|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JGraph net.clackrouter.router.graph.RouterGraph
public class RouterGraph
The extension of JGraph to display a modular Clack router.
This is essentially a GPGraph from JGraphpad with some minor modifications. There is little Clack specific code in here, save tooltips
Nested Class Summary | |
---|---|
static class |
RouterGraph.ScaledVertexRenderer
|
class |
RouterGraph.ScaledVertexView
|
Field Summary | |
---|---|
protected java.awt.Image |
background
|
protected java.awt.Color |
defaultBorderColor
|
protected boolean |
displayelements
|
protected java.awt.print.PageFormat |
pageFormat
|
protected boolean |
pagevisible
|
static VertexRenderer |
renderer
|
Constructor Summary | |
---|---|
RouterGraph()
|
|
RouterGraph(GraphModel model)
|
|
RouterGraph(GraphModel model,
GraphLayoutCache view)
|
Method Summary | |
---|---|
static void |
addSampleData(GraphModel model)
|
protected EdgeView |
createEdgeView(JGraph graph,
CellMapper mapper,
java.lang.Object cell)
|
protected VertexView |
createVertexView(JGraph graph,
CellMapper cm,
java.lang.Object v)
Creates and returns a default GraphView . |
java.lang.Object[] |
getAll()
|
java.awt.Image |
getBackgroundImage()
|
java.lang.Object[] |
getEdges(java.lang.Object[] cells)
|
java.lang.Object[] |
getEdgesBetween(java.lang.Object vertex1,
java.lang.Object vertex2)
|
static GPUserObject |
getGPUserObject(java.lang.Object cell)
|
java.lang.Object |
getNeighbour(java.lang.Object edge,
java.lang.Object vertex)
|
CellView |
getNextSelectableViewAt(CellView c,
double x,
double y)
|
java.awt.print.PageFormat |
getPageFormat()
|
java.lang.Object[] |
getSelectionEdges()
|
java.lang.Object[] |
getSelectionVertices()
|
java.lang.Object |
getSourceVertex(java.lang.Object edge)
|
CellView |
getSourceView(java.lang.Object edge)
|
java.lang.Object |
getTargetVertex(java.lang.Object edge)
|
CellView |
getTargetView(java.lang.Object edge)
|
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event)
Overrides JComponent 'buttonSelect getToolTipText
method in order to allow the graph controller to create a tooltip
for the topmost cell under the mousepointer. |
java.lang.Object[] |
getVertices(java.lang.Object[] cells)
|
boolean |
isDisplayElements()
|
boolean |
isEdge(java.lang.Object object)
|
boolean |
isGroup(java.lang.Object cell)
Returns true if object is a vertex, that is, if it
is not an instance of Port or Edge, and all of its children are
ports, or it has no children. |
boolean |
isNeighbour(java.lang.Object v1,
java.lang.Object v2)
Returns true if the given vertices are conntected by a single edge in this document. |
boolean |
isPageVisible()
|
boolean |
isPort(java.lang.Object object)
|
boolean |
isVertex(java.lang.Object object)
Returns true if object is a vertex, that is, if it
is not an instance of Port or Edge, and all of its children are
ports, or it has no children. |
void |
setBackgroundImage(java.awt.Image img)
|
void |
setDisplayElements(boolean flag)
|
void |
setPageFormat(java.awt.print.PageFormat format)
|
void |
setPageVisible(boolean flag)
|
void |
updateUI()
Notification from the UIManager that the L&F has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean pagevisible
protected boolean displayelements
protected transient java.awt.print.PageFormat pageFormat
protected java.awt.Image background
protected transient java.awt.Color defaultBorderColor
public static VertexRenderer renderer
Constructor Detail |
---|
public RouterGraph()
public RouterGraph(GraphModel model)
public RouterGraph(GraphModel model, GraphLayoutCache view)
Method Detail |
---|
public static GPUserObject getGPUserObject(java.lang.Object cell)
public static void addSampleData(GraphModel model)
public void setPageFormat(java.awt.print.PageFormat format)
public java.awt.print.PageFormat getPageFormat()
public void setDisplayElements(boolean flag)
public boolean isDisplayElements()
public void setPageVisible(boolean flag)
public boolean isPageVisible()
public void setBackgroundImage(java.awt.Image img)
public java.awt.Image getBackgroundImage()
protected EdgeView createEdgeView(JGraph graph, CellMapper mapper, java.lang.Object cell)
protected VertexView createVertexView(JGraph graph, CellMapper cm, java.lang.Object v)
GraphView
.
GraphView
public boolean isGroup(java.lang.Object cell)
object
is a vertex, that is, if it
is not an instance of Port or Edge, and all of its children are
ports, or it has no children.
public boolean isVertex(java.lang.Object object)
object
is a vertex, that is, if it
is not an instance of Port or Edge, and all of its children are
ports, or it has no children.
public boolean isPort(java.lang.Object object)
public boolean isEdge(java.lang.Object object)
public java.lang.Object[] getSelectionVertices()
public java.lang.Object[] getVertices(java.lang.Object[] cells)
public java.lang.Object[] getSelectionEdges()
public java.lang.Object[] getAll()
public java.lang.Object[] getEdges(java.lang.Object[] cells)
public java.lang.Object getNeighbour(java.lang.Object edge, java.lang.Object vertex)
public java.lang.Object getSourceVertex(java.lang.Object edge)
public java.lang.Object getTargetVertex(java.lang.Object edge)
public CellView getSourceView(java.lang.Object edge)
public CellView getTargetView(java.lang.Object edge)
public java.lang.Object[] getEdgesBetween(java.lang.Object vertex1, java.lang.Object vertex2)
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
JComponent
'buttonSelect getToolTipText
method in order to allow the graph controller to create a tooltip
for the topmost cell under the mousepointer. This differs from JTree
where the renderers tooltip is used.
NOTE: For JGraph
to properly display tooltips of its
renderers, JGraph
must be a registered component with the
ToolTipManager
. This can be done by invoking
ToolTipManager.sharedInstance().registerComponent(graph)
.
This is not done automatically!
event
- the MouseEvent
that initiated the
ToolTip
display
null
if event
is nullpublic void updateUI()
UIManager
that the L&F has changed.
Replaces the current UI object with the latest version from the
UIManager
. Subclassers can override this to support
different GraphUIs.
JComponent.updateUI()
public boolean isNeighbour(java.lang.Object v1, java.lang.Object v2)
public CellView getNextSelectableViewAt(CellView c, double x, double y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |