Java Code Examples for com.sun.swingset3.DemoProperties

The following examples show how to use com.sun.swingset3.DemoProperties. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Test
public void test() throws Exception {
    new ClassReference(ToggleButtonDemo.class.getCanonicalName()).startApplication();

    JFrameOperator mainFrame = new JFrameOperator(ToggleButtonDemo.class.getAnnotation(DemoProperties.class).value());
    JTabbedPaneOperator tabPane = new JTabbedPaneOperator(mainFrame);

    // Radio Button Toggles
    testRadioButtons(getBorderTitledJPanelOperator(mainFrame, TEXT_RADIO_BUTTONS), 3, null);
    testRadioButtons(getBorderTitledJPanelOperator(mainFrame, IMAGE_RADIO_BUTTONS), 3, null);
    testRadioButtons(getLabeledContainerOperator(mainFrame, PAD_AMOUNT), 3, (t, i) -> DEFAULT.equals(t));

    // switch to the Check Boxes Tab
    tabPane.selectPage(CHECK_BOXES);

    // Check Box Toggles
    ContainerOperator<?> textCheckBoxesJPanel = getBorderTitledJPanelOperator(mainFrame, TEXT_CHECKBOXES);
    testCheckBox(textCheckBoxesJPanel, CHECK1, false);
    testCheckBox(textCheckBoxesJPanel, CHECK2, false);
    testCheckBox(textCheckBoxesJPanel, CHECK3, false);

    ContainerOperator<?> imageCheckBoxesJPanel = getBorderTitledJPanelOperator(mainFrame, IMAGE_CHECKBOXES);
    testCheckBox(imageCheckBoxesJPanel, CHECK1, false);
    testCheckBox(imageCheckBoxesJPanel, CHECK2, false);
    testCheckBox(imageCheckBoxesJPanel, CHECK3, false);

    ContainerOperator<?> displayOptionsContainer = getLabeledContainerOperator(mainFrame, DISPLAY_OPTIONS);
    testCheckBox(displayOptionsContainer, PAINT_BORDER, false);
    testCheckBox(displayOptionsContainer, PAINT_FOCUS, true);
    testCheckBox(displayOptionsContainer, ENABLED, true);
    testCheckBox(displayOptionsContainer, CONTENT_FILLED, true);

    // Direction Button Toggles
    testToggleButtons(mainFrame);
}
 
Example 2
Source Project: openjdk-jdk9   Source File: SliderDemo.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(SliderDemo.class.getAnnotation(DemoProperties.class).value());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new SliderDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 3
/**
 * main method allows us to run as a standalone demo.
 *
 * @param args
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ToggleButtonDemo.class.getAnnotation(DemoProperties.class).value());

    frame.getContentPane().add(new ToggleButtonDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 4
Source Project: littleluck   Source File: ScrollPaneDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ScrollPaneDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ScrollPaneDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 5
Source Project: littleluck   Source File: GridBagLayoutDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(GridBagLayoutDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new GridBagLayoutDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 6
Source Project: littleluck   Source File: ToolTipDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ToolTipDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ToolTipDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 7
Source Project: littleluck   Source File: FileChooserDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(FileChooserDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new FileChooserDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 8
Source Project: littleluck   Source File: ProgressBarDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ProgressBarDemo.class.getAnnotation(DemoProperties.class).value());
    
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ProgressBarDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 9
Source Project: littleluck   Source File: SliderDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(SliderDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new SliderDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 10
Source Project: littleluck   Source File: TreeDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(TreeDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new TreeDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 11
Source Project: littleluck   Source File: ColorChooserDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ColorChooserDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ColorChooserDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 12
Source Project: littleluck   Source File: ToggleButtonDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ToggleButtonDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ToggleButtonDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 13
Source Project: littleluck   Source File: TabbedPaneDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(TabbedPaneDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new TabbedPaneDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 14
Source Project: littleluck   Source File: ListDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ListDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ListDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 15
Source Project: littleluck   Source File: SpinnerDemo.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
    JFrame frame = new JFrame(
            SpinnerDemo.class.getAnnotation(DemoProperties.class).value());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new SpinnerDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 16
Source Project: littleluck   Source File: InternalFrameDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(InternalFrameDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new InternalFrameDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 17
Source Project: littleluck   Source File: EditorPaneDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(EditorPaneDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new EditorPaneDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 18
Source Project: littleluck   Source File: TextFieldDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(TextFieldDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new TextFieldDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 19
Source Project: littleluck   Source File: SplitPaneDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(SplitPaneDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new SplitPaneDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 20
Source Project: littleluck   Source File: OptionPaneDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(OptionPaneDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new OptionPaneDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 21
Source Project: littleluck   Source File: ComboBoxDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ComboBoxDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ComboBoxDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 22
Source Project: beautyeye   Source File: ScrollPaneDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ScrollPaneDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ScrollPaneDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 23
Source Project: beautyeye   Source File: GridBagLayoutDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(GridBagLayoutDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new GridBagLayoutDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 24
Source Project: beautyeye   Source File: ToolTipDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ToolTipDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ToolTipDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 25
Source Project: beautyeye   Source File: FileChooserDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(FileChooserDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new FileChooserDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 26
Source Project: beautyeye   Source File: ProgressBarDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ProgressBarDemo.class.getAnnotation(DemoProperties.class).value());
    
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ProgressBarDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 27
Source Project: beautyeye   Source File: SliderDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(SliderDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new SliderDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 28
Source Project: beautyeye   Source File: TreeDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(TreeDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new TreeDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 29
Source Project: beautyeye   Source File: ColorChooserDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ColorChooserDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ColorChooserDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
Example 30
Source Project: beautyeye   Source File: ToggleButtonDemo.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * main method allows us to run as a standalone demo.
 */
public static void main(String[] args) {
    JFrame frame = new JFrame(ToggleButtonDemo.class.getAnnotation(DemoProperties.class).value());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new ToggleButtonDemo());
    frame.setPreferredSize(new Dimension(800, 600));
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}