Class mxCellStatePreview

java.lang.Object
com.mxgraph.swing.view.mxCellStatePreview

public class mxCellStatePreview extends Object
Represents the current state of a cell in a given graph view.
  • Field Details

    • deltas

      protected 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 List<mxCellState> cellStates
  • Constructor Details

    • 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 Details

    • isCloned

      public boolean isCloned()
    • setCloned

      public void setCloned(boolean value)
    • isEmpty

      public boolean isEmpty()
    • getCount

      public int getCount()
    • getDeltas

      public 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(List<mxCellState> snapshot)
    • restoreState

      public void restoreState(mxCellState state, mxCellState from)
    • snapshot

      public 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(Graphics g)
    • getOpacityForCell

      protected float getOpacityForCell(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.