Public Member Functions | |
TopComponent () | |
final Node[] | getActivatedNodes () |
final void | setActivatedNodes (Node[] nodes) |
UndoRedo | getUndoRedo () |
void | open () |
void | open (Workspace workspace) |
final boolean | isOpened () |
final boolean | isOpened (Workspace workspace) |
void | addNotify () |
final boolean | close () |
final boolean | close (Workspace workspace) |
boolean | canClose (Workspace workspace, boolean last) |
SystemAction[] | getSystemActions () |
javax.swing.Action[] | getActions () |
final void | setCloseOperation (final int closeOperation) |
final int | getCloseOperation () |
void | requestFocus () |
void | requestVisible () |
void | setName (final String name) |
void | setToolTipText (String toolTip) |
void | setIcon (final Image icon) |
Image | getIcon () |
HelpCtx | getHelpCtx () |
List | availableModes (List modes) |
void | writeExternal (ObjectOutput out) throws IOException |
void | readExternal (ObjectInput in) throws IOException, ClassNotFoundException |
AccessibleContext | getAccessibleContext () |
Lookup | getLookup () |
Static Public Member Functions | |
final Registry | getRegistry () |
Static Public Attributes | |
final int | CLOSE_EACH = 0 |
final int | CLOSE_LAST = 1 |
Protected Member Functions | |
void | openNotify () |
void | closeNotify () |
void | componentOpened () |
void | componentClosed () |
void | componentShowing () |
void | componentHidden () |
void | componentActivated () |
void | componentDeactivated () |
Object | writeReplace () throws ObjectStreamException |
Package Functions | |
final WindowManager.Component | getManager () |
Package Attributes | |
short | serialVersion = 1 |
Static Package Attributes | |
final long | serialVersionUID = -3022538025284122942L |
Private Attributes | |
java.lang.ref.Reference | defaultLookupRef = new WeakReference(null) |
NodeName | nodeName |
final WindowManager.Component | manager |
int | closeOperation = CLOSE_LAST |
Static Private Attributes | |
final Log | log = LogFactory.getLog(TopComponent.class) |
SystemAction[] | DEFAULT_ACTIONS |
Object | defaultLookupLock = new Object () |
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.
|
Create a top component. |
|
|
|
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.
|
|
This method is called when top component is about to close. Allows subclasses to decide if top component is ready for closing or not.
|
|
Closes the top component on given workspace, if closeOperation is set to CLOSE_LAST. If it is set to CLOSE_EACH, given parameter will be ignored and component will be closed on all workspaces at once.
|
|
Closes the top component on current workspace. First asks canClose() method to see if it is possible to close now. If canClose() returns false, component will not be closed. Semantics of this method depends on top component's closeOperation state. If closeOperation is set to CLOSE_LAST (default), top component will be closed only on current workspace. If it is set to CLOSE_EACH, if will be closed on all workspaces at once.
|
|
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.
|
|
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. |
|
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.
|
|
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. |
|
Called when
Note: Beside typical situations when component is hidden, it is considered to be hidden even in that case the component is in
|
|
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.
|
|
Called when Note: component is considered to be shown, even its container window is overlapped by another window.
|
|
|
|
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.
|
|
Get the set of activated nodes in this component.
|
|
Get the current close mode for this component.
|
|
Get the help context for this component. Subclasses should generally override this to return specific help.
|
|
|
|
Gets lookup which represents context of this component. By default the lookup delegates to result of
|
|
Getter for manager for this component. This manager allows to control where is the component shown can be used to destroy and show the component, etc. |
|
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.
|
|
Gets the system actions which will appear in the popup menu of this component.
|
|
Get the undo/redo support for this component. The default implementation returns a dummy support that cannot undo anything.
|
|
Finds out whether this top component is opened or not on specified workspace.
|
|
Finds out if this top component is opened at least on one workspace.
|
|
Show the component on given workspace. If given workspace is not active, component will be shown only after given workspace will become visible. Note that this method only makes it visible, but does not give it focus.
|
|
Show the component on current workspace. Note that this method only makes it visible, but does not give it focus. Implemented via call to open(null).
|
|
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.
|
|
Deserialize this top component. Subclasses wishing to store state must call the super method, then read from the stream.
|
|
Request focus for the window holding this top component. Also makes the component preferred in that window. The component will not be automatically opened first if it is not already.
Subclasses should override this method to transfer focus to desired focusable component. |
|
Set this component visible but not selected or focused if possible. If focus is in other container (multitab) or other pane (split) in the same container it makes this component only visible eg. it selects tab with this component. If focus is in the same container (multitab) or in the same pane (split) it has the same effect as requestFocus(). |
|
Set the set of activated nodes in this component.
|
|
Set the close mode for the component.
|
|
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.
|
|
Set the name of this top component. The default implementation just notifies the window manager.
|
|
Sets toolTip for this |
|
Serialize this top component. Subclasses wishing to store state must call the super method, then write to the stream.
|
|
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 |
|
Behavior in which a top component closed (by the user) in one workspace will be removed from every workspace. Also, 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 workspace. |
|
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 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). |
|
constant for desired close operation |
|
a set of actions of this component |
|
a lock for operations in default impl of getLookup |
|
reference to Lookup with default implementation for the component |
|
|
|
manager for the component |
|
Listener to the data object's node or null |
|
identification of serialization version Used in CloneableTopComponent readObject method. |
|
generated Serialized Version UID |