public class GraphConnection extends GraphItem
CONNECTION, CONTAINER, GRAPH, NODE| Constructor and Description |
|---|
GraphConnection(GraphWidget graphModel,
int style,
GraphNode source,
GraphNode destination) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeLineColor(Color color)
Sets the connection color.
|
void |
dispose() |
org.eclipse.draw2d.Connection |
getConnectionFigure() |
int |
getConnectionStyle()
Returns the style of this connection.
|
GraphNode |
getDestination()
Gets the target node for this relationship
|
java.lang.Object |
getExternalConnection()
Deprecated.
Use
Widget.getData() instead |
Font |
getFont()
Gets the font for the label on this connection
|
GraphWidget |
getGraphWidget()
Gets the graph widget that this connection is in
|
Color |
getHighlightColor() |
int |
getItemType()
Gets the graph item type.
|
Color |
getLineColor()
Returns the color of this connection.
|
int |
getLineStyle()
Returns the connection line style.
|
int |
getLineWidth()
Returns the connection line width.
|
GraphNode |
getSource()
Gets the source node for this relationship
|
org.eclipse.draw2d.IFigure |
getTooltip()
Gets the current tooltip for this node.
|
double |
getWeightInLayout()
Gets the weight of this connection.
|
void |
highlight()
Highlights this node.
|
boolean |
isDirected() |
boolean |
isDisposed() |
boolean |
isHighlighted()
Returns true if this connection is highlighted, false otherwise
|
boolean |
isVisible()
Get the visibility of this item.
|
void |
setConnectionDecoration(IConnectionDecorator connectionDecorator) |
void |
setConnectionStyle(int style)
Returns the style of this connection.
|
void |
setCurveDepth(int depth)
Sets the curve depth of the arc.
|
void |
setDirected(boolean directed) |
void |
setFont(Font f)
Sets the font for the label on this connection.
|
void |
setHighlightColor(Color color)
Sets the highlight color.
|
void |
setLineColor(Color color)
Perminently sets the color of this line to the given color.
|
void |
setLineStyle(int lineStyle)
Sets the connection line style.
|
void |
setLineWidth(int lineWidth)
Sets the connection line width.
|
void |
setRouter(org.eclipse.draw2d.ConnectionRouter router)
Sets the connection router of the connection
|
void |
setText(java.lang.String string) |
void |
setTooltip(org.eclipse.draw2d.IFigure tooltip)
Sets the tooltip on this node.
|
void |
setVisible(boolean visible)
Set the visibility of this item.
|
void |
setWeight(double weight)
Sets the weight for this connection.
|
java.lang.String |
toString()
Returns a string like 'source -> destination'
|
void |
unhighlight()
Unhighlights this node.
|
checkStylecheckSubclass, getImage, getText, setImageaddDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setDatapublic GraphConnection(GraphWidget graphModel, int style, GraphNode source, GraphNode destination)
public boolean isDisposed()
isDisposed in class Widgetpublic org.eclipse.draw2d.Connection getConnectionFigure()
public java.lang.Object getExternalConnection()
Widget.getData() insteadpublic java.lang.String toString()
public int getConnectionStyle()
#ZestStylespublic void setConnectionStyle(int style)
#ZestStylespublic double getWeightInLayout()
org.eclipse.mylar.zest.layouts.LayoutRelationship#getWeightInLayout()public Font getFont()
public void setFont(Font f)
public void setWeight(double weight)
public Color getLineColor()
public void setHighlightColor(Color color)
color - the color to use for highlighting.public Color getHighlightColor()
public void setLineColor(Color color)
color - the color to be set.changeLineColor(Color color)public void changeLineColor(Color color)
color - public void setTooltip(org.eclipse.draw2d.IFigure tooltip)
public org.eclipse.draw2d.IFigure getTooltip()
public int getLineWidth()
public void setLineWidth(int lineWidth)
lineWidth - public int getLineStyle()
public void setLineStyle(int lineStyle)
lineStyle - public GraphNode getSource()
public GraphNode getDestination()
public void highlight()
public void unhighlight()
unhighlight in class GraphItempublic boolean isHighlighted()
public GraphWidget getGraphWidget()
getGraphWidget in class GraphItempublic void setCurveDepth(int depth)
depth - The depth of the curvepublic int getItemType()
GraphItemgetItemType in class GraphItempublic void setVisible(boolean visible)
GraphItemsetVisible in class GraphItemvisible - whether or not this item is visible.public boolean isVisible()
GraphItempublic boolean isDirected()
public void setDirected(boolean directed)
public void setRouter(org.eclipse.draw2d.ConnectionRouter router)
router - public void setConnectionDecoration(IConnectionDecorator connectionDecorator)
Copyright (c) 2014 itemis AG and others. All rights reserved.