Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

void javamorph::CMain::layoutContainer ( Container  parent  )  [inline]

Setting the bounds of the application's main frame's components.

Definition at line 130 of file CMain.java.

References javamorph::CSeparator::getPreferredSize(), left, right, and sep.

                                                  {
        /* Own layout manager derived. */
        /* Define bounds of sub components. */
        Dimension size = parent.getSize();
        Rectangle bounds = new Rectangle();
        int s = this.sep.getPreferredSize().width;
        bounds.x = 0;
        bounds.y = 0;
        bounds .width = size.width / 2 - s / 2;
        bounds .height = size.height;
        this.left.setBounds(bounds);
        bounds.x = bounds.width;
        bounds.width = s;
        this.sep.setBounds(bounds);
        bounds.x += bounds.width;
        bounds.width = 
            size.width - 
            this.sep.getSize().width / 2 -
            this.left.getSize().width;
        this.right.setBounds(bounds);
    }


Generated by  Doxygen 1.6.0   Back to index