KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > thinlet > drafts > TabbedPane


1 package thinlet.drafts;
2
3 import thinlet.*;
4
5 /**
6  *
7  */

8 public class TabbedPane {
9     
10     /**
11      *
12      */

13     public void changePlacement(Thinlet thinlet, Object JavaDoc combobox, Object JavaDoc tabbedpane) {
14         int index = thinlet.getInteger(combobox, "selected");
15         String JavaDoc[] placements = { "top", "left", "bottom", "right", "stacked" };
16         thinlet.setChoice(tabbedpane, "placement", placements[index]);
17     }
18     
19     /**
20      *
21      */

22     public void changeEnabled(Thinlet thinlet, boolean selected, Object JavaDoc tabbedpane, int tabindex) {
23         Object JavaDoc tab = thinlet.getItem(tabbedpane, tabindex);
24         thinlet.setBoolean(tab, "enabled", selected);
25     }
26     
27     /**
28      *
29      */

30     public void changeText(Thinlet thinlet, Object JavaDoc tabbedpane) {
31         thinlet.setString(thinlet.getItem(tabbedpane, 0), "text", "First!");
32     }
33     
34     public void focus(Thinlet thinlet, Object JavaDoc component) {
35         thinlet.setBoolean(component, "visible", true);
36         //System.out.println(thinlet.requestFocus(component));
37
}
38     
39     public void setBorder(Thinlet thinlet, boolean bordered, Object JavaDoc textarea) {
40         thinlet.setBoolean(textarea, "border", bordered);
41     }
42 }
Popular Tags