net.infonode.docking.properties

Class WindowTabButtonProperties

public class WindowTabButtonProperties extends PropertyMapContainer

Properties and property values for a button in a window tab.

Version: $Revision: 1.16 $

Author: $Author: jesper $

Field Summary
static DockingWindowActionPropertyACTION
The {@link DockingWindowAction} that is performed when the button is clicked.
static ButtonFactoryPropertyFACTORY
The button factory.
static IconPropertyICON
The button icon.
static PropertyMapGroupPROPERTIES
Property group containing all window tab button properties.
static StringPropertyTOOL_TIP_TEXT
The button tool tip text.
static BooleanPropertyVISIBLE
True if the button is visible.
Constructor Summary
WindowTabButtonProperties()
Creates an empty property object.
WindowTabButtonProperties(PropertyMap map)
Creates a property object containing the map.
WindowTabButtonProperties(WindowTabButtonProperties inheritFrom)
Creates a property object that inherit values from another property object.
Method Summary
WindowTabButtonPropertiesaddSuperObject(WindowTabButtonProperties properties)
Adds a super object from which property values are inherited.
DockingWindowActiongetAction()
Gets the {@link DockingWindowAction} that is performed when the button is clicked.
ButtonFactorygetFactory()
Gets the button factory.
IcongetIcon()
Returns the button icon.
StringgetToolTipText()
Returns the button tool tip text.
booleanisVisible()
Returns true if this button is visible.
WindowTabButtonPropertiesremoveSuperObject()
Removes the last added super object.
WindowTabButtonPropertiesremoveSuperObject(WindowTabButtonProperties superObject)
Removes a super object.
WindowTabButtonPropertiessetAction(DockingWindowAction action)
Sets the {@link DockingWindowAction} that will be performed when the button is clicked.
WindowTabButtonPropertiessetFactory(ButtonFactory factory)
Sets the button factory.
WindowTabButtonPropertiessetIcon(Icon icon)
Sets the button icon.
WindowTabButtonPropertiessetTo(DockingWindowAction action)
Sets the action is performed when the button is clicked.
WindowTabButtonPropertiessetToolTipText(String text)
Sets the button tool tip text.
WindowTabButtonPropertiessetVisible(boolean visible)
Set to true if this button should be visible.

Field Detail

ACTION

public static final DockingWindowActionProperty ACTION
The {@link DockingWindowAction} that is performed when the button is clicked.

Since: IDW 1.3.0

FACTORY

public static final ButtonFactoryProperty FACTORY
The button factory. This factory is used to create the button when it's first needed. Modifying this property will NOT cause already created buttons to be replaced. The created button will be set to non-focusable and will be assigned the icon from {@link #ICON} and the tool tip from {@link #TOOL_TIP_TEXT}. An action listener is also added to the button.

Since: IDW 1.1.0

ICON

public static final IconProperty ICON
The button icon.

PROPERTIES

public static final PropertyMapGroup PROPERTIES
Property group containing all window tab button properties.

TOOL_TIP_TEXT

public static final StringProperty TOOL_TIP_TEXT
The button tool tip text.

Since: IDW 1.1.0

VISIBLE

public static final BooleanProperty VISIBLE
True if the button is visible.

Constructor Detail

WindowTabButtonProperties

public WindowTabButtonProperties()
Creates an empty property object.

WindowTabButtonProperties

public WindowTabButtonProperties(PropertyMap map)
Creates a property object containing the map.

Parameters: map the property map

WindowTabButtonProperties

public WindowTabButtonProperties(WindowTabButtonProperties inheritFrom)
Creates a property object that inherit values from another property object.

Parameters: inheritFrom the object from which to inherit property values

Method Detail

addSuperObject

public WindowTabButtonProperties addSuperObject(WindowTabButtonProperties properties)
Adds a super object from which property values are inherited.

Parameters: properties the object from which to inherit property values

Returns: this

getAction

public DockingWindowAction getAction()
Gets the {@link DockingWindowAction} that is performed when the button is clicked.

Returns: the {@link DockingWindowAction} that is performed when the button is clicked

Since: IDW 1.3.0

getFactory

public ButtonFactory getFactory()
Gets the button factory. This factory is used to create the button when it's first needed. Modifying this property will NOT cause already created buttons to be replaced. The created button will be set to non-focusable and will be assigned the icon from {@link #ICON} and the tool tip from {@link #TOOL_TIP_TEXT}. An action listener is also added to the button.

Returns: the button factory

Since: IDW 1.1.0

getIcon

public Icon getIcon()
Returns the button icon.

Returns: the button icon

getToolTipText

public String getToolTipText()
Returns the button tool tip text.

Returns: the button tool tip text

Since: IDW 1.1.0

isVisible

public boolean isVisible()
Returns true if this button is visible.

Returns: true if this button is visible

removeSuperObject

public WindowTabButtonProperties removeSuperObject()

Deprecated: Use {@link #removeSuperObject(WindowTabButtonProperties)} instead.

Removes the last added super object.

Returns: this

Since: IDW 1.1.0

removeSuperObject

public WindowTabButtonProperties removeSuperObject(WindowTabButtonProperties superObject)
Removes a super object.

Parameters: superObject the super object to remove

Returns: this

Since: IDW 1.3.0

setAction

public WindowTabButtonProperties setAction(DockingWindowAction action)
Sets the {@link DockingWindowAction} that will be performed when the button is clicked.

Parameters: action the {@link DockingWindowAction} that is performed when the button is clicked

Returns: this

Since: IDW 1.3.0

setFactory

public WindowTabButtonProperties setFactory(ButtonFactory factory)
Sets the button factory. This factory is used to create the button when it's first needed. Modifying this property will NOT cause already created buttons to be replaced. The created button will be set to non-focusable and will be assigned the icon from {@link #ICON} and the tool tip from {@link #TOOL_TIP_TEXT}. An action listener is also added to the button.

Parameters: factory the button factory

Returns: this

Since: IDW 1.1.0

setIcon

public WindowTabButtonProperties setIcon(Icon icon)
Sets the button icon.

Parameters: icon the button icon

Returns: this

setTo

public WindowTabButtonProperties setTo(DockingWindowAction action)
Sets the action is performed when the button is clicked. Also sets the icon and tooltip text of the button using the values from {@link DockingWindowAction}.

Parameters: action the action that is performed when the button is clicked

Returns: this

Since: IDW 1.3.0

setToolTipText

public WindowTabButtonProperties setToolTipText(String text)
Sets the button tool tip text.

Parameters: text the button tool tip text

Returns: this

Since: IDW 1.1.0

setVisible

public WindowTabButtonProperties setVisible(boolean visible)
Set to true if this button should be visible.

Parameters: visible true if this button should be visible

Returns: this