/** * Defines the display mode of the calendar and perform a redraw. * * @param displayMode Style of the calendar (day, week or month). * @see CalendarWidget.DisplayMode */ public void setDisplayMode(DisplayMode displayMode) { final FlexTable grid = (FlexTable) getWidget(); clear(); // Resetting the CSS style grid.removeStyleName(this.displayMode.getStyleName()); this.displayMode = displayMode; // Applying the CSS style associated with the new display mode grid.addStyleName(displayMode.getStyleName()); refresh(); }
public void setIcon(String icon) { image.setUrl(icon); switchTable.removeStyleName("screen-btn-cont"); switchTable.setWidget(1, 1, image); }