Package com.iizix.prop.ui.selection
Class BooleanSelection
- java.lang.Object
- com.iizix.prop.ui.selection.BooleanSelection
- All Implemented Interfaces:
IUIBooleanSelection
,IUISelection
public class BooleanSelection extends java.lang.Object implements IUIBooleanSelection
The boolean on/off (or selected/unselected) selection state.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description BooleanSelection(IUIBooleanSelectionComp source, boolean isSelected)
Constructor.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Equals.IUIBooleanSelectionComp
getBooleanSource()
Get the source component of the event.IUISelectionComp
getSource()
Get the source component of the event.UIComp
getUISource()
Gets the UI component being the source of the event.boolean
isOFF()
Returns if the selection is "off".boolean
isON()
Returns if the selection is "on".boolean
isSelected()
Returns the selection state.boolean
isUnselected()
Returns if the selection is not set.java.lang.String
toString()
Converts the selection to a string.Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.prop.ui.selection.IUISelection
asAnimatedSingleIndexedSelection, asBooleanSelection, asCellSelection, asIndexedSelection, asSingleIndexedSelection, asTriStateSelection
Constructor Detail
BooleanSelection
public BooleanSelection(IUIBooleanSelectionComp source, boolean isSelected)
Constructor.- Parameters:
source
- The component source.isSelected
- The selection state.
Method Detail
isSelected
public boolean isSelected()
Returns the selection state.- Specified by:
isSelected
in interfaceIUIBooleanSelection
- Returns:
- true if selected, false if unselected.
isUnselected
public boolean isUnselected()
Returns if the selection is not set.- Specified by:
isUnselected
in interfaceIUIBooleanSelection
- Returns:
- true if unselected, true if selected.
isON
public boolean isON()
Returns if the selection is "on".- Specified by:
isON
in interfaceIUIBooleanSelection
- Returns:
- true if on, false otherwise.
isOFF
public boolean isOFF()
Returns if the selection is "off".- Specified by:
isOFF
in interfaceIUIBooleanSelection
- Returns:
- true if off, true otherwise.
getBooleanSource
public IUIBooleanSelectionComp getBooleanSource()
Get the source component of the event.- Specified by:
getBooleanSource
in interfaceIUIBooleanSelection
- Returns:
- The boolean-type component.
getSource
public IUISelectionComp getSource()
Get the source component of the event.- Specified by:
getSource
in interfaceIUISelection
- Returns:
- The source.
getUISource
public UIComp getUISource()
Gets the UI component being the source of the event.- Specified by:
getUISource
in interfaceIUISelection
- Returns:
- The UI component.
equals
public boolean equals(java.lang.Object o)
Equals.- Overrides:
equals
in classjava.lang.Object
toString
public java.lang.String toString()
Converts the selection to a string.- Overrides:
toString
in classjava.lang.Object