Package com.mxgraph.swing.view
Class mxCellStatePreview
- java.lang.Object
-
- com.mxgraph.swing.view.mxCellStatePreview
-
public class mxCellStatePreview extends java.lang.ObjectRepresents the current state of a cell in a given graph view.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<mxCellState>cellStatesprotected booleanclonedSpecifies if cell states should be cloned or changed in-place.protected intcountprotected java.util.Map<mxCellState,mxPoint>deltasprotected mxGraphComponentgraphComponentprotected floatopacity
-
Constructor Summary
Constructors Constructor Description mxCellStatePreview(mxGraphComponent graphComponent, boolean cloned)Constructs a new state preview.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEdges(mxCellState state)intgetCount()java.util.Map<mxCellState,mxPoint>getDeltas()floatgetOpacity()protected floatgetOpacityForCell(java.lang.Object cell)booleanisCloned()booleanisEmpty()mxPointmoveState(mxCellState state, double dx, double dy)mxPointmoveState(mxCellState state, double dx, double dy, boolean add, boolean includeEdges)voidpaint(java.awt.Graphics g)protected voidpaintPreview(mxGraphics2DCanvas canvas)Draws the preview using the graphics canvas.protected voidpaintPreviewState(mxGraphics2DCanvas canvas, mxCellState state)Draws the preview using the graphics canvas.voidrestore(java.util.List<mxCellState> snapshot)voidrestoreState(mxCellState state, mxCellState from)protected mxRectanglerevalidateState(mxCellState parentState, mxCellState state, double dx, double dy)voidsetCloned(boolean value)voidsetOpacity(float value)mxRectangleshow()Returns a dirty rectangle to be repainted in mxGraphControl.java.util.List<mxCellState>snapshot(mxCellState state)protected voidtranslateState(mxCellState parentState, mxCellState state, double dx, double dy)
-
-
-
Field Detail
-
deltas
protected java.util.Map<mxCellState,mxPoint> deltas
-
count
protected int count
-
graphComponent
protected mxGraphComponent graphComponent
-
cloned
protected boolean cloned
Specifies if cell states should be cloned or changed in-place.
-
opacity
protected float opacity
-
cellStates
protected java.util.List<mxCellState> cellStates
-
-
Constructor Detail
-
mxCellStatePreview
public mxCellStatePreview(mxGraphComponent graphComponent, boolean cloned)
Constructs a new state preview. The paint handler to invoke the paint method must be installed elsewhere.
-
-
Method Detail
-
isCloned
public boolean isCloned()
-
setCloned
public void setCloned(boolean value)
-
isEmpty
public boolean isEmpty()
-
getCount
public int getCount()
-
getDeltas
public java.util.Map<mxCellState,mxPoint> getDeltas()
-
setOpacity
public void setOpacity(float value)
-
getOpacity
public float getOpacity()
-
moveState
public mxPoint moveState(mxCellState state, double dx, double dy)
-
moveState
public mxPoint moveState(mxCellState state, double dx, double dy, boolean add, boolean includeEdges)
-
show
public mxRectangle show()
Returns a dirty rectangle to be repainted in mxGraphControl.
-
restore
public void restore(java.util.List<mxCellState> snapshot)
-
restoreState
public void restoreState(mxCellState state, mxCellState from)
-
snapshot
public java.util.List<mxCellState> snapshot(mxCellState state)
-
translateState
protected void translateState(mxCellState parentState, mxCellState state, double dx, double dy)
-
revalidateState
protected mxRectangle revalidateState(mxCellState parentState, mxCellState state, double dx, double dy)
-
addEdges
public void addEdges(mxCellState state)
-
paint
public void paint(java.awt.Graphics g)
-
getOpacityForCell
protected float getOpacityForCell(java.lang.Object cell)
-
paintPreview
protected void paintPreview(mxGraphics2DCanvas canvas)
Draws the preview using the graphics canvas.
-
paintPreviewState
protected void paintPreviewState(mxGraphics2DCanvas canvas, mxCellState state)
Draws the preview using the graphics canvas.
-
-