public class LabelSubgraph extends FigureSubgraph
FigureSubgraph.SubgraphFigrueListener
DefaultSubgraph.DefaultSubgraphFactory, DefaultSubgraph.LabelSubgraphFactory, DefaultSubgraph.PrunedSuccessorsSubgraphFactory, DefaultSubgraph.TriangleSubgraphFactory
figure
context, disposed, nodes
Constructor and Description |
---|
LabelSubgraph(org.eclipse.gef4.layout.interfaces.NodeLayout[] nodes,
org.eclipse.gef4.layout.interfaces.LayoutContext context,
Color foregroundColor,
Color backgroundColor) |
Modifier and Type | Method and Description |
---|---|
protected void |
createFigure()
Creates a figure for this subgraph and stores it in
FigureSubgraph.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 |
updateFigure()
Updates the figure stored in
FigureSubgraph.figure depending on current nodes
contained in this subgraph. |
addNodes, applyLayoutChanges, dispose, getFigure, getLocation, getPredecessingEntities, getSize, getSuccessingEntities, isGraphEntity, isMovable, refreshLocation, removeNodes, setLocation
countNodes, getItems, getNodes, getPreferredAspectRatio, getProperty, isDirectionDependant, isResizable, refreshConnectionsVisibility, refreshSize, setDirection, setProperty, setSize
public void setForegroundColor(Color color)
color
- color to setpublic void setBackgroundColor(Color color)
color
- color to setprotected void createFigure()
FigureSubgraph
FigureSubgraph.figure
.
This method may not be called right after creation of the subgraph but
later when the figure is actually needed (lazy initialization).createFigure
in class FigureSubgraph
protected void updateFigure()
FigureSubgraph
FigureSubgraph.figure
depending on current nodes
contained in this subgraph. If this method creates a new instance of
IFigure, it should remember to add a FigureSubgraph.SubgraphFigrueListener
to
it.updateFigure
in class FigureSubgraph
Copyright (c) 2014 itemis AG and others. All rights reserved.