Class NullView
java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.plugins.gui.ipk_graffitiview.NullView
- All Implemented Interfaces:
Autoscroll,EventListener,AttributeListener,EdgeListener,GraphListener,NodeListener,TransactionListener,View,Zoomable,ZoomListener
public class NullView extends Object implements View
-
Field Summary
-
Constructor Summary
Constructors Constructor Description NullView() -
Method Summary
Modifier and Type Method Description voidaddMessageListener(MessageListener ml)Adds a message listener to the view.voidattributeChanged(Attribute attr)Called when a graphics attributes of the Graph represented by this view has changed.voidautoscroll(Point cursorLocn)voidclose()Closes the current view.voidclosing(AWTEvent e)voidcompleteRedraw()Instructs the view to do completely refresh its contents.Set<AttributeComponent>getAttributeComponentsForElement(GraphElement ge)InsetsgetAutoscrollInsets()Map<?,?>getComponentElementMap()Returns the map mappingGraphElements withGraphElementComponents.GraphElementComponentgetComponentForElement(GraphElement ge)Returns the mainGraphElementComponentassociated with the givenGraphElement.GraphgetGraph()JComponentgetViewComponent()Returns the main component of the view.StringgetViewName()Returns the viewName.JComponentgetViewToolbarComponentBackground()JComponentgetViewToolbarComponentBottom()JComponentgetViewToolbarComponentLeft()JComponentgetViewToolbarComponentRight()JComponentgetViewToolbarComponentTop()AffineTransformgetZoom()DOCUMENT ME!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.booleanputInScrollPane()booleanredrawActive()voidremoveMessageListener(MessageListener ml)Removes a message listener from the view.If the view have been started without editor instance, this method may be empty.voidrepaint(GraphElement ge)Repaints the given graph elementvoidsetAttributeComponentManager(AttributeComponentManager acm)Sets the AttributeComponentManager used by this view.voidsetGraph(Graph graph)Sets the graph of the view to the specified value.voidtransactionFinished(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall s)Called when a transaction has stopped.voidtransactionStarted(TransactionEvent e)Called when a transaction has started.booleanworksWithTab(InspectorTab tab)voidzoomChanged(AffineTransform newZoom)Indicates that a zoom value has changed.
-
Constructor Details
-
NullView
public NullView()
-
-
Method Details
-
setAttributeComponentManager
Description copied from interface:ViewSets the AttributeComponentManager used by this view.- Specified by:
setAttributeComponentManagerin interfaceView
-
getComponentElementMap
Description copied from interface:ViewReturns the map mappingGraphElements withGraphElementComponents.- Specified by:
getComponentElementMapin interfaceView- Returns:
- DOCUMENT ME!
-
getComponentForElement
Description copied from interface:ViewReturns the mainGraphElementComponentassociated with the givenGraphElement.- Specified by:
getComponentForElementin interfaceView- Parameters:
ge-GraphElementfor which the component is wanted.- Returns:
- the
GraphElementComponentused to display the givenGraphELement.
-
setGraph
Description copied from interface:ViewSets the graph of the view to the specified value. -
getGraph
-
getViewComponent
Description copied from interface:ViewReturns the main component of the view.- Specified by:
getViewComponentin interfaceView- Returns:
- the main component of the view.
-
getViewName
Description copied from interface:ViewReturns the viewName.- Specified by:
getViewNamein interfaceView- Returns:
- String
-
addMessageListener
Description copied from interface:ViewAdds a message listener to the view. If the view have been started without editor instance, this method may be empty.- Specified by:
addMessageListenerin interfaceView- Parameters:
ml- a message listener
-
close
public void close()Description copied from interface:ViewCloses the current view. -
completeRedraw
public void completeRedraw()Description copied from interface:ViewInstructs the view to do completely refresh its contents.- Specified by:
completeRedrawin interfaceView
-
removeMessageListener
Description copied from interface:ViewRemoves a message listener from the view.If the view have been started without editor instance, this method may be empty.- Specified by:
removeMessageListenerin interfaceView- Parameters:
ml- a message listener
-
repaint
Description copied from interface:ViewRepaints the given graph element -
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.
-
transactionFinished
public void transactionFinished(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall s)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.
-
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.
-
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.
-
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.
-
getAutoscrollInsets
- Specified by:
getAutoscrollInsetsin interfaceAutoscroll
-
autoscroll
- Specified by:
autoscrollin interfaceAutoscroll
-
zoomChanged
Description copied from interface:ZoomListenerIndicates that a zoom value has changed.- Specified by:
zoomChangedin interfaceZoomListener
-
getZoom
Description copied from interface:ZoomableDOCUMENT ME! -
putInScrollPane
public boolean putInScrollPane()- Specified by:
putInScrollPanein interfaceView
-
getAttributeComponentsForElement
- Specified by:
getAttributeComponentsForElementin interfaceView
-
getViewToolbarComponentTop
- Specified by:
getViewToolbarComponentTopin interfaceView- Returns:
- Null, or a Double Object specifying the height (or a TableLayout-constant) of empty space or a JComponent, placed above the graph view and sized according to its preferred height, the full width of the window is used.
-
getViewToolbarComponentBottom
- Specified by:
getViewToolbarComponentBottomin interfaceView- Returns:
- Null, or a Double Object specifying the height (or a TableLayout-constant) of empty space or a JComponent, placed below the graph view and sized according to its preferred height, the full width of the window is used.
-
getViewToolbarComponentLeft
- Specified by:
getViewToolbarComponentLeftin interfaceView- Returns:
- Null, or a Double Object specifying the width (or a TableLayout-constant) of empty space or a JComponent, placed left of the graph view and sized according to its preferred height, the height of graph view next to the component is used.
-
getViewToolbarComponentRight
- Specified by:
getViewToolbarComponentRightin interfaceView- Returns:
- Null, or a Double Object specifying the width (or a TableLayout-constant) of empty space or a JComponent, placed to the right of the graph view and sized according to its preferred height, the height of graph view next to the component is used.
-
getViewToolbarComponentBackground
- Specified by:
getViewToolbarComponentBackgroundin interfaceView- Returns:
- Either null or JComponent, placed behind the graph view. The size corresponds to the window size. Certain components may draw over the graph view, resulting in redraw bugs. But a simple JComponent with hand-made paint-code should work fine.
-
closing
-
worksWithTab
- Specified by:
worksWithTabin interfaceView
-
redrawActive
public boolean redrawActive()- Specified by:
redrawActivein interfaceZoomable- Returns:
-
attributeChanged
Description copied from interface:ViewCalled when a graphics attributes of the Graph represented by this view has changed.- Specified by:
attributeChangedin interfaceView- Parameters:
attr- the attribute that has triggered the event.
-