Examples of Insets


Examples of java.awt.Insets

     
      // now add components into panel
      gbc.gridy = 0;
      gbc.gridx = GridBagConstraints.RELATIVE;
      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.insets = new Insets(5, 0, 5, 0);
      gbc.fill = GridBagConstraints.NONE;
      addGb(new JLabel(Strings.get("labelCircuits") + " "));
      gbc.fill = GridBagConstraints.HORIZONTAL;
      addGb(new JScrollPane(list));
      gbc.fill = GridBagConstraints.NONE;
View Full Code Here

Examples of java.awt.Insets

    gc.fill = GridBagConstraints.BOTH;
   
    JPanel selectorPanel = selector.createPanel();
    gb.setConstraints(selectorPanel, gc); add(selectorPanel);
    gb.setConstraints(prettyView, gc); add(prettyView);
      Insets oldInsets = gc.insets;
      gc.insets = new Insets(10, 10, 0, 10);
      JScrollPane fieldPane = new JScrollPane(field,
          ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
          ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    gb.setConstraints(fieldPane, gc); add(fieldPane);
      gc.insets = oldInsets;
View Full Code Here

Examples of java.awt.Insets

    public void removeLayoutComponent(Component comp) { }

    public Dimension preferredLayoutSize(Container parent) {
      if (fraction <= 0.0) return comp1.getPreferredSize();
      if (fraction >= 1.0) return comp0.getPreferredSize();
      Insets in = parent.getInsets();
      Dimension d0 = comp0.getPreferredSize();
      Dimension d1 = comp1.getPreferredSize();
      return new Dimension(in.left + Math.max(d0.width, d1.width) + in.right,
          in.top + d0.height + d1.height + in.bottom);
    }
View Full Code Here

Examples of java.awt.Insets

    }

    public Dimension minimumLayoutSize(Container parent) {
      if (fraction <= 0.0) return comp1.getMinimumSize();
      if (fraction >= 1.0) return comp0.getMinimumSize();
      Insets in = parent.getInsets();
      Dimension d0 = comp0.getMinimumSize();
      Dimension d1 = comp1.getMinimumSize();
      return new Dimension(in.left + Math.max(d0.width, d1.width) + in.right,
          in.top + d0.height + d1.height + in.bottom);
    }
View Full Code Here

Examples of java.awt.Insets

      return new Dimension(in.left + Math.max(d0.width, d1.width) + in.right,
          in.top + d0.height + d1.height + in.bottom);
    }

    public void layoutContainer(Container parent) {
      Insets in = parent.getInsets();
      int maxWidth = parent.getWidth() - (in.left + in.right);
      int maxHeight = parent.getHeight() - (in.top + in.bottom);
      int split;
      if (fraction <= 0.0) {
        split = 0;
View Full Code Here

Examples of java.awt.Insets

      return getY() + e.getY() - HorizontalSplitPane.this.getInsets().top;
    }
 
    @Override
    void setDragValue(int value) {
      Insets in = HorizontalSplitPane.this.getInsets();
      setFraction((double) value / (HorizontalSplitPane.this.getHeight() - in.bottom - in.top));
      revalidate();
    }
View Full Code Here

Examples of java.awt.Insets

      // now add components into panel
      gbc.gridy = 0;
      gbc.gridx = GridBagConstraints.RELATIVE;
      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.insets = new Insets(5, 0, 5, 0);
      gbc.fill = GridBagConstraints.NONE;
      addGb(new JLabel(Strings.get("labelCircuits") + " "));
      gbc.fill = GridBagConstraints.HORIZONTAL;
      addGb(new JScrollPane(list));
      gbc.fill = GridBagConstraints.NONE;
View Full Code Here

Examples of java.awt.Insets

      int width = jcomp.getPreferredSize().width;
      int height = jcomp.getPreferredSize().height;

      if (jcomp.getBorder() != null) {
        Insets insets = jcomp.getBorder().getBorderInsets(component);
        width += insets.left + insets.right;
      }
      if (width > maxWidth || height > maxHeight) {
        if (width > maxWidth) {
          maxWidth = width;
View Full Code Here

Examples of java.awt.Insets

    cancel = new JButton(propertiesMgr.getValue("cancelForAddBuddy"));
    cancel.addActionListener(this);
    GridBagConstraints c = new GridBagConstraints();

    c.weightx = 1;
    c.insets = new Insets(5, 5, 5, 5);

    //First line
    c.gridy = 1;
    this.getContentPane().add(nameLabel, c);
    this.getContentPane().add(nameField, c);

    //second line
    c.gridy = 2;
    this.getContentPane().add(groupLabel, c);
    this.getContentPane().add(groupField, c);

    //third line
    c.gridy = 3;
    c.insets = new Insets(25, 5, 5, 5);
    this.getContentPane().add(ok, c);
    this.getContentPane().add(cancel, c);   
   
    this.pack();
    this.setResizable(false);
View Full Code Here

Examples of java.awt.Insets

   */
  private JPanel getJContentPane() {
    if (jContentPane == null) {
      GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
      gridBagConstraints1.gridx = 0;
      gridBagConstraints1.insets = new Insets(10, 5, 5, 5);
      gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
      gridBagConstraints1.weightx = 1.0;
      gridBagConstraints1.gridy = 1;
      GridBagConstraints gridBagConstraints = new GridBagConstraints();
      gridBagConstraints.gridx = 0;
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.