Package com.simsilica.lemur
Class DefaultCheckboxModel
java.lang.Object
com.simsilica.lemur.DefaultCheckboxModel
- All Implemented Interfaces:
CheckboxModel,VersionedObject<Boolean>
- Direct Known Subclasses:
RollupPanel.OpenCheckboxModel
A default implementation of the CheckboxModel interface
that simply stores a boolean state and increments the version
when the state is changed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new VersionedReference that can be used to monitor when this object changes.Returns the object that is being versioned.longReturns the current version of the versioned object.booleanvoidsetChecked(boolean state) toString()
-
Constructor Details
-
DefaultCheckboxModel
public DefaultCheckboxModel() -
DefaultCheckboxModel
public DefaultCheckboxModel(boolean initialState)
-
-
Method Details
-
setChecked
public void setChecked(boolean state) - Specified by:
setCheckedin interfaceCheckboxModel
-
isChecked
public boolean isChecked()- Specified by:
isCheckedin interfaceCheckboxModel
-
getVersion
public long getVersion()Description copied from interface:VersionedObjectReturns the current version of the versioned object.- Specified by:
getVersionin interfaceVersionedObject<Boolean>
-
getObject
Description copied from interface:VersionedObjectReturns the object that is being versioned.- Specified by:
getObjectin interfaceVersionedObject<Boolean>
-
createReference
Description copied from interface:VersionedObjectCreates a new VersionedReference that can be used to monitor when this object changes.- Specified by:
createReferencein interfaceVersionedObject<Boolean>
-
toString
-