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