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 AffineTransform
NO_ZOOM
Standard zoom value. -
Method Summary
Modifier and Type Method Description void
addMessageListener(MessageListener ml)
Adds a message listener to the view.void
attributeChanged(Attribute attr)
Called when a graphics attributes of the Graph represented by this view has changed.void
close()
Closes the current view.void
closing(AWTEvent e)
void
completeRedraw()
Instructs the view to do completely refresh its contents.Set<AttributeComponent>
getAttributeComponentsForElement(GraphElement ge)
Map<?,?>
getComponentElementMap()
Returns the map mappingGraphElement
s withGraphElementComponent
s.GraphElementComponent
getComponentForElement(GraphElement ge)
Returns the mainGraphElementComponent
associated with the givenGraphElement
.Graph
getGraph()
JComponent
getViewComponent()
Returns the main component of the view.String
getViewName()
Returns the viewName.JComponent
getViewToolbarComponentBackground()
Object
getViewToolbarComponentBottom()
Object
getViewToolbarComponentLeft()
Object
getViewToolbarComponentRight()
Object
getViewToolbarComponentTop()
boolean
putInScrollPane()
void
removeMessageListener(MessageListener ml)
Removes a message listener from the view.If the view have been started without editor instance, this method may be empty.void
repaint(GraphElement ge)
Repaints the given graph elementvoid
setAttributeComponentManager(AttributeComponentManager acm)
Sets the AttributeComponentManager used by this view.void
setGraph(Graph graph)
Sets the graph of the view to the specified value.boolean
worksWithTab(InspectorTab tab)
Methods inherited from interface org.graffiti.event.AttributeListener
postAttributeAdded, postAttributeChanged, postAttributeRemoved, preAttributeAdded, preAttributeChanged, preAttributeRemoved
Methods inherited from interface java.awt.dnd.Autoscroll
autoscroll, getAutoscrollInsets
Methods inherited from interface org.graffiti.event.EdgeListener
postDirectedChanged, postEdgeReversed, postSourceNodeChanged, postTargetNodeChanged, preDirectedChanged, preEdgeReversed, preSourceNodeChanged, preTargetNodeChanged
Methods inherited from interface org.graffiti.event.GraphListener
postEdgeAdded, postEdgeRemoved, postGraphCleared, postNodeAdded, postNodeRemoved, preEdgeAdded, preEdgeRemoved, preGraphCleared, preNodeAdded, preNodeRemoved
Methods inherited from interface org.graffiti.event.NodeListener
postUndirectedEdgeAdded, postUndirectedEdgeRemoved, preUndirectedEdgeAdded, preUndirectedEdgeRemoved
Methods inherited from interface org.graffiti.event.TransactionListener
transactionFinished, transactionStarted
Methods inherited from interface org.graffiti.plugin.view.Zoomable
getZoom, redrawActive
Methods 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 mappingGraphElement
s withGraphElementComponent
s.- Returns:
- DOCUMENT ME!
-
getComponentForElement
Returns the mainGraphElementComponent
associated with the givenGraphElement
.- Parameters:
ge
-GraphElement
for which the component is wanted.- Returns:
- the
GraphElementComponent
used 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
- theGraphElement
to 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
-