org.graffiti.plugin.view
Interface View

All Superinterfaces:
AttributeConsumer, AttributeListener, Autoscroll, EdgeListener, EventListener, GraphListener, NodeListener, TransactionListener, Zoomable
All Known Subinterfaces:
InteractiveView<T>, View2D
All Known Implementing Classes:
AbstractView

public interface View
extends GraphListener, NodeListener, EdgeListener, AttributeListener, Autoscroll, AttributeConsumer, Zoomable

Represents a view of a plugin.

Version:
$Revision: 5768 $

Field Summary
static AffineTransform NO_ZOOM
          Standard zoom value.
 
Method Summary
 void addMessageListener(MessageListener ml)
          Adds a message listener to the view.
 void close()
          Closes the current view.
 void completeRedraw()
          Instructs the view to do completely refresh its contents.
 boolean embedsInJScrollPane()
          Returns if this View shall be embedded in a JScrollPane.
 Map<GraphElement,GraphElementComponent> getComponentElementMap()
          Returns the map mapping GraphElements with GraphElementComponents.
 GraphElementComponent getComponentForElement(GraphElement ge)
          Returns the main GraphElementComponent associated with the given GraphElement.
 Grid getGrid()
          Returns the current Grid of this view.
 int getId()
          Get unique id of this view.
 JComponent getViewComponent()
          Returns the main component of the view.
 String getViewName()
          Returns the viewName.
 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 element
 void setAttributeComponentManager(AttributeComponentManager acm)
          Sets the AttributeComponentManager used by this view.
 void setGraph(Graph graph)
          Sets the graph of the view to the specified value.
 void setGrid(Grid grid)
          Sets the current Grid for this view.
 void setId(int id)
          Assign a unique, as far as the session is concerned, to this view.
 boolean supportsGrid()
          Returns if this view supports Grids.
 
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
postInEdgeAdded, postInEdgeRemoved, postOutEdgeAdded, postOutEdgeRemoved, postUndirectedEdgeAdded, postUndirectedEdgeRemoved, preInEdgeAdded, preInEdgeRemoved, preOutEdgeAdded, preOutEdgeRemoved, preUndirectedEdgeAdded, preUndirectedEdgeRemoved
 
Methods inherited from interface org.graffiti.event.EdgeListener
postDirectedChanged, postEdgeReversed, postSourceNodeChanged, postTargetNodeChanged, preDirectedChanged, preEdgeReversed, preSourceNodeChanged, preTargetNodeChanged
 
Methods inherited from interface org.graffiti.event.AttributeListener
postAttributeAdded, postAttributeChanged, postAttributeRemoved, preAttributeAdded, preAttributeChanged, preAttributeRemoved
 
Methods inherited from interface org.graffiti.event.TransactionListener
transactionFinished, transactionStarted
 
Methods inherited from interface java.awt.dnd.Autoscroll
autoscroll, getAutoscrollInsets
 
Methods inherited from interface org.graffiti.attributes.AttributeConsumer
getDirectedEdgeAttribute, getGraphAttribute, getNodeAttribute, getUndirectedEdgeAttribute
 
Methods inherited from interface org.graffiti.plugin.view.Zoomable
getZoom, getZoomTransform, setZoom
 

Field Detail

NO_ZOOM

static final AffineTransform NO_ZOOM
Standard zoom value.

Method Detail

setAttributeComponentManager

void setAttributeComponentManager(AttributeComponentManager acm)
Sets the AttributeComponentManager used by this view.


getComponentElementMap

Map<GraphElement,GraphElementComponent> getComponentElementMap()
Returns the map mapping GraphElements with GraphElementComponents.

Returns:
DOCUMENT ME!

getComponentForElement

GraphElementComponent getComponentForElement(GraphElement ge)
Returns the main GraphElementComponent associated with the given GraphElement.

Parameters:
ge - GraphElement for which the component is wanted.
Returns:
the GraphElementComponent used to display the given GraphELement.

setGraph

void setGraph(Graph graph)
Sets the graph of the view to the specified value.

Parameters:
graph - the new value of the graph.

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

addMessageListener

void addMessageListener(MessageListener ml)
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

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.

Parameters:
ml - a message listener

repaint

void repaint(GraphElement ge)
Repaints the given graph element

Parameters:
ge - the GraphElement to repaint.

setId

void setId(int id)
Assign a unique, as far as the session is concerned, to this view.

Parameters:
id - Unique id.

getId

int getId()
Get unique id of this view.

Returns:
Unique id.

embedsInJScrollPane

boolean embedsInJScrollPane()
Returns if this View shall be embedded in a JScrollPane.

Returns:
if this View shall be embedded in a JScrollPane.

supportsGrid

boolean supportsGrid()
Returns if this view supports Grids.

Returns:
true if this view supports Grids, false else.
See Also:
getGrid(), setGrid(Grid)

getGrid

Grid getGrid()
Returns the current Grid of this view.

Returns:
the current Grid of this view.
Throws:
UnsupportedOperationException - if this view does not support grids. If a view supports grids can be checked by a call to supportsGrid().
See Also:
setGrid(Grid)

setGrid

void setGrid(Grid grid)
Sets the current Grid for this view.

Parameters:
grid - the grid to be set for this view.
Throws:
UnsupportedOperationException - if this view does not support grids. If a view supports grids can be checked by a call to supportsGrid().
See Also:
getGrid()


Generated at 2012-05-30 11:00:36 PM CEST