Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.windows 6.5.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openide.windows
Class WindowManager

    java.lang.Object
      org.openide.windows.WindowManager

All Implemented Interfaces:
  Serializable

    public abstract class WindowManager

extends Object
implements Serializable

Manages window system. Allows the work with window system components, i.e. `Mode`s, `TopComponentGroup`s and provides handling of operations provided over `TopComponent`s.

Important note: Do not provide implementation of this abstract class unless you are window system provider!

See Also:
  Serialized Form

Nested Class Summary
`protected static interface` | `WindowManager.Component` Deprecated. Do not use anymore. This interface is replaced by bunch of protedcted methods which name starts with topComponent prefix, i.e. `topComponentOpen(org.openide.windows.TopComponent)`, `topComponentClose(org.openide.windows.TopComponent)` etc.

Field Summary
`static String` | `PROP_CURRENT_WORKSPACE` Deprecated. Do not use. Workspaces are not supported anymore.
`static String` | `PROP_MODES` Name of property for modes in the workspace.
`static String` | `PROP_WORKSPACES` Deprecated. Do not use. Workspaces are not supported anymore.

Constructor Summary
`WindowManager()`

Method Summary
`protected void` | `activateComponent(TopComponent tc)` Activate a component.
`abstract void` | `addPropertyChangeListener(PropertyChangeListener l)` Attaches a listener for changes in workspaces.
`protected void` | `componentCloseNotify(TopComponent tc)` Notifies component that it was closed (and is not opened on any workspace anymore).
`protected void` | `componentHidden(TopComponent tc)` Notifies `TopComponent` it was hidden.
`protected void` | `componentOpenNotify(TopComponent tc)` Notifies component that it was opened (and wasn't opened on any workspace before).
`protected TopComponent.Registry` | `componentRegistry()` Access method for registry of all components in the system.
`protected void` | `componentShowing(TopComponent tc)` Notifies `TopComponent` it is about to be shown.
`protected abstract WindowManager.Component` | `createTopComponentManager(TopComponent c)` Create a component manager for the given top component.
`Workspace` | `createWorkspace(String name)` Deprecated. Do not use. Workspaces are not supported anymore.
`abstract Workspace` | `createWorkspace(String name, String displayName)` Deprecated. Do not use. Workspaces are not supported anymore.
`protected static WindowManager.Component` | `findComponentManager(TopComponent tc)` Deprecated. Do not use anymore. See `WindowManager.Component` deprecation.
`abstract Mode` | `findMode(String name)` Finds mode where specified name.
`abstract Mode` | `findMode(TopComponent tc)` Finds mode which contains specified `TopComponent`.
`abstract TopComponent` | `findTopComponent(String tcID)` Returns `TopComponent` for given unique ID.
`abstract TopComponentGroup` | `findTopComponentGroup(String name)` Finds `TopComponentGroup` of given name.
`String` | `findTopComponentID(TopComponent tc)` Returns unique ID for specified `TopComponent`.
`abstract Workspace` | `findWorkspace(String name)` Deprecated. Do not use. Workspaces are not supported anymore.
`abstract Workspace` | `getCurrentWorkspace()` Deprecated. Do not use. Workspaces are not supported anymore.
`static WindowManager` | `getDefault()` Singleton instance accessor method for window manager.
`abstract Frame` | `getMainWindow()` Get the Main Window of the IDE.
`abstract Set` | `getModes()` Gets set of all `Mode`S added into window system.
`TopComponent.Registry` | `getRegistry()` Getter for component registry.
`abstract Workspace[]` | `getWorkspaces()` Deprecated. Do not use. Workspaces are not supported anymore.
`abstract void` | `removePropertyChangeListener(PropertyChangeListener l)` Removes a listener for changes in workspaces.
`abstract void` | `setWorkspaces(Workspace[] workspaces)` Deprecated. Do not use. Workspaces are not supported anymore.
`protected abstract void` | `topComponentActivatedNodesChanged(TopComponent tc, Node[] activatedNodes)` Informs about change of activated nodes of specified `TopComponent`.
`protected void` | `topComponentCancelRequestAttention(TopComponent tc)` Stop this TopComponent's tab from flashing if it is flashing.
`protected abstract void` | `topComponentClose(TopComponent tc)` Provides closing of specified `TopComponent`.
`protected abstract Action[]` | `topComponentDefaultActions(TopComponent tc)` Gets default list of actions which appear in popup menu of TopComponent.
`protected abstract void` | `topComponentDisplayNameChanged(TopComponent tc, String displayName)` Informs about change of display name of specified `TopComponent`.
`protected abstract void` | `topComponentHtmlDisplayNameChanged(TopComponent tc, String htmlDisplayName)` Informs about change of html display name of specified `TopComponent`.
`protected abstract void` | `topComponentIconChanged(TopComponent tc, Image icon)` Informs about chagne of icon of specified `TopComponent`.
`protected abstract String` | `topComponentID(TopComponent tc, String preferredID)` Returns unique ID for specified `TopComponent`.
`protected abstract boolean` | `topComponentIsOpened(TopComponent tc)` Indicates whether specified `TopComponent` is opened.
`protected abstract void` | `topComponentOpen(TopComponent tc)` Provides opening of specified `TopComponent`.
`protected abstract void` | `topComponentRequestActive(TopComponent tc)` Provides activation of specified `TopComponent`.
`protected void` | `topComponentRequestAttention(TopComponent tc)` Cause this TopComponent's tab to flash or otherwise draw the users' attention to it.
`protected abstract void` | `topComponentRequestVisible(TopComponent tc)` Provides selection of specfied `TopComponent`.
`protected void` | `topComponentToFront(TopComponent tc)` Attempts to bring the parent `Window` of the given `TopComponent` to front of other windows.
`protected abstract void` | `topComponentToolTipChanged(TopComponent tc, String toolTip)` Informs about change of tooltip of specified `TopComponent`.
`abstract void` | `updateUI()` Called after a Look&Feel change to update the IDE's UI.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROP_WORKSPACES

    public static final String PROP_WORKSPACES

  Deprecated. Do not use. Workspaces are not supported anymore.
  property change of workspaces.

  See Also:
    Constant Field Values

### PROP_CURRENT_WORKSPACE

    public static final String PROP_CURRENT_WORKSPACE

  Deprecated. Do not use. Workspaces are not supported anymore.
  property change of current workspace.

  See Also:
    Constant Field Values

### PROP_MODES

    public static final String PROP_MODES

  Name of property for modes in the workspace.

  Since:
    4.13
  See Also:
    Constant Field Values

Constructor Detail

### WindowManager

    public WindowManager()

Method Detail

### getDefault

    public static final WindowManager getDefault()

  Singleton instance accessor method for window manager. Provides entry point for further work with window system API of the system.

  Returns:
    instance of window manager installed in the system
  Since:
    2.10

### findMode

    public abstract Mode findMode(String name)

  Finds mode where specified name.

  Returns:
    `Mode` whith the specified name is or `null` if there does not exist such `Mode` inside window system.
  Since:
    4.13

### findMode

    public abstract Mode findMode(TopComponent tc)

  Finds mode which contains specified `TopComponent`.

  Returns:
    `Mode` which contains specified `TopComponent` or `null` if the `TopComponent` is not added into any `Mode` inside window system.
  Since:
    4.13

### getModes

    public abstract Set getModes()

  Gets set of all `Mode`S added into window system.

  Since:
    4.13

### getMainWindow

    public abstract Frame getMainWindow()

  Get the Main Window of the IDE. This should ONLY be used for:
  - using the Main Window as the parent for dialogs
  - using the Main Window's position for preplacement of windows

  Returns:
    the Main Window of the IDE

### updateUI

    public abstract void updateUI()

  Called after a Look&Feel change to update the IDE's UI. Should call `JComponent.updateUI()` on all opened windows.

### createTopComponentManager

    protected abstract WindowManager.Component createTopComponentManager(TopComponent c)

  Create a component manager for the given top component.

  Parameters:
    `c` - the component
  Returns:
    the manager to handle opening, closing and selecting the component

### componentRegistry

    protected TopComponent.Registry componentRegistry()

  Access method for registry of all components in the system.

  Returns:
    the registry

### getRegistry

    public TopComponent.Registry getRegistry()

  Getter for component registry.

  Returns:
    the registry

### createWorkspace

    public final Workspace createWorkspace(String name)

  Deprecated. Do not use. Workspaces are not supported anymore.

  Creates new workspace.

  Parameters:
    `name` - the name of the workspace
  Returns:
    new workspace

### createWorkspace

    public abstract Workspace createWorkspace(String name,
                                              String displayName)

  Deprecated. Do not use. Workspaces are not supported anymore.

  Creates new workspace with I18N support. Note that it will not be displayed until `setWorkspaces(org.openide.windows.Workspace[])` is called with an array containing the new workspace.

  Parameters:
    `name` - the code name (used for internal purposes)
    `displayName` - the display name
  Returns:
    the new workspace

### findWorkspace

    public abstract Workspace findWorkspace(String name)

  Deprecated. Do not use. Workspaces are not supported anymore.

  Finds workspace given its name.

  Parameters:
    `name` - the (code) name of workspace to find
  Returns:
    workspace or null if not found

### getWorkspaces

    public abstract Workspace[] getWorkspaces()

  Deprecated. Do not use. Workspaces are not supported anymore.

  Gets a list of all workspaces.

  Returns:
    an array of all known workspaces

### setWorkspaces

    public abstract void setWorkspaces(Workspace[] workspaces)

  Deprecated. Do not use. Workspaces are not supported anymore.

  Sets new array of workspaces. In conjunction with `getWorkspaces()`, this may be used to reorder workspaces, or add or remove workspaces.

  Parameters:
    `workspaces` - An array consisting of new workspaces.

### getCurrentWorkspace

    public abstract Workspace getCurrentWorkspace()

  Deprecated. Do not use. Workspaces are not supported anymore.

  Gets the current workspace.

  Returns:
    the currently active workspace
  See Also:
    `Workspace.activate()`

### findTopComponentGroup

    public abstract TopComponentGroup findTopComponentGroup(String name)

  Finds `TopComponentGroup` of given name.

  Returns:
    instance of TopComponetnGroup or null
  Since:
    4.13

### addPropertyChangeListener

    public abstract void addPropertyChangeListener(PropertyChangeListener l)

  Attaches a listener for changes in workspaces.

  Parameters:
    `l` - the new listener

### removePropertyChangeListener

    public abstract void removePropertyChangeListener(PropertyChangeListener l)

  Removes a listener for changes in workspaces.

  Parameters:
    `l` - the listener to remove

### findComponentManager

    protected static final WindowManager.Component findComponentManager(TopComponent tc)

  Deprecated. Do not use anymore. See `WindowManager.Component` deprecation.

  Finds top component manager for given top component.

  Parameters:
    `tc` - top component to find manager for.
  Returns:
    component manager for given top component.

### activateComponent

    protected void activateComponent(TopComponent tc)

  Activate a component. The top component containers should inform the top component that it is active via a call to this method through derived window manager implementation.

  Parameters:
    `tc` - the top component to activate; or `null` to deactivate all top components

### componentOpenNotify

    protected void componentOpenNotify(TopComponent tc)

  Notifies component that it was opened (and wasn't opened on any workspace before). Top component manager that implements Component inner interface of this class should send open notifications via calling this method

  Parameters:
    `tc` - the top component to be notified

### componentCloseNotify

    protected void componentCloseNotify(TopComponent tc)

  Notifies component that it was closed (and is not opened on any workspace anymore). Top component manager that implements Component inner interface of this class should send close notifications via calling this method

  Parameters:
    `tc` - the top component to be notified

### componentShowing

    protected void componentShowing(TopComponent tc)

  Notifies `TopComponent` it is about to be shown.

  Parameters:
    `tc` - `TopComponent` to be notified
  Since:
    2.18
  See Also:
    `TopComponent.componentShowing()`

### componentHidden

    protected void componentHidden(TopComponent tc)

  Notifies `TopComponent` it was hidden.

  Parameters:
    `tc` - `TopComponent` to be notified
  Since:
    2.18
  See Also:
    `TopComponent.componentHidden()`

### topComponentOpen

    protected abstract void topComponentOpen(TopComponent tc)

  Provides opening of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` to open
  Since:
    4.13

### topComponentClose

    protected abstract void topComponentClose(TopComponent tc)

  Provides closing of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` to close
  Since:
    4.13

### topComponentRequestActive

    protected abstract void topComponentRequestActive(TopComponent tc)

  Provides activation of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` to activate
  Since:
    4.13

### topComponentRequestVisible

    protected abstract void topComponentRequestVisible(TopComponent tc)

  Provides selection of specfied `TopComponent`.

  Parameters:
    `tc` - `TopComponent` to set visible (select)
  Since:
    4.13

### topComponentDisplayNameChanged

    protected abstract void topComponentDisplayNameChanged(TopComponent tc,
                                                           String displayName)

  Informs about change of display name of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` which display name has changed
    `displayName` - newly changed display name value
  Since:
    4.13

### topComponentHtmlDisplayNameChanged

    protected abstract void topComponentHtmlDisplayNameChanged(TopComponent tc,
                                                               String htmlDisplayName)

  Informs about change of html display name of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` which display name has changed
    `displayName` - newly changed html display name value
  Since:
    6.4

### topComponentToolTipChanged

    protected abstract void topComponentToolTipChanged(TopComponent tc,
                                                       String toolTip)

  Informs about change of tooltip of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` which tooltip has changed
    `toolTip` - newly changed tooltip value
  Since:
    4.13

### topComponentIconChanged

    protected abstract void topComponentIconChanged(TopComponent tc,
                                                    Image icon)

  Informs about chagne of icon of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` which icon has changed
    `icon` - newly chaned icon value
  Since:
    4.13

### topComponentActivatedNodesChanged

    protected abstract void topComponentActivatedNodesChanged(TopComponent tc,
                                                              Node[] activatedNodes)

  Informs about change of activated nodes of specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` which activated nodes has chagned
    `activatedNodes` - newly chaged activated nodes value
  Since:
    4.13

### topComponentIsOpened

    protected abstract boolean topComponentIsOpened(TopComponent tc)

  Indicates whether specified `TopComponent` is opened.

  Parameters:
    `tc` - specified `TopComponent`
  Since:
    4.13

### topComponentDefaultActions

    protected abstract Action[] topComponentDefaultActions(TopComponent tc)

  Gets default list of actions which appear in popup menu of TopComponent. The popup menu which is handled by window systsm implementation, typically at tab.

  Parameters:
    `tc` - `TopComponent` for which the default actions to provide
  Since:
    4.13

### topComponentID

    protected abstract String topComponentID(TopComponent tc,
                                             String preferredID)

  Returns unique ID for specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` the component for which is ID returned
    `preferredID` - first approximation used for ID
  Returns:
    unique `TopComponent` ID
  Since:
    4.13

### topComponentRequestAttention

    protected void topComponentRequestAttention(TopComponent tc)

  Cause this TopComponent's tab to flash or otherwise draw the users' attention to it. Note to WindowManager providers: This method not abstract for backward compatibility reasons, please override and provide implementation.

  Parameters:
    `tc` - A TopComponent
  Since:
    5.1

### topComponentToFront

    protected void topComponentToFront(TopComponent tc)

  Attempts to bring the parent `Window` of the given `TopComponent` to front of other windows.

  Since:
    5.8
  See Also:
    `Window.toFront()`

### topComponentCancelRequestAttention

    protected void topComponentCancelRequestAttention(TopComponent tc)

  Stop this TopComponent's tab from flashing if it is flashing. Note to WindowManager providers: This method not abstract for backward compatibility reasons, please override and provide implementation.

  Parameters:
    `tc` - A TopComponent
  Since:
    5.1

### findTopComponentID

    public String findTopComponentID(TopComponent tc)

  Returns unique ID for specified `TopComponent`.

  Parameters:
    `tc` - `TopComponent` the component for which is ID returned
  Returns:
    unique `TopComponent` ID
  Since:
    4.13

### findTopComponent

    public abstract TopComponent findTopComponent(String tcID)

  Returns `TopComponent` for given unique ID.

  Parameters:
    `tcID` - unique `TopComponent` ID
  Returns:
    `TopComponent` instance corresponding to unique ID
  Since:
    4.15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.windows 6.5.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.