|
mxGraph 1.10.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mxgraph.util.mxPoint com.mxgraph.util.mxRectangle com.mxgraph.view.mxCellState
public class mxCellState
Represents the current state of a cell in a given graph view.
Field Summary | |
---|---|
protected mxPoint |
absoluteOffset
Holds the absolute offset. |
protected List<mxPoint> |
absolutePoints
List of mxPoints that represent the absolute points of an edge. |
protected mxRectangle |
boundingBox
Holds the largest rectangle which contains all rendering for this cell. |
protected Object |
cell
Reference to the cell that is represented by this state. |
protected boolean |
invalid
Specifies if the state is invalid. |
protected String |
label
Holds the current label value, including newlines which result from word wrapping. |
protected mxRectangle |
labelBounds
Holds the rectangle which contains the label. |
protected double |
length
Caches the distance between the end points and the length of an edge. |
protected mxPoint |
origin
Holds the origin for all child cells. |
protected double[] |
segments
Array of numbers that represent the cached length of each segment of the edge. |
protected Map<String,Object> |
style
Contains an array of key, value pairs that represent the style of the cell. |
protected double |
terminalDistance
Caches the distance between the end points and the length of an edge. |
protected mxGraphView |
view
Reference to the enclosing graph view. |
protected mxCellState |
visibleSourceState
Caches the visible source and target terminal states. |
protected mxCellState |
visibleTargetState
Caches the visible source and target terminal states. |
Fields inherited from class com.mxgraph.util.mxRectangle |
---|
height, width |
Fields inherited from class com.mxgraph.util.mxPoint |
---|
x, y |
Constructor Summary | |
---|---|
mxCellState()
Constructs an empty cell state. |
|
mxCellState(mxGraphView view,
Object cell,
Map<String,Object> style)
Constructs a new object that represents the current state of the given cell in the specified view. |
Method Summary | |
---|---|
Object |
clone()
Returns a clone of this state where all members are deeply cloned except the view and cell references, which are copied with no cloning to the new instance. |
mxPoint |
getAbsoluteOffset()
Returns the absolute offset. |
mxPoint |
getAbsolutePoint(int index)
Returns the absolute point at the given index. |
int |
getAbsolutePointCount()
Returns the number of absolute points. |
List<mxPoint> |
getAbsolutePoints()
Returns the absolute points. |
mxRectangle |
getBoundingBox()
Returns the bounding box. |
Object |
getCell()
Returns the cell that is represented by this state. |
String |
getLabel()
Returns the current label. |
mxRectangle |
getLabelBounds()
Returns the label bounds. |
double |
getLength()
Returns the length. |
mxPoint |
getOrigin()
Returns the origin for the children. |
mxRectangle |
getPerimeterBounds()
Returns the rectangle that should be used as the perimeter of the cell. |
mxRectangle |
getPerimeterBounds(double border)
Returns the rectangle that should be used as the perimeter of the cell. |
double[] |
getSegments()
Returns the length of the segments. |
Map<String,Object> |
getStyle()
Returns the cell style as a map of key, value pairs. |
double |
getTerminalDistance()
Returns the terminal distance. |
mxGraphView |
getView()
Returns the enclosing graph view. |
Object |
getVisibleTerminal(boolean source)
Returns the visible source or target terminal cell. |
mxCellState |
getVisibleTerminalState(boolean source)
Returns the visible source or target terminal state. |
boolean |
isInvalid()
Returns true if the state is invalid. |
void |
setAbsoluteOffset(mxPoint absoluteOffset)
Returns the absolute offset. |
mxPoint |
setAbsolutePoint(int index,
mxPoint point)
Returns the absolute point at the given index. |
void |
setAbsolutePoints(List<mxPoint> absolutePoints)
Returns the absolute points. |
void |
setAbsoluteTerminalPoint(mxPoint point,
boolean isSource)
Sets the first or last point in the list of points depending on isSource. |
void |
setBoundingBox(mxRectangle boundingBox)
Sets the bounding box. |
void |
setCell(Object cell)
Sets the cell that this state represents. |
void |
setInvalid(boolean invalid)
Sets the invalid state. |
void |
setLabel(String value)
Returns the current label. |
void |
setLabelBounds(mxRectangle labelBounds)
Sets the label bounds. |
void |
setLength(double length)
Sets the length. |
void |
setOrigin(mxPoint origin)
Sets the origin for the children. |
void |
setSegments(double[] segments)
Sets the length of the segments. |
void |
setStyle(Map<String,Object> style)
Sets the cell style as a map of key, value pairs. |
void |
setTerminalDistance(double terminalDistance)
Sets the terminal distance. |
void |
setView(mxGraphView view)
Sets the enclosing graph view. |
void |
setVisibleTerminalState(mxCellState terminalState,
boolean source)
Sets the visible source or target terminal state. |
Methods inherited from class com.mxgraph.util.mxRectangle |
---|
add, contains, equals, getCenterX, getCenterY, getHeight, getRectangle, getWidth, grow, intersectLine, setHeight, setRect, setWidth, toString |
Methods inherited from class com.mxgraph.util.mxPoint |
---|
getPoint, getX, getY, setX, setY |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected mxGraphView view
protected Object cell
protected String label
protected Map<String,Object> style
protected mxPoint origin
protected List<mxPoint> absolutePoints
protected mxPoint absoluteOffset
protected double terminalDistance
protected double length
protected double[] segments
protected mxRectangle labelBounds
protected mxRectangle boundingBox
protected boolean invalid
protected mxCellState visibleSourceState
protected mxCellState visibleTargetState
Constructor Detail |
---|
public mxCellState()
public mxCellState(mxGraphView view, Object cell, Map<String,Object> style)
view
- Graph view that contains the state.cell
- Cell that this state represents.style
- Array of key, value pairs that constitute the style.Method Detail |
---|
public boolean isInvalid()
public void setInvalid(boolean invalid)
public mxGraphView getView()
public void setView(mxGraphView view)
view
- the view to setpublic String getLabel()
public void setLabel(String value)
public Object getCell()
public void setCell(Object cell)
cell
- the cell to setpublic Map<String,Object> getStyle()
public void setStyle(Map<String,Object> style)
style
- the style to setpublic mxPoint getOrigin()
public void setOrigin(mxPoint origin)
origin
- the origin to setpublic mxPoint getAbsolutePoint(int index)
public mxPoint setAbsolutePoint(int index, mxPoint point)
public int getAbsolutePointCount()
public List<mxPoint> getAbsolutePoints()
public void setAbsolutePoints(List<mxPoint> absolutePoints)
absolutePoints
- the absolutePoints to setpublic mxPoint getAbsoluteOffset()
public void setAbsoluteOffset(mxPoint absoluteOffset)
absoluteOffset
- the absoluteOffset to setpublic double getTerminalDistance()
public void setTerminalDistance(double terminalDistance)
terminalDistance
- the terminalDistance to setpublic double getLength()
public void setLength(double length)
length
- the length to setpublic double[] getSegments()
public void setSegments(double[] segments)
segments
- the segments to setpublic mxRectangle getLabelBounds()
public void setLabelBounds(mxRectangle labelBounds)
labelBounds
- public mxRectangle getBoundingBox()
public void setBoundingBox(mxRectangle boundingBox)
boundingBox
- public mxRectangle getPerimeterBounds()
public mxRectangle getPerimeterBounds(double border)
public void setAbsoluteTerminalPoint(mxPoint point, boolean isSource)
point
- Point that represents the terminal point.isSource
- Boolean that specifies if the first or last point should
be assigned.public Object getVisibleTerminal(boolean source)
source
- Boolean that specifies if the source or target cell should be
returned.public mxCellState getVisibleTerminalState(boolean source)
Boolean
- that specifies if the source or target state should be
returned.public void setVisibleTerminalState(mxCellState terminalState, boolean source)
terminalState
- Cell state that represents the terminal.source
- Boolean that specifies if the source or target state should be set.public Object clone()
clone
in class mxRectangle
|
mxGraph 1.10.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |