Package com.iizix.prop.ui.selection
Class TriStateSelection
java.lang.Object
com.iizix.prop.ui.selection.TriStateSelection
- All Implemented Interfaces:
IUISelection,IUITriStateSelection
The tri-state selection.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from interface com.iizix.prop.ui.selection.IUITriStateSelection
CHECKED, THIRD_STATE, UNSELECTEDConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanEquals.intGets the check state.Get the source component of the event.Get the source component of the event.Gets the UI component being the source of the event.booleanReturns if the state is checked.booleanReturns if the state is third state, i.e.booleanReturns if the state is unselected.toString()Converts the selection to a string.Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.prop.ui.selection.IUISelection
asAnimatedSingleIndexedSelection, asBooleanSelection, asCellSelection, asIndexedSelection, asSingleIndexedSelection, asTriStateSelection
Constructor Details
TriStateSelection
Constructor.- Parameters:
source- The component source.state- The check state.
Method Details
getCheckState
public int getCheckState()Gets the check state.- Specified by:
getCheckStatein interfaceIUITriStateSelection- Returns:
- Returns 0={$link #UNSELECTED}, 1={$link #CHECKED} or 2={$link #THIRD_STATE}.
isChecked
public boolean isChecked()Returns if the state is checked.- Specified by:
isCheckedin interfaceIUITriStateSelection- Returns:
- true if checked, false if unselected or in third state.
isUnselected
public boolean isUnselected()Returns if the state is unselected.- Specified by:
isUnselectedin interfaceIUITriStateSelection- Returns:
- true if unchecked, false if checked or in third state.
isThirdState
public boolean isThirdState()Returns if the state is third state, i.e. neither checked nor unselected.- Specified by:
isThirdStatein interfaceIUITriStateSelection- Returns:
- true if third state, false if checked or unselected.
getTriStateSource
Get the source component of the event.- Specified by:
getTriStateSourcein interfaceIUITriStateSelection- Returns:
- The tri-state based component.
getSource
Get the source component of the event.- Specified by:
getSourcein interfaceIUISelection- Returns:
- The selection component.
getUISource
Gets the UI component being the source of the event.- Specified by:
getUISourcein interfaceIUISelection- Returns:
- The UI component.
equals
Equals.toString
Converts the selection to a string.