Package javax.swing

Examples of javax.swing.JComponent.revalidate()


      for (int i = 0; i < comps.size(); i++) {
        BeanInstance bi = (BeanInstance)comps.elementAt(i);
        JComponent c = (JComponent)bi.getBean();
        Dimension d = c.getPreferredSize();
        c.setBounds(bi.getX(), bi.getY(), d.width, d.height);
        c.revalidate();
      }
    }
  }

  /**
 
View Full Code Here


                        JComponent c = (JComponent) e.getComponent();
                        Rectangle r = c.getBounds();
                        full.setBounds(r);
                        pip.setBounds(r);
                        controls.setBounds(r);
                        c.revalidate();
                    }
                   
                });
                for (int i = 1; i < files.length; ++i) {
                    String uri = files[i];                   
View Full Code Here

      for (int i = 0; i < comps.size(); i++) {
        BeanInstance bi = (BeanInstance)comps.elementAt(i);
        JComponent c = (JComponent)bi.getBean();
        Dimension d = c.getPreferredSize();
        c.setBounds(bi.getX(), bi.getY(), d.width, d.height);
        c.revalidate();
      }
    }
  }

  /**
 
View Full Code Here

      for (int i = menuItems.length - bottomFixedCount; i < menuItems.length; i++) {
        menu.add(menuItems[i]);
      }

      JComponent parent = (JComponent) upItem.getParent();
      parent.revalidate();
      parent.repaint();
    }
  }

  private class MenuScrollListener implements PopupMenuListener {
View Full Code Here

            for (Component item : menuItems) {
                preferredWidth = Math.max(preferredWidth, item.getPreferredSize().width);
            }
            menu.setPreferredSize(new Dimension(preferredWidth, menu.getPreferredSize().height));
            JComponent parent = (JComponent) upItem.getParent();
            parent.revalidate();
            parent.repaint();
        }
    }
   
    private class MouseScrollListener implements MouseWheelListener {
View Full Code Here

      {
        menu.add( menuItems[i] );
      }

      JComponent parent = ( JComponent )upItem.getParent();
      parent.revalidate();
      parent.repaint();
    }
  }

  private class MenuScrollListener implements PopupMenuListener
View Full Code Here

        JComponent jc = (JComponent)this._component;
        // TF:6/9/07:Added functionality to use GridTitledBorder
        if (jc.getBorder() instanceof GridTitledBorder) {
            // Grid Titled Borders know how to adjust themselves properly
            ((GridTitledBorder)jc.getBorder()).setFrameWeight(this.weight);
            jc.revalidate();
            jc.repaint();
        }
        else if (jc instanceof TextGraphic) {
            Border newBorder = null;
            switch (this.weight){
View Full Code Here

        JComponent jc = (JComponent)this._component;
        // TF:6/9/07:Added functionality to use GridTitledBorder
        if (jc.getBorder() instanceof GridTitledBorder) {
            // Grid Titled Borders know how to adjust themselves properly
            ((GridTitledBorder)jc.getBorder()).setFrameWeight(this.weight);
            jc.revalidate();
            jc.repaint();
        }
        else if (jc instanceof TextGraphic) {
            Border newBorder = null;
            switch (this.weight){
View Full Code Here

        JComponent jc = (JComponent)this._component;
        // TF:6/9/07:Added functionality to use GridTitledBorder
        if (jc.getBorder() instanceof GridTitledBorder) {
            // Grid Titled Borders know how to adjust themselves properly
            ((GridTitledBorder)jc.getBorder()).setFrameWeight(this.weight);
            jc.revalidate();
            jc.repaint();
        }
        else if (jc instanceof TextGraphic) {
            Border newBorder = null;
            switch (this.weight){
View Full Code Here

            for (int i = menuItems.length - bottomFixedCount; i < menuItems.length; i++) {
                menu.add(menuItems[i]);
            }

            JComponent parent = (JComponent) upItem.getParent();
            parent.revalidate();
            parent.repaint();
        }
    }

    protected class MenuScrollTimer extends Timer {
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.