mxGraph 2.5.0.2


com.mxgraph.swing.view
Class mxCellStatePreview

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

public class mxCellStatePreview
extends Object

Represents the current state of a cell in a given graph view.


Field Summary
protected  List<mxCellState> cellStates
           
protected  boolean cloned
          Specifies if cell states should be cloned or changed in-place.
protected  int count
           
protected  Map<mxCellState,mxPoint> deltas
           
protected  mxGraphComponent graphComponent
           
protected  float opacity
           
 
Constructor Summary
mxCellStatePreview(mxGraphComponent graphComponent, boolean cloned)
          Constructs a new state preview.
 
Method Summary
 void addEdges(mxCellState state)
           
 int getCount()
           
 Map<mxCellState,mxPoint> getDeltas()
           
 float getOpacity()
           
protected  float getOpacityForCell(Object cell)
           
 boolean isCloned()
           
 boolean isEmpty()
           
 mxPoint moveState(mxCellState state, double dx, double dy)
           
 mxPoint moveState(mxCellState state, double dx, double dy, boolean add, boolean includeEdges)
           
 void paint(Graphics g)
           
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)
           
 mxRectangle show()
          Returns a dirty rectangle to be repainted in mxGraphControl.
 List<mxCellState> snapshot(mxCellState state)
           
protected  void translateState(mxCellState parentState, mxCellState state, double dx, double dy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 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 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.


mxGraph 2.5.0.2


Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.