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

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

public class SwingIntegerEditor
extends SwingEditorSupport

Represents editor for integer properties as a JTextField. This property can have one integer value of Enumeration of them. In last case editor will be represented as a ComboBox.

Author:
TogetherSoft
See Also: SwingEnumEditor

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

Constructor Summary
SwingIntegerEditor()
           Constructs editor for single property value.

Method Summary
 voidaddPropertyChangeListener(PropertyChangeListener propertychangelistener)
           Register a listener for PropertyChange events.
 ComponentgetCustomEditor()
           Returns visual component which represents this editor on UI.
 ObjectgetValue()
           Returns integer value or Enumeration of integers.
 voidinit(IdeInspectorProperty property)
           Specifies IdeInspectorProperty to be edited and creates UI components to display editor.
 voidremovePropertyChangeListener(PropertyChangeListener propertychangelistener)
           Removes a listener for PropertyChange events.
 voidsetValue(Object obj)
           Sets given value to TextField (ComboBox if it is Enumeration of integers).

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

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

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

Constructor Detail

SwingIntegerEditor

public SwingIntegerEditor()
Constructs editor for single property value.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener propertychangelistener)
Register a listener for PropertyChange events.
Parameters:
propertychangelistener - PropertyChangeListener to be registered

getCustomEditor

public Component getCustomEditor()
Returns visual component which represents this editor on UI.

getValue

public Object getValue()
Returns integer value or Enumeration of integers.

init

public void init(IdeInspectorProperty property)
Specifies IdeInspectorProperty to be edited and creates UI components to display editor.
Parameters:
property - IdeInspectorProperty to be edited

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener propertychangelistener)
Removes a listener for PropertyChange events.
Parameters:
propertychangelistener - PropertyChangeListener to be removed

setValue

public void setValue(Object obj)
Sets given value to TextField (ComboBox if it is Enumeration of integers).
Parameters:
obj - Value to be set.

Association Links

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

to Class javax.swing.JTextField