edu.swri.swiftvis.util
Class EditableBoolean

java.lang.Object
  extended by edu.swri.swiftvis.util.EditableBoolean
All Implemented Interfaces:
java.io.Serializable

public final class EditableBoolean
extends java.lang.Object
implements java.io.Serializable

This class can be used to store booleans that need to be edited in a GUI. Using this class prevents the programmer from having to write event handlers. It also makes it so that when the value is changed the GUI component is updates.

Author:
Mark Lewis
See Also:
Serialized Form

Nested Class Summary
static interface EditableBoolean.Listener
           
 
Field Summary
private  javax.swing.JCheckBox field
           
private  EditableBoolean.Listener listener
           
private static long serialVersionUID
           
private  boolean value
           
 
Constructor Summary
EditableBoolean(boolean val)
           
 
Method Summary
 javax.swing.JCheckBox getCheckBox(java.lang.String prompt, EditableBoolean.Listener ebl)
           
 boolean getValue()
           
 void setValue(boolean val)
           
private  void valueChanged()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private boolean value

field

private transient javax.swing.JCheckBox field

listener

private transient EditableBoolean.Listener listener

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

EditableBoolean

public EditableBoolean(boolean val)
Method Detail

getValue

public boolean getValue()

setValue

public void setValue(boolean val)

getCheckBox

public javax.swing.JCheckBox getCheckBox(java.lang.String prompt,
                                         EditableBoolean.Listener ebl)

valueChanged

private void valueChanged()