Show
Ignore:
Timestamp:
06/09/08 07:19:19 (6 months ago)
Author:
magi@…
Message:

Merged [4769] from trunk to 5.2 branch: #1572 (GridLayout? : setMargin(true) nor setComponentSpacing(true) does nothing in non-sized grid): updated test case and spacing implementation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/5.2/src/com/itmill/toolkit/terminal/gwt/client/ui/IGridLayout.java

    r4792 r4794  
    5757                margins.hasLeft()); 
    5858 
     59        setStyleName(margin, CLASSNAME + "-" + "spacing", uidl 
     60                .hasAttribute("spacing")); 
     61 
    5962        grid.updateFromUIDL(uidl, client); 
    6063    } 
     
    7982        public Grid() { 
    8083            super(); 
    81             setStyleName(CLASSNAME); 
     84            setStyleName(CLASSNAME + "-grid"); 
    8285        } 
    8386 
     
    133136                            } 
    134137 
    135                             getCellFormatter() 
    136                                     .setAlignment(row, column, ha, va); 
     138                            FlexCellFormatter formatter = (FlexCellFormatter) getCellFormatter(); 
     139 
     140                            formatter.setAlignment(row, column, ha, va); 
    137141 
    138142                            // set col span 
    139                             ((FlexCellFormatter) getCellFormatter()) 
    140                                     .setColSpan(row, column, w); 
     143                            formatter.setColSpan(row, column, w); 
     144 
     145                            String styleNames = CLASSNAME + "-cell"; 
     146                            if (column == 0) { 
     147                                styleNames += " " + CLASSNAME + "-firstcol"; 
     148                            } 
     149                            if (row == 0) { 
     150                                styleNames += " " + CLASSNAME + "-firstrow"; 
     151                            } 
     152                            formatter.setStyleName(row, column, styleNames); 
    141153 
    142154                            // Set cell height