Class SpinnerEditComponent

All Implemented Interfaces:
EventListener, AttributeListener, EdgeListener, GraphListener, NodeListener, TransactionListener, ValueEditComponent

public class SpinnerEditComponent
extends AbstractValueEditComponent
An EditComponent, displaying values in a JSpinner-manner.
Version:
2.6.5
Recent revisions:
2.6.5
  • Constructor Details

    • SpinnerEditComponent

      public SpinnerEditComponent​(Displayable disp)
      Constructor for SpinnerEditComponent.
      Parameters:
      disp - containing the attributes to be displayed
  • Method Details

    • getComponent

      public JComponent getComponent()
      Returns the ValueEditComponent's JComponent.
      Returns:
      underlying JSpinner Component
    • setDisplayable

      public void setDisplayable​(Displayable disp)
      Sets the displayable.
      Specified by:
      setDisplayable in interface ValueEditComponent
      Overrides:
      setDisplayable in class AbstractValueEditComponent
      Parameters:
      disp - new displayable
    • setEditFieldValue

      public void setEditFieldValue()
      Sets the current value of the Attribute in the corresponding JComponent.
    • setShowEmpty

      public void setShowEmpty​(boolean showEmpty)
      Description copied from interface: ValueEditComponent
      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.
      Specified by:
      setShowEmpty in interface ValueEditComponent
      Overrides:
      setShowEmpty in class AbstractValueEditComponent
    • setValue

      public void setValue()
      Sets the value of the displayable, specified in the JComponent. But only, if it is different.