Package net.infonode.docking.properties
Class WindowTabButtonProperties
- java.lang.Object
-
- net.infonode.properties.propertymap.PropertyMapContainer
-
- net.infonode.docking.properties.WindowTabButtonProperties
-
public class WindowTabButtonProperties extends PropertyMapContainer
Properties and property values for a button in a window tab.
-
-
Field Summary
Fields Modifier and Type Field Description static DockingWindowActionProperty
ACTION
TheDockingWindowAction
that is performed when the button is clicked.static ButtonFactoryProperty
FACTORY
The button factory.static IconProperty
ICON
The button icon.static PropertyMapGroup
PROPERTIES
Property group containing all window tab button properties.static StringProperty
TOOL_TIP_TEXT
The button tool tip text.static BooleanProperty
VISIBLE
True if the button is visible.
-
Constructor Summary
Constructors Constructor Description WindowTabButtonProperties()
Creates an empty property object.WindowTabButtonProperties(WindowTabButtonProperties inheritFrom)
Creates a property object that inherit values from another property object.WindowTabButtonProperties(PropertyMap map)
Creates a property object containing the map.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WindowTabButtonProperties
addSuperObject(WindowTabButtonProperties properties)
Adds a super object from which property values are inherited.DockingWindowAction
getAction()
Gets theDockingWindowAction
that is performed when the button is clicked.ButtonFactory
getFactory()
Gets the button factory.javax.swing.Icon
getIcon()
Returns the button icon.java.lang.String
getToolTipText()
Returns the button tool tip text.boolean
isVisible()
Returns true if this button is visible.WindowTabButtonProperties
removeSuperObject()
Deprecated.UseremoveSuperObject(WindowTabButtonProperties)
instead.WindowTabButtonProperties
removeSuperObject(WindowTabButtonProperties superObject)
Removes a super object.WindowTabButtonProperties
setAction(DockingWindowAction action)
Sets theDockingWindowAction
that will be performed when the button is clicked.WindowTabButtonProperties
setFactory(ButtonFactory factory)
Sets the button factory.WindowTabButtonProperties
setIcon(javax.swing.Icon icon)
Sets the button icon.WindowTabButtonProperties
setTo(DockingWindowAction action)
Sets the action is performed when the button is clicked.WindowTabButtonProperties
setToolTipText(java.lang.String text)
Sets the button tool tip text.WindowTabButtonProperties
setVisible(boolean visible)
Set to true if this button should be visible.-
Methods inherited from class net.infonode.properties.propertymap.PropertyMapContainer
getMap
-
-
-
-
Field Detail
-
PROPERTIES
public static final PropertyMapGroup PROPERTIES
Property group containing all window tab button properties.
-
VISIBLE
public static final BooleanProperty VISIBLE
True if the button is visible.
-
ICON
public static final IconProperty ICON
The button icon.
-
TOOL_TIP_TEXT
public static final StringProperty TOOL_TIP_TEXT
The button tool tip text.- Since:
- IDW 1.1.0
-
ACTION
public static final DockingWindowActionProperty ACTION
TheDockingWindowAction
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 fromICON
and the tool tip fromTOOL_TIP_TEXT
. An action listener is also added to the button.- Since:
- IDW 1.1.0
-
-
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
-
removeSuperObject
public WindowTabButtonProperties removeSuperObject()
Deprecated.UseremoveSuperObject(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
-
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
-
isVisible
public boolean isVisible()
Returns true if this button is visible.- Returns:
- true if this button is visible
-
setIcon
public WindowTabButtonProperties setIcon(javax.swing.Icon icon)
Sets the button icon.- Parameters:
icon
- the button icon- Returns:
- this
-
getIcon
public javax.swing.Icon getIcon()
Returns the button icon.- Returns:
- the button icon
-
getToolTipText
public java.lang.String getToolTipText()
Returns the button tool tip text.- Returns:
- the button tool tip text
- Since:
- IDW 1.1.0
-
setToolTipText
public WindowTabButtonProperties setToolTipText(java.lang.String text)
Sets the button tool tip text.- Parameters:
text
- the button tool tip text- Returns:
- this
- Since:
- IDW 1.1.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 fromICON
and the tool tip fromTOOL_TIP_TEXT
. An action listener is also added to the button.- Returns:
- the button factory
- Since:
- IDW 1.1.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 fromICON
and the tool tip fromTOOL_TIP_TEXT
. An action listener is also added to the button.- Parameters:
factory
- the button factory- Returns:
- this
- Since:
- IDW 1.1.0
-
getAction
public DockingWindowAction getAction()
Gets theDockingWindowAction
that is performed when the button is clicked.- Returns:
- the
DockingWindowAction
that is performed when the button is clicked - Since:
- IDW 1.3.0
-
setAction
public WindowTabButtonProperties setAction(DockingWindowAction action)
Sets theDockingWindowAction
that will be performed when the button is clicked.- Parameters:
action
- theDockingWindowAction
that is performed when the button is clicked- Returns:
- this
- Since:
- IDW 1.3.0
-
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 fromDockingWindowAction
.- Parameters:
action
- the action that is performed when the button is clicked- Returns:
- this
- Since:
- IDW 1.3.0
-
-