Class SwingEditorSupport
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- com.inductiveautomation.factorypmi.designer.property.editors.bb.SwingEditorSupport
-
- All Implemented Interfaces:
java.beans.PropertyEditor
- Direct Known Subclasses:
ColorArrayEditor
,ConfiguratorEditorSupport
,CursorEditor
,SwingDimensionEditor
,SwingEnumEditor
,SwingIconEditor
,SwingInsetsEditor
,SwingObjectEditor
,SwingPointEditor
,SwingRectangleEditor
public class SwingEditorSupport extends java.beans.PropertyEditorSupport
Base class of all Swing based property editors.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object
bean
protected static java.awt.Insets
BUTTON_MARGIN
protected boolean
canceled
protected VisionDesignerInterface
fpmi
protected static java.awt.Dimension
LARGE_DIMENSION
protected static java.awt.Dimension
MEDIUM_DIMENSION
protected int
modelColumn
protected int
modelRow
protected javax.swing.JPanel
panel
Component which holds the editor.protected java.lang.String
propertyName
protected static java.awt.Dimension
SMALL_DIMENSION
protected javax.swing.table.TableModel
tableModel
protected static java.awt.Dimension
TINY_DIMENSION
-
Constructor Summary
Constructors Constructor Description SwingEditorSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getBean()
DesignerContext
getContext()
java.awt.Component
getCustomEditor()
Returns the panel responsible for rendering the PropertyEditor.VisionDesignerInterface
getFPMIContext()
java.lang.String
getPropertyName()
void
init(VisionDesignerInterface fpmi, java.beans.FeatureDescriptor descriptor, java.lang.Object bean, javax.swing.table.TableModel model, int row, int col)
For property editors that must be initialized with values from the property descriptor.protected void
init(java.beans.FeatureDescriptor descriptor)
boolean
isCanceled()
protected void
setAlignment(javax.swing.JComponent c)
boolean
supportsCustomEditor()
-
-
-
Field Detail
-
panel
protected javax.swing.JPanel panel
Component which holds the editor. Subclasses are responsible for instantiating this panel.
-
fpmi
protected VisionDesignerInterface fpmi
-
bean
protected java.lang.Object bean
-
propertyName
protected java.lang.String propertyName
-
canceled
protected boolean canceled
-
tableModel
protected javax.swing.table.TableModel tableModel
-
modelRow
protected int modelRow
-
modelColumn
protected int modelColumn
-
LARGE_DIMENSION
protected static final java.awt.Dimension LARGE_DIMENSION
-
MEDIUM_DIMENSION
protected static final java.awt.Dimension MEDIUM_DIMENSION
-
SMALL_DIMENSION
protected static final java.awt.Dimension SMALL_DIMENSION
-
TINY_DIMENSION
protected static final java.awt.Dimension TINY_DIMENSION
-
BUTTON_MARGIN
protected static final java.awt.Insets BUTTON_MARGIN
-
-
Method Detail
-
getCustomEditor
public java.awt.Component getCustomEditor()
Returns the panel responsible for rendering the PropertyEditor.- Specified by:
getCustomEditor
in interfacejava.beans.PropertyEditor
- Overrides:
getCustomEditor
in classjava.beans.PropertyEditorSupport
-
supportsCustomEditor
public boolean supportsCustomEditor()
- Specified by:
supportsCustomEditor
in interfacejava.beans.PropertyEditor
- Overrides:
supportsCustomEditor
in classjava.beans.PropertyEditorSupport
-
getContext
public DesignerContext getContext()
-
getFPMIContext
public VisionDesignerInterface getFPMIContext()
-
setAlignment
protected final void setAlignment(javax.swing.JComponent c)
-
init
public void init(VisionDesignerInterface fpmi, java.beans.FeatureDescriptor descriptor, java.lang.Object bean, javax.swing.table.TableModel model, int row, int col)
For property editors that must be initialized with values from the property descriptor.
-
init
protected void init(java.beans.FeatureDescriptor descriptor)
-
getBean
public java.lang.Object getBean()
-
getPropertyName
public java.lang.String getPropertyName()
-
isCanceled
public boolean isCanceled()
-
-