[Htmlparser-cvs] htmlparser/src/org/htmlparser/parserapplications/filterbuilder/layouts NullLayoutMa
Brought to you by:
derrickoswald
From: Derrick O. <der...@us...> - 2005-04-12 11:27:51
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/layouts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23432/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/layouts Modified Files: NullLayoutManager.java VerticalLayoutManager.java Log Message: Documentation revamp part two. Index: NullLayoutManager.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/layouts/NullLayoutManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullLayoutManager.java 13 Feb 2005 20:43:13 -0000 1.1 --- NullLayoutManager.java 12 Apr 2005 11:27:42 -0000 1.2 *************** *** 51,54 **** --- 51,55 ---- * panel given the components in the specified parent container. * @param target The component to be laid out. + * @return The minimum size. * @see #preferredLayoutSize */ *************** *** 61,66 **** * Calculates the preferred size dimensions for the specified * panel given the components in the specified parent container. - * @param target The component to be laid out. * @see #minimumLayoutSize */ public Dimension preferredLayoutSize (Container target) --- 62,68 ---- * Calculates the preferred size dimensions for the specified * panel given the components in the specified parent container. * @see #minimumLayoutSize + * @param target The component to be laid out. + * @return A size deemed suitable for laying out the container. */ public Dimension preferredLayoutSize (Container target) *************** *** 76,82 **** synchronized (target.getTreeLock ()) { ! count = target.getComponentCount (); ! if (0 == count) ! { // be the same size unless we have a parent ret = target.getSize (); --- 78,84 ---- synchronized (target.getTreeLock ()) { ! count = target.getComponentCount (); ! if (0 == count) ! { // be the same size unless we have a parent ret = target.getSize (); *************** *** 91,107 **** } } ! else ! { ! ret = new Dimension (0, 0); ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! point = component.getLocation (); ! dimension = component.getPreferredSize(); ! ret.width = Math.max (ret.width, point.x + dimension.width); ! ret.height = Math.max (ret.height, point.y + dimension.height); ! } } insets = target.getInsets (); --- 93,109 ---- } } ! else ! { ! ret = new Dimension (0, 0); ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! point = component.getLocation (); ! dimension = component.getPreferredSize(); ! ret.width = Math.max (ret.width, point.x + dimension.width); ! ret.height = Math.max (ret.height, point.y + dimension.height); ! } } insets = target.getInsets (); *************** *** 117,123 **** * Returns the maximum size of this component. * @param target The component to be laid out. ! * @see java.awt.Component#getMinimumSize ! * @see java.awt.Component#getPreferredSize ! * @see java.awt.LayoutManager */ public Dimension maximumLayoutSize (Container target) --- 119,124 ---- * Returns the maximum size of this component. * @param target The component to be laid out. ! * @return The maximum size for the container. ! * @see #preferredLayoutSize */ public Dimension maximumLayoutSize (Container target) *************** *** 154,174 **** public void layoutContainer (Container target) { ! int count; ! Component component; ! Dimension dimension; ! synchronized (target.getTreeLock ()) { ! count = target.getComponentCount (); ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! dimension = component.getPreferredSize(); ! component.setSize (dimension.width, dimension.height); ! } ! } ! } } --- 155,175 ---- public void layoutContainer (Container target) { ! int count; ! Component component; ! Dimension dimension; ! synchronized (target.getTreeLock ()) { ! count = target.getComponentCount (); ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! dimension = component.getPreferredSize(); ! component.setSize (dimension.width, dimension.height); ! } ! } ! } } *************** *** 194,197 **** --- 195,199 ---- * the furthest away from the origin, 0.5 is centered, etc. * @param target The target container. + * @return The X-axis alignment. */ public float getLayoutAlignmentX (Container target) *************** *** 207,210 **** --- 209,213 ---- * the furthest away from the origin, 0.5 is centered, etc. * @param target The target container. + * @return The Y-axis alignment. */ public float getLayoutAlignmentY (Container target) Index: VerticalLayoutManager.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/layouts/VerticalLayoutManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VerticalLayoutManager.java 13 Feb 2005 20:43:13 -0000 1.1 --- VerticalLayoutManager.java 12 Apr 2005 11:27:42 -0000 1.2 *************** *** 52,55 **** --- 52,56 ---- * panel given the components in the specified parent container. * @param target The component to be laid out. + * @return The minimum size. * @see #preferredLayoutSize */ *************** *** 63,66 **** --- 64,68 ---- * panel given the components in the specified parent container. * @param target The component to be laid out. + * @return A size deemed suitable for laying out the container. * @see #minimumLayoutSize */ *************** *** 99,105 **** * Returns the maximum size of this component. * @param target The component to be laid out. ! * @see java.awt.Component#getMinimumSize ! * @see java.awt.Component#getPreferredSize ! * @see java.awt.LayoutManager */ public Dimension maximumLayoutSize (Container target) --- 101,106 ---- * Returns the maximum size of this component. * @param target The component to be laid out. ! * @return The maximum size for the container. ! * @see #preferredLayoutSize */ public Dimension maximumLayoutSize (Container target) *************** *** 139,147 **** int x; int y; ! int count; ! int width; ! Component component; ! Dimension dimension; ! synchronized (target.getTreeLock ()) { --- 140,148 ---- int x; int y; ! int count; ! int width; ! Component component; ! Dimension dimension; ! synchronized (target.getTreeLock ()) { *************** *** 149,178 **** x = insets.left; y = insets.top; ! count = target.getComponentCount (); ! width = 0; ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! dimension = component.getPreferredSize (); ! width = Math.max (width, dimension.width); ! component.setSize (dimension.width, dimension.height); ! component.setLocation (x, y); ! y += dimension.height; ! } ! } ! // now set them all to the same width ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! dimension = component.getSize (); ! dimension.width = width; ! component.setSize (dimension.width, dimension.height); ! } ! } ! } } --- 150,179 ---- x = insets.left; y = insets.top; ! count = target.getComponentCount (); ! width = 0; ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! dimension = component.getPreferredSize (); ! width = Math.max (width, dimension.width); ! component.setSize (dimension.width, dimension.height); ! component.setLocation (x, y); ! y += dimension.height; ! } ! } ! // now set them all to the same width ! for (int i = 0 ; i < count ; i++) ! { ! component = target.getComponent (i); ! if (component.isVisible ()) ! { ! dimension = component.getSize (); ! dimension.width = width; ! component.setSize (dimension.width, dimension.height); ! } ! } ! } } *************** *** 198,201 **** --- 199,203 ---- * the furthest away from the origin, 0.5 is centered, etc. * @param target The target container. + * @return The X-axis alignment. */ public float getLayoutAlignmentX (Container target) *************** *** 211,214 **** --- 213,217 ---- * the furthest away from the origin, 0.5 is centered, etc. * @param target The target container. + * @return The Y-axis alignment. */ public float getLayoutAlignmentY (Container target) |