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: import com.javelin.swinglets.plaf.html.*;
14:
15: /**
16: * HTMLPasswordFieldUI defines a look and feel for default HTML.
17: *
18: * @author Robin Sharp
19: */
20:
21: public class HTMLPasswordFieldUI extends HTMLComponentUI {
22: /**
23: * Render the UI on the PrintWriter
24: */
25: public void update(PrintWriter out, SComponent c) {
26: if (!c.isVisible())
27: return;
28:
29: SPasswordField passwordField = (SPasswordField) c;
30:
31: out.print("<INPUT TYPE = \"password\" SIZE=\"");
32: out.print(passwordField.getColumns());
33: out.print("\"");
34:
35: if (c.isEnabled()) {
36: HTMLUtility.setName(out, passwordField);
37: }
38:
39: HTMLUtility.setTabIndex(out, c);
40:
41: HTMLUtility.setValue(out, passwordField);
42:
43: HTMLUtility.setMouseOverStatusText(out, c.getToolTipText());
44:
45: updateEvent(out, c);
46:
47: if (!c.isEnabled()) {
48: out.print(" DISABLED");
49: }
50:
51: out.println(">");
52: }
53: }
|