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

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
Direct Known Subclasses:
SwingColorEditor, ExtendedEditor, SwingBooleanEditor, SwingComboBoxEditor, SwingEnumEditor, SwingIntegerEditor, SwingNumberEditor, SwingStringEditor

public class SwingEditorSupport
extends PropertyEditorSupport

Helps to build custom property editor. This class is used as base for all other Swing.* editors.

Author:
TogetherSoft

Field Summary
 protected final static DimensionMEDIUM_DIMENSION
           
 protected JPanelpanel
           
 protected final static DimensionSMALL_DIMENSION
           

Method Summary
 voidaddCellEditorListener(CellEditorListener l)
           Register a listener for EditingCanceled and EditingStoped events.
 protected voidfireEditingCanceled()
           Reports that editing cancelled.
 protected voidfireEditingStopped()
           Reports that editing stopped.
 ComponentgetCustomEditor()
           Returns visual component which represents this editor on UI.
 voidinit(IdeInspectorProperty property)
           Specifies IdeInspectorProperty to be edited.
 voidremoveCellEditorListener(CellEditorListener l)
           Removes a listener for EditingCanceled and EditingStoped events.
 protected final voidsetAlignment(JComponent jcomponent)
           
 booleansupportsCustomEditor()
           Checks whether this class supports custom editors.

Methods inherited from class java.beans.PropertyEditorSupport
setValue, getValue, 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

MEDIUM_DIMENSION

protected final static Dimension MEDIUM_DIMENSION

panel

protected JPanel panel

SMALL_DIMENSION

protected final static Dimension SMALL_DIMENSION
Method Detail

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)
Register a listener for EditingCanceled and EditingStoped events.
Parameters:
l - CellEditorListener to be registered

fireEditingCanceled

protected void fireEditingCanceled()
Reports that editing cancelled. This method is thread-safe.

fireEditingStopped

protected void fireEditingStopped()
Reports that editing stopped. This method is thread-safe.

getCustomEditor

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

init

public void init(IdeInspectorProperty property)
Specifies IdeInspectorProperty to be edited.
Parameters:
property - IdeInspectorProperty to be edited

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)
Removes a listener for EditingCanceled and EditingStoped events.
Parameters:
l - CellEditorListener to be removed

setAlignment

protected final void setAlignment(JComponent jcomponent)

supportsCustomEditor

public boolean supportsCustomEditor()
Checks whether this class supports custom editors.
Returns: Always true

Association Links

to Class javax.swing.JPanel

to Class java.awt.Dimension

to Class java.awt.Dimension

to Class java.util.ArrayList

to Class javax.swing.event.ChangeEvent