Java Doc for TopComponent.java in  » IDE-Netbeans » openide » org » openide » windows » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » openide » org.openide.windows 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.JComponent
   org.openide.windows.TopComponent

All known Subclasses:   org.openide.explorer.ExplorerPanel,  org.openide.windows.CloneableTopComponent,
TopComponent
public class TopComponent extends JComponent implements Externalizable,Accessible,HelpCtx.Provider,Lookup.Provider(Code)
Embeddable visual component to be displayed in NetBeans. This is the basic unit of display--windows should not be created directly, but rather use this class. A top component may correspond to a single window, but may also be a tab (e.g.) in a window. It may be docked or undocked, have selected nodes, supply actions, etc. Important serialization note: Serialization of this TopComponent is designed in a way that it's not desired to override writeReplace method. If you would like to resolve to something, please implement readResolve() method directly on your top component.
author:
   Jaroslav Tulach, Petr Hamernik, Jan Jancura

Inner Class :public static interface Cloneable
Inner Class :public static interface Registry
Inner Class :public static class NodeName extends NodeAdapter

Field Summary
final public static  intCLOSE_EACH
     Behavior in which a top component closed (by the user) in one workspace will be removed from every workspace.
final public static  intCLOSE_LAST
     Behavior in which a top component closed (by the user) in one workspace may be left in other workspaces.
final static  LoggerLOG
    
final public static  intPERSISTENCE_ALWAYS
     Persistence type of TopComponent instance.
final public static  intPERSISTENCE_NEVER
     Persistence type of TopComponent instance.
final public static  intPERSISTENCE_ONLY_OPENED
     Persistence type of TopComponent instance.
 shortserialVersion
     identification of serialization version Used in CloneableTopComponent readObject method.
final static  longserialVersionUID
    

Constructor Summary
public  TopComponent()
     Create a top component.
public  TopComponent(Lookup lookup)
     Creates a top component for a provided lookup that will delegate take and synchronize activated nodes and ActionMap from a provided lookup.

Method Summary
final protected  voidassociateLookup(Lookup lookup)
     Associates the provided lookup with the component.
public  List<Mode>availableModes(List<Mode> modes)
     Allows top component to specify list of modes into which can be docked by end user.
public  booleancanClose()
     This method is called when this TopComponent is about to close.
public  booleancanClose(Workspace workspace, boolean last)
     This method is called when top component is about to close. Allows subclasses to decide if top component is ready for closing or not.
Default implementation always return true.
Parameters:
  workspace - the workspace on which we are about to close ornull which means that component will be closedon all workspaces where it is opened (CLOSE_EACH mode)
Parameters:
  last - true if this is last workspace where top component isopened, false otherwise.
final public  voidcancelRequestAttention()
     Cause this TopComponent's tab to stop flashing if it was flashing.
final public  booleanclose()
     Closes this TopComponent. true if top component was succesfully closed, false iftop component for some reason refused to close.
final public  booleanclose(Workspace workspace)
     Closes this TopComponent in current workspace. Node: Currently workspaces are not supported.
protected  voidcloseNotify()
     Called only when top component was closed so that now it is closed on all workspaces in the system.
protected  voidcomponentActivated()
     Called when this component is activated.
protected  voidcomponentClosed()
     Called only when top component was closed so that now it is closed on all workspaces in the system.
protected  voidcomponentDeactivated()
     Called when this component is deactivated.
protected  voidcomponentHidden()
     Called when TopComponent was hidden.
protected  voidcomponentOpened()
     Called only when top component was closed on all workspaces before and now is opened for the first time on some workspace.
protected  voidcomponentShowing()
     Called when TopComponent is about to be shown. Shown here means the component is selected or resides in it own cell in container in its Mode.
public  AccessibleContextgetAccessibleContext()
    
public  javax.swing.Action[]getActions()
     Gets the actions which will appear in the popup menu of this component.
final public  Node[]getActivatedNodes()
     Get the set of activated nodes in this component.
final public  intgetCloseOperation()
     Get the current close mode for this component.
public  StringgetDisplayName()
     Gets localized display name of this TopComponent.
