Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.util / org.gvsig.tools.util.api / src / main / java / org / gvsig / htmlbuilder / HTMLBuilder.java @ 1746

History | View | Annotate | Download (14.1 KB)

1 1746 jjdelcerro
2
package org.gvsig.htmlbuilder;
3
4
import java.awt.Color;
5
import java.util.Date;
6
import java.util.List;
7
import java.util.Map;
8
9
/**
10
 *
11
 * @author jjdelcerro
12
 */
13
public interface HTMLBuilder {
14
15
16
    public static final String accesskey = "accesskey";
17
    public static final String class_ = "class";
18
    public static final String contenteditable = "contenteditable";
19
    public static final String content = "content";
20
    public static final String dir = "dir";
21
    public static final String draggable = "draggable";
22
    public static final String dropzone = "dropzone";
23
    public static final String hidden = "hidden";
24
    public static final String id = "id";
25
    public static final String lang = "lang";
26
    public static final String spellcheck = "spellcheck";
27
    public static final String style = "style";
28
    public static final String tabindex = "tabindex";
29
    public static final String title = "title";
30
    public static final String translate = "translate";
31
32
    public static final String alt  = "alt";
33
    public static final String coords = "coords";
34
    public static final String download = "download";
35
    public static final String href = "href";
36
    public static final String hreflang = "hreflang";
37
    public static final String media = "media";
38
    public static final String nohref = "nohref";
39
    public static final String rel  = "rel";
40
    public static final String shape = "shape";
41
    public static final String target = "target";
42
    public static final String type = "type";
43
44
    public static final String autofocus = "autofocus";
45
    public static final String disabled = "disabled";
46
    public static final String form = "form";
47
    public static final String formaction = "formaction";
48
    public static final String formenctype = "formenctype";
49
    public static final String formmethod = "formmethod";
50
    public static final String formnovalidate = "formnovalidate";
51
    public static final String formtarget = "formtarget";
52
    public static final String framename = "framename";
53
    public static final String name = "name";
54
    public static final String value  = "value";
55
    public static final String height  = "height";
56
    public static final String width  = "width";
57
    public static final String align  = "align";
58
    public static final String open  = "open";
59
    public static final String size  = "size";
60
    public static final String color  = "color";
61
    public static final String face  = "face";
62
    public static final String noshade  = "noshade";
63
    public static final String xmlns  = "xmlns";
64
    public static final String for_  = "for";
65
    public static final String charset = "charset";
66
67
    public static final String max = "max";
68
    public static final String min = "min";
69
    public static final String low = "low";
70
    public static final String hight = "hight";
71
    public static final String optimun = "optimun";
72
73
    public static final String compact = "compact";
74
    public static final String reversed = "reversed";
75
    public static final String start = "start";
76
77
    public static final String multiple = "multiple";
78
    public static final String required = "required";
79
80
    public static final String bgcolor = "bgcolor";
81
    public static final String border = "border";
82
    public static final String cellpadding = "cellpadding";
83
    public static final String cellspacing = "cellspacing";
84
85
    public static final String colspan = "colspan";
86
    public static final String nowrap = "nowrap";
87
    public static final String valign = "valign";
88
89
    public static final String cols = "cols";
90
    public static final String dirname = "dirname";
91
    public static final String maxlength = "maxlength";
92
    public static final String placeholder = "placeholder";
93
    public static final String readonly = "readonly";
94
    public static final String rows = "rows";
95
    public static final String wrap = "wrap";
96
97
    public static final String datetime = "datetime";
98
99
100
101
102
103
104
    public static final String target_blank = "_blank";
105
    public static final String target_self = "_self";
106
    public static final String target_parent = "_parent";
107
    public static final String target_top = "_top";
108
109
    public static final String method_get = "get";
110
    public static final String method_post = "post";
111
112
    public static final String type_button = "button";
113
    public static final String type_reset = "reset";
114
    public static final String type_submit = "submit";
115
116
    public static final String valign_top = "top";
117
    public static final String valign_middle = "middle";
118
    public static final String valign_bottom = "bottom";
119
    public static final String valign_baseline = "baseline";
120
121
122
123
    public interface HTMLElement {
124
        public boolean allowContents();
125
126
        public boolean allowAttributes();
127
128
        public String toHTML();
129
    }
130
131
    public interface HTMLElementWithAttributes extends HTMLElement {
132
        public Map<String,String> getAttributes();
133
134
        public Map<String,String> getStyle();
135
136
        public HTMLElementWithAttributes set(String name, String value);
137
138
        public HTMLElementWithAttributes set(String name, int value);
139
140
        public HTMLElementWithAttributes set(String name, double value);
141
142
        public HTMLElementWithAttributes set(String name, HTMLColor color);
143
144
        public HTMLElementWithAttributes set(String name);
145
146
        public HTMLElementWithAttributes style(String name, String value);
147
148
        public HTMLElementWithAttributes style(String name, int value);
149
150
        public HTMLElementWithAttributes style(String name, double value);
151
152
        public HTMLElementWithAttributes style(String name, HTMLColor color);
153
154
    }
155
156
    public interface HTMLElementWithContents extends HTMLElement {
157
158
        public HTMLElementWithContents contents(Object... values);
159
160
        public List<HTMLElement> getContents();
161
    }
162
163
    public interface HTMLComplexElement
164
            extends  HTMLElementWithContents, HTMLElementWithAttributes
165
    {
166
        @Override
167
        public HTMLComplexElement contents(Object... values);
168
169
        @Override
170
        public HTMLComplexElement set(String name, String value);
171
172
        @Override
173
        public HTMLComplexElement set(String name, int value);
174
175
        @Override
176
        public HTMLComplexElement set(String name, double value);
177
178
        @Override
179
        public HTMLComplexElement set(String name, HTMLColor color);
180
181
        @Override
182
        public HTMLComplexElement set(String name);
183
184
        @Override
185
        public HTMLComplexElement style(String name, String value);
186
187
        @Override
188
        public HTMLComplexElement style(String name, int value);
189
190
        @Override
191
        public HTMLComplexElement style(String name, double value);
192
193
        @Override
194
        public HTMLComplexElement style(String name, HTMLColor color);
195
196
    }
197
198
    public interface HTMLColor extends HTMLElement {
199
200
    }
201
202
    HTMLColor color(Color color);
203
204
    HTMLColor color(String color);
205
206
    HTMLColor color(int r, int g, int b);
207
208
    HTMLElement contents(HTMLElement... values);
209
210
    HTMLElement custom(String value);
211
212
    HTMLElement plain(String value);
213
214
    HTMLElement plainWithNl(String value);
215
216
217
218
219
    HTMLComplexElement a(Object... contents);
220
221
    HTMLComplexElement a(String link, Object... contents);
222
223
    HTMLComplexElement abbr(Object... contents);
224
225
    HTMLComplexElement acronym(Object... contents);
226
227
    HTMLComplexElement address(Object... contents);
228
229
    HTMLComplexElement area(Object... contents);
230
231
    HTMLComplexElement article(Object... contents);
232
233
    HTMLComplexElement aside(Object... contents);
234
235
    HTMLComplexElement b(Object... contents);
236
237
    HTMLElementWithAttributes base();
238
239
    HTMLElementWithAttributes basefont();
240
241
    HTMLComplexElement bdi(Object... contents);
242
243
    HTMLComplexElement bdo(Object... contents);
244
245
    HTMLElementWithContents big(Object... contents);
246
247
    HTMLComplexElement blockquote(Object... contents);
248
249
    HTMLComplexElement body(Object... contents);
250
251
    HTMLElement br();
252
253
    HTMLComplexElement button(Object... contents);
254
255
    HTMLComplexElement canvas(Object... contents);
256
257
    HTMLComplexElement caption(Object... contents);
258
259
    HTMLElementWithContents center(Object... contents);
260
261
    HTMLComplexElement cite(Object... contents);
262
263
    HTMLComplexElement code(Object... contents);
264
265
    HTMLElementWithAttributes col();
266
267
    HTMLComplexElement colgroup(Object... contents);
268
269
    HTMLComplexElement data(Object... contents);
270
271
    HTMLComplexElement datalist(Object... contents);
272
273
    HTMLComplexElement dd(Object... contents);
274
275
    HTMLComplexElement del(Object... contents);
276
277
    HTMLComplexElement details(Object... contents);
278
279
    HTMLComplexElement dfn(Object... contents);
280
281
    HTMLComplexElement dialog(Object... contents);
282
283
    HTMLElementWithContents dir(Object... contents);
284
285
    HTMLComplexElement div(Object... contents);
286
287
    HTMLComplexElement dl(Object... contents);
288
289
    HTMLComplexElement dt(Object... contents);
290
291
    HTMLComplexElement em(Object... contents);
292
293
    HTMLElementWithAttributes embed();
294
295
    HTMLComplexElement fieldset(Object... contents);
296
297
    HTMLComplexElement figcaption(Object... contents);
298
299
    HTMLComplexElement figure(Object... contents);
300
301
    HTMLComplexElement font(Object... contents);
302
303
    HTMLComplexElement font(int size, HTMLColor color);
304
305
    HTMLComplexElement font(int size, HTMLColor color, String face, Object... contents);
306
307
    HTMLComplexElement footer(Object... contents);
308
309
    HTMLComplexElement form(Object... contents);
310
311
    HTMLComplexElement frame(Object... contents);
312
313
    HTMLComplexElement frameset(Object... contents);
314
315
    HTMLComplexElement h1(Object... contents);
316
317
    HTMLComplexElement h2(Object... contents);
318
319
    HTMLComplexElement h3(Object... contents);
320
321
    HTMLComplexElement h4(Object... contents);
322
323
    HTMLComplexElement h5(Object... contents);
324
325
    HTMLComplexElement h6(Object... contents);
326
327
    HTMLComplexElement head(Object... contents);
328
329
    HTMLComplexElement header(Object... contents);
330
331
    HTMLComplexElement hr(Object... contents);
332
333
    HTMLComplexElement html(Object... contents);
334
335
    HTMLComplexElement i(Object... contents);
336
337
    HTMLComplexElement iframe(Object... contents);
338
339
    HTMLElementWithAttributes img();
340
341
    HTMLElementWithAttributes input(Object... contents);
342
343
    HTMLComplexElement ins(Object... contents);
344
345
    HTMLComplexElement kbd(Object... contents);
346
347
    HTMLComplexElement label(Object... contents);
348
349
    HTMLComplexElement legend(Object... contents);
350
351
    HTMLComplexElement li(Object... contents);
352
353
    HTMLElementWithAttributes link();
354
355
    HTMLElementWithAttributes link(String rel, String type, String href);
356
357
    HTMLComplexElement main(Object... contents);
358
359
    HTMLComplexElement map(Object... contents);
360
361
    HTMLComplexElement mark(Object... contents);
362
363
    HTMLElementWithAttributes meta();
364
365
    HTMLElementWithAttributes meta(String charset);
366
367
    HTMLElementWithAttributes meta(String name, String content);
368
369
    HTMLComplexElement meter(Object... contents);
370
371
    HTMLComplexElement nav(Object... contents);
372
373
    HTMLElementWithContents noframes(Object... contents);
374
375
    HTMLElementWithContents noscript(Object... contents);
376
377
    HTMLComplexElement object(Object... contents);
378
379
    HTMLComplexElement ol(Object... contents);
380
381
    HTMLComplexElement optgroup(Object... contents);
382
383
    HTMLComplexElement  option(Object... contents);
384
385
    HTMLComplexElement output(Object... contents);
386
387
    HTMLComplexElement p(Object... contents);
388
389
    HTMLElementWithAttributes param();
390
391
    HTMLComplexElement pre(Object... contents);
392
393
    HTMLComplexElement progress(Object... contents);
394
395
    HTMLComplexElement q(Object... contents);
396
397
    HTMLComplexElement rp(Object... contents);
398
399
    HTMLComplexElement rt(Object... contents);
400
401
    HTMLComplexElement ruby(Object... contents);
402
403
    HTMLComplexElement s(Object... contents);
404
405
    HTMLComplexElement samp(Object... contents);
406
407
    HTMLComplexElement script(Object... contents);
408
409
    HTMLComplexElement section(Object... contents);
410
411
    HTMLComplexElement select(Object... contents);
412
413
    HTMLComplexElement small(Object... contents);
414
415
    HTMLComplexElement source(Object... contents);
416
417
    HTMLComplexElement span(Object... contents);
418
419
    HTMLElementWithContents strike(Object... contents);
420
421
    HTMLComplexElement strong(Object... contents);
422
423
    HTMLComplexElement style(Object... contents);
424
425
    HTMLComplexElement sub(Object... contents);
426
427
    HTMLComplexElement summary(Object... contents);
428
429
    HTMLComplexElement sup(Object... contents);
430
431
    HTMLComplexElement svg(Object... contents);
432
433
    HTMLComplexElement table(Object... contents);
434
435
    HTMLComplexElement table(int border, int cellpadding, int cellspacing);
436
437
    HTMLComplexElement table(int border, int cellpadding, int cellspacing, int widthpercent);
438
439
    HTMLComplexElement tbody(Object... contents);
440
441
    HTMLComplexElement td(Object... contents);
442
443
    HTMLComplexElement td(boolean wrap, int colspan);
444
445
    HTMLComplexElement td(boolean wrap, int colspan, String valign);
446
447
    HTMLComplexElement template(Object... contents);
448
449
    HTMLComplexElement textarea(Object... contents);
450
451
    HTMLComplexElement textarea(int rows, int cols);
452
453
    HTMLComplexElement textarea(int rows, int cols, int maxlength);
454
455
    HTMLComplexElement tfoot(Object... contents);
456
457
    HTMLComplexElement th(Object... contents);
458
459
    HTMLComplexElement thead(Object... contents);
460
461
    HTMLComplexElement time(Object... contents);
462
463
    HTMLComplexElement time(Date datetime);
464
465
    HTMLComplexElement time(String datetime);
466
467
    HTMLComplexElement title(Object... contents);
468
469
    HTMLComplexElement tr(Object... contents);
470
471
    HTMLComplexElement tr(HTMLColor color);
472
473
    HTMLComplexElement tr(String valign);
474
475
    HTMLComplexElement tr(String valign, HTMLColor color);
476
477
    HTMLComplexElement track(Object... contents);
478
479
    HTMLElementWithContents tt(Object... contents);
480
481
    HTMLComplexElement u(Object... contents);
482
483
    HTMLComplexElement ul(Object... contents);
484
485
    HTMLComplexElement var(Object... contents);
486
487
    HTMLComplexElement video(Object... contents);
488
489
    HTMLComplexElement wbr(Object... contents);
490
491
}