Package net.infonode.properties.gui.util
Class ButtonProperties
java.lang.Object
net.infonode.properties.propertymap.PropertyMapContainer
net.infonode.properties.gui.util.ButtonProperties
Properties and property values for a button.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IconProperty
The disabled button icon.static final ButtonFactoryProperty
The button factory.static final IconProperty
The button icon.static final PropertyMapGroup
Property group for all button properties.static final StringProperty
The enabled button tool tip text. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty property object.ButtonProperties
(ButtonProperties inheritFrom) Creates a property object that inherit values from another property object.Creates a property map containing the map. -
Method Summary
Modifier and TypeMethodDescriptionaddSuperObject
(ButtonProperties properties) Adds a super object from which property values are inherited.applyTo
(AbstractButton button) Applies the icon, disabled icon and tool tip to the given buttonReturns the disabled button icon.Gets the button factory.getIcon()
Returns the button icon.Returns the button tool tip text.Removes the last added super object.removeSuperObject
(ButtonProperties superObject) Removes the given super object.setDisabledIcon
(Icon icon) Sets the disabled button icon.setFactory
(ButtonFactory factory) Sets the button factory.Sets the button icon.setToolTipText
(String text) Sets the button tool tip text.Methods inherited from class net.infonode.properties.propertymap.PropertyMapContainer
getMap
-
Field Details
-
PROPERTIES
Property group for all button properties. -
ICON
The button icon. -
DISABLED_ICON
The disabled button icon. -
TOOL_TIP_TEXT
The enabled button tool tip text. -
FACTORY
The button factory.
The created button will be assigned the icon from
ICON
orDISABLED_ICON
and the tool tip fromTOOL_TIP_TEXT
. An action listener is also added to the button.
-
-
Constructor Details
-
ButtonProperties
public ButtonProperties()Creates an empty property object. -
ButtonProperties
Creates a property map containing the map.- Parameters:
map
- the property map
-
ButtonProperties
Creates a property object that inherit values from another property object.- Parameters:
inheritFrom
- the object from which to inherit property values
-
-
Method Details
-
addSuperObject
Adds a super object from which property values are inherited.- Parameters:
properties
- the object from which to inherit property values- Returns:
- this
-
removeSuperObject
Removes the last added super object.- Returns:
- this
-
removeSuperObject
Removes the given super object.- Parameters:
superObject
- super object to remove- Returns:
- this
-
setIcon
Sets the button icon.- Parameters:
icon
- the button icon- Returns:
- this
-
getIcon
Returns the button icon.- Returns:
- the button icon
-
setDisabledIcon
Sets the disabled button icon.- Parameters:
icon
- the disabled button icon- Returns:
- this
-
getDisabledIcon
Returns the disabled button icon.- Returns:
- the disabled button icon
-
getToolTipText
Returns the button tool tip text.- Returns:
- the button tool tip text
-
setToolTipText
Sets the button tool tip text.- Parameters:
text
- the button tool tip text- Returns:
- this
-
getFactory
Gets the button factory.
The created button will be assigned the icon from
ICON
orDISABLED_ICON
and the tool tip fromTOOL_TIP_TEXT
. An action listener is also added to the button.- Returns:
- the button factory
-
setFactory
Sets the button factory.
The created button will be assigned the icon from
ICON
orDISABLED_ICON
and the tool tip fromTOOL_TIP_TEXT
. An action listener is also added to the button.- Parameters:
factory
- the button factory- Returns:
- this
-
applyTo
Applies the icon, disabled icon and tool tip to the given button- Parameters:
button
- botton- Returns:
- the button
-