01: /*
02: * Copyright (c) 2005-2008 Substance Kirill Grouchnikov, based on work by
03: * Sun Microsystems, Inc. All rights reserved.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18: */
19: package test;
20:
21: import javax.swing.*;
22: import javax.swing.border.EmptyBorder;
23:
24: import org.jvnet.substance.SubstanceLookAndFeel;
25: import org.jvnet.substance.skin.SubstanceBusinessBlackSteelLookAndFeel;
26:
27: import test.check.SampleMenuFactory;
28:
29: public class TestBaselineFrame extends JFrame {
30: public TestBaselineFrame() {
31: super ("Baseline");
32: TestBaselinePanel testPanel = new TestBaselinePanel();
33: testPanel.setBorder(new EmptyBorder(10, 10, 5, 5));
34: this .add(testPanel);
35: JMenuBar jmb = new JMenuBar();
36: jmb.add(SampleMenuFactory.getLookAndFeelMenu(this ));
37: this .setJMenuBar(jmb);
38: this .setSize(250, 250);
39: this .setLocationRelativeTo(null);
40: this .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
41: }
42:
43: public static void main(String[] args) throws Exception {
44: UIManager
45: .setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());
46: JFrame.setDefaultLookAndFeelDecorated(true);
47: UIManager.put(SubstanceLookAndFeel.NO_EXTRA_ELEMENTS,
48: Boolean.TRUE);
49: SwingUtilities.invokeLater(new Runnable() {
50: public void run() {
51: new TestBaselineFrame().setVisible(true);
52: }
53: });
54: }
55:
56: }
|