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 StringEMPTY_STRINGPreferred string to be displayed by edit components that have a showEmpty value of true. -
Method Summary
Modifier and Type Method Description JComponentgetComponent()Returns theValueEditComponent'sJComponent.DisplayablegetDisplayable()Returns theDisplayableinstance the currentValueEditComponentcontains.booleangetShowEmpty()Returns true when this component actually does not represent the value of an attribute.booleanisEnabled()Returns whether this component allows editing.voidsetDisplayable(Displayable disp)Sets the object that will be displayed.voidsetEditFieldValue()Sets the current value of theDisplayablein the correspondingJComponent.voidsetEnabled(boolean enabled)Specifies whether this component should allow editing.voidsetParameter(String setting, Object value)voidsetShowEmpty(boolean showEmpty)Called with a value of true when this component should display nothing instead of the value of its associated displayable.voidsetValue()Sets the value of theDisplayablespecified in theJComponent.voidsetValue(Collection<Displayable> attributes)Methods inherited from interface org.graffiti.event.AttributeListener
postAttributeAdded, postAttributeChanged, postAttributeRemoved, preAttributeAdded, preAttributeChanged, preAttributeRemovedMethods inherited from interface org.graffiti.event.EdgeListener
postDirectedChanged, postEdgeReversed, postSourceNodeChanged, postTargetNodeChanged, preDirectedChanged, preEdgeReversed, preSourceNodeChanged, preTargetNodeChangedMethods inherited from interface org.graffiti.event.GraphListener
postEdgeAdded, postEdgeRemoved, postGraphCleared, postNodeAdded, postNodeRemoved, preEdgeAdded, preEdgeRemoved, preGraphCleared, preNodeAdded, preNodeRemovedMethods inherited from interface org.graffiti.event.NodeListener
postUndirectedEdgeAdded, postUndirectedEdgeRemoved, preUndirectedEdgeAdded, preUndirectedEdgeRemovedMethods 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 theDisplayableinstance the currentValueEditComponentcontains.- Returns:
- the
Displayableinstance the currentValueEditComponentcontains.
-
setEditFieldValue
void setEditFieldValue()Sets the current value of theDisplayablein the correspondingJComponent. IfshowEmptyis 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 theDisplayablespecified in theJComponent. Should only change the value if the value is really different otherwise too many events will be sent. -
setValue
-
setParameter
-