Package java.awt

Examples of java.awt.Dimension


    }
  }


  public Dimension getPreferredSize() {
    return new Dimension(mModel.getColumnCount() * mColumnWidth, mHeight);
  }
View Full Code Here


      // if program is partially not visible then show the title as tooltip
      final JViewport viewport = MainFrame.getInstance()
          .getProgramTableScrollPane().getViewport();
      Point viewPos = viewport.getViewPosition();
      Dimension viewSize = viewport.getSize();
      final Program program = panel.getProgram();
      if ((currY < viewPos.y)
          || (panelIndex.x * mColumnWidth + panel.getTitleX() < viewPos.x)
          || ((panelIndex.x + 1) * mColumnWidth - 1 > viewPos.x
              + viewSize.width)) {
View Full Code Here

          }
        }
      }
    });

    Dimension size = bt.getPreferredSize();

    if (tf.getPreferredSize().height > size.height) {
      size.height = tf.getPreferredSize().height;
      bt.setPreferredSize(size);
    }
View Full Code Here

      for(int localCellHeight : cellHeights) {
        height += localCellHeight;
      }

      return new Dimension(width,height);
    }
View Full Code Here

          try {
            if(new File("imgs/TrayIcon.png").isFile()) {
              mTrayIcon = new TrayIcon(ImageIO.read(new File("imgs/TrayIcon.png")), tooltip);
            }
            else {
              Dimension trayIconSize = getTrayIconSize();
              BufferedImage trayIconImage = null;
              Color backgroundColor = null;

              if(trayIconSize.height > 16 && trayIconSize.height <= 32 && new File("imgs/tvbrowser32.png").isFile()) {
                trayIconImage = UiUtilities.scaleIconToBufferedImage(ImageIO.read(new File("imgs/tvbrowser32.png")),
View Full Code Here

    cardPanel.setLayout(new CardLayout(HORIZ_GAP, VERT_GAP));

    // Panels are created and added as they are needed. We start with
    // a dummy blank one.
    JPanel panel = new JPanel();
    panel.setPreferredSize(new Dimension(EDIT_PANEL_WIDTH, EDIT_PANEL_HEIGHT));
    cardPanel.add(panel, "dummy-blank-panel");

    return cardPanel;
}
View Full Code Here

      // make backgrounds look the same
      treeView.setBackground(m_tree.getBackground());

      m_scroller = new JScrollPane(treeView);
     
      m_scroller.setPreferredSize(new Dimension(300, 400));
      m_scroller.getVerticalScrollBar().setUnitIncrement(20);

      add(m_scroller);
    }
View Full Code Here

      java.awt.Dimension screenSize = getToolkit().getScreenSize();
      int maxWidth = (int) (screenSize.getWidth() - location.getX());
      int maxHeight = (int) (screenSize.getHeight() - location.getY());

      // if the part of the popup goes off the screen then resize it
      Dimension scrollerSize = m_scroller.getPreferredSize();
      int height = (int) scrollerSize.getHeight();
      int width = (int) scrollerSize.getWidth();
      if (width > maxWidth) width = maxWidth;
      if (height > maxHeight) height = maxHeight;
     
      // commit any size changes
      m_scroller.setPreferredSize(new Dimension(width, height));
      revalidate();
      pack();
    }
View Full Code Here

    private JTextField processIdTextField;
    private JButton startButton;

    public ProcessInstanceExecutorFrame(WorkingMemory workingMemory) {
        this.workingMemory = workingMemory;
        setSize(new Dimension(200, 150));
        setTitle("Start Process");
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        initializeComponent();
    }
View Full Code Here

   
    public Dimension getPreferredSize() {

      Font f = this.getFont();
      FontMetrics fm = this.getFontMetrics(f);
      return new Dimension(0, fm.getHeight());
    }
  };
      } catch (Exception ex) {
  return null;
      }
View Full Code Here

TOP

Related Classes of java.awt.Dimension

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.