Java Reference
In-Depth Information
// listen for mouse events on the Add New Row button
addRowButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
addRow();
}
});
// listen for the changes in the value of the date
dateBox.addValueChangeHandler(new ValueChangeHandler<Date>() {
public void onValueChange(ValueChangeEvent<Date> evt) {
startDate = evt.getValue();
renameColumns();
// show the main parts of the UI now
flexEntryTable.setVisible(true);
rightNav.setVisible(true);
totalPanel.setVisible(true);
}
});
// set the width of the table to expand the size of the
navPanel
flexEntryTable.setWidth("100%");
// set the style for the table to be accessed in the css
flexEntryTable.setStylePrimaryName("timeEntryTable");
// add the columns and headers
flexEntryTable.setText(0, 0, "Project");
flexEntryTable.setText(0, 1, "Milestone");
flexEntryTable.setText(0, 2, "Billable?");
flexEntryTable.setText(0, 3, "Mon");
flexEntryTable.setText(0, 4, "Tue");
flexEntryTable.setText(0, 5, "Wed");
flexEntryTable.setText(0, 6, "Thu");
flexEntryTable.setText(0, 7, "Fri");
flexEntryTable.setText(0, 8, "Sat");
flexEntryTable.setText(0, 9, "Sun");
flexEntryTable.setText(0, 10, "Total");
VerticalPanel tab1Content = new VerticalPanel();
tab1Content.add(navPanel);
tab1Content.add(flexEntryTable);
tab1Content.add(totalPanel);
116
Search WWH ::




Custom Search