Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:styling_model [2020/06/13 02:22]
admin [Styling with css style]
tutorial:styling_model [2021/01/05 03:00] (current)
Line 1: Line 1:
-===== Tutorial: Styling Your Models =====+====== Tutorial: Styling Your Models ======
  
-Learning Objectives:+====Learning Objectives====
   * [[#What can be styled?]]   * [[#What can be styled?]]
   * [[#What are the styling options?]]   * [[#What are the styling options?]]
Line 9: Line 9:
   * [[#Styling Boxes]]   * [[#Styling Boxes]]
  
----- +===== What can be styled? =====
-==== What can be styled? ====+
  
 Model consists of nodes (state, branch, etc.), transitions, boxes and swimlanes, and each of which has components like container area, lines, and labels.  All these can be styled to some degree, some supports more styling options while others less. Model consists of nodes (state, branch, etc.), transitions, boxes and swimlanes, and each of which has components like container area, lines, and labels.  All these can be styled to some degree, some supports more styling options while others less.
Line 16: Line 15:
 By styling, we are referring to the background, color, shape, position and other cosmetic look and feel, which do not affect the functioning of the model. By styling, we are referring to the background, color, shape, position and other cosmetic look and feel, which do not affect the functioning of the model.
  
----- + 
-==== What are the styling options? ====+===== What are the styling options? =====
  
 Styling options include: Styling options include:
Line 27: Line 26:
 In general the color can be set.  Many of the components also support styling by classes and css style which are referred to as //advanced styling//. In general the color can be set.  Many of the components also support styling by classes and css style which are referred to as //advanced styling//.
  
-==== Styling with classes ====+===== Styling with classes =====
 This is the preferred option to style as it's more reliable / predictable, and it's a good way to maintain consistency. This is the preferred option to style as it's more reliable / predictable, and it's a good way to maintain consistency.
  
Line 36: Line 35:
 The definition of these css classes are set in //config/ide.css// The download package comes with two classes: //class_GREEN and class_ORANGE// Use these as examples to define your own classes. The definition of these css classes are set in //config/ide.css// The download package comes with two classes: //class_GREEN and class_ORANGE// Use these as examples to define your own classes.
  
-==== Styling with css style ====+===== Styling with css style =====
 CSS style is the most flexible option to change the look and feel of the components. CSS style is just a set of key / value pairs.  CSS style is the most flexible option to change the look and feel of the components. CSS style is just a set of key / value pairs. 
    { "background": "ORANGE", "border": "2px solid RED" }    { "background": "ORANGE", "border": "2px solid RED" }
Line 57: Line 56:
  
  
----- +===== Styling Nodes =====
- +
-==== Styling Nodes ====+
 Nodes are states, branches, switches, synchbars and initial / final states.  The node container area and node label can be styled independently. Nodes are states, branches, switches, synchbars and initial / final states.  The node container area and node label can be styled independently.
  
-=== States ===+==== States ====
 States can be styled on: States can be styled on:
   * container area   * container area
Line 82: Line 79:
   * left, right, top, bottom   * left, right, top, bottom
  
-=== Branches ===+==== Branches ====
 Branches can be styled: Branches can be styled:
   * container area   * container area
Line 97: Line 94:
   * left, right, top, bottom   * left, right, top, bottom
  
-=== Synchbars ===+==== Synchbars ====
 Syncbars have two variations: horizontal and vertical, both can be styled: Syncbars have two variations: horizontal and vertical, both can be styled:
   * container area   * container area
Line 110: Line 107:
  
  
-=== Initial and Final States ===+==== Initial and Final States ====
 Initial and Final states can be styled: Initial and Final states can be styled:
   * container area   * container area
Line 130: Line 127:
  
  
----- +===== Styling Transitions =====
- +
-==== Styling Transitions ====+
 Transitions have line segments and a transition label. Both are styled independently. Transitions have line segments and a transition label. Both are styled independently.
  
-=== Transition line segments ===+==== Transition line segments ====
 Transition line segments and the arrow head can be styled with color name or //advanced styling//. Transition line segments and the arrow head can be styled with color name or //advanced styling//.
   * background   * background
   * opacity   * opacity
  
-=== Transition label ===+==== Transition label ====
 Transition labels support //advanced styling//, however their position should not be changed as they are positioned relative to the connection point at the source state.  The styling should only on the font. Transition labels support //advanced styling//, however their position should not be changed as they are positioned relative to the connection point at the source state.  The styling should only on the font.
   * color   * color
Line 147: Line 142:
  
  
----- +===== Styling Boxes =====
- +
-==== Styling Boxes ====+
 Boxes can be styled on the container area as well as their labels independently, both supports //advanced styling//. Boxes can be styled on the container area as well as their labels independently, both supports //advanced styling//.
  
Line 166: Line 159:
   * left, right, top, bottom   * left, right, top, bottom
  
----- + 
-==== Styling Swimlanes ====+===== Styling Swimlanes =====
 Swimlane has two variations: horizontal and vertical.  They are styled in exactly the same way. Swimlane has two variations: horizontal and vertical.  They are styled in exactly the same way.
  
Line 178: Line 171:
 //Advanced styling// is not supported. //Advanced styling// is not supported.
  
-----