com.togethersoft.openapi.ide.inspector.util.editors
Class SwingBooleanEditor

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
              |
              +--com.togethersoft.openapi.ide.inspector.util.editors.SwingBooleanEditor

public class SwingBooleanEditor
extends SwingEditorSupport

Represents editor for boolean properties as a check box.

Author:
TogetherSoft

Field Summary
 final static SwingBooleanEditorCENTER_ALIGNED
           
 final static SwingBooleanEditorLEFT_ALIGNED
           

Fields inherited from class com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
MEDIUM_DIMENSION, panel, SMALL_DIMENSION

Constructor Summary
SwingBooleanEditor()
           Constructs BooleanEditor with left alignment of values and default color (not white).
SwingBooleanEditor(int alignment, boolean whiteBackground)
           Constructs BooleanEditor with alignment of values and default or white background.

Method Summary
 ObjectgetValue()
           Returns state of check box as a Boolean.
 voidsetValue(Object obj)
           Changes state of check box due to given value.

Methods inherited from class com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCustomEditor, init, removeCellEditorListener, setAlignment, supportsCustomEditor

Methods inherited from class java.beans.PropertyEditorSupport
isPaintable, paintValue, getJavaInitializationString, getAsText, setAsText, getTags, addPropertyChangeListener, removePropertyChangeListener, firePropertyChange

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize

Field Detail

CENTER_ALIGNED

public final static SwingBooleanEditor CENTER_ALIGNED

LEFT_ALIGNED

public final static SwingBooleanEditor LEFT_ALIGNED
Constructor Detail

SwingBooleanEditor

public SwingBooleanEditor()
Constructs BooleanEditor with left alignment of values and default color (not white).

SwingBooleanEditor

public SwingBooleanEditor(int alignment, boolean whiteBackground)
Constructs BooleanEditor with alignment of values and default or white background.
Parameters:
alignment - Alignment of values: RIGHT, CENTER, LEFT
whiteBackground - if true then background will be white, otherwise - default
Method Detail

getValue

public Object getValue()
Returns state of check box as a Boolean.

setValue

public void setValue(Object obj)
Changes state of check box due to given value.
Parameters:
obj - Value to be set. To be Boolean.

Association Links

to Class javax.swing.JCheckBox

to Class com.togethersoft.openapi.ide.inspector.util.editors.SwingBooleanEditor

to Class com.togethersoft.openapi.ide.inspector.util.editors.SwingBooleanEditor