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

Defines the appearance of the cells in a graph. More...

Public Member Functions

 mxStylesheet ()
 Constructs a new stylesheet and assigns default styles. More...
 
void PutCellStyle (string name, Dictionary< string, Object > style)
 Stores the specified style under the given name. More...
 
Dictionary< string, Object > GetCellStyle (string name, Dictionary< string, Object > defaultStyle)
 Returns the cell style for the specified cell or the given defaultStyle if no style can be found for the given stylename. More...
 

Static Public Attributes

static Dictionary< string, Object > EMPTY_STYLE = new Dictionary<string, Object>()
 Shared immutable empty dictionary (for undefined cell styles). More...
 

Protected Member Functions

Dictionary< string, Object > CreateDefaultVertexStyle ()
 Creates and returns the default vertex style. More...
 
Dictionary< string, Object > CreateDefaultEdgeStyle ()
 Creates and returns the default edge style. More...
 

Protected Attributes

Dictionary< string, Dictionary< string, Object > > styles
 Maps from names to styles. More...
 

Properties

Dictionary< string, Dictionary< string, Object > > Styles [get, set]
 Sets or returns the map that contains the styles. More...
 
Dictionary< string, Object > DefaultVertexStyle [get, set]
 Sets or returns the default style for vertices. More...
 
Dictionary< string, Object > DefaultEdgeStyle [get, set]
 Sets or returns the default style for edges. More...
 

Detailed Description

Defines the appearance of the cells in a graph.

Constructor & Destructor Documentation

com.mxgraph.mxStylesheet.mxStylesheet ( )
inline

Constructs a new stylesheet and assigns default styles.

Member Function Documentation

Dictionary<string, Object> com.mxgraph.mxStylesheet.CreateDefaultEdgeStyle ( )
inlineprotected
Dictionary<string, Object> com.mxgraph.mxStylesheet.CreateDefaultVertexStyle ( )
inlineprotected
Dictionary<string, Object> com.mxgraph.mxStylesheet.GetCellStyle ( string  name,
Dictionary< string, Object >  defaultStyle 
)
inline

Returns the cell style for the specified cell or the given defaultStyle if no style can be found for the given stylename.

Parameters
nameString of the form [(stylename|key=value);] that represents the style.
defaultStyleDefault style to be returned if no style can be found.
Returns
Returns the style for the given formatted cell style.

References com.mxgraph.mxConstants.NONE.

Referenced by com.mxgraph.mxGraph.GetCellStyle().

void com.mxgraph.mxStylesheet.PutCellStyle ( string  name,
Dictionary< string, Object >  style 
)
inline

Stores the specified style under the given name.

Parameters
nameName for the style to be stored.
styleKey, value pairs that define the style.

Member Data Documentation

Dictionary<string, Object> com.mxgraph.mxStylesheet.EMPTY_STYLE = new Dictionary<string, Object>()
static

Shared immutable empty dictionary (for undefined cell styles).

Referenced by com.mxgraph.mxGraph.GetCellStyle().

Dictionary<string, Dictionary<string, Object> > com.mxgraph.mxStylesheet.styles
protected
Initial value:
=
new Dictionary<string, Dictionary<string, Object>>()

Maps from names to styles.

Property Documentation

Dictionary<string, Object> com.mxgraph.mxStylesheet.DefaultEdgeStyle
getset

Sets or returns the default style for edges.

Referenced by com.mxgraph.mxGraph.GetCellStyle().

Dictionary<string, Object> com.mxgraph.mxStylesheet.DefaultVertexStyle
getset

Sets or returns the default style for vertices.

Referenced by com.mxgraph.mxGraph.GetCellStyle().

Dictionary<string, Dictionary<string, Object> > com.mxgraph.mxStylesheet.Styles
getset

Sets or returns the map that contains the styles.


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