01: /*
02: * Javu WingS - Lightweight Java Component Set
03: * Copyright (c) 2005-2007 Krzysztof A. Sadlocha
04: * e-mail: ksadlocha@programics.com
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: */
20:
21: package com.javujavu.javux.demo;
22:
23: import java.awt.BorderLayout;
24: import java.awt.Color;
25: import java.awt.Dimension;
26: import com.javujavu.javux.wings.WingButton;
27: import com.javujavu.javux.wings.WingCombo;
28: import com.javujavu.javux.wings.WingLabel;
29: import com.javujavu.javux.wings.WingList;
30: import com.javujavu.javux.wings.WingPanel;
31: import com.javujavu.javux.wings.WingScrollPane;
32: import com.javujavu.javux.wings.WingTextPane;
33: import com.javujavu.javux.wings.extra.ColorItem;
34: import com.javujavu.javux.wings.item.LabelItem;
35:
36: public class ZOrderPanel extends WingPanel {
37: public ZOrderPanel(WingSetPanel owner) {
38: this .setLayout(null);
39:
40: WingButton b;
41: this .add(b = new WingButton("Custom Button"));
42: b.setStyleId("custom_imageA");
43: b.setBounds(30, 80, 200, 80);
44:
45: WingTextPane ta;
46: this .add(ta = new WingTextPane());
47: ta.setStyleId("alpha_text");
48: ta
49: .append("Transparent WingTextPane\nstyle: alpha_text (stylesheet wingsetdemo.ini)\ntransparency works on Java >= 1.2");
50: ta.setBounds(260, 240, 280, 60);
51:
52: WingPanel panel2, panel3;
53: this .add(panel2 = new WingPanel(new BorderLayout()));
54: WingList list;
55: panel2.add(new WingScrollPane(list = new WingList(
56: WingList.VERTICAL)));
57: panel2.add(panel3 = new WingPanel(new BorderLayout()),
58: BorderLayout.NORTH);
59: panel3.setStyleId("border2");
60: panel3.add(new WingLabel("vertical aligned list",
61: WingLabel.CENTER));
62: ListPanel.addItems(list);
63: panel2.setBounds(130, 20, 200, 300);
64:
65: this .add(panel2 = new WingPanel(new BorderLayout()));
66: panel2.add(panel3 = new WingPanel(new BorderLayout()));
67: panel3.setStyleId("border3");
68: panel3.add(new WingLabel("Panel Style ID: border3",
69: WingLabel.CENTER));
70: panel2.add(panel3 = new WingPanel(new BorderLayout()),
71: BorderLayout.NORTH);
72: panel3.setStyleId("border2");
73: panel3.add(new WingLabel("Panel Style ID: border2",
74: WingLabel.CENTER));
75: panel2.setBounds(280, 150, 200, 120);
76:
77: WingCombo cb;
78: this .add(cb = new WingCombo(false));
79: cb.setStyleId("custom_combo");
80: cb.addItem(new ColorItem("color red", Color.red));
81: cb.addItem("text item 1");
82: cb.addItem(new ColorItem("color green", Color.green));
83: cb.addItem(WingSet.imgSmile);
84: cb.addItem(new ColorItem("blue", Color.blue));
85: cb.addItem(new LabelItem("text and icon", WingSet.imgSmile));
86: cb.addItem(new ColorItem("color magenta", Color.magenta));
87: cb.addItem("text item 2");
88: cb.addItem(new ColorItem("color orange", Color.orange));
89: cb.addItem(new LabelItem("text and icon", WingSet.imgSmile));
90: cb.addItem(new ColorItem("color yellow", Color.yellow));
91: cb.setBounds(380, 110, 160, 60);
92:
93: this .setPreferredSize(new Dimension(550, 330));
94: }
95: }
|