Package org.eclipse.zest.core.widgets
Class GraphItem
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.zest.core.widgets.GraphItem
- Direct Known Subclasses:
- GraphConnection,- GraphNode
Provides support for property changes. All model elements extend this class.
 Also extends the Item (Widget) class to be used inside a StructuredViewer.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancheckStyle(int styleToCheck) Checks a style to see if it is set on the given graph itemvoiddispose()abstract GraphGets the graph that this item is rooted on.abstract intGets the graph item type.abstract voidHighlights the current GraphItem.booleanGet state of highlight of this itemabstract booleanGet the visibility of this item.abstract voidsetVisible(boolean visible) Set the visibility of this item.abstract voidUnhighlight sets the graphItem (either a graphNode or graphConnection) back to the unhighlight figure or color.Methods inherited from class org.eclipse.swt.widgets.ItemcheckSubclass, getImage, getText, setImage, setTextMethods inherited from class org.eclipse.swt.widgets.WidgetaddDisposeListener, addListener, addTypedListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData, toString
- 
Field Details- 
GRAPHpublic static final int GRAPH- See Also:
 
- 
NODEpublic static final int NODE- See Also:
 
- 
CONNECTIONpublic static final int CONNECTION- See Also:
 
- 
CONTAINERpublic static final int CONTAINER- See Also:
 
 
- 
- 
Constructor Details- 
GraphItem- Parameters:
- parent-
- style-
 
- 
GraphItemDeprecated, for removal: This API element is subject to removal in a future version.Since Zest 2.0, useGraphItem(Graph, int)andWidget.setData(Object)- Parameters:
- parent-
- style-
 
 
- 
- 
Method Details- 
disposepublic void dispose()
- 
getItemTypepublic abstract int getItemType()Gets the graph item type. The item type is one of: GRAPH, NODE or CONNECTION
- 
setVisiblepublic abstract void setVisible(boolean visible) Set the visibility of this item.- Parameters:
- visible- whether or not this item is visible.
 
- 
isVisiblepublic abstract boolean isVisible()Get the visibility of this item.- Returns:
- the visibility of this item.
 
- 
getGraphModelGets the graph that this item is rooted on. If this item is itself a graph, then this is returned.- Returns:
- the parent graph.
 
- 
highlightpublic abstract void highlight()Highlights the current GraphItem. A graph item is either a graph node or graph connection, and highlighting them will set the appropriate highlight color.
- 
unhighlightpublic abstract void unhighlight()Unhighlight sets the graphItem (either a graphNode or graphConnection) back to the unhighlight figure or color.
- 
isHighlightedpublic boolean isHighlighted()Get state of highlight of this item- Returns:
- boolean true if item is highlighted
- Since:
- 1.9 (included default impl and not made abstract to not brake downstream)
 
- 
checkStyleprotected boolean checkStyle(int styleToCheck) Checks a style to see if it is set on the given graph item- Parameters:
- styleToCheck- The style to check
 
 
- 
GraphItem(Graph, int)andWidget.setData(Object)