01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.plaf.html;
06:
07: import java.awt.*;
08: import java.util.*;
09: import java.io.*;
10:
11: import com.javelin.swinglets.*;
12: import com.javelin.swinglets.plaf.*;
13:
14: /**
15: * HTMLTextAreaUI defines a look and feel for default HTML.
16: *
17: * @author Robin Sharp
18: */
19:
20: public class HTMLTextAreaUI extends HTMLTextComponentUI {
21: /**
22: * Render the UI on the PrintWriter
23: */
24: public void update(PrintWriter out, SComponent c) {
25: if (!c.isVisible())
26: return;
27:
28: STextArea textArea = (STextArea) c;
29:
30: out.print("<TEXTAREA ROWS=\"");
31: out.print(textArea.getRows());
32: out.print("\"");
33: out.print(" COLS=\"");
34: out.print(textArea.getColumns());
35: out.println("\"");
36:
37: if (c.isEnabled()) {
38: HTMLUtility.setName(out, textArea);
39: }
40: HTMLUtility.setTabIndex(out, c);
41:
42: HTMLUtility.setMouseOverStatusText(out, c.getToolTipText());
43:
44: updateEvent(out, c);
45:
46: if (!c.isEnabled()) {
47: out.println(" DISABLED");
48: }
49:
50: out.println(" >");
51:
52: if (textArea.getText() != null) {
53: out.print(textArea.getText());
54: }
55:
56: out.println("</TEXTAREA>");
57: }
58: }
|