public  HelpCtxgetHelpCtx()
     Get the help context for this component.
public  StringgetHtmlDisplayName()
     Gets localized display name of this TopComponent with added html tags for text coloring and/or font style.
public  ImagegetIcon()
    
public  LookupgetLookup()
     Gets lookup which represents context of this component.
public  intgetPersistenceType()
     Overwrite when you want to change default persistence type.
final public static  RegistrygetRegistry()
     Getter for class that allows obtaining of information about components.
public  SystemAction[]getSystemActions()
     Gets the system actions which will appear in the popup menu of this component.
final public  intgetTabPosition()
     Gives position index of opened TopComponent in the mode.
public  UndoRedogetUndoRedo()
     Get the undo/redo support for this component.
final public  booleanisOpened()
     Indicates whether this TopComponent is opened.
final public  booleanisOpened(Workspace workspace)
     Indicates whether this TopComponent is opened in current workspace. Node: Currently workspaces are not supported.
public  voidopen()
     Shows this TopComponent.
public  voidopen(Workspace workspace)
     Shows this TopComponent in current workspace. Node: Currently workspaces are not supported.
final public  voidopenAtTabPosition(int position)
     Opens TopComponent at given position in the mode.
protected  voidopenNotify()
     Called only when top component was closed on all workspaces before and now is opened for the first time on some workspace.
protected  StringpreferredID()
     Subclasses are encouraged to override this method to provide preferred value for unique TopComponent ID returned by org.openide.windows.WindowManager.findTopComponentID .
protected  booleanprocessKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
     Overrides superclass method, adds possible additional handling of global keystrokes in case this TopComoponent is ancestor of focused component.
public  voidreadExternal(ObjectInput in)
     Deserialize this top component.
public  voidrequestActive()
     Activates this TopComponent if it is opened.
final public  voidrequestAttention(boolean brief)
     Cause this TopComponent's tab to flash or otherwise draw attention to itself.
public  voidrequestFocus()
     Request focus for the window holding this top component. Also makes the component preferred in that window. The component will not be automatically TopComponent.open opened first if it is not already.

Subclasses should override this method to transfer focus to desired focusable component.

public  booleanrequestFocusInWindow()
     Request focus for the top component inside focused window. Also makes the component preferred in that window. The component will not be automatically TopComponent.open opened first if it is not already.

Subclasses should override this method to transfer focus to desired focusable component.

public  voidrequestVisible()
     Selects this TopComponent, if it is opened, but does not activate it unless it is in active mode already.
final public  voidsetActivatedNodes(Node[] activatedNodes)
     Set the set of activated nodes in this component.
final public  voidsetCloseOperation(int closeOperation)
     Set the close mode for the component.
public  voidsetDisplayName(String displayName)
     Sets localized display name of this TopComponent.
public  voidsetHtmlDisplayName(String htmlDisplayName)
     Sets localized html display name of this TopComponent.
public  voidsetIcon(Image icon)
     Set the icon of this top component. The icon will be used for the component's representation on the screen, e.g.
final  voidsetLookup(Lookup lookup, boolean sync)
     Associates the provided lookup with the component.
public  voidsetName(String name)
     Set the name of this top component.
public  voidsetToolTipText(String toolTip)
     Sets toolTip for this TopComponent, adds notification about the change to its WindowManager.TopComponentManager.
public  voidtoFront()
     Attempts to bring the parent Window or Frame of this TopComponent to front of other windows.
public  voidwriteExternal(ObjectOutput out)
     Serialize this top component.
protected  ObjectwriteReplace()
     Delegates instance of replacer class to be serialized instead of top component itself.

Field Detail
CLOSE_EACH
final public static int CLOSE_EACH(Code)
Behavior in which a top component closed (by the user) in one workspace will be removed from every workspace. Also, TopComponent.close is called. This is appropriate for top components such as Editor panes which the user expects to really close (and prompt to save) when closed in any



CLOSE_LAST
final public static int CLOSE_LAST(Code)
Behavior in which a top component closed (by the user) in one workspace may be left in other workspaces. Only when the last remaining manifestation in any workspace is closed will the object be deleted using TopComponent.close . Appropriate for components containing no user data, for which closing the component is only likely to result from the user's wanting to remove it from active view (on the current workspace).



