Package javax.swing.plaf

Examples of javax.swing.plaf.OptionPaneUI


     * focus to the initial value. This method
     * should be invoked after the window containing the option pane
     * is made visible.
     */
    public void selectInitialValue() {
        OptionPaneUI         ui = getUI();
        if (ui != null) {
            ui.selectInitialValue(this);
        }
    }
View Full Code Here


    public void testGetUIClassID() {
        assertEquals("UI class ID", "OptionPaneUI", pane.getUIClassID());
    }

    public void testUpdateUI() {
        OptionPaneUI ui = new OptionPaneUI() {
            @Override
            public void selectInitialValue(JOptionPane arg0) {
            }

            @Override
View Full Code Here

     * focus to the initial value. This method
     * should be invoked after the window containing the option pane
     * is made visible.
     */
    public void selectInitialValue() {
        OptionPaneUI         ui = getUI();
        if (ui != null) {
            ui.selectInitialValue(this);
        }
    }
View Full Code Here

        Icon icon = jOptionPaneMessageTypeToIconMap.get(messageTypeInteger);

        if (icon == null) {

            // Get the icon from a new JOptionPane's UI.
            OptionPaneUI ui = (new JOptionPane()).getUI();
           
            // The code below only works for BasicOptionPaneUIs.
            if (!(ui instanceof BasicOptionPaneUI)) {
                ui = new BasicOptionPaneUI();
               
View Full Code Here

    public void testGetUIClassID() {
        assertEquals("UI class ID", "OptionPaneUI", pane.getUIClassID());
    }

    public void testUpdateUI() {
        OptionPaneUI ui = new OptionPaneUI() {
            @Override
            public void selectInitialValue(JOptionPane arg0) {
            }

            @Override
View Full Code Here

    public void testSelectInitialValue() {
        //TODO Implement selectInitialValue().
    }

    public void testContainsCustomComponents() {
        OptionPaneUI ui = null;
        JOptionPane optionPane = null;
        optionPane = new JOptionPane();
        assertFalse(paneUI.containsCustomComponents(optionPane));
        assertFalse(paneUI.containsCustomComponents(null));
        paneUI.hasCustomComponents = true;
        assertTrue(paneUI.containsCustomComponents(optionPane));
        assertTrue(paneUI.containsCustomComponents(null));
        optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE);
        ui = optionPane.getUI();
        assertFalse(ui.containsCustomComponents(optionPane));
        assertFalse(ui.containsCustomComponents(null));
        optionPane = new JOptionPane(new JButton("Message"), JOptionPane.ERROR_MESSAGE);
        ui = optionPane.getUI();
        assertTrue(ui.containsCustomComponents(optionPane));
        assertTrue(ui.containsCustomComponents(null));
        optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
                JOptionPane.CLOSED_OPTION, null, new Object[] { "1", "2" });
        ui = optionPane.getUI();
        assertFalse(ui.containsCustomComponents(optionPane));
        assertFalse(ui.containsCustomComponents(null));
        optionPane = new JOptionPane("Message", JOptionPane.ERROR_MESSAGE,
                JOptionPane.CLOSED_OPTION, null, new Object[] { new Button("1"), "2" });
        ui = optionPane.getUI();
        assertTrue(ui.containsCustomComponents(optionPane));
        assertTrue(ui.containsCustomComponents(null));
    }
View Full Code Here

     * focus to the initial value. This method
     * should be invoked after the window containing the option pane
     * is made visible.
     */
    public void selectInitialValue() {
        OptionPaneUI         ui = getUI();
        if (ui != null) {
            ui.selectInitialValue(this);
        }
    }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.OptionPaneUI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.