Exemple #1
0
  /** Description of the Method */
  public void init() {
    // super.init();
    size = new Dimension(570, 570);
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(borderLayout1);

    Dimension d = messagePanel.getSize();
    d.height += 20;
    messagePanel.setPreferredSize(d);
    contentPane.add(messagePanel, BorderLayout.SOUTH);

    contentPane.setOpaque(true);
    userPanel.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.insets = new Insets(2, 2, 2, 2);

    messagePanel.setLayout(borderLayout5);
    contentPane.setOpaque(true);
    contentPane.setBackground(Color.white);
    this.setSize(size);

    messagePanel.add(labelMessage, BorderLayout.NORTH);
    // Logg.logg("MhClient: Före XttTree-skapande", 6);
    this.mhTable = new MhTable(root, false, this.labelMessage);
    // Logg.logg("MhClient: mhTable-skapande klart", 6);
    this.contentPane.add(this.mhTable.splitPane, BorderLayout.CENTER);
  }
  @Override
  public Dimension getPreferredSize() {
    Dimension d = super.getPreferredSize();
    Insets ins = getInsets();

    if (bSmallTitle) {
      if (getOrientation().isHorizontal()) {
        d.height = 16 + 2 + ins.top + ins.bottom;
      } else {
        d.width = 16 + 2 + ins.left + ins.right;
      }
    } else {
      if (getOrientation().isHorizontal()) {
        d.height = 16 + 2 + ins.top + ins.bottom;
      } else {
        d.width = 16 + 2 + ins.left + ins.right;
      }
    }
    return d;
  }
        public synchronized boolean imageUpdate(
            Image a_image, int a_flag, int a_x, int a_y, int a_width, int a_height) {
          if ((a_flag & WIDTH) != 0) m_size.width = a_width;
          if ((a_flag & HEIGHT) != 0) m_size.height = a_height;
          if ((a_flag & (ERROR | ABORT)) != 0) m_isImcomplete = true;

          boolean retval = !resultKnown();
          if (!retval) {
            notifyAll();
          } // if

          return retval;
        }
 public ImageSizer(Image a_image) {
   m_size.width = a_image.getWidth(m_observer);
   m_size.height = a_image.getHeight(m_observer);
 }