Show
Ignore:
Timestamp:
08/26/08 06:42:31 (5 months ago)
Author:
risto.yrjana@…
Message:

Updated coordinate ordering, fixed captions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • incubator/widgets/coordinatelayout/src/com/itmill/toolkit/ui/CoordinateLayout.java

    r5258 r5264  
    3232 
    3333    /** 
    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. 
    3536     */ 
    3637    public CoordinateLayout() { 
     
    4546    /** 
    4647     *  
    47      * Adds a component to the coordinateLayout at the specified coordinates. The values 
    48      * are treated as pixel values by default and for example 
     48     * Adds a component to the coordinateLayout at the specified coordinates. 
     49     * The values are treated as pixel values by default and for example 
    4950     * {@link com.itmill.toolkit.ui.CoordinateLayout.Coordinates#setUnitPercent(int, boolean)} 
    5051     * can be used to set the values as percentage. 
     
    135136 
    136137    /** 
    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. 
    139141     *  
    140142     * @param c 
     
    279281     * Replaces a child component with a new one. The new component uses the 
    280282     * same coordinates as the previous component. If the arguments are null or 
    281      * the component is not a child of this coordinateLayout IllegalArgumentException is 
    282      * thrown. 
     283     * the component is not a child of this coordinateLayout 
     284     * IllegalArgumentException is thrown. 
    283285     *  
    284286     * @param c1 
     
    451453         * @throws NumberFormatException 
    452454         */ 
    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 { 
    455457 
    456458            properties = new int[6]; 
    457459            isUnitPercent = new boolean[6]; 
    458460 
     461            properties[LEFT] = left; 
    459462            properties[TOP] = top; 
     463            properties[WIDTH] = width; 
     464            properties[HEIGHT] = height; 
    460465            properties[RIGHT] = right; 
    461466            properties[BOTTOM] = bottom; 
    462             properties[LEFT] = left; 
    463  
    464             properties[WIDTH] = width; 
    465             properties[HEIGHT] = height; 
    466467 
    467468            for (int i = 0; i < properties.length; i++) { 
     
    530531         * @param height 
    531532         */ 
    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) { 
    534535            isUnitPercent[TOP] = top; 
    535             isUnitPercent[RIGHT] = right; 
    536             isUnitPercent[BOTTOM] = bottom; 
    537536            isUnitPercent[LEFT] = left; 
    538537            isUnitPercent[WIDTH] = width; 
    539538            isUnitPercent[HEIGHT] = height; 
     539            isUnitPercent[RIGHT] = right; 
     540            isUnitPercent[BOTTOM] = bottom; 
    540541        } 
    541542