public class DockKey
extends java.lang.Object
As it is the object which identifies uniquely a user Dockable component,
it should be associated with one and only one Dockable
.
The unique key used for equals() comparison is the dockKey property, other properties can be shared by a set of DockKey (for example, you can share an icon, or even a display name between dockable Components).
Another usage is the decoration of a dockable container, providing informations such as its name, tooltip or icon.
Properties of a DockKey are listened to by the docking framework, so a change of name or icon is reflected on the GUI without further programming.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_AUTOHIDEABLE
Key identifying a change in the autohideEnabled property
|
static java.lang.String |
PROPERTY_CLOSEABLE
Key identifying a change in the closeEnabled property
|
static java.lang.String |
PROPERTY_DOCKABLE_STATE
Key identifying a change in the dockable dockableState
|
static java.lang.String |
PROPERTY_DOCKKEY
Key identifying a change in the dockKey property
|
static java.lang.String |
PROPERTY_FLOATABLE
Key identifying a change in the floatableEnabled property
|
static java.lang.String |
PROPERTY_ICON
Key identifying a change in the icon property
|
static java.lang.String |
PROPERTY_MAXIMIZABLE
Key identifying a change in the maximizedEnabled property
|
static java.lang.String |
PROPERTY_NAME
Key identifying a change in the name property
|
static java.lang.String |
PROPERTY_NOTIFICATION
Key identifying a change in the notification property
|
static java.lang.String |
PROPERTY_TAB_NAME
Key identifying a change in the tabname property (title used by tabbed containers)
|
static java.lang.String |
PROPERTY_TOOLTIP
Key identifying a change in the tooltip property
|
Constructor and Description |
---|
DockKey()
JavaBeans constructor : If used, also think to set the dockKey property.
|
DockKey(java.lang.String dockKey)
Constructs a DockKey with dockKey (unique key) and name set to the same value
|
DockKey(java.lang.String dockKey,
java.lang.String name)
Constructs a DockKey with dockKey (unique key) and a displayed name
|
DockKey(java.lang.String dockKey,
java.lang.String name,
java.lang.String tooltip)
Constructs a DockKey with dockKey (unique key), a displayed name and a tooltip
|
DockKey(java.lang.String dockKey,
java.lang.String name,
java.lang.String tooltip,
javax.swing.Icon icon)
Constructs a DockKey with dockKey (unique key), a displayed name, a tooltip and
an icon.
|
DockKey(java.lang.String dockKey,
java.lang.String name,
java.lang.String tooltip,
javax.swing.Icon icon,
DockingConstants.Hide hideBorder)
Constructs a DockKey with dockKey (unique key), a displayed name, a tooltip, an icon
and a default autohide border.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Hook for property change notification
|
boolean |
equals(java.lang.Object o)
Overriden for Map storage needs
|
DockableActionCustomizer |
getActionCustomizer()
Returns the action customizer associated to this dockkey (may return null)
|
DockingConstants.Hide |
getAutoHideBorder()
Returns the autohide border of this dockable, or null if not set
|
DockGroup |
getDockGroup()
returns the dockGroup of this dockable
|
java.lang.String |
getDockName()
Deprecated.
use getKey instead
|
javax.swing.Icon |
getIcon()
Returns the icon displayed in title bars
|
java.lang.String |
getKey()
Returns the unique id designating the user component.
|
DockableState.Location |
getLocation()
returns the current visible location of the dockable
(see DockableState.Location for enumeration values)
|
java.lang.String |
getName()
Returns the name (or title) displayed in title bars
|
java.lang.Object |
getProperty(java.lang.String name)
returns a property associated to this name, or null if the property is undefined
|
float |
getResizeWeight() |
java.lang.String |
getTabName()
Returns the tab name (or tab title) displayed when the component is contained into a tabbed container.
|
java.lang.String |
getTooltip()
Returns the tooltip associated to the title bar
|
int |
hashCode()
Overriden for Map storage needs
|
boolean |
isAutoHideEnabled()
Returns try if autohiding is enabled
|
boolean |
isCloseEnabled()
Returns true if this dockable can be closed
|
boolean |
isFloatEnabled()
Returns true if this dockable can be detached from its desktop
|
boolean |
isMaximizeEnabled()
Returns true if this dockable can be maximized
|
boolean |
isNotification()
Returns true is a notification has been set.
|
void |
putProperty(java.lang.String name,
java.lang.Object value)
Allows any property to be stored in a map associated with this dockkey.
|
java.lang.Object |
removeProperty(java.lang.String name)
returns and removes a property associated to this name, or null if the property is undefined
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change notification
|
void |
setActionCustomizer(DockableActionCustomizer actionCustomizer)
Updates the action customizer of this dockable
|
void |
setAutoHideBorder(DockingConstants.Hide border)
Updates the autohide border property
|
void |
setAutoHideEnabled(boolean enabled)
Updates the autohideEnabled propety.
|
void |
setCloseEnabled(boolean enabled)
Updates the closeEnabled propety.
|
void |
setDockGroup(DockGroup group)
Updates the dockGroup of this dockable.
|
void |
setDockName(java.lang.String name)
Deprecated.
use setKey instead
|
void |
setFloatEnabled(boolean enabled)
Updates the floatEnabled propety.
|
void |
setIcon(javax.swing.Icon icon)
Updates the icon property.
|
void |
setKey(java.lang.String dockKey)
Updates the dockKey property.
|
void |
setLocation(DockableState.Location location)
updates the location property.
|
void |
setMaximizeEnabled(boolean enabled)
Updates the maximizeEnabled propety.
|
void |
setName(java.lang.String name)
Updates the name property.
|
void |
setNotification(boolean notification)
Updates the notification propety.
|
void |
setResizeWeight(float weight)
updates the resize weight of this dockable.
|
void |
setTabName(java.lang.String tabName)
Updates the tabname property.
|
void |
setTooltip(java.lang.String tooltip)
Updates the tooltip property.
|
java.lang.String |
toString() |
public static final java.lang.String PROPERTY_TOOLTIP
public static final java.lang.String PROPERTY_NAME
public static final java.lang.String PROPERTY_TAB_NAME
public static final java.lang.String PROPERTY_DOCKKEY
public static final java.lang.String PROPERTY_ICON
public static final java.lang.String PROPERTY_AUTOHIDEABLE
public static final java.lang.String PROPERTY_CLOSEABLE
public static final java.lang.String PROPERTY_MAXIMIZABLE
public static final java.lang.String PROPERTY_NOTIFICATION
public static final java.lang.String PROPERTY_FLOATABLE
public static final java.lang.String PROPERTY_DOCKABLE_STATE
public DockKey()
public DockKey(java.lang.String dockKey)
public DockKey(java.lang.String dockKey, java.lang.String name)
public DockKey(java.lang.String dockKey, java.lang.String name, java.lang.String tooltip)
public DockKey(java.lang.String dockKey, java.lang.String name, java.lang.String tooltip, javax.swing.Icon icon)
public DockKey(java.lang.String dockKey, java.lang.String name, java.lang.String tooltip, javax.swing.Icon icon, DockingConstants.Hide hideBorder)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public javax.swing.Icon getIcon()
public java.lang.String getName()
public java.lang.String getTooltip()
public java.lang.String getKey()
Note : This used to be the getDockName prior version 2.0. It has been renamed to clarify the concept (there was a naming problem between getName() and getDockName()
public void setTooltip(java.lang.String tooltip)
PropertyListeners are notified of that change
public void setName(java.lang.String name)
PropertyListeners are notified of that change
public java.lang.String getTabName()
public void setTabName(java.lang.String tabName)
Default value is null, meaning the name
PropertyListeners are notified of that change
public void setIcon(javax.swing.Icon icon)
PropertyListeners are notified of that change
public void setKey(java.lang.String dockKey)
Although PropertyListeners are notified of that change, it is not recommended to change dynamicaly the dockKey property, as it is heavily used in the docking framework to identify dockable components.
Note : This used to be the getDockName prior version 2.0. It has been renamed to clarify the concept (there was a naming problem between getName() and getDockName()
public java.lang.String getDockName()
getKey()
public void setDockName(java.lang.String name)
setKey(String)
public DockingConstants.Hide getAutoHideBorder()
public void setAutoHideBorder(DockingConstants.Hide border)
public boolean isAutoHideEnabled()
public void setAutoHideEnabled(boolean enabled)
PropertyListeners are notified of that change
public boolean isCloseEnabled()
public void setCloseEnabled(boolean enabled)
PropertyListeners are notified of that change
public boolean isMaximizeEnabled()
public void setMaximizeEnabled(boolean enabled)
PropertyListeners are notified of that change
public boolean isFloatEnabled()
public void setFloatEnabled(boolean enabled)
PropertyListeners are notified of that change
public boolean isNotification()
default notification is making title bars blink.
public void setNotification(boolean notification)
PropertyListeners are notified of that change.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public DockableActionCustomizer getActionCustomizer()
public void setActionCustomizer(DockableActionCustomizer actionCustomizer)
public void setDockGroup(DockGroup group)
public DockGroup getDockGroup()
public DockableState.Location getLocation()
DockableState
public void setLocation(DockableState.Location location)
Warning : do not call this method, it is for the sole use of the DockingDesktop API.
DockableState
public float getResizeWeight()
public void setResizeWeight(float weight)
public void putProperty(java.lang.String name, java.lang.Object value)
name
- the name used to lookup the propertyvalue
- the value of the propertypublic java.lang.Object getProperty(java.lang.String name)
name
- the name used to lookup the propertypublic java.lang.Object removeProperty(java.lang.String name)
name
- the name used to lookup the propertyCopyright © 2010-2014 Pacific Biosciences. All Rights Reserved.