Package java.awt

Examples of java.awt.LayoutManager


            Dimension size = ui.getMaximumSize(this);
            if (size != null) {
                return new Dimension(size);
            }
        }
        LayoutManager layout = getLayout();
        if (layout != null && layout instanceof LayoutManager2) {
            return ((LayoutManager2) layout).maximumLayoutSize(this);
        }
        return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);
    }
View Full Code Here


        //because the BasicToolBarUI always uses an absolute position of
        //NORTH/SOUTH/EAST/WEST.
        if (toolbar != null) {
            Container parent = toolbar.getParent();
            if (parent != null) {
                LayoutManager m = parent.getLayout();
                if (m instanceof BorderLayout) {
                    BorderLayout b = (BorderLayout)m;
                    Object con = b.getConstraints(toolbar);
                    if (con == SOUTH || con == EAST || con == WEST) {
                        return con;
View Full Code Here

        }
    }


    public void setLayout(LayoutManager mgr) {
        LayoutManager oldMgr = getLayout();
        if (oldMgr instanceof PropertyChangeListener) {
            removePropertyChangeListener((PropertyChangeListener)oldMgr);
        }
        super.setLayout(mgr);
    }
View Full Code Here

        //because the BasicToolBarUI always uses an absolute position of
        //NORTH/SOUTH/EAST/WEST.
        if (toolbar != null) {
            Container parent = toolbar.getParent();
            if (parent != null) {
                LayoutManager m = parent.getLayout();
                if (m instanceof BorderLayout) {
                    BorderLayout b = (BorderLayout)m;
                    Object con = b.getConstraints(toolbar);
                    if (con == SOUTH || con == EAST || con == WEST) {
                        return con;
View Full Code Here

    /* This has to deal with the fact that the title may be wider than
       the widest child component.
       */
    public Dimension getPreferredSize(JComponent c) {
  LayoutManager layout = c.getLayout();
  Dimension d = layout.preferredLayoutSize(c);
  String title = ((JPopupMenu)c).getLabel();
  if (titleFont == null) {
      UIDefaults table = UIManager.getLookAndFeelDefaults();
      titleFont = table.getFont("PopupMenu.font");
  }
View Full Code Here

        }
    }


    public void setLayout(LayoutManager mgr) {
  LayoutManager oldMgr = getLayout();
  if (oldMgr instanceof PropertyChangeListener) {
      removePropertyChangeListener((PropertyChangeListener)oldMgr);
  }
  super.setLayout(mgr);
    }
View Full Code Here

      int count = buttons.length;

      JPanel outerPanel = new JPanel(new BorderLayout());
      outerPanel.setBorder(new EmptyBorder(new Insets(sidebuttons ? 5 : 0, sidebuttons ? 0 : 5, 5, 5)));

      LayoutManager lm = new GridLayout(// GridLayout makes equal cells
         sidebuttons ? count : 1, sidebuttons ? 1 : count, 5, 5);

      JPanel innerPanel = new JPanel(lm);

      for (int i = 0; i < count; i++) innerPanel.add(buttons[i]);
View Full Code Here

         */
        if (toolbar != null) {
            Container parent = toolbar.getParent();

            if (parent != null) {
                LayoutManager m = parent.getLayout();

                if (m instanceof BorderLayout) {
                    BorderLayout b   = (BorderLayout) m;
                    Object       con = b.getConstraints(toolbar);

View Full Code Here

     *
     * @return the layout manager.
     */
    private LayoutManager createLayout() {
        SeaGlassContext context = getContext(this);
        LayoutManager   lm      = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout");

        context.dispose();

        return (lm != null) ? lm : new SeaGlassTitlePaneLayout();
    }
View Full Code Here

     *
     * @return the layout manager.
     */
    private LayoutManager createLayout() {
        SeaGlassContext context = getContext(this);
        LayoutManager   lm      = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout");

        context.dispose();

        return (lm != null) ? lm : new SeaGlassTitlePaneLayout();
    }
View Full Code Here

TOP

Related Classes of java.awt.LayoutManager

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.