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

Public Member Functions

LabelExtended setFormat (String format)
 
int getMaxChars ()
 
LabelExtended setCSS (String style)
 
LabelExtended setMaxChars (int maxChars)
 
LabelExtended setString (String value)
 
LabelExtended setResourceValue (String resourceValue)
 
LabelExtended setEnum (Enum e)
 
LabelExtended setDate (Date date)
 
LabelExtended setDateTime (Date date)
 
LabelExtended setBoolean (boolean value)
 
LabelExtended setBoolean (String value)
 
LabelExtended setDouble (double value)
 
LabelExtended setLong (long value)
 
boolean isShowTooltip ()
 
LabelExtended setShowTooltip (boolean showTooltip)
 
int getWordWrap ()
 
LabelExtended setWordWrap (int wordWrap)
 
void setValue (String value)
 

Detailed Description

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

Definition at line 30 of file LabelExtended.java.

Member Function Documentation

◆ getMaxChars()

int org.turro.zkoss.label.LabelExtended.getMaxChars ( )

Definition at line 48 of file LabelExtended.java.

48  {
49  return maxChars;
50  }

◆ getWordWrap()

int org.turro.zkoss.label.LabelExtended.getWordWrap ( )

Definition at line 129 of file LabelExtended.java.

129  {
130  return wordWrap;
131  }

◆ isShowTooltip()

boolean org.turro.zkoss.label.LabelExtended.isShowTooltip ( )

Definition at line 120 of file LabelExtended.java.

120  {
121  return showTooltip;
122  }

◆ setBoolean() [1/2]

LabelExtended org.turro.zkoss.label.LabelExtended.setBoolean ( boolean  value)

Definition at line 98 of file LabelExtended.java.

98  {
99  setBoolean(Boolean.toString(value));
100  return this;
101  }
LabelExtended setBoolean(boolean value)
Here is the caller graph for this function:

◆ setBoolean() [2/2]

LabelExtended org.turro.zkoss.label.LabelExtended.setBoolean ( String  value)

Definition at line 103 of file LabelExtended.java.

103  {
104  setValue(I_.get(value));
105  return this;
106  }
Here is the call graph for this function:

◆ setCSS()

LabelExtended org.turro.zkoss.label.LabelExtended.setCSS ( String  style)

Definition at line 52 of file LabelExtended.java.

52  {
53  setStyle(style);
54  return this;
55  }

◆ setDate()

LabelExtended org.turro.zkoss.label.LabelExtended.setDate ( Date  date)

Definition at line 84 of file LabelExtended.java.

84  {
85  if(date != null) {
86  setValue(DateFormats.format(date, true));
87  }
88  return this;
89  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDateTime()

LabelExtended org.turro.zkoss.label.LabelExtended.setDateTime ( Date  date)

Definition at line 91 of file LabelExtended.java.

91  {
92  if(date != null) {
93  setValue(DateFormats.format(date, false));
94  }
95  return this;
96  }
Here is the call graph for this function:

◆ setDouble()

LabelExtended org.turro.zkoss.label.LabelExtended.setDouble ( double  value)

Definition at line 108 of file LabelExtended.java.

108  {
109  setValue(format == null ? DecimalFormats.format(value) :
110  DecimalFormats.format(value, format));
111  return this;
112  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEnum()

LabelExtended org.turro.zkoss.label.LabelExtended.setEnum ( Enum  e)

Definition at line 77 of file LabelExtended.java.

77  {
78  if(e != null) {
79  setValue(I_.byKey(e.toString()));
80  }
81  return this;
82  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFormat()

LabelExtended org.turro.zkoss.label.LabelExtended.setFormat ( String  format)

Definition at line 43 of file LabelExtended.java.

43  {
44  this.format = format;
45  return this;
46  }

◆ setLong()

LabelExtended org.turro.zkoss.label.LabelExtended.setLong ( long  value)

Definition at line 114 of file LabelExtended.java.

114  {
115  setValue(format == null ? DecimalFormats.format(value) :
116  DecimalFormats.format(value, format));
117  return this;
118  }
Here is the call graph for this function:

◆ setMaxChars()

LabelExtended org.turro.zkoss.label.LabelExtended.setMaxChars ( int  maxChars)

Definition at line 57 of file LabelExtended.java.

57  {
58  this.maxChars = maxChars;
59  return this;
60  }
Here is the caller graph for this function:

◆ setResourceValue()

LabelExtended org.turro.zkoss.label.LabelExtended.setResourceValue ( String  resourceValue)

Definition at line 67 of file LabelExtended.java.

67  {
68  if(resourceValue.startsWith("#")) {
69  // LabelBundle legacy
70  setValue(I_.get(resourceValue.substring(1)));
71  } else {
72  setValue(I_.get(resourceValue));
73  }
74  return this;
75  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShowTooltip()

LabelExtended org.turro.zkoss.label.LabelExtended.setShowTooltip ( boolean  showTooltip)

Definition at line 124 of file LabelExtended.java.

124  {
125  this.showTooltip = showTooltip;
126  return this;
127  }
Here is the caller graph for this function:

◆ setString()

LabelExtended org.turro.zkoss.label.LabelExtended.setString ( String  value)

Definition at line 62 of file LabelExtended.java.

62  {
63  setValue(value);
64  return this;
65  }
Here is the call graph for this function:

◆ setValue()

void org.turro.zkoss.label.LabelExtended.setValue ( String  value)

Definition at line 139 of file LabelExtended.java.

139  {
140  if(value != null) {
141  if(maxChars > 0 && value.length() > maxChars) {
142  if(showTooltip) {
143  setTooltiptext(value);
144  }
145  value = value.substring(0, lastIndexOfWhiteChar(value, maxChars)) + "...";
146  }
147  if(wordWrap > 0) {
148  if(isPre()) {
149  value = insertLF(value, wordWrap);
150  }
151  }
152  }
153  super.setValue(value);
154  }
Here is the caller graph for this function:

◆ setWordWrap()

LabelExtended org.turro.zkoss.label.LabelExtended.setWordWrap ( int  wordWrap)

Definition at line 133 of file LabelExtended.java.

133  {
134  this.wordWrap = wordWrap;
135  return this;
136  }
Here is the caller graph for this function:

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