Interface ValueEditComponent
- All Superinterfaces:
AttributeListener
,EdgeListener
,EventListener
,GraphListener
,NodeListener
,TransactionListener
- All Known Implementing Classes:
AbstractDialogableEditComponent
,AbstractValueEditComponent
,ArrowShapeEditComponent
,BooleanEditComponent
,ByteEditComponent
,ChartAttributeEditor
,ChartColorAttributeEditor
,ChartsColumnAttributeEditor
,ClusterColorAttributeEditor
,ColorChooserEditComponent
,ComboBoxEditComponent
,CompoundImageAttributeEditor
,CompoundImagePositionAttributeEditor
,DockingAttributeEditor
,DoubleEditComponent
,EdgeArrowShapeEditComponent
,EdgeEditComponent
,EdgeShapeEditComponent
,EnhDoubleEditComponent
,FloatEditComponent
,FontAttributeEditor
,GradientFillAttributeEditor
,GraphComponentEditComponent
,IntegerEditComponent
,JComponentParameterEditor
,KeggGroupPartAttributeEditor
,KeggReactionIdAttributeEditor
,KeggReactionTypeAttributeEditor
,KeggRelationSubTypeAttributeEditor
,KeggRelationTypeAttributeEditor
,KeggTypeAttributeEditor
,LabelAlignmentAttributeEditor
,LabelFontAttributeEditor
,LabelStyleAttributeEditor
,LandmarkSliderComponent
,LineModeAttributeEditor
,LineModeEditComponent
,LongEditComponent
,MultiFileSelectionEditComponent
,NodeEditComponent
,NodePathwayLinkVisualizationAttributeEditor
,NodeShapeEditComponent
,NumberEditComponent
,ObjectListComponent
,ShortEditComponent
,SingleGraphElementEditComponent
,SliderComponent
,SpinnerEditComponent
,StandardValueEditComponent
,StringEditComponent
,TextAreaEditComponent
,ThicknessAttributeEditor
,URLAttributeEditor
,ValueEditComponentAdapter
,XMLAttributeEditor
public interface ValueEditComponent extends AttributeListener, EdgeListener, GraphListener, NodeListener, TransactionListener
A generic extension of a
javax.swing.JComponent
which allows
editing of Attributes. Each class extending ValueEditComponent
contains an org.graffiti.attributes.Attribute
and a
javax.swing.JComponent
for editing the
org.graffiti.attributes.Attribute
. As attribute values may
change from several sources a ValueEditComponent
must implement
the org.graffiti.event.AttributeListener
-interface.- See Also:
Attribute
,AttributeListener
,JComponent
-
Field Summary
Fields Modifier and Type Field Description static String
EMPTY_STRING
Preferred string to be displayed by edit components that have a showEmpty value of true. -
Method Summary
Modifier and Type Method Description JComponent
getComponent()
Returns theValueEditComponent
'sJComponent
.Displayable
getDisplayable()
Returns theDisplayable
instance the currentValueEditComponent
contains.boolean
getShowEmpty()
Returns true when this component actually does not represent the value of an attribute.boolean
isEnabled()
Returns whether this component allows editing.void
setDisplayable(Displayable disp)
Sets the object that will be displayed.void
setEditFieldValue()
Sets the current value of theDisplayable
in the correspondingJComponent
.void
setEnabled(boolean enabled)
Specifies whether this component should allow editing.void
setParameter(String setting, Object value)
void
setShowEmpty(boolean showEmpty)
Called with a value of true when this component should display nothing instead of the value of its associated displayable.void
setValue()
Sets the value of theDisplayable
specified in theJComponent
.void
setValue(Collection<Displayable> attributes)
Methods inherited from interface org.graffiti.event.AttributeListener
postAttributeAdded, postAttributeChanged, postAttributeRemoved, preAttributeAdded, preAttributeChanged, preAttributeRemoved
Methods inherited from interface org.graffiti.event.EdgeListener
postDirectedChanged, postEdgeReversed, postSourceNodeChanged, postTargetNodeChanged, preDirectedChanged, preEdgeReversed, preSourceNodeChanged, preTargetNodeChanged
Methods inherited from interface org.graffiti.event.GraphListener
postEdgeAdded, postEdgeRemoved, postGraphCleared, postNodeAdded, postNodeRemoved, preEdgeAdded, preEdgeRemoved, preGraphCleared, preNodeAdded, preNodeRemoved
Methods inherited from interface org.graffiti.event.NodeListener
postUndirectedEdgeAdded, postUndirectedEdgeRemoved, preUndirectedEdgeAdded, preUndirectedEdgeRemoved
Methods inherited from interface org.graffiti.event.TransactionListener
transactionFinished, transactionStarted
-
Field Details
-
EMPTY_STRING
Preferred string to be displayed by edit components that have a showEmpty value of true.- See Also:
- Constant Field Values
-
-
Method Details
-
getComponent
JComponent getComponent()Returns theValueEditComponent
'sJComponent
.- Returns:
- the
ValueEditComponent
'sJComponent
.
-
setDisplayable
Sets the object that will be displayed.- Parameters:
disp
- the object to connect to this component.
-
getDisplayable
Displayable getDisplayable()Returns theDisplayable
instance the currentValueEditComponent
contains.- Returns:
- the
Displayable
instance the currentValueEditComponent
contains.
-
setEditFieldValue
void setEditFieldValue()Sets the current value of theDisplayable
in the correspondingJComponent
. IfshowEmpty
is set to true, this component should instead show only empty fields. -
setEnabled
void setEnabled(boolean enabled)Specifies whether this component should allow editing.- Parameters:
enabled
-
-
isEnabled
boolean isEnabled()Returns whether this component allows editing.- Returns:
- DOCUMENT ME!
-
setShowEmpty
void setShowEmpty(boolean showEmpty)Called with a value of true when this component should display nothing instead of the value of its associated displayable. This is used when several displayables use this component but have different values. When set to false, the value of the displayable associated with this component is used. -
getShowEmpty
boolean getShowEmpty()Returns true when this component actually does not represent the value of an attribute.- Returns:
- DOCUMENT ME!
-
setValue
void setValue()Sets the value of theDisplayable
specified in theJComponent
. Should only change the value if the value is really different otherwise too many events will be sent. -
setValue
-
setParameter
-