01: /*
02: * $Id: JXTaskPaneContainerTest.java,v 1.3 2007/01/25 13:19:00 kleopatra Exp $
03: *
04: * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
05: * Santa Clara, California 95054, U.S.A. All rights reserved.
06: */
07: package org.jdesktop.swingx;
08:
09: import java.awt.event.ActionEvent;
10:
11: import org.jdesktop.swingx.action.AbstractActionExt;
12:
13: public class JXTaskPaneContainerTest extends InteractiveTestCase {
14:
15: public static void main(String[] args) throws Exception {
16: // setSystemLF(true);
17: JXTaskPaneContainerTest test = new JXTaskPaneContainerTest(
18: "TaskPaneContainer");
19: try {
20: test.runInteractiveTests();
21: } catch (Exception e) {
22: System.err
23: .println("exception when executing interactive tests:");
24: e.printStackTrace();
25: }
26: }
27:
28: public JXTaskPaneContainerTest(String testTitle) {
29: super (testTitle);
30: }
31:
32: public void testBean() throws Exception {
33: new JXTaskPaneContainerBeanInfo();
34: }
35:
36: public void testAddon() throws Exception {
37: // move around all addons
38: TestUtilities.cycleAddons(new JXTaskPaneContainer());
39: }
40:
41: public void interactiveGap() {
42: JXTaskPaneContainer container = new JXTaskPaneContainer();
43: // ((VerticalLayout) container.getLayout()).setGap(0);
44: JXTaskPane first = new JXTaskPane();
45: fillTaskPane(first);
46: container.add(first);
47: JXTaskPane second = new JXTaskPane();
48: fillTaskPane(second);
49: container.add(second);
50: showWithScrollingInFrame(container, "custom gap");
51: }
52:
53: private void fillTaskPane(JXTaskPane first) {
54: first.add(new AbstractActionExt("some") {
55:
56: public void actionPerformed(ActionEvent e) {
57: // TODO Auto-generated method stub
58:
59: }
60:
61: });
62:
63: first.add(new AbstractActionExt("other") {
64:
65: public void actionPerformed(ActionEvent e) {
66: // TODO Auto-generated method stub
67:
68: }
69:
70: });
71: }
72: }
|