Logo Search packages:      
Sourcecode: libjgoodies-forms-java version File versions  Download package

LayoutInfo com::jgoodies::forms::layout::FormLayout::getLayoutInfo ( Container  parent  )  [inline]

Computes and returns the horizontal and vertical grid origins. Performs the same layout process as layoutContainer but does not layout the components.

This method has been added only to make it easier to debug the form layout. You must not call this method directly; It may be removed in a future release or the visibility may be reduced.

Parameters:
parent the Container to inspect
Returns:
an object that comprises the grid x and y origins

Definition at line 1655 of file FormLayout.java.

References colComponents, colGroupIndices, colSpecs, computeGridOrigins(), initializeColAndRowComponentLists(), minimumWidthMeasure, rowComponents, rowGroupIndices, and rowSpecs.

Referenced by com::jgoodies::forms::layout::SerializationTest::doLayout(), com::jgoodies::forms::debug::FormDebugUtils::getLayoutInfo(), and com::jgoodies::forms::layout::FormLayoutTest::testBasic().

                                                      {
        synchronized (parent.getTreeLock()) {
            initializeColAndRowComponentLists();
            Dimension size = parent.getSize();
            
            Insets insets = parent.getInsets();
            int totalWidth  = size.width - insets.left - insets.right;
            int totalHeight = size.height- insets.top  - insets.bottom; 

            int[] x = computeGridOrigins(parent,
                                         totalWidth, insets.left,
                                         colSpecs, 
                                         colComponents,
                                         colGroupIndices,
                                         minimumWidthMeasure,
                                         preferredWidthMeasure
                                         );
            int[] y = computeGridOrigins(parent,
                                         totalHeight, insets.top,
                                         rowSpecs, 
                                         rowComponents,
                                         rowGroupIndices,
                                         minimumHeightMeasure,
                                         preferredHeightMeasure
                                         );
            return new LayoutInfo(x, y);
        }        
    }


Generated by  Doxygen 1.6.0   Back to index