List of usage examples for com.google.gwt.user.client.ui FlexTable getRowCount
@Override public int getRowCount()
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void localAppendRuleTable(FlexTable flexTable) { ruleAttributeList.clear();//ww w . java 2 s . c o m ruleAttributeList.add(ruleName); ruleAttributeList.add(sH); ruleAttributeList.add(sM); ruleAttributeList.add(eH); ruleAttributeList.add(eM); int numRows = flexTable.getRowCount(); for (int i = 0; i < ruleAttributeList.size(); i++) { flexTable.setText(numRows, i, String.valueOf(ruleAttributeList.get(i))); } addEditRuleColumnLatestRow(flexTable); }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void addEditRegularScheduleColumnAllRow(FlexTable ft) { for (int i = 1; i < ft.getRowCount(); i++) { Anchor edit = new Anchor("Edit"); ft.setWidget(i, ft.getCellCount(i), edit); edit.setName(ft.getText(i, 0));/*from w w w.j a v a 2 s . co m*/ setEditRegularScheduleClickHandler(edit); } }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void addEditSpecialScheduleColumnAllRow(FlexTable ft) { for (int i = 1; i < ft.getRowCount(); i++) { Anchor edit = new Anchor("Edit"); ft.setWidget(i, ft.getCellCount(i), edit); edit.setName(ft.getText(i, 0));/*from w w w .j av a2 s . c o m*/ setEditSpecialScheduleClickHandler(edit); } }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void addEditRuleColumnAllRow(FlexTable ft) { for (int i = 1; i < ft.getRowCount(); i++) { final Anchor edit = new Anchor("Edit"); ft.setWidget(i, ft.getCellCount(i), edit); edit.setName(ft.getText(i, 0));//w ww.j ava 2s . c o m setEditRuleClickHandler(edit); } }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void addEditRuleColumnLatestRow(FlexTable ft) { int lastRow = ft.getRowCount() - 1; final Anchor edit = new Anchor("Edit"); ft.setWidget(lastRow, ft.getCellCount(lastRow), edit); edit.setName(ft.getText(lastRow, 0)); setEditRuleClickHandler(edit);// w ww . ja v a 2 s . co m }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void convertDayMaskToString(FlexTable ft) { for (int i = 1; i < ft.getRowCount(); i++) { StringBuilder sb = new StringBuilder(); String dayMask = ft.getText(i, 2); int dayMaskInt = Integer.parseInt(dayMask); for (int j = 1; j <= 7; j++) { //1 = Monday, 7 = Sunday if ((dayMaskInt & (1 << j)) != 0) { sb.append(DaysShort[j - 1]); sb.append(','); }/*from w w w. j a v a 2 s.c o m*/ } String s = sb.toString(); ft.setText(i, 2, s.substring(0, s.length() - 1)); } }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void formatMonth(FlexTable ft) { for (int i = 1; i < ft.getRowCount(); i++) { int monthInt = Integer.parseInt(ft.getText(i, 3)); ft.setText(i, 3, monthName[monthInt - 1]); }//w ww . j a va2 s. c o m }
From source file:com.google.gwt.sample.stockwatcher.client.SensorActuatorResponsePage.java
private void addEditResponseColumnAllRow(FlexTable ft) { for (int i = 1; i < ft.getRowCount(); i++) { final Anchor edit = new Anchor("Edit"); ft.setWidget(i, ft.getCellCount(i), edit); edit.setName(ft.getText(i, 0));/* ww w.ja v a 2 s . c o m*/ setEditResponseClickHandler(edit); } }
From source file:com.google.gwt.sample.stockwatcher.client.UserNotificationPage.java
private void renderControllerSubcriptionPanel() { FlexTable wrapper = new FlexTable(); setHeaders(wrapper);/*from w w w . ja v a2s .c o m*/ for (String controller : controllerSubcriptionList.keySet()) { int row = wrapper.getRowCount(); wrapper.setText(row, 0, controller); wrapper.setText(row, 1, controllerSubcriptionList.get(controller)); } addUnsubscribeControllerColumnAllRow(wrapper); cTable = wrapper; controllerSubscribedPanel.clear(); controllerSubscribedPanel.setStyleName("mainStyle"); controllerSubscribedPanel.setSpacing(10); controllerSubscribedPanel.add(new HTML("Subscribed Controllers")); controllerSubscribedPanel.add(cTable); controllerSubscribedPanel.add(subscribeControllerButton); }
From source file:com.google.gwt.sample.stockwatcher.client.UserNotificationPage.java
private void renderSensorSubcriptionPanel() { FlexTable wrapper = new FlexTable(); setHeaders(wrapper);// w ww. j a v a 2 s . c o m for (String sensor : sensorSubcriptionList.keySet()) { int row = wrapper.getRowCount(); wrapper.setText(row, 0, sensor); wrapper.setText(row, 1, sensorSubcriptionList.get(sensor)); } addUnsubscribeSensorColumnAllRow(wrapper); sTable = wrapper; sensorSubscribedPanel.clear(); sensorSubscribedPanel.setStyleName("mainStyle"); sensorSubscribedPanel.setSpacing(10); sensorSubscribedPanel.add(new HTML("Subscribed Sensors")); sensorSubscribedPanel.add(sTable); sensorSubscribedPanel.add(subscribeSensorButton); }