Class SpinnerEditComponent
java.lang.Object
org.graffiti.plugin.editcomponent.ValueEditComponentAdapter
org.graffiti.plugin.editcomponent.AbstractValueEditComponent
org.graffiti.plugin.editcomponent.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
-
Field Summary
Fields inherited from class org.graffiti.plugin.editcomponent.AbstractValueEditComponent
showEmpty
Fields inherited from interface org.graffiti.plugin.editcomponent.ValueEditComponent
EMPTY_STRING
-
Constructor Summary
Constructors Constructor Description SpinnerEditComponent(Displayable disp)
Constructor for SpinnerEditComponent. -
Method Summary
Modifier and Type Method Description JComponent
getComponent()
Returns theValueEditComponent
'sJComponent
.void
setDisplayable(Displayable disp)
Sets the displayable.void
setEditFieldValue()
Sets the current value of theAttribute
in the correspondingJComponent
.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 the displayable, specified in theJComponent
.Methods inherited from class org.graffiti.plugin.editcomponent.AbstractValueEditComponent
getDisplayable, getShowEmpty, isEnabled, postAttributeChanged, preAttributeChanged, setEnabled
Methods inherited from class org.graffiti.plugin.editcomponent.ValueEditComponentAdapter
postAttributeAdded, postAttributeRemoved, postDirectedChanged, postEdgeAdded, postEdgeRemoved, postEdgeReversed, postGraphCleared, postInEdgeAdded, postInEdgeRemoved, postNodeAdded, postNodeRemoved, postOutEdgeAdded, postOutEdgeRemoved, postSourceNodeChanged, postTargetNodeChanged, postUndirectedEdgeAdded, postUndirectedEdgeRemoved, preAttributeAdded, preAttributeRemoved, preDirectedChanged, preEdgeAdded, preEdgeRemoved, preEdgeReversed, preGraphCleared, preInEdgeAdded, preInEdgeRemoved, preNodeAdded, preNodeRemoved, preOutEdgeAdded, preOutEdgeRemoved, preSourceNodeChanged, preTargetNodeChanged, preUndirectedEdgeAdded, preUndirectedEdgeRemoved, setParameter, setValue, transactionFinished, transactionStarted
-
Constructor Details
-
SpinnerEditComponent
Constructor for SpinnerEditComponent.- Parameters:
disp
- containing the attributes to be displayed
-
-
Method Details
-
getComponent
Returns theValueEditComponent
'sJComponent
.- Returns:
- underlying JSpinner Component
-
setDisplayable
Sets the displayable.- Specified by:
setDisplayable
in interfaceValueEditComponent
- Overrides:
setDisplayable
in classAbstractValueEditComponent
- Parameters:
disp
- new displayable
-
setEditFieldValue
public void setEditFieldValue()Sets the current value of theAttribute
in the correspondingJComponent
. -
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 interfaceValueEditComponent
- Overrides:
setShowEmpty
in classAbstractValueEditComponent
-
setValue
public void setValue()Sets the value of the displayable, specified in theJComponent
. But only, if it is different.
-