Package java.awt

Examples of java.awt.LayoutManager


      final double border = 5;
      final double rowsGap = 0;
      final double colsGap = 10;
      final double[][] size = {{border, TableLayout.PREFERRED, colsGap, TableLayout.FILL, border}, // Columns
                   {border, TableLayout.PREFERRED, rowsGap, TableLayout.PREFERRED, 10, TableLayout.FILL, 10, TableLayout.PREFERRED, border}};// Rows
      final LayoutManager tbl = new TableLayout(size);

      _mainPanel = new JPanel();
      _mainPanel.setLayout(tbl);
      //panel.setBorder(BorderFactory.createTitledBorder("Inspections"));
      _mainPanel.setBorder(BorderFactory.createTitledBorder("Configuration options"));
View Full Code Here


      final double border = 5;
      final double rowsGap = 0;
      final double colsGap = 10;
      final double[][] size = {{border, TableLayout.PREFERRED, colsGap, TableLayout.PREFERRED, border}, // Columns
                   {border, TableLayout.PREFERRED, border}};// Rows
      final LayoutManager tbl = new TableLayout(size);

      _effortPanel = new JPanel(tbl);
      _effortPanel.add(getEffortLabel(), "1, 1, 1, 1");
      _effortPanel.setBorder(null);
      _effortPanel.add( getEffortSlider(), "3, 1, 3, 1, l, t" );
View Full Code Here

    final double border = 0;
    final double rowsGap = 0;
    final double colsGap = _hGap;
    final double[][] size = {{border, TableLayoutConstants.PREFERRED, colsGap, TableLayoutConstants.PREFERRED, colsGap, TableLayoutConstants.PREFERRED, colsGap, TableLayoutConstants.PREFERRED, border}, // Columns
                 {border, TableLayoutConstants.PREFERRED, border}};// Rows
    final LayoutManager tbl = new TableLayout(size);
    setLayout(tbl);

    //setLayout(new BorderLayout(_hGap, 0));
    _icon = new JLabel();
View Full Code Here

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

    return true;
  }

  @Override
  protected LayoutManager copyLayout(Container con) {
    LayoutManager layout = con.getLayout();
    if (layout == null || layout.getClass() != GroupLayout.class)
      return new GroupLayout();
    else
      return layout;
  }
View Full Code Here

        }

        public void react(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout == false ) lm = c.getLayout();

            if ( lm instanceof MigLayout ) {
                MigLayout layout = (MigLayout) lm;
                boolean isComp = layout.isManagingComponent( c );
View Full Code Here

    private static class ToolTipListener extends MouseMotionAdapter
    {
        public void mouseMoved(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout ) {
                Object constr = ((MigLayout) lm).getComponentConstraints( c );
                if ( constr instanceof String ) c.setToolTipText( (constr != null ? ("\"" + constr + "\"") : "null") );
            }
        }
View Full Code Here

        }

        public void react(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout == false ) lm = c.getLayout();

            if ( lm instanceof MigLayout ) {
                MigLayout layout = (MigLayout) lm;
                boolean isComp = layout.isManagingComponent( c );
View Full Code Here

    private static class ToolTipListener extends MouseMotionAdapter
    {
        public void mouseMoved(MouseEvent e)
        {
            JComponent c = (JComponent) e.getSource();
            LayoutManager lm = c.getParent().getLayout();
            if ( lm instanceof MigLayout ) {
                Object constr = ((MigLayout) lm).getComponentConstraints( c );
                if ( constr instanceof String ) c.setToolTipText( (constr != null ? ("\"" + constr + "\"") : "null") );
            }
        }
View Full Code Here

    } else {
      testClass = comp.getClass();
    }
    try {
      Container container = (Container) testClass.newInstance();
      LayoutManager lm = container.getLayout();
      if (lm == null)
        return null;
      else
        return lm.getClass();
    } catch (Exception e) {
      return FlowLayout.class;
    }
  }
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.