Package com.mxgraph.swing.view
Class mxCellStatePreview
java.lang.Object
com.mxgraph.swing.view.mxCellStatePreview
Represents the current state of a cell in a given graph view.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
<mxCellState> protected boolean
Specifies if cell states should be cloned or changed in-place.protected int
protected Map
<mxCellState, mxPoint> protected mxGraphComponent
protected float
-
Constructor Summary
ConstructorsConstructorDescriptionmxCellStatePreview
(mxGraphComponent graphComponent, boolean cloned) Constructs a new state preview. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEdges
(mxCellState state) int
getCount()
float
protected float
getOpacityForCell
(Object cell) boolean
isCloned()
boolean
isEmpty()
moveState
(mxCellState state, double dx, double dy) moveState
(mxCellState state, double dx, double dy, boolean add, boolean includeEdges) void
protected void
paintPreview
(mxGraphics2DCanvas canvas) Draws the preview using the graphics canvas.protected void
paintPreviewState
(mxGraphics2DCanvas canvas, mxCellState state) Draws the preview using the graphics canvas.void
restore
(List<mxCellState> snapshot) void
restoreState
(mxCellState state, mxCellState from) protected mxRectangle
revalidateState
(mxCellState parentState, mxCellState state, double dx, double dy) void
setCloned
(boolean value) void
setOpacity
(float value) show()
Returns a dirty rectangle to be repainted in mxGraphControl.snapshot
(mxCellState state) protected void
translateState
(mxCellState parentState, mxCellState state, double dx, double dy)
-
Field Details
-
deltas
-
count
protected int count -
graphComponent
-
cloned
protected boolean clonedSpecifies if cell states should be cloned or changed in-place. -
opacity
protected float opacity -
cellStates
-
-
Constructor Details
-
mxCellStatePreview
Constructs a new state preview. The paint handler to invoke the paint method must be installed elsewhere.
-
-
Method Details
-
isCloned
public boolean isCloned() -
setCloned
public void setCloned(boolean value) -
isEmpty
public boolean isEmpty() -
getCount
public int getCount() -
getDeltas
-
setOpacity
public void setOpacity(float value) -
getOpacity
public float getOpacity() -
moveState
-
moveState
public mxPoint moveState(mxCellState state, double dx, double dy, boolean add, boolean includeEdges) -
show
Returns a dirty rectangle to be repainted in mxGraphControl. -
restore
-
restoreState
-
snapshot
-
translateState
-
revalidateState
protected mxRectangle revalidateState(mxCellState parentState, mxCellState state, double dx, double dy) -
addEdges
-
paint
-
getOpacityForCell
-
paintPreview
Draws the preview using the graphics canvas. -
paintPreviewState
Draws the preview using the graphics canvas.
-