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 Details

    • EMPTY_STRING

      static final String 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 the ValueEditComponent's JComponent.
      Returns:
      the ValueEditComponent's JComponent.
    • setDisplayable

      void setDisplayable​(Displayable disp)
      Sets the object that will be displayed.
      Parameters:
      disp - the object to connect to this component.
    • getDisplayable

      Displayable getDisplayable()
      Returns the Displayable instance the current ValueEditComponent contains.
      Returns:
      the Displayable instance the current ValueEditComponent contains.
    • setEditFieldValue

      void setEditFieldValue()
      Sets the current value of the Displayable in the corresponding JComponent. If showEmpty 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 the Displayable specified in the JComponent. Should only change the value if the value is really different otherwise too many events will be sent.
    • setValue

      void setValue​(Collection<Displayable> attributes)
    • setParameter

      void setParameter​(String setting, Object value)