Package java.awt

Examples of java.awt.Dimension


    scroll = 0;
    setOpaque(false);
   
    int prefWidth = About.IMAGE_WIDTH + 2 * About.IMAGE_BORDER;
    int prefHeight = About.IMAGE_HEIGHT / 2 + About.IMAGE_BORDER;
    setPreferredSize(new Dimension(prefWidth, prefHeight));
 
    fadeStop = (float) (About.IMAGE_HEIGHT / 4.0);

    colorBase = new Color[] {
        new Color(143, 0, 0),
View Full Code Here


      AppPreferences.APPEARANCE_SHOW_GRID.setBoolean(aZoom.getShowGrid());
      AppPreferences.APPEARANCE_ZOOM.set(Double.valueOf(aZoom.getZoomFactor()));
    }
    int state = getExtendedState() & ~JFrame.ICONIFIED;
    AppPreferences.WINDOW_STATE.set(Integer.valueOf(state));
    Dimension dim = getSize();
    AppPreferences.WINDOW_WIDTH.set(Integer.valueOf(dim.width));
    AppPreferences.WINDOW_HEIGHT.set(Integer.valueOf(dim.height));
    Point loc;
    try {
      loc = getLocationOnScreen();
View Full Code Here

      textArea.setEditable(false);
      textArea.setText(description);
      textArea.setCaretPosition(0);
     
      JScrollPane scrollPane = new JScrollPane(textArea);   
      scrollPane.setPreferredSize(new Dimension(350, 150));
      JOptionPane.showMessageDialog(parent, scrollPane,
          Strings.get("fileErrorTitle"), JOptionPane.ERROR_MESSAGE);
    } else {
      JOptionPane.showMessageDialog(parent, description,
          Strings.get("fileErrorTitle"), JOptionPane.ERROR_MESSAGE);
View Full Code Here

        paintString(g, Strings.get("canvasExceptionError"));
        return;
      }

      computeViewportContents();
      Dimension sz = getSize();
      g.setColor(Value.WIDTH_ERROR_COLOR);

      if (widthMessage != null) {
        paintString(g, widthMessage);
      }
View Full Code Here

    public MyPanel() {
      setLayout(null);
     
      int prefWidth = IMAGE_WIDTH + 2 * IMAGE_BORDER;
      int prefHeight = IMAGE_HEIGHT + 2 * IMAGE_BORDER;
      setPreferredSize(new Dimension(prefWidth, prefHeight));
      setBackground(Color.WHITE);
      addAncestorListener(this);
     
      credits = new AboutCredits();
      credits.setBounds(0, prefHeight / 2, prefWidth, prefHeight / 2);
View Full Code Here

      }
      return ret;
    }
   
    public Dimension getDimension(Object orientation) {
      return new Dimension(24, 24);
    }
View Full Code Here

    if (zoom != 1.0) {
      f = f.deriveFont(AffineTransform.getScaleInstance(zoom, zoom));
    }
    field.setFont(f);
   
    Dimension dim = field.getPreferredSize();
    int w;
    int border = EditableLabelField.FIELD_BORDER;
    if (dimsKnown) {
      w = width + 1 + 2 * border;
    } else {
View Full Code Here

    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.gridwidth = 1;
    gbc.gridy = 3;
    gbc.gridx = GridBagConstraints.RELATIVE;
    JPanel strut = new JPanel();
    strut.setMinimumSize(new Dimension(50, 1));
    strut.setPreferredSize(new Dimension(50, 1));
    gbc.weightx = 0.0; gridbag.setConstraints(strut, gbc); add(strut);
    gbc.weightx = 1.0; gridbag.setConstraints(templateField, gbc); add(templateField);
    gbc.weightx = 0.0; gridbag.setConstraints(templateButton, gbc); add(templateButton);
   
    AppPreferences.addPropertyChangeListener(AppPreferences.TEMPLATE_TYPE, myListener);
View Full Code Here

  public void computeSize(boolean immediate) {
    Bounds bounds = proj.getCurrentCircuit().getBounds();
    int width = bounds.getX() + bounds.getWidth() + BOUNDS_BUFFER;
    int height = bounds.getY() + bounds.getHeight() + BOUNDS_BUFFER;
    Dimension dim;
    if (canvasPane == null) {
      dim = new Dimension(width, height);
    } else {
      dim = canvasPane.supportPreferredSize(width, height);
    }
    if (!immediate) {
      Bounds old = oldPreferredSize;
View Full Code Here

  public boolean isSelectable() {
    return false;
  }
 
  public void paintIcon(Component destination, Graphics g) {
    Dimension dim = destination.getSize();
    g.setColor(Color.GRAY);
    int x = 0;
    int y = 0;
    int w = dim.width;
    int h = dim.height;
View Full Code Here

TOP

Related Classes of java.awt.Dimension

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.