Class TitledTabProperties
- java.lang.Object
-
- net.infonode.properties.propertymap.PropertyMapContainer
-
- net.infonode.tabbedpanel.titledtab.TitledTabProperties
-
public class TitledTabProperties extends PropertyMapContainer
TitledTabProperties holds all properties for a
TitledTab.A titled tab can have three states, normal, highlighted and disabled. Each state is represented by a
TitledTabStatePropertiesobject containing all properties that can be set for a state.By default the property values in the highlighted and disabled state are references to corresponding values in the normal state. This means that if you set a property value in the normal state, then highlighted and the disabled state will use that property value if the property has not been set in the highlighted or disabled state.
Example:
Setting the background color in the normal state means that normal, highlighted and disabled state will use that color as background color. If you set background color for highlighted state, then the highlighted state will use that color regardless of the background color for the normal state.By default the tool tip text in all states is the same as the tab text in the normal state. For example, if you change the tab text in the highlighted state and want the tooltip to display the same text, you must set the "Tool Tip Text" property
TitledTabStateProperties.TOOL_TIP_TEXTin the highlighted state.- See Also:
TitledTab,TitledTabStateProperties
-
-
Field Summary
Fields Modifier and Type Field Description static TitledTabBorderSizePolicyPropertyBORDER_SIZE_POLICYBorder size policy propertystatic PropertyMapPropertyDISABLED_PROPERTIESDisabled state propertiesstatic BooleanPropertyENABLEDTitledTab enabled propertystatic BooleanPropertyFOCUS_MARKER_ENABLEDFocus Marker Enabled propertystatic BooleanPropertyFOCUSABLEFocusabled propertystatic PropertyMapPropertyHIGHLIGHTED_PROPERTIESHighlighted state propertiesstatic IntegerPropertyHIGHLIGHTED_RAISED_AMOUNTHighlighted raised amount propertystatic HoverListenerPropertyHOVER_LISTENERHover listener propertystatic DimensionProviderPropertyMINIMUM_SIZE_PROVIDERTab minimum size propertystatic PropertyMapPropertyNORMAL_PROPERTIESNormal state propertiesstatic PropertyMapGroupPROPERTIESA property group for all properties in TitledTabPropertiesstatic TitledTabSizePolicyPropertySIZE_POLICYSize policy property
-
Constructor Summary
Constructors Constructor Description TitledTabProperties()Constructs an empty TitledTabProperties objectTitledTabProperties(PropertyMap object)Constructs a TitledTabProperties object with the give object as property storageTitledTabProperties(TitledTabProperties inheritFrom)Constructs a TitledTabProperties object that inherits its properties from the given TitledTabProperties object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TitledTabPropertiesaddSuperObject(TitledTabProperties superObject)Adds a super object from which property values are inherited.TitledTabBorderSizePolicygetBorderSizePolicy()Gets the border size policy for this TitledTabstatic TitledTabPropertiesgetDefaultProperties()Creates a properties object with default properties based on the current look and feelTitledTabStatePropertiesgetDisabledProperties()Gets the properties for the disabled statebooleangetEnabled()Gets if this TitledTab is enabled or disabledbooleangetFocusable()Gets if this TitledTab is focusablebooleangetFocusMarkerEnabled()Gets if this TitledTab should show its built-in focus marker when this tab has focus.TitledTabStatePropertiesgetHighlightedProperties()Gets the properties for the highlighted stateintgetHighlightedRaised()Gets how many pixels higher this TitledTab will be when it is in its highlighted state compared to its normal and disabled stateHoverListenergetHoverListener()Gets the hover listener that will be triggered when the tab is hovered by the mouse.DimensionProvidergetMinimumSizeProvider()Gets the dimension provider for the tab's minimum sizeTitledTabStatePropertiesgetNormalProperties()Gets the properties for the normal stateTitledTabSizePolicygetSizePolicy()Gets the size policy for this TitledTabTitledTabPropertiesremoveSuperObject()Removes the last added super object.TitledTabPropertiesremoveSuperObject(TitledTabProperties superObject)Removes the given super object.TitledTabPropertiesreplaceSuperObject(TitledTabProperties oldSuperObject, TitledTabProperties newSuperObject)Replaces the given super objects.TitledTabPropertiessetBorderSizePolicy(TitledTabBorderSizePolicy sizePolicy)Sets the border size policy for this TitledTabTitledTabPropertiessetEnabled(boolean value)Sets if this TitledTab should be enabled or not.TitledTabPropertiessetFocusable(boolean value)Sets if this TitledTab should be focusableTitledTabPropertiessetFocusMarkerEnabled(boolean value)Sets if this TitledTab should show its built-in focus marker when this tab has focus.TitledTabPropertiessetHighlightedRaised(int amount)Sets how many pixels higher this TitledTab will be when it is in its highlighted state compared to its normal and disabled stateTitledTabPropertiessetHoverListener(HoverListener listener)Sets the hover listener that will be triggered when the tab is hovered by the mouse.TitledTabPropertiessetMinimumSizeProvider(DimensionProvider size)Sets the tab's minimum size dimension providerTitledTabPropertiessetSizePolicy(TitledTabSizePolicy sizePolicy)Sets the size policy for this TitledTab-
Methods inherited from class net.infonode.properties.propertymap.PropertyMapContainer
getMap
-
-
-
-
Field Detail
-
PROPERTIES
public static final PropertyMapGroup PROPERTIES
A property group for all properties in TitledTabProperties
-
FOCUSABLE
public static final BooleanProperty FOCUSABLE
Focusabled property- See Also:
setFocusable(boolean),getFocusable()
-
FOCUS_MARKER_ENABLED
public static final BooleanProperty FOCUS_MARKER_ENABLED
Focus Marker Enabled property- Since:
- ITP 1.4.0
- See Also:
setFocusMarkerEnabled(boolean),getFocusMarkerEnabled()
-
NORMAL_PROPERTIES
public static final PropertyMapProperty NORMAL_PROPERTIES
Normal state properties- See Also:
getNormalProperties()
-
HIGHLIGHTED_PROPERTIES
public static final PropertyMapProperty HIGHLIGHTED_PROPERTIES
Highlighted state properties- See Also:
getHighlightedProperties()
-
DISABLED_PROPERTIES
public static final PropertyMapProperty DISABLED_PROPERTIES
Disabled state properties- See Also:
getDisabledProperties()
-
SIZE_POLICY
public static final TitledTabSizePolicyProperty SIZE_POLICY
Size policy property
-
BORDER_SIZE_POLICY
public static final TitledTabBorderSizePolicyProperty BORDER_SIZE_POLICY
Border size policy property
-
MINIMUM_SIZE_PROVIDER
public static final DimensionProviderProperty MINIMUM_SIZE_PROVIDER
Tab minimum size property
-
HIGHLIGHTED_RAISED_AMOUNT
public static final IntegerProperty HIGHLIGHTED_RAISED_AMOUNT
Highlighted raised amount property- See Also:
setHighlightedRaised(int),getHighlightedRaised()
-
HOVER_LISTENER
public static final HoverListenerProperty HOVER_LISTENER
Hover listener property- Since:
- ITP 1.3.0
- See Also:
setHoverListener(net.infonode.gui.hover.HoverListener),getHoverListener()
-
ENABLED
public static final BooleanProperty ENABLED
TitledTab enabled property- Since:
- ITP 1.5.0
- See Also:
setEnabled(boolean),getEnabled()
-
-
Constructor Detail
-
TitledTabProperties
public TitledTabProperties()
Constructs an empty TitledTabProperties object
-
TitledTabProperties
public TitledTabProperties(PropertyMap object)
Constructs a TitledTabProperties object with the give object as property storage- Parameters:
object- object to store properties in
-
TitledTabProperties
public TitledTabProperties(TitledTabProperties inheritFrom)
Constructs a TitledTabProperties object that inherits its properties from the given TitledTabProperties object- Parameters:
inheritFrom- TitledTabProperties object to inherit properties from
-
-
Method Detail
-
addSuperObject
public TitledTabProperties addSuperObject(TitledTabProperties superObject)
Adds a super object from which property values are inherited.- Parameters:
superObject- the object from which to inherit property values- Returns:
- this
-
removeSuperObject
public TitledTabProperties removeSuperObject()
Removes the last added super object.- Returns:
- this
-
removeSuperObject
public TitledTabProperties removeSuperObject(TitledTabProperties superObject)
Removes the given super object.- Parameters:
superObject- super object to remove- Returns:
- this
- Since:
- ITP 1.3.0
-
replaceSuperObject
public TitledTabProperties replaceSuperObject(TitledTabProperties oldSuperObject, TitledTabProperties newSuperObject)
Replaces the given super objects.- Parameters:
oldSuperObject- super object to replacenewSuperObject- new super object- Returns:
- this
- Since:
- ITP 1.4.0
-
getDefaultProperties
public static TitledTabProperties getDefaultProperties()
Creates a properties object with default properties based on the current look and feel- Returns:
- properties object
-
getNormalProperties
public TitledTabStateProperties getNormalProperties()
Gets the properties for the normal state- Returns:
- the normal state properties
-
getHighlightedProperties
public TitledTabStateProperties getHighlightedProperties()
Gets the properties for the highlighted state- Returns:
- the highlighted state properties
-
getDisabledProperties
public TitledTabStateProperties getDisabledProperties()
Gets the properties for the disabled state- Returns:
- the disabled state properties
-
setFocusable
public TitledTabProperties setFocusable(boolean value)
Sets if this TitledTab should be focusable- Parameters:
value- true for focusable, otherwise false- Returns:
- this TitledTabProperties
-
getFocusable
public boolean getFocusable()
Gets if this TitledTab is focusable- Returns:
- true for focusable, otherwise false
-
setFocusMarkerEnabled
public TitledTabProperties setFocusMarkerEnabled(boolean value)
Sets if this TitledTab should show its built-in focus marker when this tab has focus.
Note: Disabling the focus marker is useful when for example creating a theme that draws its own focus marker.
- Parameters:
value- true for enabled, otherwise false- Returns:
- this TitledTabProperties
- Since:
- ITP 1.4.0
-
getFocusMarkerEnabled
public boolean getFocusMarkerEnabled()
Gets if this TitledTab should show its built-in focus marker when this tab has focus.
Note: Disabling the focus marker is useful when for example creating a theme that draws its own focus marker.
- Returns:
- true for enabled, otherwise false
- Since:
- ITP 1.4.0
-
setSizePolicy
public TitledTabProperties setSizePolicy(TitledTabSizePolicy sizePolicy)
Sets the size policy for this TitledTab- Parameters:
sizePolicy- the size policy- Returns:
- this TitledTabProperties
-
getSizePolicy
public TitledTabSizePolicy getSizePolicy()
Gets the size policy for this TitledTab- Returns:
- the size policy
-
setBorderSizePolicy
public TitledTabProperties setBorderSizePolicy(TitledTabBorderSizePolicy sizePolicy)
Sets the border size policy for this TitledTab- Parameters:
sizePolicy- the border size policy- Returns:
- this TitledTabProperties
-
getBorderSizePolicy
public TitledTabBorderSizePolicy getBorderSizePolicy()
Gets the border size policy for this TitledTab- Returns:
- the border size policy
-
setMinimumSizeProvider
public TitledTabProperties setMinimumSizeProvider(DimensionProvider size)
Sets the tab's minimum size dimension provider- Parameters:
size- the minimum size dimension provider or null if tab's default minimum size should be used instead- Returns:
- this TitledTabProperties
-
getMinimumSizeProvider
public DimensionProvider getMinimumSizeProvider()
Gets the dimension provider for the tab's minimum size- Returns:
- the minimum size provider or null if default tab minimum size is to be used instead
-
setHighlightedRaised
public TitledTabProperties setHighlightedRaised(int amount)
Sets how many pixels higher this TitledTab will be when it is in its highlighted state compared to its normal and disabled state- Parameters:
amount- number of pixels- Returns:
- this TitledTabProperties
-
getHighlightedRaised
public int getHighlightedRaised()
Gets how many pixels higher this TitledTab will be when it is in its highlighted state compared to its normal and disabled state- Returns:
- number of pixels
-
setEnabled
public TitledTabProperties setEnabled(boolean value)
Sets if this TitledTab should be enabled or not.
Note: Calling
TitledTab.setEnabled(boolean)will modify this property for the tab.- Parameters:
value- true for enabled, otherwise false- Returns:
- this TitledTabProperties
- Since:
- ITP 1.5.0
-
getEnabled
public boolean getEnabled()
Gets if this TitledTab is enabled or disabled- Returns:
- true for enabled, otherwise false
- Since:
- ITP 1.5.0
-
setHoverListener
public TitledTabProperties setHoverListener(HoverListener listener)
Sets the hover listener that will be triggered when the tab is hovered by the mouse.
The hovered titled tab will be the source of the hover event sent to the hover listener.
- Parameters:
listener- the hover listener- Returns:
- this TitledTabProperties
- Since:
- ITP 1.3.0
-
getHoverListener
public HoverListener getHoverListener()
Gets the hover listener that will be triggered when the tab is hovered by the mouse.
The hovered titled tab will be the source of the hover event sent to the hover listener.
- Returns:
- the hover listener
- Since:
- ITP 1.3.0
-
-