List of usage examples for com.google.gwt.user.client.ui FlexTable FlexTable
public FlexTable()
From source file:com.google.gwt.sample.stockwatcher.client.ChartUtilities.java
public static FlexTable createFlexTable(String data[][]) { FlexTable table = new FlexTable(); table.setBorderWidth(1);//from w w w. j a va2s .c o m table.setCellPadding(5); table.getElement().getStyle().setBorderStyle(BorderStyle.SOLID); for (int i = table.getRowCount(); i < data.length; i++) { for (int j = 0; j < data[i].length; j++) { table.setText(i, j, data[i][j]); } } return table; }
From source file:com.google.gwt.sample.stockwatcher.client.NotificationServer.java
public static void resetNotificationTables() { cTable = new FlexTable(); sTable = new FlexTable(); aTable = new FlexTable(); setHeaderC(cTable);// w w w .ja va2 s.c o m setHeaderS(sTable); setHeaderA(aTable); }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void initializeRuleTable() { rulePopup.setVisible(false);/*www. ja va 2 s . c om*/ FlexTable ft = new FlexTable(); setRuleHeaders(ft); String[][] data = new String[Data.dayScheduleRuleAttributeList.size()][Data.ruleAttributeSize]; int row = 0; for (String ruleName : Data.dayScheduleRuleAttributeList.keySet()) { int column = 0; for (String rAttributes : Data.dayScheduleRuleAttributeList.get(ruleName)) { data[row][column] = rAttributes; column++; } row++; } ruleTable = ChartUtilities.appendFlexTable(ft, data); addEditRuleColumnAllRow(ruleTable); refreshRuleTable(); }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void updateRegularScheduleTable(FlexTable ft, String[][] result) { schedulePopup.setVisible(false);//from w w w.j ava 2s .c o m ft.setStyleName("fancyTable"); FlexTable newTable = new FlexTable(); setRegularScheduleHeaders(newTable); ft = ChartUtilities.appendFlexTable(newTable, result); addEditRegularScheduleColumnAllRow(ft); convertDayMaskToString(ft); middlePanel.clear(); middlePanel.add(ft); scheduleType.setSelectedIndex(0); currentScheduleView = scheduleType.getSelectedItemText(); }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void updateSpecialScheduleTable(FlexTable ft, String[][] result) { schedulePopup.setVisible(false);//ww w . jav a2s . c o m ft.setStyleName("fancyTable"); FlexTable newTable = new FlexTable(); setSpecialScheduleHeaders(newTable); ft = ChartUtilities.appendFlexTable(newTable, result); addEditSpecialScheduleColumnAllRow(ft); formatMonth(ft); middlePanel.clear(); middlePanel.add(ft); scheduleType.setSelectedIndex(1); currentScheduleView = scheduleType.getSelectedItemText(); }
From source file:com.google.gwt.sample.stockwatcher.client.SchedulePage.java
private void updateOngoingScheduleTable(FlexTable ft, String[][] result) { schedulePopup.setVisible(false);//from w w w .j a va 2 s.c om ft.setStyleName("fancyTable"); FlexTable newTable = new FlexTable(); setOngoingScheduleHeaders(newTable); ft = ChartUtilities.appendFlexTable(newTable, result); middlePanel.clear(); middlePanel.add(ft); }
From source file:com.google.gwt.sample.stockwatcher.client.SensorActuatorResponsePage.java
private void getLatestResponseData() { tablePanel.clear();/* ww w . j a va 2 s .c o m*/ tablePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); tablePanel.add(Utility.addTimer()); Utility.newRequestObj().sensorActuatorResponseGetAll(new AsyncCallback<String[][]>() { public void onFailure(Throwable caught) { Window.alert("Unable to get sensor/actuator response list"); } public void onSuccess(String[][] responseList) { Utility.hideTimer(); responseTable.setVisible(true); if (responseList != null) { // Window.alert("Got latest response data: size "+responseList.length); refreshResponseCache(responseList); updateResponseTable(responseTable, responseList); } else { responsePopup.setVisible(false); FlexTable newTable = new FlexTable(); responseTable = newTable; tablePanel.clear(); tablePanel.add(responseTable); } } }); }
From source file:com.google.gwt.sample.stockwatcher.client.SensorActuatorResponsePage.java
private void updateResponseTable(FlexTable ft, String[][] result) { responsePopup.setVisible(false);//from w w w . j ava 2 s. co m ft.setStyleName("fancyTable"); FlexTable newTable = new FlexTable(); setHeaders(newTable); ft = ChartUtilities.appendFlexTable(newTable, result); ft.getElement().getStyle().setBorderStyle(BorderStyle.SOLID); addEditResponseColumnAllRow(ft); tablePanel.clear(); tablePanel.add(ft); }
From source file:com.google.gwt.sample.stockwatcher.client.StockWatcherView.java
public void onInit() { mainPanel = new VerticalPanel(); mainPanel.setSize("301px", "300px"); viewPanel.add(mainPanel);//from ww w .j a va2 s . c o m image = new Image("images/googlecode.png"); mainPanel.add(image); stocksFlexTable = new FlexTable(); stocksFlexTable.setStyleName("watchList"); // Add these lines stocksFlexTable.setText(0, 0, CONSTANTS.Symbol()); stocksFlexTable.setText(0, 1, CONSTANTS.Price()); stocksFlexTable.setText(0, 2, CONSTANTS.Change()); stocksFlexTable.setText(0, 3, CONSTANTS.Remove()); stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader"); mainPanel.add(stocksFlexTable); HorizontalPanel addPanel = new HorizontalPanel(); mainPanel.add(addPanel); newSymbolTextBox = new TextBox(); newSymbolTextBox.setFocus(true); addPanel.add(newSymbolTextBox); addButton = new Button(CONSTANTS.addButton_html()); addButton.setStyleName("gwt-Button-add"); addPanel.add(addButton); lastUpdatedLabel = new Label(); mainPanel.add(lastUpdatedLabel); lastUpdatedLabel.setStyleName("gwt-Label-stockwatcher"); }
From source file:com.google.gwt.sample.stockwatcher.client.ui.StockWatcherViewImpl.java
private void initFlexTable() { stocksFlexTable = new FlexTable(); // Create table for stock data. stocksFlexTable.setText(0, 0, "Symbol"); stocksFlexTable.setText(0, 1, "Price"); stocksFlexTable.setText(0, 2, "Change"); stocksFlexTable.setText(0, 3, "Remove"); // Add styles to elements in the stock list table. stocksFlexTable.setCellPadding(6);/* w w w.j ava 2 s. co m*/ stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader"); stocksFlexTable.addStyleName("watchList"); stocksFlexTable.getCellFormatter().addStyleName(0, 1, "watchListNumericColumn"); stocksFlexTable.getCellFormatter().addStyleName(0, 2, "watchListNumericColumn"); stocksFlexTable.getCellFormatter().addStyleName(0, 3, "watchListRemoveColumn"); }