LOG
final static Logger LOG(Code)
top component logger



PERSISTENCE_ALWAYS
final public static int PERSISTENCE_ALWAYS(Code)
Persistence type of TopComponent instance. TopComponent is persistent.



PERSISTENCE_NEVER
final public static int PERSISTENCE_NEVER(Code)
Persistence type of TopComponent instance. TopComponent is not persistent.



PERSISTENCE_ONLY_OPENED
final public static int PERSISTENCE_ONLY_OPENED(Code)
Persistence type of TopComponent instance. TopComponent is persistent only when it is opened in Mode.



serialVersion
short serialVersion(Code)
identification of serialization version Used in CloneableTopComponent readObject method.



serialVersionUID
final static long serialVersionUID(Code)
generated Serialized Version UID




Constructor Detail
TopComponent
public TopComponent()(Code)
Create a top component.



TopComponent
public TopComponent(Lookup lookup)(Code)
Creates a top component for a provided lookup that will delegate take and synchronize activated nodes and ActionMap from a provided lookup. The lookup will also be returned from TopComponent.getLookup method, if not overriden.
Parameters:
  lookup - the lookup to associate with
since:
   4.19




Method Detail
associateLookup
final protected void associateLookup(Lookup lookup)(Code)
Associates the provided lookup with the component. So it will be returned from TopComponent.getLookup method.
Parameters:
  lookup - the lookup to associate
exception:
  IllegalStateException - if there already is a lookup registeredwith this component
since:
   4.23



availableModes
public List<Mode> availableModes(List<Mode> modes)(Code)
Allows top component to specify list of modes into which can be docked by end user. Subclasses should override this method if they want to alter docking policy of top component.

So for example, by returning empty list, top component refuses to be docked anywhere.

Default implementation allows docking anywhere by returning input list unchanged.
Parameters:
  modes - list of Mode which represent all modes of currentworkspace, can contain nulls. Items are structured in logical groupsseparated by null entries.

Input array also contains special constant modes for dockinginto newly created frames. Their names are "SingleNewMode","MultiNewMode", "SplitNewMode", can be used for theirrecognition. Please note that names and existence of special modescan change in future releases. list of Mode which are available for dock, can contain nulls
since:
   2.14




canClose
public boolean canClose()(Code)
This method is called when this TopComponent is about to close. Allows subclasses to decide if TopComponent is ready to close.
since:
   4.13



canClose
public boolean canClose(Workspace workspace, boolean last)(Code)
This method is called when top component is about to close. Allows subclasses to decide if top component is ready for closing or not.
Default implementation always return true.
Parameters:
  workspace - the workspace on which we are about to close ornull which means that component will be closedon all workspaces where it is opened (CLOSE_EACH mode)
Parameters:
  last - true if this is last workspace where top component isopened, false otherwise. If close operation is set toCLOSE_EACH, then this param is always true true if top component is ready to close, false otherwise.TopComponent.canClose()



cancelRequestAttention
final public void cancelRequestAttention()(Code)
Cause this TopComponent's tab to stop flashing if it was flashing.
since:
   5.1



close
final public boolean close()(Code)
Closes this TopComponent. true if top component was succesfully closed, false iftop component for some reason refused to close.



close
final public boolean close(Workspace workspace)(Code)
Closes this TopComponent in current workspace. Node: Currently workspaces are not supported. The method has the same effect like TopComponent.close() . TopComponent.close()



closeNotify
protected void closeNotify()(Code)
Called only when top component was closed so that now it is closed on all workspaces in the system. The intent is to provide subclasses information about TopComponent's life cycle across workspaces. Subclasses will usually perform cleaning tasks here. TopComponent.componentClosed



componentActivated
protected void componentActivated()(Code)
Called when this component is activated. This happens when the parent window of this component gets focus (and this component is the preferred one in it), or when this component is selected in its window (and its window was already focussed). Remember to call the super method. The default implementation does nothing.



