Examples of validate()


Examples of javax.swing.Box.validate()

      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          Box upper = (Box)splitPane.getComponent(0);         
          upper.remove(0);
          upper.add(nextToolbar, 0);
          upper.validate();
          nextToolbar.repaint();
          toolbar = nextToolbar;
          // The toolbar responds to shift down/up events
          // in order to show the alt version of toolbar buttons.
          // With toolbar switch, KeyListener has to be changed as well
View Full Code Here

Examples of javax.swing.JApplet.validate()

      WidgetAdapter target = adaptable.getDropWidget().get(0);
      JMenuBar jmb = (JMenuBar) target.getWidget();
      JApplet japplet = (JApplet) adaptable.getWidget();
      japplet.setJMenuBar(jmb);
      target.requestNewName();
      japplet.validate();
      adaptable.doLayout();
      adaptable.validateContent();
      adaptable.clearAllSelected();
      target.setSelected(true);
      adaptable.setDirty(true);
View Full Code Here

Examples of javax.swing.JComboBox.validate()

    JComboBox jc = new JComboBox();
    jc.setModel(new DefaultComboBoxModel(new Object[] { Messages.JComboBoxAdapter_Item_0, Messages.JComboBoxAdapter_Item_1, Messages.JComboBoxAdapter_Item_2, Messages.JComboBoxAdapter_Item_3 }));
    Dimension size = jc.getPreferredSize();
    jc.setSize(size);
    jc.doLayout();
    jc.validate();
    return jc;
  }

  @Override
  protected Component newWidget() {
View Full Code Here

Examples of javax.swing.JComponent.validate()

        buttons.add(doneButton);
        buttons.add(cancelButton);

        component.add(buttons, BorderLayout.SOUTH);

        component.validate();
        return component;
    }

    /**
     * Implement the ActionListener interface. The actions registering here
View Full Code Here

Examples of javax.swing.JDialog.validate()

        int x=up.getInt(propRoot+".X",0);
        int y=up.getInt(propRoot+".Y", 0);
        int w=up.getInt(propRoot+".WIDTH", 100);
        int h=up.getInt(propRoot+".HEIGHT", 100);
        jd.setSize(w,h);
        jd.validate();
        jd.setLocation(x,y);
      }
    }
  }
View Full Code Here

Examples of javax.swing.JEditorPane.validate()

            JEditorPane htmlComp = new JEditorPane();
            htmlComp.setContentType("text/html");
            htmlComp.read(new StringReader(someHTML), null);
            htmlComp.setSize(new Dimension(pageSize.width - 72, pageSize.height - 72));
            //htmlComp.setBackground(Color.ORANGE);
            htmlComp.validate();
            htmlComp.printAll(g2d);

            //Cleanup
            g2d.finish();
        } finally {
View Full Code Here

Examples of javax.swing.JFrame.validate()

      WidgetAdapter target = adaptable.getDropWidget().get(0);
      JMenuBar jmb = (JMenuBar) target.getWidget();
      JFrame jframe = (JFrame) adaptable.getWidget();
      jframe.setJMenuBar(jmb);
      target.requestNewName();
      jframe.validate();
      adaptable.doLayout();
      adaptable.validateContent();
      adaptable.clearAllSelected();
      target.setSelected(true);
      adaptable.setDirty(true);
View Full Code Here

Examples of javax.swing.JInternalFrame.validate()

    JInternalFrame jif = new JInternalFrame();   
    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

Examples of javax.swing.JLabel.validate()

                }
                @Override public void mouseClicked(MouseEvent e) {
                    DataSet ds = Main.main.getCurrentDataSet();
                    // Let the user toggle the selection
                    ds.toggleSelected(osm);
                    l.validate();
                }
            });
            // Sometimes the mouseEntered event is not catched, thus the label
            // will not be highlighted, making it confusing. The MotionListener
            // can correct this defect.
View Full Code Here

Examples of javax.swing.JLayeredPane.validate()

      if(isProxiedFiliation) {
        if(embeddedPanel.getParent() == null) {
          layeredPane.setLayer(embeddedPanel, Integer.MIN_VALUE);
          layeredPane.add(embeddedPanel);
          layeredPane.invalidate();
          layeredPane.validate();
        }
        JLayeredPane oldLayeredPane = findLayeredPane(embeddedPanel);
        if(layeredPane != oldLayeredPane) {
          embeddedPanel.isCrossWindowReparenting = true;
          nativeComponentWrapper.storeInHiddenParent();
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.