Class JComponentParameterEditor
java.lang.Object
org.graffiti.plugin.editcomponent.JComponentParameterEditor
- All Implemented Interfaces:
EventListener,AttributeListener,EdgeListener,GraphListener,NodeListener,TransactionListener,ValueEditComponent
public class JComponentParameterEditor extends Object implements ValueEditComponent
-
Field Summary
Fields inherited from interface org.graffiti.plugin.editcomponent.ValueEditComponent
EMPTY_STRING -
Constructor Summary
Constructors Constructor Description JComponentParameterEditor(Displayable disp) -
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.voidpostAttributeAdded(AttributeEvent e)Called after an attribute has been added.voidpostAttributeChanged(AttributeEvent e)Called after an attribute has been changed.voidpostAttributeRemoved(AttributeEvent e)Called after an attribute has been removed.voidpostDirectedChanged(EdgeEvent e)Called after the edge was set directed or undirected.voidpostEdgeAdded(GraphEvent e)Called after an edge has been added to the graph.voidpostEdgeRemoved(GraphEvent e)Called after an edge has been removed from the graph.voidpostEdgeReversed(EdgeEvent e)Called after the edge has been reversed.voidpostGraphCleared(GraphEvent e)Called after methodclear()has been called on a graph.voidpostInEdgeAdded(NodeEvent e)voidpostInEdgeRemoved(NodeEvent e)voidpostNodeAdded(GraphEvent e)Called after an edge has been added to the graph.voidpostNodeRemoved(GraphEvent e)Called after a node has been removed from the graph.voidpostOutEdgeAdded(NodeEvent e)voidpostOutEdgeRemoved(NodeEvent e)voidpostSourceNodeChanged(EdgeEvent e)Called after the source node of an edge has changed.voidpostTargetNodeChanged(EdgeEvent e)Called after the target node of an edge has changed.voidpostUndirectedEdgeAdded(NodeEvent e)Called after an (undirected) edge has been added to the node.voidpostUndirectedEdgeRemoved(NodeEvent e)Called after an (undirected) edge has been removed from the node.voidpreAttributeAdded(AttributeEvent e)Called just before an attribute is added.voidpreAttributeChanged(AttributeEvent e)Called before a change of an attribute takes place.voidpreAttributeRemoved(AttributeEvent e)Called just before an attribute is removed.voidpreDirectedChanged(EdgeEvent e)Called before the edge is set directed or undirected.voidpreEdgeAdded(GraphEvent e)Called just before an edge is added to the graph.voidpreEdgeRemoved(GraphEvent e)Called just before an edge is removed from the graph.voidpreEdgeReversed(EdgeEvent e)Called before the edge is going to be reversed.voidpreGraphCleared(GraphEvent e)Called before methodclear()is called on a graph.voidpreInEdgeAdded(NodeEvent e)voidpreInEdgeRemoved(NodeEvent e)voidpreNodeAdded(GraphEvent e)Called just before a node is added to the graph.voidpreNodeRemoved(GraphEvent e)Called just before a node is removed from the graph.voidpreOutEdgeAdded(NodeEvent e)voidpreOutEdgeRemoved(NodeEvent e)voidpreSourceNodeChanged(EdgeEvent e)Called before a change of the source node of an edge takes place.voidpreTargetNodeChanged(EdgeEvent e)Called before a change of the target node of an edge takes place.voidpreUndirectedEdgeAdded(NodeEvent e)Called just before an (undirected) edge is added to the node.voidpreUndirectedEdgeRemoved(NodeEvent e)Called just before an (undirected) edge is removed from the node.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)voidtransactionFinished(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall status)Called when a transaction has stopped.voidtransactionStarted(TransactionEvent e)Called when a transaction has started.
-
Constructor Details
-
JComponentParameterEditor
-
-
Method Details
-
getComponent
Description copied from interface:ValueEditComponentReturns theValueEditComponent'sJComponent.- Specified by:
getComponentin interfaceValueEditComponent- Returns:
- the
ValueEditComponent'sJComponent.
-
getDisplayable
Description copied from interface:ValueEditComponentReturns theDisplayableinstance the currentValueEditComponentcontains.- Specified by:
getDisplayablein interfaceValueEditComponent- Returns:
- the
Displayableinstance the currentValueEditComponentcontains.
-
getShowEmpty
public boolean getShowEmpty()Description copied from interface:ValueEditComponentReturns true when this component actually does not represent the value of an attribute.- Specified by:
getShowEmptyin interfaceValueEditComponent- Returns:
- DOCUMENT ME!
-
isEnabled
public boolean isEnabled()Description copied from interface:ValueEditComponentReturns whether this component allows editing.- Specified by:
isEnabledin interfaceValueEditComponent- Returns:
- DOCUMENT ME!
-
setDisplayable
Description copied from interface:ValueEditComponentSets the object that will be displayed.- Specified by:
setDisplayablein interfaceValueEditComponent- Parameters:
disp- the object to connect to this component.
-
setEditFieldValue
public void setEditFieldValue()Description copied from interface:ValueEditComponentSets the current value of theDisplayablein the correspondingJComponent. IfshowEmptyis set to true, this component should instead show only empty fields.- Specified by:
setEditFieldValuein interfaceValueEditComponent
-
setEnabled
public void setEnabled(boolean enabled)Description copied from interface:ValueEditComponentSpecifies whether this component should allow editing.- Specified by:
setEnabledin interfaceValueEditComponent
-
setShowEmpty
public void setShowEmpty(boolean showEmpty)Description copied from interface:ValueEditComponentCalled 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:
setShowEmptyin interfaceValueEditComponent
-
setValue
public void setValue()Description copied from interface:ValueEditComponentSets the value of theDisplayablespecified in theJComponent. Should only change the value if the value is really different otherwise too many events will be sent.- Specified by:
setValuein interfaceValueEditComponent
-
postAttributeAdded
Description copied from interface:AttributeListenerCalled after an attribute has been added.- Specified by:
postAttributeAddedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
postAttributeChanged
Description copied from interface:AttributeListenerCalled after an attribute has been changed.- Specified by:
postAttributeChangedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
postAttributeRemoved
Description copied from interface:AttributeListenerCalled after an attribute has been removed.- Specified by:
postAttributeRemovedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
preAttributeAdded
Description copied from interface:AttributeListenerCalled just before an attribute is added.- Specified by:
preAttributeAddedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
preAttributeChanged
Description copied from interface:AttributeListenerCalled before a change of an attribute takes place.- Specified by:
preAttributeChangedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
preAttributeRemoved
Description copied from interface:AttributeListenerCalled just before an attribute is removed.- Specified by:
preAttributeRemovedin interfaceAttributeListener- Parameters:
e- the AttributeEvent detailing the changes.
-
transactionFinished
public void transactionFinished(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall status)Description copied from interface:TransactionListenerCalled when a transaction has stopped.
The classTransactionHashMapmerges duplicateAttributeEvents. In case the Attribute path for the sameAttributableis not equal, detailed information about Attribute path is lost. Instead a genericAttributeEventcontaining just theAttributableis in the list of changed Objects (seeTransactionEvent).
In case no detailed information about an Attribute change is available, your code should completely re-process the affectedAttributable.- Specified by:
transactionFinishedin interfaceTransactionListener- Parameters:
e- the EdgeEvent detailing the changes.
-
transactionStarted
Description copied from interface:TransactionListenerCalled when a transaction has started.- Specified by:
transactionStartedin interfaceTransactionListener- Parameters:
e- the EdgeEvent detailing the changes.
-
postDirectedChanged
Description copied from interface:EdgeListenerCalled after the edge was set directed or undirected.- Specified by:
postDirectedChangedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
postEdgeReversed
Description copied from interface:EdgeListenerCalled after the edge has been reversed.- Specified by:
postEdgeReversedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
postSourceNodeChanged
Description copied from interface:EdgeListenerCalled after the source node of an edge has changed.- Specified by:
postSourceNodeChangedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
postTargetNodeChanged
Description copied from interface:EdgeListenerCalled after the target node of an edge has changed.- Specified by:
postTargetNodeChangedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
preDirectedChanged
Description copied from interface:EdgeListenerCalled before the edge is set directed or undirected.- Specified by:
preDirectedChangedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
preEdgeReversed
Description copied from interface:EdgeListenerCalled before the edge is going to be reversed.- Specified by:
preEdgeReversedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
preSourceNodeChanged
Description copied from interface:EdgeListenerCalled before a change of the source node of an edge takes place.- Specified by:
preSourceNodeChangedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
preTargetNodeChanged
Description copied from interface:EdgeListenerCalled before a change of the target node of an edge takes place.- Specified by:
preTargetNodeChangedin interfaceEdgeListener- Parameters:
e- the EdgeEvent detailing the changes.
-
postEdgeAdded
Description copied from interface:GraphListenerCalled after an edge has been added to the graph.- Specified by:
postEdgeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postEdgeRemoved
Description copied from interface:GraphListenerCalled after an edge has been removed from the graph.- Specified by:
postEdgeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postGraphCleared
Description copied from interface:GraphListenerCalled after methodclear()has been called on a graph. No other events (like remove events) are generated.- Specified by:
postGraphClearedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postNodeAdded
Description copied from interface:GraphListenerCalled after an edge has been added to the graph.- Specified by:
postNodeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postNodeRemoved
Description copied from interface:GraphListenerCalled after a node has been removed from the graph. All edges incident to this node have already been removed (preEdgeRemoved and postEdgeRemoved have been called).- Specified by:
postNodeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preEdgeAdded
Description copied from interface:GraphListenerCalled just before an edge is added to the graph.- Specified by:
preEdgeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preEdgeRemoved
Description copied from interface:GraphListenerCalled just before an edge is removed from the graph.- Specified by:
preEdgeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preGraphCleared
Description copied from interface:GraphListenerCalled before methodclear()is called on a graph. No other events (like remove events) are generated.- Specified by:
preGraphClearedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preNodeAdded
Description copied from interface:GraphListenerCalled just before a node is added to the graph.- Specified by:
preNodeAddedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
preNodeRemoved
Description copied from interface:GraphListenerCalled just before a node is removed from the graph. This method is called before the incident edges are deleted.- Specified by:
preNodeRemovedin interfaceGraphListener- Parameters:
e- the GraphEvent detailing the changes.
-
postInEdgeAdded
-
postInEdgeRemoved
-
postOutEdgeAdded
-
postOutEdgeRemoved
-
postUndirectedEdgeAdded
Description copied from interface:NodeListenerCalled after an (undirected) edge has been added to the node. (For directed edges pre- In/Out- EdgeAdded is called.)- Specified by:
postUndirectedEdgeAddedin interfaceNodeListener- Parameters:
e- The NodeEvent detailing the changes.
-
postUndirectedEdgeRemoved
Description copied from interface:NodeListenerCalled after an (undirected) edge has been removed from the node. (For directed edges pre- In/Out- EdgeRemoved is called.)- Specified by:
postUndirectedEdgeRemovedin interfaceNodeListener- Parameters:
e- The NodeEvent detailing the changes.
-
preInEdgeAdded
-
preInEdgeRemoved
-
preOutEdgeAdded
-
preOutEdgeRemoved
-
preUndirectedEdgeAdded
Description copied from interface:NodeListenerCalled just before an (undirected) edge is added to the node. (For directed edges pre- In/Out- EdgeAdded is called.)- Specified by:
preUndirectedEdgeAddedin interfaceNodeListener- Parameters:
e- The NodeEvent detailing the changes.
-
preUndirectedEdgeRemoved
Description copied from interface:NodeListenerCalled just before an (undirected) edge is removed from the node. (For directed edges pre- In/Out- EdgeRemoved is called.)- Specified by:
preUndirectedEdgeRemovedin interfaceNodeListener- Parameters:
e- The NodeEvent detailing the changes.
-
setValue
- Specified by:
setValuein interfaceValueEditComponent
-
setParameter
- Specified by:
setParameterin interfaceValueEditComponent
-