mxGraph
Public Member Functions | Protected Attributes | Properties | List of all members
com.mxgraph.mxCellState Class Reference

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

Inheritance diagram for com.mxgraph.mxCellState:
com.mxgraph.mxRectangle com.mxgraph.mxPoint

Public Member Functions

 mxCellState ()
 Constructs an empty cell state. More...
 
 mxCellState (mxGraphView view, Object cell, Dictionary< string, Object > style)
 Constructs a new object that represents the current state of the given cell in the specified view. More...
 
int AbsolutePointCount ()
 Returns the number of absolute points. More...
 
mxRectangle GetPerimeterBounds ()
 Returns the rectangle that should be used as the perimeter of the cell. This implementation adds the perimeter spacing to the rectangle defined by this cell state. More...
 
mxRectangle GetPerimeterBounds (double border)
 Returns the rectangle that should be used as the perimeter of the cell. More...
 
void SetAbsoluteTerminalPoint (mxPoint point, bool source)
 Sets the first or last point in the list of points depending on source. More...
 
new mxCellState 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. More...
 
- Public Member Functions inherited from com.mxgraph.mxRectangle
 mxRectangle ()
 Constructs a new rectangle at (0, 0) with the width and height set to 0. More...
 
 mxRectangle (mxRectangle rect)
 Constructs a copy of the given rectangle. More...
 
 mxRectangle (Rectangle rect)
 Constructs a copy of the given rectangle. More...
 
 mxRectangle (double x, double y, double width, double height)
 Constructs a rectangle using the given parameters. More...
 
void setRect (double x, double y, double w, double h)
 Sets this rectangle to the specified values More...
 
double GetCenterX ()
 Returns the x-coordinate of the center. More...
 
double GetCenterY ()
 Returns the y-coordinate of the center. More...
 
void Add (mxRectangle rect)
 Adds the given rectangle to this rectangle. More...
 
void Grow (double amount)
 Grows the rectangle by the given amount, that is, this method subtracts the given amount from the x- and y-coordinates and adds twice the amount to the width and height. More...
 
bool Contains (double x, double y)
 Returns true if this rectangle contains the given point (x, y). More...
 
Rectangle GetRectangle ()
 Returns the bounds as a new rectangle. More...
 
new Boolean Equals (Object obj)
 Returns true if the given object equals this rectangle. More...
 
new mxRectangle Clone ()
 Returns a new instance of the same rectangle. More...
 
- Public Member Functions inherited from com.mxgraph.mxPoint
 mxPoint ()
 Constructs a new point at (0, 0). More...
 
 mxPoint (Point point)
 Constructs a new point at the location of the given point. More...
 
 mxPoint (mxPoint point)
 Constructs a new point at the location of the given point. More...
 
 mxPoint (double x, double y)
 Constructs a new point at (x, y). More...
 
Point GetPoint ()
 Returns the coordinates as a new point. More...
 
new Boolean Equals (Object obj)
 Returns true if the given object equals this point. More...
 
mxPoint Clone ()
 Returns a new instance of the same point. More...
 

Protected Attributes

mxGraphView view
 Reference to the enclosing graph view. More...
 
Object cell
 Reference to the cell that is represented by this state. More...
 
Dictionary< string, Object > style
 Contains an array of key, value pairs that represent the style of the cell. More...
 
Boolean invalid = true
 Specifies if the state is invalid. Default is true. More...
 
mxPoint origin = new mxPoint()
 Holds the origin for all child cells. More...
 
List< mxPointabsolutePoints
 List of mxPoints that represent the absolute points of an edge. More...
 
mxPoint absoluteOffset = new mxPoint()
 Holds the absolute offset. For edges, this is the absolute coordinates of the label position. For vertices, this is the offset of the label relative to the top, left corner of the vertex. More...
 
double terminalDistance
 Caches the distance between the end points of an edge. More...
 
double length
 Caches the length of an edge. More...
 
double [] segments
 Array of numbers that represent the cached length of each segment of the edge. More...
 
