Package java.awt

Examples of java.awt.LayoutManager


    /*
     * Class under test for void setLayout(LayoutManager)
     */
    public void testSetLayout() {
        TestInternalFrame frame = new TestInternalFrame();
        LayoutManager contentLayout = frame.getContentPane().getLayout();
        LayoutManager frameLayout = frame.getLayout();
        // rootPaneCheckingEnabled is true, no exception since 1.5
        frame.setRootPaneCheckingEnabled(true);
        boolean ok = false;
        try {
            frame.setLayout(new FlowLayout());
View Full Code Here


    /*
     * Class under test for void setLayout(LayoutManager)
     */
    public void testSetLayout() {
        TestWindow window = new TestWindow();
        LayoutManager contentLayout = window.getContentPane().getLayout();
        LayoutManager frameLayout = window.getLayout();
        // rootPaneCheckingEnabled is true, no exception since 1.5
        window.setRootPaneCheckingEnabled(true);
        boolean ok = false;
        try {
            window.setLayout(new FlowLayout());
View Full Code Here

        assertTrue(pane.paramString() != null);
    }

    public void testCreateRootLayout() {
        TestRootPane pane = new TestRootPane();
        LayoutManager layout = pane.createRootLayout();
        assertTrue(layout != null);
        assertTrue(layout instanceof JRootPane.RootLayout);
    }
View Full Code Here

    /*
     * Class under test for void setLayout(LayoutManager)
     */
    public void testSetLayout() {
        TestDialog dialog = new TestDialog();
        LayoutManager contentLayout = dialog.getContentPane().getLayout();
        LayoutManager dialogLayout = dialog.getLayout();
        // rootPaneCheckingEnabled is true, no exception since 1.5
        dialog.setRootPaneCheckingEnabled(true);
        boolean ok = false;
        try {
            dialog.setLayout(new FlowLayout());
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

        //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

    p.add(BorderLayout.SOUTH,panel_show_options);
    p.add(BorderLayout.CENTER,panel_test_parameters);
   
    Container pane=viewer_frame.getContentPane();

    LayoutManager manager=viewer_frame.getLayout();
    if(panel!=null)
    {
      manager.removeLayoutComponent(panel);
      pane.remove(panel);
    }   
   
    panel=p;
View Full Code Here

      }
    });
  }

  private void setSplitPaneLayoutManager() {
      final LayoutManager layout = mSplitPane.getLayout();
      if(layout instanceof SplitPaneLayoutManagerDecorator){
        return;
      }
    mSplitPane.setLayout(new SplitPaneLayoutManagerDecorator(layout));
    }
View Full Code Here

  public FButtonBar(JRootPane rootPane, KeyBindingProcessor proc) {
    KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
    final Container oldContentPane = rootPane.getContentPane();
    final ContentPane newContentPane = new ContentPane();
    final LayoutManager layoutManager = oldContentPane.getLayout();
    oldContentPane.setLayout(null);
    newContentPane.setLayout(layoutManager);
    //RIBBONS impl: if ribbon found add it to NORTH
    for (Component c : oldContentPane.getComponents()) {
      if(c instanceof JRibbon) {
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.