Class LabelSubgraph
java.lang.Object
org.eclipse.zest.core.widgets.DefaultSubgraph
org.eclipse.zest.core.widgets.FigureSubgraph
org.eclipse.zest.core.widgets.custom.LabelSubgraph
- All Implemented Interfaces:
EntityLayout
,SubgraphLayout
A subgraph layout that displays a label showing number of items pruned within
it.
- Since:
- 1.14
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.zest.core.widgets.FigureSubgraph
FigureSubgraph.SubgraphFigrueListener
Nested classes/interfaces inherited from class org.eclipse.zest.core.widgets.DefaultSubgraph
DefaultSubgraph.DefaultSubgraphFactory, DefaultSubgraph.LabelSubgraphFactory, DefaultSubgraph.PrunedSuccessorsSubgraphFactory, DefaultSubgraph.TriangleSubgraphFactory
-
Field Summary
Fields inherited from class org.eclipse.zest.core.widgets.FigureSubgraph
figure
Fields inherited from class org.eclipse.zest.core.widgets.DefaultSubgraph
context, disposed, nodes
Fields inherited from interface org.eclipse.zest.layouts.interfaces.SubgraphLayout
BOTTOM_UP, LEFT_RIGHT, RIGHT_LEFT, TOP_DOWN
-
Constructor Summary
ConstructorsConstructorDescriptionLabelSubgraph
(NodeLayout[] nodes, LayoutContext context, Color foregroundColor, Color backgroundColor) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates a figure for this subgraph and stores it inFigureSubgraph.figure
.void
setBackgroundColor
(Color color) Sets the background color of this subgraph's label.void
setForegroundColor
(Color color) Sets the foreground color of this subgraph (that is color of the text on the label).protected void
Updates the figure stored inFigureSubgraph.figure
depending on current nodes contained in this subgraph.Methods inherited from class org.eclipse.zest.core.widgets.FigureSubgraph
addNodes, applyLayoutChanges, dispose, getFigure, getLocation, getPredecessingEntities, getSize, getSuccessingEntities, isGraphEntity, isMovable, refreshLocation, removeNodes, setLocation
Methods inherited from class org.eclipse.zest.core.widgets.DefaultSubgraph
countNodes, getItems, getNodes, getPreferredAspectRatio, isDirectionDependant, isResizable, refreshConnectionsVisibility, refreshSize, removeDisposedNodes, setDirection, setSize
-
Constructor Details
-
LabelSubgraph
public LabelSubgraph(NodeLayout[] nodes, LayoutContext context, Color foregroundColor, Color backgroundColor)
-
-
Method Details
-
setForegroundColor
Sets the foreground color of this subgraph (that is color of the text on the label).- Parameters:
color
- color to set
-
setBackgroundColor
Sets the background color of this subgraph's label.- Parameters:
color
- color to set
-
createFigure
protected void createFigure()Description copied from class:FigureSubgraph
Creates a figure for this subgraph and stores it inFigureSubgraph.figure
. This method may not be called right after creation of the subgraph but later when the figure is actually needed (lazy initialization).- Specified by:
createFigure
in classFigureSubgraph
-
updateFigure
protected void updateFigure()Description copied from class:FigureSubgraph
Updates the figure stored inFigureSubgraph.figure
depending on current nodes contained in this subgraph. If this method creates a new instance of IFigure, it should remember to add aFigureSubgraph.SubgraphFigrueListener
to it.- Specified by:
updateFigure
in classFigureSubgraph
-