mxRectangle labelBounds
 Holds the rectangle which contains the label. More...
 
mxRectangle boundingBox
 Holds the largest rectangle which contains all rendering for this cell. More...
 
- Protected Attributes inherited from com.mxgraph.mxRectangle
double width
 Holds the width. Default is 0. More...
 
double height
 Holds the height. Default is 0. More...
 
- Protected Attributes inherited from com.mxgraph.mxPoint
double x
 Holds the x-coordinate of the point. Default is 0. More...
 
double y
 Holds the y-coordinate of the point. Default is 0. More...
 

Properties

mxGraphView View [get, set]
 Sets or returns the enclosing graph view. More...
 
Object Cell [get, set]
 Sets or returns the cell that is represented by this state. More...
 
Dictionary< string, Object > Style [get, set]
 Sets or returns the cell style as a map of key, value pairs. More...
 
Boolean Invalid [get, set]
 Sets or returns the invalid state. More...
 
mxPoint Origin [get, set]
 Sets or returns the origin for the children. More...
 
List< mxPointAbsolutePoints [get, set]
 Sets or returns the absolute points. More...
 
mxPoint AbsoluteOffset [get, set]
 Sets or returns the absolute offset. More...
 
double TerminalDistance [get, set]
 Sets or returns the terminal distance. More...
 
double Length [get, set]
 Sets or returns the length. More...
 
double [] Segments [get, set]
 Sets or returns the length of the segments. More...
 
mxRectangle LabelBounds [get, set]
 Sets or returns the label bounds. More...
 
mxRectangle BoundingBox [get, set]
 Sets or returns the bounding box. More...
 
- Properties inherited from com.mxgraph.mxRectangle
double Width [get, set]
 Sets or returns the width of the rectangle. More...
 
double Height [get, set]
 Sets or returns the height of the rectangle. More...
 
- Properties inherited from com.mxgraph.mxPoint
double X [get, set]
 Sets or returns the x-coordinate of the point. More...
 
double Y [get, set]
 Sets or returns the y-coordinate of the point. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ mxCellState() [1/2]

com.mxgraph.mxCellState.mxCellState ( )
inline

Constructs an empty cell state.

◆ mxCellState() [2/2]

com.mxgraph.mxCellState.mxCellState ( mxGraphView  view,
Object  cell,
Dictionary< string, Object >  style 
)
inline

Constructs a new object that represents the current state of the given cell in the specified view.

Parameters
viewGraph view that contains the state.
cellCell that this state represents.
styleArray of key, value pairs that constitute the style.

Member Function Documentation

◆ AbsolutePointCount()

int com.mxgraph.mxCellState.AbsolutePointCount ( )
inline

◆ Clone()

new mxCellState com.mxgraph.mxCellState.Clone ( )
inline

◆ GetPerimeterBounds() [1/2]

mxRectangle com.mxgraph.mxCellState.GetPerimeterBounds ( )
inline

Returns the rectangle that should be used as the perimeter of the cell. This implementation adds the perimeter spacing to the rectangle defined by this cell state.

Returns
Returns the rectangle that defines the perimeter.

Referenced by com.mxgraph.mxGraphView.GetPerimeterBounds().

◆ GetPerimeterBounds() [2/2]

mxRectangle com.mxgraph.mxCellState.GetPerimeterBounds ( double  border)
inline

Returns the rectangle that should be used as the perimeter of the cell.

Parameters
border
Returns
Returns the rectangle that defines the perimeter.

References com.mxgraph.mxRectangle.Grow().

◆ SetAbsoluteTerminalPoint()

void com.mxgraph.mxCellState.SetAbsoluteTerminalPoint ( mxPoint  point,
bool  source 
)
inline

Sets the first or last point in the list of points depending on source.

Parameters
pointPoint that represents the terminal point.
sourceBoolean that specifies if the first or last point should be assigned.

Referenced by com.mxgraph.mxGraphView.UpdateFixedTerminalPoint(), and com.mxgraph.mxGraphView.UpdateFloatingTerminalPoint().