componentClosed
protected void componentClosed()(Code)
Called only when top component was closed so that now it is closed on all workspaces in the system. The intent is to provide subclasses information about TopComponent's life cycle across workspaces. Subclasses will usually perform cleaning tasks here.
since:
   2.18



componentDeactivated
protected void componentDeactivated()(Code)
Called when this component is deactivated. This happens when the parent window of this component loses focus (and this component is the preferred one in the parent), or when this component loses preference in the parent window (and the parent window is focussed). Remember to call the super method. The default implementation does nothing.



componentHidden
protected void componentHidden()(Code)
Called when TopComponent was hidden. Nore:

Note: Beside typical situations when component is hidden, it is considered to be hidden even in that case the component is in Mode container hierarchy, the cointainer is visible, not minimized, but the component is neither selected nor in its own cell, i.e. it has it's own tab, but is not the selected one.
since:
   2.18




componentOpened
protected void componentOpened()(Code)
Called only when top component was closed on all workspaces before and now is opened for the first time on some workspace. The intent is to provide subclasses information about TopComponent's life cycle across all existing workspaces. Subclasses will usually perform initializing tasks here.
since:
   2.18



componentShowing
protected void componentShowing()(Code)
Called when TopComponent is about to be shown. Shown here means the component is selected or resides in it own cell in container in its Mode. The container is visible and not minimized.

Note: component is considered to be shown, even its container window is overlapped by another window.


since:
   2.18



getAccessibleContext
public AccessibleContext getAccessibleContext()(Code)



getActions
public javax.swing.Action[] getActions()(Code)
Gets the actions which will appear in the popup menu of this component.

Subclasses are encouraged to override this method to specify their own sets of actions.

Remember to call the super method when overriding and add your actions to the superclass' ones (in some order), because the default implementation provides support for standard component actions like save, close, and clone. array of actions for this component
since:
   3.32




getActivatedNodes
final public Node[] getActivatedNodes()(Code)
Get the set of activated nodes in this component. the activated nodes for this component or null, nullmeans such component does not change Registry.getActivatedNodes justRegistry.getCurrentNodes when this component gets activated



getCloseOperation
final public int getCloseOperation()(Code)
Get the current close mode for this component. one of TopComponent.CLOSE_EACH or TopComponent.CLOSE_LAST



getDisplayName
public String getDisplayName()(Code)
Gets localized display name of this TopComponent. localized display name or null if there is none
since:
   4.13



getHelpCtx
public HelpCtx getHelpCtx()(Code)
Get the help context for this component. Subclasses should generally override this to return specific help. the help context



getHtmlDisplayName
public String getHtmlDisplayName()(Code)
Gets localized display name of this TopComponent with added html tags for text coloring and/or font style. May return null. Must apparently begin with <html>. localized html display name or null if there is none
since:
   6.4



getIcon
public Image getIcon()(Code)
The icon of the top component



getLookup
public Lookup getLookup()(Code)
Gets lookup which represents context of this component. By default the lookup delegates to result of getActivatedNodes method and result of this component ActionMap delegate. If you override the method in your subclass, the default activatedNodes<->lookup synchronization will not be performed. That can influence functionality that relies on activated Nodes being present in the TopComponent's lookup. If you want to preserve the synchronization, use associateLookup instead. a lookup with designates context of this component
See Also:   org.openide.util.ContextAwareAction
See Also:   org.openide.util.Utilities.actionsToPopup(Action[]Lookup)
since:
   3.29



getPersistenceType
public int getPersistenceType()(Code)
Overwrite when you want to change default persistence type. Default persistence type is PERSISTENCE_ALWAYS. Return value should be constant over a given TC's lifetime. one of P_X constants
since:
   4.20



getRegistry
final public static Registry getRegistry()(Code)
Getter for class that allows obtaining of information about components. It allows to find out which component is selected, which nodes are currently or has been activated and list of all components. the registry of components



getSystemActions
public SystemAction[] getSystemActions()(Code)
Gets the system actions which will appear in the popup menu of this component. array of system actions for this componentTopComponent.getActions()



getTabPosition
final public int getTabPosition()(Code)
Gives position index of opened TopComponent in the mode. For closed TopComponents, position value less then zero is returned. Index of position.
since:
   6.15



getUndoRedo
public UndoRedo getUndoRedo()(Code)
Get the undo/redo support for this component. The default implementation returns a dummy support that cannot undo anything. undoable edit for this component



isOpened
final public boolean isOpened()(Code)
Indicates whether this TopComponent is opened. true if given top component is opened, false otherwise



isOpened
final public boolean isOpened(Workspace workspace)(Code)
Indicates whether this TopComponent is opened in current workspace. Node: Currently workspaces are not supported. The method has the same effect like TopComponent.isOpened() . TopComponent.isOpened()



open
public void open()(Code)
Shows this TopComponent. Note: This method only makes it visible, but does not activates it.
See Also:   TopComponent.requestActive
See Also:   



open
public void open(Workspace workspace)(Code)
Shows this TopComponent in current workspace. Node: Currently workspaces are not supported. The method has the same effect like TopComponent.open() . TopComponent.open()



openAtTabPosition
final public void openAtTabPosition(int position)(Code)
Opens TopComponent at given position in the mode. TopComponent is inserted at given position, positions of already opened TopComponents in the same mode are incremented.
  • Does no operation if this TopComponent is already opened.
  • For position value less then 0, TopComponent is opened at position 0, the very first one.
  • For position value greater then count of opened TopComponents in the mode, TopComponent is opened at last position

Parameters:
  position - Index of the requested position.
since:
   6.15



openNotify
protected void openNotify()(Code)
Called only when top component was closed on all workspaces before and now is opened for the first time on some workspace. The intent is to provide subclasses information about TopComponent's life cycle across all existing workspaces. Subclasses will usually perform initializing tasks here. TopComponent.componentOpened



preferredID
protected String preferredID()(Code)
Subclasses are encouraged to override this method to provide preferred value for unique TopComponent ID returned by org.openide.windows.WindowManager.findTopComponentID . Returned value should be a String, preferably describing semantics of TopComponent subclass, such as "PieChartViewer" or "HtmlEditor" etc. Value is then used by window system as prefix value for creating unique TopComponent ID. Returned String value should be preferably unique, but need not be.
since:
   4.13



processKeyBinding
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)(Code)
Overrides superclass method, adds possible additional handling of global keystrokes in case this TopComoponent is ancestor of focused component.



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Deserialize this top component. Subclasses wishing to store state must call the super method, then read from the stream.
Parameters:
  in - the stream to deserialize from



requestActive
public void requestActive()(Code)
Activates this TopComponent if it is opened.
since:
   4.13



requestAttention
final public void requestAttention(boolean brief)(Code)
Cause this TopComponent's tab to flash or otherwise draw attention to itself. This method is thread-safe.

It will remain flashing until either cancelRequestAttention is called, the component becomes selected or its activated state changes, unless the brief argument is true, in which case it will stop after a few second.
Parameters:
  brief - True if the tab should blink a few times and stop
since:
   5.1




requestFocus
public void requestFocus()(Code)
Request focus for the window holding this top component. Also makes the component preferred in that window. The component will not be automatically TopComponent.open opened first if it is not already.

Subclasses should override this method to transfer focus to desired focusable component. TopComponent itself is not focusable. See for example org.openide.text.CloneableEditor.requestFocus . TopComponent.requestActive




requestFocusInWindow
public boolean requestFocusInWindow()(Code)
Request focus for the top component inside focused window. Also makes the component preferred in that window. The component will not be automatically TopComponent.open opened first if it is not already.

Subclasses should override this method to transfer focus to desired focusable component. TopComponent itself is not focusable. See for example org.openide.text.CloneableEditor.requestFocusInWindow . TopComponent.requestActive




requestVisible
public void requestVisible()(Code)
Selects this TopComponent, if it is opened, but does not activate it unless it is in active mode already.



setActivatedNodes
final public void setActivatedNodes(Node[] activatedNodes)(Code)
Set the set of activated nodes in this component.
Parameters:
  activatedNodes - activated nodes for this component



setCloseOperation
final public void setCloseOperation(int closeOperation)(Code)
Set the close mode for the component.
Parameters:
  closeOperation - one of TopComponent.CLOSE_EACH or TopComponent.CLOSE_LAST
throws:
  IllegalArgumentException - if an unrecognized close mode was supplied
See Also:   TopComponent.close()



setDisplayName
public void setDisplayName(String displayName)(Code)
Sets localized display name of this TopComponent.
Parameters:
  displayName - localized display name which is set
since:
   4.13



setHtmlDisplayName
public void setHtmlDisplayName(String htmlDisplayName)(Code)
Sets localized html display name of this TopComponent. Hmtl name usually contains basic html tags for text coloring and style. Html name may be null if not needed. Must apparently begin with <html>.
Parameters:
  htmlDisplayName - localized html display name which is set
since:
   6.4



setIcon
public void setIcon(Image icon)(Code)
Set the icon of this top component. The icon will be used for the component's representation on the screen, e.g. in a multiwindow's tab. The default implementation just notifies the window manager.
Parameters:
  icon - New components' icon.



setLookup
final void setLookup(Lookup lookup, boolean sync)(Code)
Associates the provided lookup with the component. So it will be returned from TopComponent.getLookup method.
Parameters:
  lookup - the lookup to associate
Parameters:
  sync - synchronize return value of TopComponent.getActivatedNodes with thecontent of lookup?
exception:
  IllegalStateException - if there already is a lookup registeredwith this component



setName
public void setName(String name)(Code)
Set the name of this top component. The default implementation just notifies the window manager.
Parameters:
  name - the new display name



setToolTipText
public void setToolTipText(String toolTip)(Code)
Sets toolTip for this TopComponent, adds notification about the change to its WindowManager.TopComponentManager.



toFront
public void toFront()(Code)
Attempts to bring the parent Window or Frame of this TopComponent to front of other windows.
since:
   5.8



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
Serialize this top component. Subclasses wishing to store state must call the super method, then write to the stream.
Parameters:
  out - the stream to serialize to



writeReplace
protected Object writeReplace() throws ObjectStreamException(Code)
Delegates instance of replacer class to be serialized instead of top component itself. Replacer class calls writeExternal and constructor, readExternal and readResolve methods properly, so 8 any top component can behave like any other externalizable object. Subclasses can override this method to perform their serialization differentrly



Fields inherited from javax.swing.JComponent
final public static String TOOL_TIP_TEXT_KEY(Code)(Java Doc)
final public static int UNDEFINED_CONDITION(Code)(Java Doc)
final public static int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT(Code)(Java Doc)
final public static int WHEN_FOCUSED(Code)(Java Doc)
final public static int WHEN_IN_FOCUSED_WINDOW(Code)(Java Doc)
protected AccessibleContext accessibleContext(Code)(Java Doc)
protected EventListenerList listenerList(Code)(Java Doc)
protected transient ComponentUI ui(Code)(Java Doc)

Methods inherited from javax.swing.JComponent
public void addAncestorListener(AncestorListener listener)(Code)(Java Doc)
public void addNotify()(Code)(Java Doc)
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)(Code)(Java Doc)
public void computeVisibleRect(Rectangle visibleRect)(Code)(Java Doc)
public boolean contains(int x, int y)(Code)(Java Doc)
public JToolTip createToolTip()(Code)(Java Doc)
public void disable()(Code)(Java Doc)
public void enable()(Code)(Java Doc)
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)(Code)(Java Doc)
public void firePropertyChange(String propertyName, int oldValue, int newValue)(Code)(Java Doc)
public void firePropertyChange(String propertyName, char oldValue, char newValue)(Code)(Java Doc)
protected void fireVetoableChange(String propertyName, Object oldValue, Object newValue) throws java.beans.PropertyVetoException(Code)(Java Doc)
public AccessibleContext getAccessibleContext()(Code)(Java Doc)
public ActionListener getActionForKeyStroke(KeyStroke aKeyStroke)(Code)(Java Doc)
final public ActionMap getActionMap()(Code)(Java Doc)
public float getAlignmentX()(Code)(Java Doc)
public float getAlignmentY()(Code)(Java Doc)
public AncestorListener[] getAncestorListeners()(Code)(Java Doc)
public boolean getAutoscrolls()(Code)(Java Doc)
public int getBaseline(int width, int height)(Code)(Java Doc)
public BaselineResizeBehavior getBaselineResizeBehavior()(Code)(Java Doc)
public Border getBorder()(Code)(Java Doc)
public Rectangle getBounds(Rectangle rv)(Code)(Java Doc)
final public Object getClientProperty(Object key)(Code)(Java Doc)
protected Graphics getComponentGraphics(Graphics g)(Code)(Java Doc)
public JPopupMenu getComponentPopupMenu()(Code)(Java Doc)
public int getConditionForKeyStroke(KeyStroke aKeyStroke)(Code)(Java Doc)
public int getDebugGraphicsOptions()(Code)(Java Doc)
public static Locale getDefaultLocale()(Code)(Java Doc)
public FontMetrics getFontMetrics(Font font)(Code)(Java Doc)
public Graphics getGraphics()(Code)(Java Doc)
public int getHeight()(Code)(Java Doc)
public boolean getInheritsPopupMenu()(Code)(Java Doc)
final public InputMap getInputMap(int condition)(Code)(Java Doc)
final public InputMap getInputMap()(Code)(Java Doc)
public InputVerifier getInputVerifier()(Code)(Java Doc)
public Insets getInsets()(Code)(Java Doc)
public Insets getInsets(Insets insets)(Code)(Java Doc)
public T[] getListeners(Class<T> listenerType)(Code)(Java Doc)
public Point getLocation(Point rv)(Code)(Java Doc)
public Dimension getMaximumSize()(Code)(Java Doc)
public Dimension getMinimumSize()(Code)(Java Doc)
public Component getNextFocusableComponent()(Code)(Java Doc)
public Point getPopupLocation(MouseEvent event)(Code)(Java Doc)
public Dimension getPreferredSize()(Code)(Java Doc)
public KeyStroke[] getRegisteredKeyStrokes()(Code)(Java Doc)
public JRootPane getRootPane()(Code)(Java Doc)
public Dimension getSize(Dimension rv)(Code)(Java Doc)
public Point getToolTipLocation(MouseEvent event)(Code)(Java Doc)
public String getToolTipText()(Code)(Java Doc)
public String getToolTipText(MouseEvent event)(Code)(Java Doc)
public Container getTopLevelAncestor()(Code)(Java Doc)
public TransferHandler getTransferHandler()(Code)(Java Doc)
public String getUIClassID()(Code)(Java Doc)
public boolean getVerifyInputWhenFocusTarget()(Code)(Java Doc)
public synchronized VetoableChangeListener[] getVetoableChangeListeners()(Code)(Java Doc)
public Rectangle getVisibleRect()(Code)(Java Doc)
public int getWidth()(Code)(Java Doc)
public int getX()(Code)(Java Doc)
public int getY()(Code)(Java Doc)
public void grabFocus()(Code)(Java Doc)
public boolean isDoubleBuffered()(Code)(Java Doc)
public static boolean isLightweightComponent(Component c)(Code)(Java Doc)
public boolean isManagingFocus()(Code)(Java Doc)
public boolean isOpaque()(Code)(Java Doc)
public boolean isOptimizedDrawingEnabled()(Code)(Java Doc)
final public boolean isPaintingForPrint()(Code)(Java Doc)
public boolean isPaintingTile()(Code)(Java Doc)
public boolean isRequestFocusEnabled()(Code)(Java Doc)
public boolean isValidateRoot()(Code)(Java Doc)
public void paint(Graphics g)(Code)(Java Doc)
protected void paintBorder(Graphics g)(Code)(Java Doc)
protected void paintChildren(Graphics g)(Code)(Java Doc)
protected void paintComponent(Graphics g)(Code)(Java Doc)
public void paintImmediately(int x, int y, int w, int h)(Code)(Java Doc)
public void paintImmediately(Rectangle r)(Code)(Java Doc)
protected String paramString()(Code)(Java Doc)
public void print(Graphics g)(Code)(Java Doc)
public void printAll(Graphics g)(Code)(Java Doc)
protected void printBorder(Graphics g)(Code)(Java Doc)
protected void printChildren(Graphics g)(Code)(Java Doc)
protected void printComponent(Graphics g)(Code)(Java Doc)
protected void processComponentKeyEvent(KeyEvent e)(Code)(Java Doc)
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)(Code)(Java Doc)
protected void processKeyEvent(KeyEvent e)(Code)(Java Doc)
protected void processMouseEvent(MouseEvent e)(Code)(Java Doc)
protected void processMouseMotionEvent(MouseEvent e)(Code)(Java Doc)
final public void putClientProperty(Object key, Object value)(Code)(Java Doc)
public void registerKeyboardAction(ActionListener anAction, String aCommand, KeyStroke aKeyStroke, int aCondition)(Code)(Java Doc)
public void registerKeyboardAction(ActionListener anAction, KeyStroke aKeyStroke, int aCondition)(Code)(Java Doc)
public void removeAncestorListener(AncestorListener listener)(Code)(Java Doc)
public void removeNotify()(Code)(Java Doc)
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)(Code)(Java Doc)
public void repaint(long tm, int x, int y, int width, int height)(Code)(Java Doc)
public void repaint(Rectangle r)(Code)(Java Doc)
public boolean requestDefaultFocus()(Code)(Java Doc)
public void requestFocus()(Code)(Java Doc)
public boolean requestFocus(boolean temporary)(Code)(Java Doc)
public boolean requestFocusInWindow()(Code)(Java Doc)
protected boolean requestFocusInWindow(boolean temporary)(Code)(Java Doc)
public void resetKeyboardActions()(Code)(Java Doc)
public void reshape(int x, int y, int w, int h)(Code)(Java Doc)
public void revalidate()(Code)(Java Doc)
public void scrollRectToVisible(Rectangle aRect)(Code)(Java Doc)
final public void setActionMap(ActionMap am)(Code)(Java Doc)
public void setAlignmentX(float alignmentX)(Code)(Java Doc)
public void setAlignmentY(float alignmentY)(Code)(Java Doc)
public void setAutoscrolls(boolean autoscrolls)(Code)(Java Doc)
public void setBackground(Color bg)(Code)(Java Doc)
public void setBorder(Border border)(Code)(Java Doc)
public void setComponentPopupMenu(JPopupMenu popup)(Code)(Java Doc)
public void setDebugGraphicsOptions(int debugOptions)(Code)(Java Doc)
public static void setDefaultLocale(Locale l)(Code)(Java Doc)
public void setDoubleBuffered(boolean aFlag)(Code)(Java Doc)
public void setEnabled(boolean enabled)(Code)(Java Doc)
public void setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)(Code)(Java Doc)
public void setFont(Font font)(Code)(Java Doc)
public void setForeground(Color fg)(Code)(Java Doc)
public void setInheritsPopupMenu(boolean value)(Code)(Java Doc)
final public void setInputMap(int condition, InputMap map)(Code)(Java Doc)
public void setInputVerifier(InputVerifier inputVerifier)(Code)(Java Doc)
public void setMaximumSize(Dimension maximumSize)(Code)(Java Doc)
public void setMinimumSize(Dimension minimumSize)(Code)(Java Doc)
public void setNextFocusableComponent(Component aComponent)(Code)(Java Doc)
public void setOpaque(boolean isOpaque)(Code)(Java Doc)
public void setPreferredSize(Dimension preferredSize)(Code)(Java Doc)
public void setRequestFocusEnabled(boolean requestFocusEnabled)(Code)(Java Doc)
public void setToolTipText(String text)(Code)(Java Doc)
public void setTransferHandler(TransferHandler newHandler)(Code)(Java Doc)
protected void setUI(ComponentUI newUI)(Code)(Java Doc)
public void setVerifyInputWhenFocusTarget(boolean verifyInputWhenFocusTarget)(Code)(Java Doc)
public void setVisible(boolean aFlag)(Code)(Java Doc)
public void unregisterKeyboardAction(KeyStroke aKeyStroke)(Code)(Java Doc)
public void update(Graphics g)(Code)(Java Doc)
public void updateUI()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.