Examples of GridLayout


Examples of java.awt.GridLayout

            }
        });

        scroll.setViewportView(timetableGrid);

        JPanel southPanel = new JPanel(new GridLayout(1, 0));
        eventJList.setVisibleRowCount(3);
        taskJList.setVisibleRowCount(3);
        southPanel.add(new JScrollPane(eventJList));
        southPanel.add(new JScrollPane(taskJList));
View Full Code Here

Examples of java.awt.GridLayout

    }

    @Override
    protected void doOnce() {
        // TODO move to jgoodies layout / miglayout
        JPanel panel = new JPanel(new GridLayout(0, 2));
        JCheckBox aiCheckBox = new JCheckBox(tr.get(ID + ".autoImport"));
        aiCheckBox.setSelected(appSettings.isAutoImport());
        panel.add(aiCheckBox);

        JOptionPane.showMessageDialog(null, panel);
        Exception error = null;

        try {
            appSettings.setAutoImport(aiCheckBox.isSelected());
            appSettings.save();
        } catch (Exception ex) {
            error = ex;
        }

        if (error != null) {
            panel = new JPanel(new GridLayout(0, 1));
            if (error != null)
                panel.add(new JLabel(tr.get(ID + ".error") + error.getMessage()));

            JOptionPane.showMessageDialog(null, panel, tr.get(ID + ".inputError"), JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of java.awt.GridLayout

    @Override
    protected void doOnce() {
        closeAllViews();

        // TODO move to jgoodies layout / miglayout
        JPanel panel = new JPanel(new GridLayout(0, 2));
        JTextField daysTextField = new JTextField(20);
        daysTextField.setText("" + settings.getNumberOfDays());

        JLabel daysLabel = new JLabel(tr.get(ID + ".days"));
        JTextField slotsTextField = new JTextField(20);
        slotsTextField.setText("" + settings.getTimeslotsPerDay());
        JLabel slotsLabel = new JLabel(tr.get(ID + ".slots"));

        panel.add(daysLabel);
        panel.add(daysTextField);
        panel.add(slotsLabel);
        panel.add(slotsTextField);

        JOptionPane.showMessageDialog(null, panel);
        Exception daysError = null;
        Exception slotsError = null;

        try {
            settings.setNumberOfDays(Integer.parseInt(daysTextField.getText()));
        } catch (Exception ex) {
            daysError = ex;
        }

        try {
            settings.setTimeslotsPerDay(Integer.parseInt(slotsTextField.getText()));
        } catch (Exception ex) {
            slotsError = ex;
        }

        if (slotsError != null || daysError != null) {
            panel = new JPanel(new GridLayout(0, 1));

            if (slotsError != null)
                panel.add(new JLabel(tr.get(ID + ".daysError") + slotsError.getMessage()));
            if (daysError != null)
                panel.add(new JLabel(tr.get(ID + ".slotsError") + daysError.getMessage()));
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.composite.GridLayout

                return !secondaryContent.getId().equals(content.getId());
            };

            @Override
            public Layout createLayout(final Content content, final Axes axes) {
                final GridLayout gridLayout = new GridLayout();
                gridLayout.setSize(2);
                return gridLayout;
            }
        }.createView(mainContent, axes, -1);
        return form1;
    }
View Full Code Here

Examples of org.eclipse.draw2d.GridLayout

  /**
   * Creates a new abstract polygon shape.
   */
  public AbstractPolygonShape() {
    setLayoutManager(new GridLayout(2, false));
    setFill(true);
  }
View Full Code Here

Examples of org.eclipse.swt.layout.GridLayout

    _message = message;
  }

  public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    container.setLayout(layout);
   
    Label lblMessage = new Label(container, SWT.None);
    lblMessage.setText(_message);
View Full Code Here

Examples of org.eclipse.swt.layout.GridLayout

        _beans = beans;
        createControls();
    }
   
    private void createControls() {
        GridLayout layout = new GridLayout();      
        layout.numColumns = 3;
        layout.marginHeight = 0;
        layout.marginWidth = 0;
        this.setLayout(layout);
       
View Full Code Here

Examples of org.eclipse.swt.layout.GridLayout

    }
  }

  public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    container.setLayout(layout);
    _treeViewer = createTreeViewer(container);
    Tree treeWidget = _treeViewer.getTree();
    GridData gridDataTree = new GridData(GridData.FILL_BOTH);
    gridDataTree.horizontalSpan = 3;
View Full Code Here

Examples of org.eclipse.swt.layout.GridLayout

    _btnLayout = new GridData(GridData.FILL, GridData.VERTICAL_ALIGN_FILL, true , false);
    createControls()
  }

  private void createControls() {
    GridLayout layout = new GridLayout();   
    layout.numColumns = 2;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    this.setLayout(layout);
   
   
    GridData fillBoth = new GridData(GridData.FILL_BOTH);
        fillBoth.minimumHeight = 100;
        fillBoth.verticalSpan = 2;
        _list = new org.eclipse.swt.widgets.List(this, SWT.BORDER|SWT.MULTI);
        _list.setLayoutData(fillBoth);
        _list.setItems(_items);
       
       
        _buttonArea = new Composite(this, SWT.NONE);
      layout = new GridLayout();   
    layout.numColumns = 1;
    layout.marginHeight = 0;
    layout.marginWidth = 0;           
    _buttonArea.setLayout(layout);
    _buttonArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
View Full Code Here

Examples of org.eclipse.swt.layout.GridLayout

      column.pack();
    }   
  }

  private void createControls() {
    GridLayout layout = new GridLayout();   
    layout.numColumns = 2;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    this.setLayout(layout);
   
        GridData tblLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
        //tblLayoutData.verticalSpan = 2;
   
        _table = new Table(this, _tableStyle);
        _table.setHeaderVisible(true);         
        _table.setLayoutData(tblLayoutData)
       
       
        createColumns();
       
        _tableViewer = new TableViewer(_table);
       
        _cellModifier = new BeanListTableModelCellModifier(_tableViewer, _model);
        _tableViewer.setCellModifier(_cellModifier);
       
        _tableViewer.setContentProvider(new BeanListTableModelContentProvider());
        _tableViewer.setLabelProvider(new BeanListTableModelLabelProvider(_model));
        _tableViewer.setInput(_model)
       
        if (isButtonAreaNeeded()) {
          _buttonArea = new Composite(this, SWT.NONE);
          layout = new GridLayout();   
      layout.numColumns = 1;
      layout.marginHeight = 0;
      layout.marginWidth = 0;           
      _buttonArea.setLayout(layout);
      _buttonArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
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.