Member Data Documentation

◆ absoluteOffset

mxPoint com.mxgraph.mxCellState.absoluteOffset = new mxPoint()
protected

Holds the absolute offset. For edges, this is the absolute coordinates of the label position. For vertices, this is the offset of the label relative to the top, left corner of the vertex.

Referenced by com.mxgraph.mxCellState.Clone().

◆ absolutePoints

List<mxPoint> com.mxgraph.mxCellState.absolutePoints
protected

List of mxPoints that represent the absolute points of an edge.

Referenced by com.mxgraph.mxCellState.Clone().

◆ boundingBox

mxRectangle com.mxgraph.mxCellState.boundingBox
protected

Holds the largest rectangle which contains all rendering for this cell.

Referenced by com.mxgraph.mxCellState.Clone().

◆ cell

Object com.mxgraph.mxCellState.cell
protected

Reference to the cell that is represented by this state.

◆ invalid

Boolean com.mxgraph.mxCellState.invalid = true
protected

Specifies if the state is invalid. Default is true.

◆ labelBounds

mxRectangle com.mxgraph.mxCellState.labelBounds
protected

Holds the rectangle which contains the label.

Referenced by com.mxgraph.mxCellState.Clone().

◆ length

double com.mxgraph.mxCellState.length
protected

Caches the length of an edge.

Referenced by com.mxgraph.mxCellState.Clone().

◆ origin

mxPoint com.mxgraph.mxCellState.origin = new mxPoint()
protected

Holds the origin for all child cells.

Referenced by com.mxgraph.mxCellState.Clone().

◆ segments

double [] com.mxgraph.mxCellState.segments
protected

Array of numbers that represent the cached length of each segment of the edge.

Referenced by com.mxgraph.mxCellState.Clone().

◆ style

Dictionary<string, Object> com.mxgraph.mxCellState.style
protected

Contains an array of key, value pairs that represent the style of the cell.

◆ terminalDistance

double com.mxgraph.mxCellState.terminalDistance
protected

Caches the distance between the end points of an edge.

Referenced by com.mxgraph.mxCellState.Clone().

◆ view

mxGraphView com.mxgraph.mxCellState.view
protected

Reference to the enclosing graph view.

Property Documentation

◆ AbsoluteOffset

mxPoint com.mxgraph.mxCellState.AbsoluteOffset
getset

◆ AbsolutePoints

List<mxPoint> com.mxgraph.mxCellState.AbsolutePoints
getset

◆ BoundingBox

mxRectangle com.mxgraph.mxCellState.BoundingBox
getset

◆ Cell

Object com.mxgraph.mxCellState.Cell
getset

◆ Invalid

Boolean com.mxgraph.mxCellState.Invalid
getset

Sets or returns the invalid state.

Referenced by com.mxgraph.mxGraphView.ValidateCellState().

◆ LabelBounds

mxRectangle com.mxgraph.mxCellState.LabelBounds
getset

◆ Length

double com.mxgraph.mxCellState.Length
getset

◆ Origin

mxPoint com.mxgraph.mxCellState.Origin
getset

◆ Segments

double [] com.mxgraph.mxCellState.Segments
getset

Sets or returns the length of the segments.

Referenced by com.mxgraph.mxGraphView.GetPoint(), and com.mxgraph.mxGraphView.UpdateEdgeBounds().

◆ Style

Dictionary<string, Object> com.mxgraph.mxCellState.Style
getset

◆ TerminalDistance

double com.mxgraph.mxCellState.TerminalDistance
getset

Sets or returns the terminal distance.

Referenced by com.mxgraph.mxGraphView.UpdateEdgeBounds().

◆ View

mxGraphView com.mxgraph.mxCellState.View
getset

Sets or returns the enclosing graph view.

Referenced by com.mxgraph.mxStencil.DrawShape(), and com.mxgraph.mxStencil.PaintShape().


The documentation for this class was generated from the following file: