List of usage examples for com.google.gwt.user.client.ui FlexTable FlexTable
public FlexTable()
From source file:com.google.gwt.gdata.sample.hellogdata.client.MapsRetrieveMapFeaturesDemo.java
License:Apache License
/** * Setup the Google Maps service and create the main content panel. * If the user is not logged on to Google Maps display a message, * otherwise start the demo by retrieving the user's maps. *//*from w w w . j a v a2s. c om*/ public MapsRetrieveMapFeaturesDemo() { mainPanel = new FlexTable(); initWidget(mainPanel); if (!GData.isLoaded(GDataSystemPackage.MAPS)) { showStatus("Loading the GData Maps package...", false); GData.loadGDataApi(GDATA_API_KEY, new Runnable() { public void run() { startDemo(); } }, GDataSystemPackage.MAPS); } else { startDemo(); } }
From source file:com.google.gwt.gdata.sample.hellogdata.client.MapsRetrieveMapsDemo.java
License:Apache License
/** * Setup the Google Maps service and create the main content panel. * If the user is not logged on to Google Maps display a message, * otherwise start the demo by retrieving the user's maps. *//*from w ww .ja va2 s. c o m*/ public MapsRetrieveMapsDemo() { mainPanel = new FlexTable(); initWidget(mainPanel); if (!GData.isLoaded(GDataSystemPackage.MAPS)) { showStatus("Loading the GData Maps package...", false); GData.loadGDataApi(GDATA_API_KEY, new Runnable() { public void run() { startDemo(); } }, GDataSystemPackage.MAPS); } else { startDemo(); } }
From source file:com.google.gwt.gdata.sample.hellogdata.client.MapsUpdateMapDemo.java
License:Apache License
/** * Setup the Google Maps service and create the main content panel. * If the user is not logged on to Google Maps display a message, * otherwise start the demo by retrieving the user's maps. *///from www. ja v a 2 s .c om public MapsUpdateMapDemo() { mainPanel = new FlexTable(); initWidget(mainPanel); if (!GData.isLoaded(GDataSystemPackage.MAPS)) { showStatus("Loading the GData Maps package...", false); GData.loadGDataApi(GDATA_API_KEY, new Runnable() { public void run() { startDemo(); } }, GDataSystemPackage.MAPS); } else { startDemo(); } }
From source file:com.google.gwt.gdata.sample.hellogdata.client.MapsUpdateMapFeatureDemo.java
License:Apache License
/** * Setup the Google Maps service and create the main content panel. * If the user is not logged on to Google Maps display a message, * otherwise start the demo by retrieving the user's maps. */// www . ja v a 2s . co m public MapsUpdateMapFeatureDemo() { mainPanel = new FlexTable(); initWidget(mainPanel); if (!GData.isLoaded(GDataSystemPackage.MAPS)) { showStatus("Loading the GData Maps package...", false); GData.loadGDataApi(GDATA_API_KEY, new Runnable() { public void run() { startDemo(); } }, GDataSystemPackage.MAPS); } else { startDemo(); } }
From source file:com.google.gwt.gdata.sample.hellogdata.client.SidewikiQueryEntriesByAuthorDemo.java
License:Apache License
/** * Setup the Google Sidewiki service and create the main content panel. * Start the demo by querying Sidewiki entries. *//*from w ww . j a v a 2 s .c o m*/ public SidewikiQueryEntriesByAuthorDemo() { mainPanel = new FlexTable(); initWidget(mainPanel); if (!GData.isLoaded(GDataSystemPackage.SIDEWIKI)) { showStatus("Loading the GData Sidewiki package...", false); GData.loadGDataApi(GDATA_API_KEY, new Runnable() { public void run() { startDemo(); } }, GDataSystemPackage.SIDEWIKI); } else { startDemo(); } }
From source file:com.google.gwt.gdata.sample.hellogdata.client.SidewikiQueryEntriesBySiteDemo.java
License:Apache License
/** * Setup the Google Sidewiki service and create the main content panel. * Start the demo by querying Sidewiki entries. */// w ww .jav a 2 s .c o m public SidewikiQueryEntriesBySiteDemo() { mainPanel = new FlexTable(); initWidget(mainPanel); if (!GData.isLoaded(GDataSystemPackage.SIDEWIKI)) { showStatus("Loading the GData Sidewiki package...", false); GData.loadGDataApi(GDATA_API_KEY, new Runnable() { public void run() { startDemo(); } }, GDataSystemPackage.SIDEWIKI); } else { startDemo(); } }
From source file:com.google.gwt.gdata.sample.hellogdata.client.SidewikiRetrieveEntriesDemo.java
License:Apache License
/** * Setup the Google Sidewiki service and create the main content panel. * Start the demo by querying Sidewiki entries. *///from w w w . ja v a2 s . c o m public SidewikiRetrieveEntriesDemo() { mainPanel = new FlexTable(); initWidget(mainPanel); if (!GData.isLoaded(GDataSystemPackage.SIDEWIKI)) { showStatus("Loading the GData Sidewiki package...", false); GData.loadGDataApi(GDATA_API_KEY, new Runnable() { public void run() { startDemo(); } }, GDataSystemPackage.SIDEWIKI); } else { startDemo(); } }
From source file:com.google.gwt.gears.sample.workerpool.client.WorkerPoolDemo.java
License:Apache License
private Widget buildControlPanel() { VerticalPanel outerPanel = new VerticalPanel(); DecoratorPanel tableWrapper = new DecoratorPanel(); FlexTable resultTable = new FlexTable(); numDigitsListBox.addItem("1,000", "1000"); numDigitsListBox.addItem("5,000", "5000"); numDigitsListBox.addItem("10,000", "10000"); numDigitsListBox.addItem("20,000", "20000"); numDigitsListBox.addItem("100,000", "100000"); buildControlPanelRow(resultTable, "Number of Digits to compute: ", numDigitsListBox); buildControlPanelRow(resultTable, "Execute calculation using:", syncCalc); syncCalc.setChecked(true);//from ww w . ja v a 2 s. c o m buildControlPanelRow(resultTable, "", asyncCalc); startStopButton.addClickListener(new ClickListener() { public void onClick(Widget sender) { if (calculationInProgress) { statusLabel.setText(statusLabel.getText() + "...Cancelled"); stopCalculation(); return; } htmlResults.setText(""); statusLabel.setText("Starting calculation"); calculationInProgress = true; startStopButton.setEnabled(false); startStopButton.setText("Working..."); startTime = System.currentTimeMillis(); final int numDigits = Integer .valueOf(numDigitsListBox.getValue(numDigitsListBox.getSelectedIndex())); if (syncCalc.isChecked()) { /* * A DeferredCommand is used here so that the previous updates to the * user interface will appear. The synchronous computation will block * until the calculation is complete, freezing the user interface. */ DeferredCommand.addCommand(new Command() { public void execute() { doSyncCalculation(numDigits); } }); } else { doAsyncCalculation(numDigits); } } }); buildControlPanelRow(resultTable, "", startStopButton); tableWrapper.setWidget(resultTable); // Position the Animation so that it looks centered. Widget toy = new AnimationToy(); AbsolutePanel toyWrapper = new AbsolutePanel(); toyWrapper.setSize("450px", "210px"); toyWrapper.add(toy, 70, 0); outerPanel.add(toyWrapper); HTML desc = new HTML(INTERACTION_DESC); desc.setWidth("450px"); outerPanel.add(desc); outerPanel.add(tableWrapper); return outerPanel; }
From source file:com.google.gwt.gears.sample.workerpooldemo.client.WorkerPoolDemo.java
License:Apache License
private Widget buildControlPanel() { VerticalPanel outerPanel = new VerticalPanel(); DecoratorPanel tableWrapper = new DecoratorPanel(); FlexTable resultTable = new FlexTable(); numDigitsListBox.addItem("1,000", "1000"); numDigitsListBox.addItem("5,000", "5000"); numDigitsListBox.addItem("10,000", "10000"); numDigitsListBox.addItem("20,000", "20000"); numDigitsListBox.addItem("100,000", "100000"); buildControlPanelRow(resultTable, "Number of Digits to compute: ", numDigitsListBox); buildControlPanelRow(resultTable, "Execute calculation using:", syncCalc); syncCalc.setValue(true);// w w w . j av a2s . c o m buildControlPanelRow(resultTable, "", asyncCalc); startStopButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (calculationInProgress) { statusLabel.setText(statusLabel.getText() + "...Cancelled"); stopCalculation(); return; } htmlResults.setText(""); statusLabel.setText("Starting calculation"); calculationInProgress = true; startStopButton.setEnabled(false); startStopButton.setText("Working..."); startTime = System.currentTimeMillis(); final int numDigits = Integer .valueOf(numDigitsListBox.getValue(numDigitsListBox.getSelectedIndex())); if (syncCalc.getValue()) { /* * A DeferredCommand is used here so that the previous updates to the * user interface will appear. The synchronous computation will block * until the calculation is complete, freezing the user interface. */ DeferredCommand.addCommand(new Command() { public void execute() { doSyncCalculation(numDigits); } }); } else { doAsyncCalculation(numDigits); } } }); buildControlPanelRow(resultTable, "", startStopButton); tableWrapper.setWidget(resultTable); // Position the Animation so that it looks centered. Widget toy = new AnimationToy(); AbsolutePanel toyWrapper = new AbsolutePanel(); toyWrapper.setSize("450px", "210px"); toyWrapper.add(toy, 70, 0); outerPanel.add(toyWrapper); HTML desc = new HTML(INTERACTION_DESC); desc.setWidth("450px"); outerPanel.add(desc); outerPanel.add(tableWrapper); return outerPanel; }
From source file:com.google.gwt.gen2.demo.logging.client.LoggingDemo.java
License:Apache License
/** * This is the entry point method.//from w w w . j a v a2 s. c om */ public void onModuleLoad() { if (Log.isLoggingSupported() && !Log.isLoggingMinimal()) { Gen2CssInjector.addLogHandlerDefault(); Log.setDefaultLevel(Level.ALL); final FlexTable control = new FlexTable(); RootPanel.get().add(control); addLevelControls(control); addHandlers(control); } else { Window.alert("Now that you have logging turned off or to minimal, now check your compiled output."); Log.warning("Should be compiled out when logging is turned off or in minimal mode"); Log.severe("Should be compiled out when logging is turned off, but present in minimal mode"); } }