Package org.eclipse.zest.core.widgets

# Class CGraphNode

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.zest.core.widgets.GraphItem
org.eclipse.zest.core.widgets.GraphNode
org.eclipse.zest.core.widgets.CGraphNode

public class CGraphNode extends GraphNode
A Custom Graph Node

## Field Summary

### Fields inherited from class org.eclipse.zest.core.widgets.GraphNode

`graph, HIGHLIGHT_NONE, HIGHLIGHT_ON, highlighted, internalNode, nodeFigure, parent, size`

### Fields inherited from class org.eclipse.zest.core.widgets.GraphItem

`CONNECTION, CONTAINER, GRAPH, NODE`

## Constructor Summary

Constructors
Constructor
Description
`CGraphNode(IContainer graphModel, int style, org.eclipse.draw2d.IFigure figure)`

## Method Summary

Modifier and Type
Method
Description
`protected org.eclipse.draw2d.IFigure`
`createFigureForModel()`
`Color`
`getBackgroundColor()`
Get the background colour for this node.
`org.eclipse.draw2d.IFigure`
`getFigure()`
`Font`
`getFont()`
`Color`
`getForegroundColor()`
Get the foreground colour for this node
`void`
`setBackgroundColor(Color c)`
Permanently sets the background color (unhighlighted).
`void`
`setFont(Font font)`
`protected void`
`updateFigureForModel(org.eclipse.draw2d.IFigure currentFigure)`

### Methods inherited from class org.eclipse.zest.core.widgets.GraphNode

`cacheLabel, dispose, fishEye, getBorderColor, getBorderHighlightColor, getBorderWidth, getGraphModel, getHideContainerBounds, getHideNodeHelper, getHighlightColor, getItemType, getLayout, getLayoutEntity, getLocation, getModelFigure, getNodeFigure, getNodeStyle, getSize, getSourceConnections, getStyle, getTargetConnections, getTooltip, highlight, initFigure, initModel, isDisposed, isHighlighted, isSelected, isSizeFixed, isVisible, refreshLocation, setBorderColor, setBorderHighlightColor, setBorderWidth, setCacheLabel, setForegroundColor, setHideNodeHelper, setHighlightColor, setImage, setLocation, setModelFigure, setNodeStyle, setSize, setText, setTooltip, setVisible, toString, unhighlight`

### 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, addTypedListener, checkWidget, getData, getData, getDisplay, getListeners, getTypedListeners, isAutoDirection, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### CGraphNode

public CGraphNode(IContainer graphModel, int style, org.eclipse.draw2d.IFigure figure)

## Method Details

### getFigure

public org.eclipse.draw2d.IFigure getFigure()

### createFigureForModel

protected org.eclipse.draw2d.IFigure createFigureForModel()

Overrides:
  `createFigureForModel` in class `GraphNode`

### setBackgroundColor

public void setBackgroundColor(Color c)
Description copied from class: `GraphNode`
Permanently sets the background color (unhighlighted). This color has no effect if a custom figure has been set.

Overrides:
  `setBackgroundColor` in class `GraphNode`
Parameters:
  `c` -

### setFont

public void setFont(Font font)

Overrides:
  `setFont` in class `GraphNode`

### getBackgroundColor

public Color getBackgroundColor()
Description copied from class: `GraphNode`
Get the background colour for this node. This is the color the node will be if it is not currently highlighted. This color is meaningless if a custom figure has been set.

Overrides:
  `getBackgroundColor` in class `GraphNode`

### getFont

public Font getFont()

Overrides:
  `getFont` in class `GraphNode`

### getForegroundColor

public Color getForegroundColor()
Description copied from class: `GraphNode`
Get the foreground colour for this node

Overrides:
  `getForegroundColor` in class `GraphNode`

### updateFigureForModel

protected void updateFigureForModel(org.eclipse.draw2d.IFigure currentFigure)

Overrides:
  `updateFigureForModel` in class `GraphNode`