Package org.graffiti.plugin.view
Interface View
- All Superinterfaces:
AttributeListener,Autoscroll,EdgeListener,EventListener,GraphListener,NodeListener,TransactionListener,Zoomable,ZoomListener
- All Known Implementing Classes:
AbstractView,ButtonOverlayView,FastView,GraffitiView,IPKGraffitiView,MatrixView,NullView
public interface View extends GraphListener, NodeListener, EdgeListener, AttributeListener, Autoscroll, ZoomListener, Zoomable
Represents a view of a plugin.
- Version:
- $Revision: 1.14 $
-
Field Summary
Fields Modifier and Type Field Description static AffineTransformNO_ZOOMStandard zoom value. -
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.voidclose()Closes the current view.voidclosing(AWTEvent e)voidcompleteRedraw()Instructs the view to do completely refresh its contents.Set<AttributeComponent>getAttributeComponentsForElement(GraphElement ge)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()ObjectgetViewToolbarComponentBottom()ObjectgetViewToolbarComponentLeft()ObjectgetViewToolbarComponentRight()ObjectgetViewToolbarComponentTop()booleanputInScrollPane()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.booleanworksWithTab(InspectorTab tab)Methods inherited from interface org.graffiti.event.AttributeListener
postAttributeAdded, postAttributeChanged, postAttributeRemoved, preAttributeAdded, preAttributeChanged, preAttributeRemovedMethods inherited from interface java.awt.dnd.Autoscroll
autoscroll, getAutoscrollInsetsMethods inherited from interface org.graffiti.event.EdgeListener
postDirectedChanged, postEdgeReversed, postSourceNodeChanged, postTargetNodeChanged, preDirectedChanged, preEdgeReversed, preSourceNodeChanged, preTargetNodeChangedMethods inherited from interface org.graffiti.event.GraphListener
postEdgeAdded, postEdgeRemoved, postGraphCleared, postNodeAdded, postNodeRemoved, preEdgeAdded, preEdgeRemoved, preGraphCleared, preNodeAdded, preNodeRemovedMethods inherited from interface org.graffiti.event.NodeListener
postUndirectedEdgeAdded, postUndirectedEdgeRemoved, preUndirectedEdgeAdded, preUndirectedEdgeRemovedMethods inherited from interface org.graffiti.event.TransactionListener
transactionFinished, transactionStartedMethods inherited from interface org.graffiti.plugin.view.Zoomable
getZoom, redrawActiveMethods inherited from interface org.graffiti.plugin.view.ZoomListener
zoomChanged
-
Field Details
-
NO_ZOOM
Standard zoom value.
-
-
Method Details
-
setAttributeComponentManager
Sets the AttributeComponentManager used by this view. -
getComponentElementMap
Map<?,?> getComponentElementMap()Returns the map mappingGraphElements withGraphElementComponents.- Returns:
- DOCUMENT ME!
-
getComponentForElement
Returns the mainGraphElementComponentassociated with the givenGraphElement.- Parameters:
ge-GraphElementfor which the component is wanted.- Returns:
- the
GraphElementComponentused to display the givenGraphELement.
-
getAttributeComponentsForElement
-
setGraph
Sets the graph of the view to the specified value.- Parameters:
graph- the new value of the graph.
-
getGraph
Graph getGraph() -
getViewComponent
JComponent getViewComponent()Returns the main component of the view.- Returns:
- the main component of the view.
-
getViewName
String getViewName()Returns the viewName.- Returns:
- String
-
putInScrollPane
boolean putInScrollPane() -
attributeChanged
Called when a graphics attributes of the Graph represented by this view has changed.- Parameters:
attr- the attribute that has triggered the event.
-
addMessageListener
Adds a message listener to the view. If the view have been started without editor instance, this method may be empty.- Parameters:
ml- a message listener
-
close
void close()Closes the current view. -
completeRedraw
void completeRedraw()Instructs the view to do completely refresh its contents. -
removeMessageListener
Removes a message listener from the view.If the view have been started without editor instance, this method may be empty.- Parameters:
ml- a message listener
-
repaint
Repaints the given graph element- Parameters:
ge- theGraphElementto repaint.
-
getViewToolbarComponentTop
Object getViewToolbarComponentTop()- 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
Object getViewToolbarComponentBottom()- 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
Object getViewToolbarComponentLeft()- 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
Object getViewToolbarComponentRight()- 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
JComponent getViewToolbarComponentBackground()- 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
-