Package java.awt

Examples of java.awt.LayoutManager


      super.setProperty(name, value);
   
  }

  public void recreateLayout() throws GUIException {
    LayoutManager manager = panel.getLayout();
    if (manager instanceof HIGLayout && !(this instanceof Group)) {
      /* Recreate the hig layout. Why is this needed? */
      HIGLayout layout = (HIGLayout) manager;
      HIGLayout newLayout = new HIGLayout(layout.getWidths(), layout.getHeights());
      for (int i=1; i<layout.getColumnWeights().length; i++)
View Full Code Here


            g2D.flush(true);
          }
        }
      });
    }
    JPanel canvasPanel = new JPanel(new LayoutManager() {
        public void addLayoutComponent(String name, Component comp) {
        }
       
        public void removeLayoutComponent(Component comp) {
        }
View Full Code Here

      alignment = Alignment.LEFT;
    }

    // set alignment
    if (value instanceof JPanel) {
      final LayoutManager layout = ((JPanel) value).getLayout();
      if (layout instanceof FlowLayout) {
        final FlowLayout flowLayout = (FlowLayout) layout;
        flowLayout.setAlignment(alignment.getFlowLayoutAlignment());
      }
    } else if (result instanceof JLabel) {
View Full Code Here

   * @param anchor
   * @param padding
   */
  public static void addToGridBag(Component comp, JPanel panel, int gridx, int gridy, int width, int height, int anchor,
      int padding, double weightx, double weighty) {
    LayoutManager layout = panel.getLayout();
    if (!(layout instanceof GridBagLayout)) {
      layout = new GridBagLayout();
      panel.setLayout(layout);
    }
    GridBagLayout gridBagLayout = (GridBagLayout) layout;
View Full Code Here

  }

  private JComponent createTab( final int id )
  {
    final JPanel        tab;
    final LayoutManager      lay;
    final JTable        table;
    final AbstractTableModel  tm;
    final SortedTableModel    stm;
    final JTableHeader      th;
    final TableCellRenderer    tcr;
View Full Code Here

public class JPanelParser extends CompositeParser implements IParser,
    IConstants {

  protected void genAddCode(ImportRewrite imports, StringBuilder builder) {
    JPanel panel = (JPanel) adaptable.getWidget();
    LayoutManager layout = panel.getLayout();
    if (layout == null) {
      if (!adaptable.isRoot())
        builder.append(adaptable.getID() + ".");
      builder.append("setLayout(null);\n");
      int count = ((CompositeAdapter) adaptable).getChildCount();
View Full Code Here

    final double border = 5;
    final double colsGap = 2;
    final double[][] size = {{border, TableLayout.PREFERRED, colsGap, TableLayout.PREFERRED, colsGap, TableLayout.FILL, border}, // Columns
                 {border, TableLayout.PREFERRED, border}};// Rows
    final LayoutManager tbl = new TableLayout(size);
    _labelPanel = new JPanel(tbl);
    _labelPanel.add(new JLabel("Preview"), "1, 1, 1, 1");
    _labelPanel.add(_label, "3, 1, 3, 1");

    final AbstractButton closeButton = new JButton(GuiResources.CLOSE_EDITOR_ICON);
View Full Code Here

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

   
  }
View Full Code Here

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

    _dialogBuilder = dialogBuilder;

    _label = new JLabel("Directory: ");
View Full Code Here

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

      final JPanel fontPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
      _plainBox = new JCheckBox("plain");
      _plainBox.addActionListener(new ActionListener() {
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.