List of usage examples for com.google.gwt.gen2.logging.shared Log warning
public static void warning(String message)
From source file:com.google.gwt.gen2.demo.logging.client.LoggingDemo.java
License:Apache License
/** * This is the entry point method./* www. j a va 2 s. c o m*/ */ 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"); } }
From source file:com.google.gwt.gen2.demo.picker.client.DropDownDatePickerDemo.java
License:Apache License
/** * @see com.google.gwt.core.client.EntryPoint#onModuleLoad() *///from w w w .j a v a 2s .c o m @SuppressWarnings/* TODO pending resolution of GWT issue #3233 */("deprecation") public void onModuleLoad() { DropDownDatePicker.injectDefaultCss(); final DropDownDatePicker datePicker = new DropDownDatePicker(); final TextBox startYearField = new TextBox(); final TextBox yearsToDisplayField = new TextBox(); startYearField.setText("1950"); yearsToDisplayField.setText("100"); startYearField.addChangeListener(new ChangeListener() { public void onChange(Widget sender) { // TODO pending resolution of GWT issue #3233 // startYearField.addValueChangeHandler(new ValueChangeHandler<String>() // { // public void onValueChange(ValueChangeEvent<String> event) { try { // datePicker.setStartYear(Integer.parseInt(event.getValue())); datePicker.setStartYear(Integer.parseInt(startYearField.getValue())); } catch (NumberFormatException e) { Log.warning("Invalid number:" + startYearField.getValue()); } } }); yearsToDisplayField.addChangeListener(new ChangeListener() { public void onChange(Widget sender) { // TODO pending resolution of GWT issue #3233 // yearsToDisplayField.addValueChangeHandler(new // ValueChangeHandler<String>() { // public void onValueChange(ValueChangeEvent<String> event) { try { // datePicker.setYearsToDisplay(Integer.parseInt(event.getValue())); datePicker.setYearsToDisplay(Integer.parseInt(yearsToDisplayField.getValue())); } catch (NumberFormatException e) { // System.out.println("Invalid number:" + event.getValue()); System.out.println("Invalid number:" + yearsToDisplayField.getValue()); } } }); RootPanel.get().add(new Label("First year in list:")); RootPanel.get().add(startYearField); RootPanel.get().add(new Label("Number of years in list:")); RootPanel.get().add(yearsToDisplayField); RootPanel.get().add(datePicker); }