|
Zest 1.5.100.201405261516 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.zest.core.widgets.GraphItem
org.eclipse.zest.core.widgets.GraphNode
public class GraphNode
Field Summary | |
---|---|
protected Graph |
graph
|
static int |
HIGHLIGHT_NONE
|
static int |
HIGHLIGHT_ON
|
protected int |
highlighted
|
protected java.lang.Object |
internalNode
The internal node. |
protected IFigure |
nodeFigure
|
protected IContainer |
parent
|
protected Dimension |
size
|
Fields inherited from class org.eclipse.zest.core.widgets.GraphItem |
---|
CONNECTION, CONTAINER, GRAPH, NODE |
Constructor Summary | |
---|---|
GraphNode(IContainer graphModel,
int style)
|
|
GraphNode(IContainer graphModel,
int style,
java.lang.Object data)
|
|
GraphNode(IContainer graphModel,
int style,
java.lang.String text)
|
|
GraphNode(IContainer graphModel,
int style,
java.lang.String text,
Image image)
|
|
GraphNode(IContainer graphModel,
int style,
java.lang.String text,
Image image,
java.lang.Object data)
|
|
GraphNode(IContainer graphModel,
int style,
java.lang.String text,
java.lang.Object data)
|
Method Summary | |
---|---|
boolean |
cacheLabel()
|
protected IFigure |
createFigureForModel()
|
void |
dispose()
|
protected IFigure |
fishEye(boolean enable,
boolean animate)
|
Color |
getBackgroundColor()
Get the background colour for this node. |
Color |
getBorderColor()
Sets if the adjacent nodes to this one should be highlighted when this node is selected. |
Color |
getBorderHighlightColor()
|
int |
getBorderWidth()
|
Font |
getFont()
|
Color |
getForegroundColor()
Get the foreground colour for this node |
Graph |
getGraphModel()
Gets the graphModel that this node is contained in |
Color |
getHighlightColor()
Get the highlight colour for this node |
int |
getItemType()
Gets the graph item type. |
LayoutEntity |
getLayoutEntity()
|
Point |
getLocation()
Returns a copy of the node's location. |
IFigure |
getNodeFigure()
|
int |
getNodeStyle()
|
Dimension |
getSize()
Returns a copy of the node's size. |
java.util.List |
getSourceConnections()
Returns a new list of the source connections (GraphModelConnection objects). |
int |
getStyle()
|
java.util.List |
getTargetConnections()
Returns a new list of the target connections (GraphModelConnection objects). |
IFigure |
getTooltip()
Gets the current tooltip for this node. |
void |
highlight()
Highlights the node changing the background color and border color. |
protected void |
initFigure()
|
protected void |
initModel(IContainer parent,
java.lang.String text,
Image image)
|
boolean |
isDisposed()
|
boolean |
isSelected()
|
boolean |
isSizeFixed()
Determines if this node has a fixed size or if it is packed to the size of its contents. |
boolean |
isVisible()
Get the visibility of this item. |
protected void |
refreshLocation()
|
void |
setBackgroundColor(Color c)
Permanently sets the background color (unhighlighted). |
void |
setBorderColor(Color c)
Sets the border color. |
void |
setBorderHighlightColor(Color c)
Sets the highlighted border color. |
void |
setBorderWidth(int width)
|
void |
setCacheLabel(boolean cacheLabel)
|
void |
setFont(Font font)
|
void |
setForegroundColor(Color c)
Set the foreground colour for this node |
void |
setHighlightColor(Color c)
Set the highlight colour for this node |
void |
setImage(Image image)
|
void |
setLocation(double x,
double y)
Sets the current location for this node. |
void |
setNodeStyle(int nodeStyle)
|
void |
setSize(double width,
double height)
|
void |
setText(java.lang.String string)
|
void |
setTooltip(IFigure tooltip)
Sets the tooltip on this node. |
void |
setVisible(boolean visible)
Set the visibility of this item. |
java.lang.String |
toString()
A simple toString that we can use for debugging |
void |
unhighlight()
Restores the nodes original background color and border width. |
protected void |
updateFigureForModel(IFigure currentFigure)
|
Methods inherited from class org.eclipse.zest.core.widgets.GraphItem |
---|
checkStyle |
Methods inherited from class org.eclipse.swt.widgets.Item |
---|
checkSubclass, getImage, getText |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int HIGHLIGHT_NONE
public static final int HIGHLIGHT_ON
protected Dimension size
protected Graph graph
protected IContainer parent
protected java.lang.Object internalNode
protected int highlighted
protected IFigure nodeFigure
Constructor Detail |
---|
public GraphNode(IContainer graphModel, int style)
public GraphNode(IContainer graphModel, int style, java.lang.Object data)
public GraphNode(IContainer graphModel, int style, java.lang.String text)
public GraphNode(IContainer graphModel, int style, java.lang.String text, java.lang.Object data)
public GraphNode(IContainer graphModel, int style, java.lang.String text, Image image)
public GraphNode(IContainer graphModel, int style, java.lang.String text, Image image, java.lang.Object data)
Method Detail |
---|
protected void initFigure()
protected void initModel(IContainer parent, java.lang.String text, Image image)
public java.lang.String toString()
toString
in class Widget
public LayoutEntity getLayoutEntity()
public void dispose()
dispose
in class GraphItem
public boolean isDisposed()
isDisposed
in class Widget
public boolean isSizeFixed()
public java.util.List getSourceConnections()
public java.util.List getTargetConnections()
public Point getLocation()
public boolean isSelected()
public void setLocation(double x, double y)
public Dimension getSize()
public Color getForegroundColor()
public void setForegroundColor(Color c)
public Color getBackgroundColor()
public void setBackgroundColor(Color c)
c
- public void setTooltip(IFigure tooltip)
public IFigure getTooltip()
public void setBorderColor(Color c)
c
- the border color.public void setBorderHighlightColor(Color c)
c
- the highlighted border color.public Color getHighlightColor()
public void setHighlightColor(Color c)
public void highlight()
highlight
in class GraphItem
public void unhighlight()
unhighlight
in class GraphItem
protected void refreshLocation()
public Color getBorderColor()
highlightAdjacentNodes
- The highlightAdjacentNodes to set.public int getBorderWidth()
public void setBorderWidth(int width)
public Font getFont()
public void setFont(Font font)
public void setText(java.lang.String string)
setText
in class Item
public void setImage(Image image)
setImage
in class Item
public Graph getGraphModel()
getGraphModel
in class GraphItem
public int getNodeStyle()
public void setNodeStyle(int nodeStyle)
nodeStyle
- the nodeStyle to setpublic void setSize(double width, double height)
public Color getBorderHighlightColor()
public boolean cacheLabel()
public void setCacheLabel(boolean cacheLabel)
public IFigure getNodeFigure()
public void setVisible(boolean visible)
GraphItem
setVisible
in class GraphItem
visible
- whether or not this item is visible.public int getStyle()
getStyle
in class Widget
protected IFigure fishEye(boolean enable, boolean animate)
protected void updateFigureForModel(IFigure currentFigure)
protected IFigure createFigureForModel()
public boolean isVisible()
GraphItem
isVisible
in class GraphItem
public int getItemType()
GraphItem
getItemType
in class GraphItem
|
Zest 1.5.100.201405261516 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |