BrightSide Workbench Full Report + Source Code
org.turro.zkoss.layout.GridLayout Class Reference
Inheritance diagram for org.turro.zkoss.layout.GridLayout:
Collaboration diagram for org.turro.zkoss.layout.GridLayout:

Public Member Functions

 GridLayout ()
 
 GridLayout (int columns)
 
 GridLayout (String hflexs)
 
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void setColCaptions (String captions)
 
void setColCaptions (String[] captions)
 
void clearRows ()
 
GridLayout addGroup (String title, boolean open)
 
GridLayout addRow ()
 
GridLayout insertBeforeRow (Row row)
 
GridLayout addCaption (String label)
 
GridLayout addValue (String value)
 
GridLayout addBoldValue (String value)
 
GridLayout addComponent (HtmlBasedComponent comp)
 
GridLayout addSpannedComponent (HtmlBasedComponent comp, int cols)
 
GridLayout addRowSpannedComponent (HtmlBasedComponent comp, int rows)
 
GridLayout addSpace ()
 
Row getCurrentRow ()
 
Rows getRows (boolean create)
 
Object getData ()
 
void setData (Object data)
 

Protected Attributes

Row currentRow
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 31 of file GridLayout.java.

Constructor & Destructor Documentation

◆ GridLayout() [1/3]

org.turro.zkoss.layout.GridLayout.GridLayout ( )

Definition at line 37 of file GridLayout.java.

37  {
38  super();
39  setSclass("grid-layout");
40  }

◆ GridLayout() [2/3]

org.turro.zkoss.layout.GridLayout.GridLayout ( int  columns)

Definition at line 42 of file GridLayout.java.

42  {
43  super();
44  setSclass("grid-layout");
45  setColumns(columns);
46  }
Here is the call graph for this function:

◆ GridLayout() [3/3]

org.turro.zkoss.layout.GridLayout.GridLayout ( String  hflexs)

Definition at line 48 of file GridLayout.java.

48  {
49  super();
50  setSclass("grid-layout");
51  setColumns(hflexs);
52  }
Here is the call graph for this function:

Member Function Documentation

◆ addBoldValue()

GridLayout org.turro.zkoss.layout.GridLayout.addBoldValue ( String  value)

Definition at line 142 of file GridLayout.java.

142  {
143  getCurrentRow().appendChild(new StyledLabel(value, "font-weight:bold"));
144  return this;
145  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCaption()

GridLayout org.turro.zkoss.layout.GridLayout.addCaption ( String  label)

Definition at line 132 of file GridLayout.java.

132  {
133  getCurrentRow().appendChild(new CaptionLabel(label));
134  return this;
135  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addComponent()

GridLayout org.turro.zkoss.layout.GridLayout.addComponent ( HtmlBasedComponent  comp)

Definition at line 147 of file GridLayout.java.

147  {
148  getCurrentRow().appendChild(comp);
149  if(comp instanceof AfterCompose) {
150  ((AfterCompose) comp).afterCompose();
151  }
152  return this;
153  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addGroup()

GridLayout org.turro.zkoss.layout.GridLayout.addGroup ( String  title,
boolean  open 
)

Definition at line 113 of file GridLayout.java.

113  {
114  GroupExtended group = new GroupExtended(title);
115  group.setOpen(open);
116  getRows(true).appendChild(group);
117  return this;
118  }
Rows getRows(boolean create)
Here is the call graph for this function:

◆ addRow()

GridLayout org.turro.zkoss.layout.GridLayout.addRow ( )

Definition at line 120 of file GridLayout.java.

120  {
121  currentRow = new Row();
122  getRows(true).appendChild(currentRow);
123  return this;
124  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addRowSpannedComponent()

GridLayout org.turro.zkoss.layout.GridLayout.addRowSpannedComponent ( HtmlBasedComponent  comp,
int  rows 
)

Definition at line 166 of file GridLayout.java.

166  {
167  Cell cell = new Cell();
168  cell.setRowspan(rows);
169  cell.appendChild(comp);
170  getCurrentRow().appendChild(cell);
171  if(comp instanceof AfterCompose) {
172  ((AfterCompose) comp).afterCompose();
173  }
174  return this;
175  }
Here is the call graph for this function:

◆ addSpace()

GridLayout org.turro.zkoss.layout.GridLayout.addSpace ( )

Definition at line 177 of file GridLayout.java.

177  {
178  getCurrentRow().appendChild(new Space());
179  return this;
180  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSpannedComponent()

GridLayout org.turro.zkoss.layout.GridLayout.addSpannedComponent ( HtmlBasedComponent  comp,
int  cols 
)

Definition at line 155 of file GridLayout.java.

155  {
156  Cell cell = new Cell();
157  cell.setColspan(cols);
158  cell.appendChild(comp);
159  getCurrentRow().appendChild(cell);
160  if(comp instanceof AfterCompose) {
161  ((AfterCompose) comp).afterCompose();
162  }
163  return this;
164  }
Here is the call graph for this function:

◆ addValue()

GridLayout org.turro.zkoss.layout.GridLayout.addValue ( String  value)

Definition at line 137 of file GridLayout.java.

137  {
138  getCurrentRow().appendChild(new Label(value));
139  return this;
140  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearRows()

void org.turro.zkoss.layout.GridLayout.clearRows ( )

Definition at line 108 of file GridLayout.java.

108  {
109  getRows(true).getChildren().clear();
110  currentRow = null;
111  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentRow()

Row org.turro.zkoss.layout.GridLayout.getCurrentRow ( )

Definition at line 182 of file GridLayout.java.

182  {
183  if(currentRow == null) {
184  currentRow = new Row();
185  getRows(true).appendChild(currentRow);
186  }
187  return currentRow;
188  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getData()

Object org.turro.zkoss.layout.GridLayout.getData ( )

Definition at line 199 of file GridLayout.java.

199  {
200  return data;
201  }
Here is the caller graph for this function:

◆ getRows()

Rows org.turro.zkoss.layout.GridLayout.getRows ( boolean  create)

Definition at line 190 of file GridLayout.java.

190  {
191  Rows rows = super.getRows();
192  if(rows == null && create) {
193  rows = new Rows();
194  appendChild(rows);
195  }
196  return rows;
197  }
Here is the caller graph for this function:

◆ insertBeforeRow()

GridLayout org.turro.zkoss.layout.GridLayout.insertBeforeRow ( Row  row)

Definition at line 126 of file GridLayout.java.

126  {
127  currentRow = new Row();
128  getRows(true).insertBefore(currentRow, row);
129  return this;
130  }
Here is the call graph for this function:

◆ setColCaptions() [1/2]

void org.turro.zkoss.layout.GridLayout.setColCaptions ( String  captions)

Definition at line 94 of file GridLayout.java.

94  {
95  setColCaptions(captions.split(","));
96  }
void setColCaptions(String captions)
Definition: GridLayout.java:94
Here is the caller graph for this function:

◆ setColCaptions() [2/2]

void org.turro.zkoss.layout.GridLayout.setColCaptions ( String[]  captions)

Definition at line 98 of file GridLayout.java.

98  {
99  setSclass("grid-layout-head");
100  invalidate();
101  int index = 0;
102  for(Component col : getColumns().getChildren()) {
103  ((Column)col).setLabel(captions[index++]);
104  }
105  getColumns().setStyle(null);
106  }

◆ setColumns() [1/2]

void org.turro.zkoss.layout.GridLayout.setColumns ( int  columns)

Definition at line 54 of file GridLayout.java.

54  {
55  setSpan(true);
56  Columns cols = getColumns();
57  if(cols == null) {
58  cols = new Columns();
59  appendChild(cols);
60  } else {
61  cols.getChildren().clear();
62  }
63  cols.setVisible(false);
64  for(int i = 0; i < columns; i++) {
65  Column col = new Column();
66  col.setHflex("min");
67  cols.appendChild(col);
68  }
69  }
Here is the caller graph for this function:

◆ setColumns() [2/2]

void org.turro.zkoss.layout.GridLayout.setColumns ( String  hflexs)

Definition at line 71 of file GridLayout.java.

71  {
72  setSpan(true);
73  String hfs[] = hflexs.split(",");
74  Columns cols = getColumns();
75  if(cols == null) {
76  cols = new Columns();
77  appendChild(cols);
78  } else {
79  cols.getChildren().clear();
80  }
81  cols.setStyle("height:0px");
82  for(int i = 0; i < hfs.length; i++) {
83  Column col = new Column();
84  if(hfs[i].startsWith("right-")) {
85  col.setAlign("right");
86  setWidthFlex(col, hfs[i].substring(6));
87  } else {
88  setWidthFlex(col, hfs[i]);
89  }
90  cols.appendChild(col);
91  }
92  }

◆ setData()

void org.turro.zkoss.layout.GridLayout.setData ( Object  data)

Definition at line 203 of file GridLayout.java.

203  {
204  this.data = data;
205  }

Member Data Documentation

◆ currentRow

Row org.turro.zkoss.layout.GridLayout.currentRow
protected

Definition at line 35 of file GridLayout.java.


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