Examples of Dimension


Examples of java.awt.Dimension

    return null;
  }

  @Override
  public Dimension getPreferredScrollableViewportSize() {
    return new Dimension(getPreferredSize().width, 400);
  }
View Full Code Here

Examples of java.awt.Dimension

    }

    if (m_NumEditable == 0) {
      JLabel empty = new JLabel("No editable properties",
                                SwingConstants.CENTER);
      Dimension d = empty.getPreferredSize();
      empty.setPreferredSize(new Dimension(d.width * 2, d.height * 2));
      empty.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 10));
      GridBagConstraints gbConstraints = new GridBagConstraints();
      gbConstraints.anchor = GridBagConstraints.CENTER;
      gbConstraints.fill = GridBagConstraints.HORIZONTAL;
      gbConstraints.gridy = componentOffset;     gbConstraints.gridx = 0;
      gbLayout.setConstraints(empty, gbConstraints);
      scrollablePanel.add(empty);
    }

    validate();

    // sometimes, the calculated dimensions seem to be too small and the
    // scrollbars show up, though there is still plenty of space on the
    // screen. hence we increase the dimensions a bit to fix this.
    Dimension dim = scrollablePanel.getPreferredSize();
    dim.height += 20;
    dim.width  += 20;
    scrollPane.setPreferredSize(dim);
    validate();

View Full Code Here

Examples of java.awt.Dimension

              showOutputCheckBox.setMnemonic('S');
              generatorPanel.setLog(m_Log);
              generatorPanel.setGenerator(m_DataGenerator);
              generatorPanel.setPreferredSize(
                  new Dimension(
                        300,
                        (int) generatorPanel.getPreferredSize().getHeight()));
              generateButton.setMnemonic('G');
              generateButton.setToolTipText("Generates the dataset according the settings.");
              generateButton.addActionListener(new ActionListener(){
View Full Code Here

Examples of java.awt.Dimension

    dialog.getContentPane().add(new JScrollPane(textData), BorderLayout.CENTER);
    dialog.getContentPane().add(panel, BorderLayout.SOUTH);
    dialog.pack();

    // make sure, it's not bigger than 80% of the screen
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    int width  = dialog.getWidth() > screen.getWidth()*0.8
                    ? (int) (screen.getWidth()*0.8) : dialog.getWidth();
    int height = dialog.getHeight() > screen.getHeight()*0.8
                    ? (int) (screen.getHeight()*0.8) : dialog.getHeight();
    dialog.setSize(width, height);
   
    // display dialog
    dialog.setVisible(true);
  }
View Full Code Here

Examples of java.awt.Dimension

    scrollPane.setBorder(null);

    setContentPane(scrollPane);
    pack();

    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();

    if (d.height < getHeight()) {
      setSize(getWidth(), d.height);
    }
  }
View Full Code Here

Examples of java.awt.Dimension

   */
  public StatusBar() {
    setOpaque(false);
    setLayout(new BorderLayout(2, 0));
    setBorder(BorderFactory.createEmptyBorder(2,0,0,0));
    setPreferredSize(new Dimension(0, 18));

    mInfoLabel = new JLabel();
    mInfoLabel.setBorder(BorderFactory.createEtchedBorder());

    mProgressBar = new JProgressBar();
    mProgressBar.setPreferredSize(new Dimension(200, 10));
    mProgressBar.setBorder(BorderFactory.createEtchedBorder());

    add(mInfoLabel, BorderLayout.CENTER);
    add(mProgressBar, BorderLayout.EAST);
  }
View Full Code Here

Examples of java.awt.Dimension

    contentPane.add(northPn, BorderLayout.NORTH);
    contentPane.add(mSoftwareUpdateItemList, BorderLayout.CENTER);
    contentPane.add(southPn, BorderLayout.SOUTH);

    Settings.layoutWindow("softwareUpdateDlg", this, new Dimension(700,600));

    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

    addWindowListener(new WindowAdapter() {
      @Override
View Full Code Here

Examples of java.awt.Dimension

              Launch.openURL(e.getURL().toString());
            }
          }
        },Color.white);
   
    pane.setPreferredSize(new Dimension(400,300));
   
    pane.setBackground(Color.white);
    pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0,0,1,0,Color.darkGray),Borders.createEmptyBorder("0dlu,10dlu,0dlu,10dlu")));
   
    pb.add(pane, cc.xyw(1,2,3));
View Full Code Here

Examples of java.awt.Dimension

      item.setText(ch.getName());
    }

    if (Settings.propShowChannelIconsInChannellist.getBoolean()) {
      item.setIcon(UiUtilities.createChannelIcon(ch.getIcon()));
      item.setPreferredSize(new Dimension(item.getPreferredSize().width, item
          .getIcon().getIconHeight()));
    }

    item.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
View Full Code Here

Examples of java.awt.Dimension

 
  public void setColumnWidth(int columnWidth) {
    mColumnWidth = columnWidth;
   
    for (ProgramTableChannelLabel element : mLabelArr) {
      element.setPreferredSize(new Dimension(mColumnWidth, mColumnHeight));
    }
  }
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.