MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
labelcontrols.class
Ir para a documentação deste ficheiro.
1<?php
2
4{
5 public function __construct( $name = NULL, $value = NULL, $label = NULL, $color = '', $hint = '' )
6 {
7 parent::__construct( $name, $value, $label, $color, $hint );
8 }
9
10
11 public function setBold( $value = true )
12 {
13 $this->fontWeight = $value ? 'bold' : 'normal';
14 }
15}
16
17
19{
20 public function __construct( $text = NULL )
21 {
22 parent::__construct( NULL, $text );
23 }
24
25
26 public function generateInner()
27 {
28 $this->inner = $this->getRender( 'comment' );
29 }
30
31
32 public function generate()
33 {
34 $this->generateInner();
35
36 return $this->getInner();
37 }
38}
39
40
42{
43 private $margin;
44 private $lineWidth;
45
46 public function __construct( $text = NULL, $margin = '', $color = '', $lineHeight = '1px' )
47 {
48 parent::__construct( NULL, $text, '', $color );
49
50 $this->margin = $margin;
51 $this->lineHeight = $lineHeight;
52 }
53
54
55 public function generateInner()
56 {
57 $color = Util::NVL( $this->color, "#999" );
58 $this->setBoxClass( 'm-separator' );
59
60 if( $this->lineHeight )
61 {
62 $this->addBoxStyle( 'border-bottom', $this->lineHeight." solid {$color}" );
63 }
64
65 if ( trim($this->value) != '' )
66 {
67 $this->addBoxStyle( 'line-height', "15px" );
68 $this->inner = $this->value;
69 }
70 else
71 {
72 $this->addBoxStyle( 'line-height', "0px" );
73 $this->inner = '&nbsp;';
74 }
75 }
76}
77
78class MLabel extends MBaseLabel
79{
80 public function __construct( $text = NULL, $color = '', $class = '' )
81 {
82 parent::__construct( NULL, $text, NULL, $color );
83 $this->setClass($class);
84 }
85
86
87 public function generateInner()
88 {
89 if ( $this->getClass() == '' )
90 {
91 $this->setClass( 'm-label' );
92 }
93
94// $span = new MSpan( '', $this->value, $this->getClass() );
95
96// $this->inner = ( trim($this->value) != '' ) ? $span->getRender('text') : '';
97 $this->inner = ( trim($this->value) != '' ) ? $this->getRender( 'text' ) : '';
98
99 }
100}
101
102
104{
105 public function __construct( $text = NULL, $required = false )
106 {
107 substr($text, -1) == ':' ? null : $text .= ':';
108
109 parent::__construct($text);
110 $this->setWidth('140');
111 $this->setClass('m-caption');
112 if ($required)
113 {
114 $this->setClass('m-caption m-caption-required');
115 }
116 }
117}
118
119class MRawText extends MLabel
120{
121 public function generateInner()
122 {
123 $this->inner = trim($this->value);
124 }
125}
126
128{
129 public function __construct( $id, $text = NULL )
130 {
131 parent::__construct( NULL, $text );
132
133 $this->setId( $id );
134 }
135
136
137 public function generateInner()
138 {
139 if ( $this->getClass() == '' )
140 {
141 $this->setClass( 'm-label' );
142 }
143
144 $this->inner = ( trim($this->value) != '' ) ? $this->getRender('label') : '';
145 }
146}
147
148
150{
152
153 public function __construct( $name = '', $level = '1', $text = NULL, $color = '' )
154 {
155 parent::__construct( $name, $text, '', $color );
156
157 $this->level = $level;
158 }
159
160 public function generateInner()
161 {
162 $this->inner = $this->getRender( 'header' );
163 }
164}
165
166
167class MText extends MBaseLabel
168{
169 public function __construct( $name = '', $text = NULL, $color = '' )
170 {
171 parent::__construct( $name, $text, '', $color );
172
173 $this->formMode = 1;
174 }
175
176
177 public function generateInner()
178 {
179 if ( $this->getClass() == '' )
180 {
181 $this->setClass( 'm-text' );
182 }
183
184 $this->inner = $this->getRender( 'text' );
185 }
186}
187
188
189class MTextLabel extends MText
190{
191 public function __construct( $name = '', $text = null, $label = '', $color = '' )
192 {
193 parent::__construct( $name, $text, $color );
194
195 $this->label = $label;
196 $this->setClass( 'm-label-text' );
197// $this->formMode = 1;
198 }
199
200 public function generateInner()
201 {
202 if ( $this->getClass() == '' )
203 {
204 $this->setClass( 'm-text' );
205 }
206
207 $this->inner = $this->generateLabel() . $this->getRender( 'text' );
208 }
209}
210
211?>
__construct( $name=NULL, $value=NULL, $label=NULL, $color='', $hint='')
setBold( $value=true)
__construct( $text=NULL, $required=false)
setWidth($value)
Definição mcontrol.class:539
setClass( $cssClass, $add=true)
Definição mcontrol.class:398
setBoxClass( $cssClass, $add=true)
Definição mcontrol.class:797
setId($id)
Definição mcontrol.class:367
addBoxStyle($name, $value='')
Definição mcontrol.class:819
getRender( $method)
Definição mcontrol.class:833
__construct( $id, $text=NULL)
__construct( $text=NULL, $color='', $class='')
__construct( $text=NULL)
__construct( $text=NULL, $margin='', $color='', $lineHeight='1px')
__construct( $name='', $level='1', $text=NULL, $color='')
__construct( $name='', $text=null, $label='', $color='')
__construct( $name='', $text=NULL, $color='')
static NVL($value1, $value2)
Definição mutil.class:38