FlexTable border and TabPanel
Hi,
I want to create flexTable that show difference between two lists.
each two rows show one row from first list and second line one from
second list.
Total number of rows is size of list * 2.
I need that between each first and second line to have "little" border
and between each 2 rows "bigger" splitter.
Below is example code and css that show the problem.
Another question is that I want to create 2 tables that I can switch
between them by using TabPanel.
When I try this I got the following exception from code line -
tabPanel.add(flexTable1); :
Caused by: java.lang.UnsupportedOperationException: A tabText
parameter must be specified with add().
The code :
public void onModuleLoad() {
TabPanel tabPanel = new TabPanel();
FlexTable flexTable1 = new FlexTable();
flexTable1.addStyleName("FlexTable");
FlexTable flexTable2 = new FlexTable();
tabPanel.add(flexTable1);
tabPanel.add(flexTable2);
HTMLTable.RowFormatter rf = flexTable1.getRowFormatter();
for(int i = 0; i < 6; i+=2) {
rf.addStyleName(i, "FlexTable-PrevRow");
rf.addStyleName(i+1, "FlexTable-CurrRow");
flexTable1.setText(i, 0, "Text1"+i);
flexTable1.setText(i, 1, "Text2"+i);
flexTable1.setText(i+1, 0, "Text1"+i);
flexTable1.setText(i+1, 1, "Text4"+i);
flexTable1.getCellFormatter().addStyleName(i, 1,"FlexTable-
diffPrev");
flexTable1.getCellFormatter().addStyleName(i+1, 1,"FlexTable-
diffCurr");
}
RootPanel.get("compare").add(flexTable1);
}
The css :
.FlexTable {
border-top: thin solid #444444;
border-left: thin solid #444444;
border-right: thin solid #111111;
border-bottom: thin solid #111111;
background-color: #505050;
}
.FlexTable-PrevRow {
background-color: #cccccc;
border-bottom: solid;
}
.FlexTable-CurrRow {
background-color: #505050;
border-bottom: dashed;
}
.FlexTable-diffPrev {
color: blue;
}
.FlexTable-diffCurr {
color: red;
}
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home