Package java.awt

Examples of java.awt.Insets


        reloadWorkItemsList();
        GridBagConstraints c = new GridBagConstraints();
        c.weightx = 1;
        c.weighty = 1;
        c.fill = GridBagConstraints.BOTH;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(workItemsList, c);
       
        selectButton = new JButton("Select");
        selectButton.setEnabled(false);
        selectButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                select();
            }
        });
        c = new GridBagConstraints();
        c.gridy = 1;
        c.weightx = 1;
        c.anchor = GridBagConstraints.EAST;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(selectButton, c);
    }
View Full Code Here


        GridBagConstraints c = new GridBagConstraints();
        c.weightx = 1;
        c.weighty = 1;
        c.gridwidth = 5;
        c.fill = GridBagConstraints.BOTH;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(params, c);
       
        JLabel resultName = new JLabel("Result");
        c = new GridBagConstraints();
        c.gridy = 1;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(resultName, c);
        resultNameTextField = new JTextField();
        c = new GridBagConstraints();
        c.gridx = 1;
        c.gridy = 1;
        c.weightx = 0.3;
        c.fill = GridBagConstraints.HORIZONTAL;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(resultNameTextField, c);
       
        JLabel resultValue = new JLabel("Value");
        c = new GridBagConstraints();
        c.gridx = 2;
        c.gridy = 1;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(resultValue, c);
        resultValueTextField = new JTextField();
        c = new GridBagConstraints();
        c.gridx = 3;
        c.gridy = 1;
        c.weightx = 0.7;
        c.fill = GridBagConstraints.HORIZONTAL;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(resultValueTextField, c);
       
        addResultButton = new JButton("Add");
        addResultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                addResult();
            }
        });
        c = new GridBagConstraints();
        c.gridx = 4;
        c.gridy = 1;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(addResultButton, c);
       
        completeButton = new JButton("Complete");
        completeButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                complete();
            }
        });
        c = new GridBagConstraints();
        c.gridy = 2;
        c.weightx = 1;
        c.gridwidth = 4;
        c.anchor = GridBagConstraints.EAST;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(completeButton, c);

        abortButton = new JButton("Abort");
        abortButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                abort();
            }
        });
        c = new GridBagConstraints();
        c.gridx = 4;
        c.gridy = 2;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(abortButton, c);
    }
View Full Code Here

    this.buttons = new JButton[42];
    for (int i = 0; i < 42; i++)
    {
      final JButton b = new JButton("");
      b.setMargin(new Insets(1, 1, 1, 1));
      b.setName(Integer.toString(i));
      b.setFont(this.dateFont);
      b.setFocusPainted(false);
      b.putClientProperty("JButton.buttonType", "square"); //$NON-NLS-1$ $NON-NLS-2$
      this.buttons[i] = b;
View Full Code Here

       
        descriptionField = ComponentFactory.getTextArea();
        descriptionField.setPreferredSize(new Dimension(600, 120));
        descriptionField.setText(getShortDescription((String) dco.getValue(Book._B_DESCRIPTION)));
        add(descriptionField, Layout.getGBC( 0, 2, 4, 1, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 0), 0, 0));
        add(getPicturePanel(getPictures()), Layout.getGBC( 4, 0, 1, 3, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0));          
   
View Full Code Here

       
        descriptionField = ComponentFactory.getTextArea();
        descriptionField.setPreferredSize(new Dimension(600, 79));
        descriptionField.setText(getShortDescription((String) dco.getValue(Software._B_DESCRIPTION)));
        add(descriptionField, Layout.getGBC( 0, 3, 4, 1, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 0), 0, 0));
        add(getPicturePanel(getPictures()), Layout.getGBC( 4, 0, 1, 4, 10.0, 10.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0));
    }
View Full Code Here

    gbc.gridy = gridY;
    gbc.gridx = 0;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.weightx = 0;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets(5, 5, 0, 5);
    carrierPanel.add(label, gbc);


    if (entry.isMandatory())
    {
      gbc = new GridBagConstraints();
      gbc.gridy = gridY;
      gbc.gridx = 1;
      gbc.anchor = GridBagConstraints.WEST;
      gbc.insets = new Insets(5, 0, 0, 0);
      final JLabel mandatoryLabel = new JLabel("*");
      mandatoryLabel.setToolTipText(messages.getString("ParameterReportControllerPane.MandatoryParameter"));
      carrierPanel.add(mandatoryLabel, gbc);
    }

    gbc = new GridBagConstraints();
    gbc.gridy = gridY;
    gbc.gridx = 2;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.weightx = 1;
    if (editor instanceof ButtonParameterComponent)
    {
      gbc.fill = GridBagConstraints.HORIZONTAL;
    }
    gbc.ipadx = 100;
    gbc.insets = new Insets(5, 0, 0, 0);
    carrierPanel.add(editor, gbc);

    gbc = new GridBagConstraints();
    gbc.gridy = gridY + 1;
    gbc.gridx = 1;
    gbc.anchor = GridBagConstraints.NORTH;
    gbc.weightx = 1;
    gbc.gridwidth = 2;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets(5, 0, 0, 0);
    carrierPanel.add(errorLabel, gbc);
  }
View Full Code Here

  {
    defaultComp.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    abstractButton.setSelected(isSelected);
    abstractButton.setText(String.valueOf(value));
    abstractButton.setFont(new Font("Dialog", Font.PLAIN, 10));
    abstractButton.setMargin(new Insets(2, 0, 3, 0));

    return this;
  }
View Full Code Here

  public Dimension preferredLayoutSize(final Container parent)
  {

    synchronized (parent.getTreeLock())
    {
      final Insets insets = parent.getInsets();
      if (parent.getComponentCount() > 0)
      {
        final Component component = parent.getComponent(0);
        final Dimension d = component.getPreferredSize();
        return new Dimension(
View Full Code Here

  public Dimension minimumLayoutSize(final Container parent)
  {

    synchronized (parent.getTreeLock())
    {
      final Insets insets = parent.getInsets();
      if (parent.getComponentCount() > 0)
      {
        final Component component = parent.getComponent(0);
        final Dimension d = component.getMinimumSize();
        return new Dimension(d.width + insets.left + insets.right,
View Full Code Here

    synchronized (parent.getTreeLock())
    {
      if (parent.getComponentCount() > 0)
      {
        final Insets insets = parent.getInsets();
        final Dimension parentSize = parent.getSize();
        final Component component = parent.getComponent(0);
        final Dimension componentSize = component.getPreferredSize();
        final int xx = insets.left + (
            Math.max((parentSize.width - insets.left - insets.right
View Full Code Here

TOP

Related Classes of java.awt.Insets

Copyright © 2015 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.