Changeset 5264 for incubator/widgets/coordinatelayout/src/com/itmill/toolkit/ui/CoordinateLayout.java
- Timestamp:
- 08/26/08 06:42:31 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
incubator/widgets/coordinatelayout/src/com/itmill/toolkit/ui/CoordinateLayout.java
r5258 r5264 32 32 33 33 /** 34 * Creates an empty coordinatelayout. The coordinateLayout is full size by default. 34 * Creates an empty coordinatelayout. The coordinateLayout is full size by 35 * default. 35 36 */ 36 37 public CoordinateLayout() { … … 45 46 /** 46 47 * 47 * Adds a component to the coordinateLayout at the specified coordinates. The values48 * are treated as pixel values by default and for example48 * Adds a component to the coordinateLayout at the specified coordinates. 49 * The values are treated as pixel values by default and for example 49 50 * {@link com.itmill.toolkit.ui.CoordinateLayout.Coordinates#setUnitPercent(int, boolean)} 50 51 * can be used to set the values as percentage. … … 135 136 136 137 /** 137 * Adds a component to the coordinateLayout at the specified coordinates. Null 138 * arguments are not permitted and will throw an IllegalArgumentException. 138 * Adds a component to the coordinateLayout at the specified coordinates. 139 * Null arguments are not permitted and will throw an 140 * IllegalArgumentException. 139 141 * 140 142 * @param c … … 279 281 * Replaces a child component with a new one. The new component uses the 280 282 * same coordinates as the previous component. If the arguments are null or 281 * the component is not a child of this coordinateLayout IllegalArgumentException is282 * thrown.283 * the component is not a child of this coordinateLayout 284 * IllegalArgumentException is thrown. 283 285 * 284 286 * @param c1 … … 451 453 * @throws NumberFormatException 452 454 */ 453 public Coordinates(int top, int right, int bottom, int left, int width,454 int height) throws IllegalArgumentException {455 public Coordinates(int left, int top, int width, int height, int right, 456 int bottom) throws IllegalArgumentException { 455 457 456 458 properties = new int[6]; 457 459 isUnitPercent = new boolean[6]; 458 460 461 properties[LEFT] = left; 459 462 properties[TOP] = top; 463 properties[WIDTH] = width; 464 properties[HEIGHT] = height; 460 465 properties[RIGHT] = right; 461 466 properties[BOTTOM] = bottom; 462 properties[LEFT] = left;463 464 properties[WIDTH] = width;465 properties[HEIGHT] = height;466 467 467 468 for (int i = 0; i < properties.length; i++) { … … 530 531 * @param height 531 532 */ 532 public void setUnitsPercent(boolean top, boolean right, boolean bottom,533 boolean left, boolean width, boolean height) {533 public void setUnitsPercent(boolean left, boolean top, boolean width, 534 boolean height, boolean right, boolean bottom) { 534 535 isUnitPercent[TOP] = top; 535 isUnitPercent[RIGHT] = right;536 isUnitPercent[BOTTOM] = bottom;537 536 isUnitPercent[LEFT] = left; 538 537 isUnitPercent[WIDTH] = width; 539 538 isUnitPercent[HEIGHT] = height; 539 isUnitPercent[RIGHT] = right; 540 isUnitPercent[BOTTOM] = bottom; 540 541 } 541 542
