站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

Mode (NetBeans Windows API) - NetBeans API Javadoc 5.0.0

 

org.openide.windows
Interface Mode

All Superinterfaces:
Serializable

public interface Mode
extends Serializable

Instances of this interface represent places or containers which TopComponent has to be added to in order to be managed by window system.

There is always present default document mode named "editor". Modules can add their own modes by declaring them using XML.

Modules can get a set of current modes by calling WindowManager.getModes().

Each mode must have a unique name.

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


Field Summary
static String PROP_BOUNDS
          Name of property for bounds of the mode
static String PROP_DISPLAY_NAME
          Deprecated. Do not use. It is redundant.
static String PROP_NAME
          Deprecated. Do not use. It is redundant, name can not be changed.
static long serialVersionUID
          Deprecated. Only public by accident.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener list)
          Add a property change listener.
 boolean canDock(TopComponent tc)
          Allows implementor to specify some restrictive policy as to which top components can be docked into this mode.
 boolean dockInto(TopComponent c)
          Attaches a component to a mode for this workspace.
 Rectangle getBounds()
          Getter for current bounds of the mode.
 String getDisplayName()
          Deprecated. Do not use. It is redudant.
 Image getIcon()
          Deprecated. Do not use. It is redundant.
 String getName()
          Get the programmatic name of the mode.
 TopComponent getSelectedTopComponent()
          Gets selected TopComponent in this mode.
 TopComponent[] getTopComponents()
          Get all top components currently docked into this mode.
 Workspace getWorkspace()
          Deprecated. Do not use. Worskpaces are not supporeted anymore.
 void removePropertyChangeListener(PropertyChangeListener list)
          Remove a property change listener.
 void setBounds(Rectangle s)
          Sets the bounds of the mode.
 

Field Detail

PROP_BOUNDS

public static final String PROP_BOUNDS
Name of property for bounds of the mode

See Also:
Constant Field Values

PROP_NAME

public static final String PROP_NAME
Deprecated. Do not use. It is redundant, name can not be changed.

Name of property for the unique programmatic name of this mode.

See Also:
Constant Field Values

PROP_DISPLAY_NAME

public static final String PROP_DISPLAY_NAME
Deprecated. Do not use. It is redundant.

Name of property for the display name of this mode.

See Also:
Constant Field Values

serialVersionUID

public static final long serialVersionUID
Deprecated. Only public by accident.

See Also:
Constant Field Values
Method Detail

getDisplayName

public String getDisplayName()
Deprecated. Do not use. It is redudant.

Get the diplay name of the mode. This name will be used by a container to create its title.

Returns:
human-presentable name of the mode

getName

public String getName()
Get the programmatic name of the mode. This name should be unique, as it is used to find modes etc.

Returns:
programmatic name of the mode

getIcon

public Image getIcon()
Deprecated. Do not use. It is redundant.

Get the icon of the mode. It will be used by component container implementations as the icon (e.g. for display in tabs).

Returns:
the icon of the mode (or null if no icon was specified)

dockInto

public boolean dockInto(TopComponent c)
Attaches a component to a mode for this workspace. If the component is in different mode on this workspace, it is removed from the original and moved to this one.

Parameters:
c - component
Returns:
true if top component was succesfully docked to this mode, false otherwise

canDock

public boolean canDock(TopComponent tc)
Allows implementor to specify some restrictive policy as to which top components can be docked into this mode.

Returns:
true if a given top component can be docked into this mode, false otherwise

setBounds

public void setBounds(Rectangle s)
Sets the bounds of the mode.

Parameters:
s - the bounds for the mode

getBounds

public Rectangle getBounds()
Getter for current bounds of the mode.

Returns:
the bounds of the mode

getWorkspace

public Workspace getWorkspace()
Deprecated. Do not use. Worskpaces are not supporeted anymore.

Getter for asociated workspace.

Returns:
The workspace instance to which is this mode asociated.

getTopComponents

public TopComponent[] getTopComponents()
Get all top components currently docked into this mode.

Returns:
the list of components; might be empty, but not null

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener list)
Add a property change listener.

Parameters:
list - the listener to add

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener list)
Remove a property change listener.

Parameters:
list - the listener to remove

getSelectedTopComponent

public TopComponent getSelectedTopComponent()
Gets selected TopComponent in this mode.

Since:
4.13

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.