Examples of addNotify()


Examples of java.awt.Frame.addNotify()

        /*
         * This is necessary to make lightweight components
         * directly added to the frame receive mouse events
         * properly.
         */
        frame.addNotify();
       
        /*
        * TEMPORARY CODE
        *
        * For some reason, the graphics configuration of the embedded
View Full Code Here

Examples of java.awt.Menu.addNotify()

            jComponent.setHelpMenu(((SwingMenuPeer) help_menu.getPeer()).jComponent);
            */
        }
        for (int i = 0; i < mc; i++) {
            Menu menu = menuBar.getMenu(i);
            menu.addNotify();
            jComponent.add(((SwingMenuPeer) menu.getPeer()).jComponent);
        }
        //TODO a better workaround than this
        if (help_menu != null) {
            help_menu.addNotify();
View Full Code Here

Examples of java.awt.MenuItem.addNotify()

    public SwingPopupMenuPeer(SwingToolkit toolkit, PopupMenu popupMenu) {
        super(toolkit, popupMenu, new JPopupMenu());
        int item_count = popupMenu.getItemCount();
        for (int i = 0; i < item_count; i++) {
            MenuItem menu_item = popupMenu.getItem(i);
            menu_item.addNotify();
            jComponent.add(((SwingMenuComponentPeer<?, ?>) menu_item.getPeer()).jComponent);
        }
    }

    public void setLabel(String text) {
View Full Code Here

Examples of java.awt.MenuItem.addNotify()

    public SwingMenuPeer(SwingToolkit toolkit, Menu menu) {
        super(toolkit, menu, new JMenu());
        int item_count = menu.getItemCount();
        for (int i = 0; i < item_count; i++) {
            MenuItem menu_item = menu.getItem(i);
            menu_item.addNotify();
            jComponent.add(((SwingMenuComponentPeer<?, ?>) menu_item.getPeer()).jComponent);
        }
    }

    @SuppressWarnings("deprecation")
View Full Code Here

Examples of java.awt.Panel.addNotify()

        jp.addNotify();
    }
   
    public void testPanel(){
        Panel p = new Panel();
        p.addNotify();
    }

    public void testCanvas(){
        Canvas cnv = new Canvas();
        cnv.addNotify();
View Full Code Here

Examples of java.awt.Window.addNotify()

          // On Mac, if we initialize the window in the UI thread, it gets wrong insets, paints incorrectly, etc.
          // The "fix" is to initialize in the SWT thread.
          class MacWindowInitMessage extends CommandMessage implements NoSerializationTestMessage {
            @Override
            public Object run(Object[] args) throws Exception {
              windowAncestor.addNotify();
              return null;
            }
          };
          new MacWindowInitMessage().syncSend(true);
        } else {
View Full Code Here

Examples of java.awt.Window.addNotify()

              return null;
            }
          };
          new MacWindowInitMessage().syncSend(true);
        } else {
          windowAncestor.addNotify();
        }
        createNativePeer();
      } finally {
        isForcingInitialization = false;
      }
View Full Code Here

Examples of javax.swing.JButton.addNotify()

        final Component c = new JButton();

        c.setVisible(true);
        c.setEnabled(true);
        c.setFocusable(true);
        c.addNotify();

        assertTrue(new DefaultFocusTraversalPolicy().accept(c));
    }
}
View Full Code Here

Examples of javax.swing.JButton.addNotify()

public class HeadlessTest extends TestCase {   

    public void testJButton(){
        JButton jb = new JButton();
        jb.addNotify();
    }

    public void testJPanel(){
        JPanel jp = new JPanel();
        jp.addNotify();
View Full Code Here

Examples of javax.swing.JInternalFrame.addNotify()

    Dimension size = new Dimension(100, 100);
    jif.setLayout(new GroupLayout());
    jif.setSize(size);
    JavaUtil.layoutContainer(jif);
    jif.validate();
    jif.addNotify();
    desktopPane.add(jif);
    jif.setVisible(true);
    return jif;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.