List of usage examples for com.google.gwt.user.client.ui LazyPanel LazyPanel
public LazyPanel()
From source file:com.pietschy.gwt.pectin.demo.client.DemoEntryPoint.java
License:Apache License
public void onModuleLoad() { rootPanel = RootPanel.get("demo-target"); // tabs.add(new BasicDemo(), "Basic", "basic"); // tabs.add(new FormattedFieldDemo(), "Formatted Fields", "formattedFields"); // tabs.add(new MetadataDemo(), "Metadata Plugin", "metadata"); // tabs.add(new ValidationDemo(), "Validation Plugin", "validation"); // tabs.add(new StyleDemo(), "Style Bindings", "style"); // tabs.initialiseSelectionFromHistory(); tabs.add(new LazyPanel() { @Override/* w w w.j a v a2s .c o m*/ protected Widget createWidget() { return new BasicDemo(); } }, "Basic Form"); tabs.add(new LazyPanel() { @Override protected Widget createWidget() { return new MetadataDemo(); } }, "Enabled/Visible/Watermarks"); tabs.add(new LazyPanel() { @Override protected Widget createWidget() { return new FormattedFieldDemo(); } }, "Formatted fields"); tabs.add(new LazyPanel() { @Override protected Widget createWidget() { return new ValidationDemo(); } }, "Validation"); tabs.add(new LazyPanel() { @Override protected Widget createWidget() { return new StyleDemo(); } }, "Style bindings"); tabs.add(new LazyPanel() { @Override protected Widget createWidget() { return new CommandDemo(); } }, "UiCommands & Buttons"); tabs.selectTab(0); rootPanel.add(tabs); Window.enableScrolling(true); Window.addResizeHandler(new ResizeHandler() { public void onResize(ResizeEvent event) { updateSize(); } }); updateSize(); }
From source file:org.cruxframework.crux.widgets.client.slider.TouchSlider.java
License:Apache License
/** * /*w ww. j a va2 s . c o m*/ * @param contentProvider */ public void setContentProvider(ContentProvider contentProvider) { this.contentProvider = contentProvider; contentPanel.clear(); for (int i = 0; i < contentProvider.size(); i++) { final int index = i; LazyPanel itemWrapper = new LazyPanel() { @Override protected Widget createWidget() { return TouchSlider.this.contentProvider.loadWidget(index); } }; itemWrapper.setStyleName("touchSliderItem"); itemWrapper.setVisible(false); Style style = itemWrapper.getElement().getStyle(); style.setPosition(Position.ABSOLUTE); style.setTop(0, Unit.PX); style.setLeft(0, Unit.PX); style.setWidth(100, Unit.PCT); style.setHeight(100, Unit.PCT); style.setOverflowX(Overflow.HIDDEN); style.setOverflowY(Overflow.VISIBLE); contentPanel.add(itemWrapper); } if (this.circularShowing && contentProvider.size() < 3) { this.circularShowing = false; } }
From source file:tv.dyndns.kishibe.qmaclone.client.chat.PanelChat.java
License:Open Source License
public PanelChat() { setWidth("800px"); add(new Label("?(??ON/OFF?????)")); if (SharedData.get().isAdministoratorMode()) { final TabPanel panel = new TabPanel(); panel.setAnimationEnabled(true); panel.add(new LazyPanel() { @Override/* w ww . j av a2 s . co m*/ protected Widget createWidget() { return new PanelRealtime(); } }, ""); panel.add(new LazyPanel() { @Override protected Widget createWidget() { return new PanelPast(); } }, "?"); panel.selectTab(0); add(panel); } else { add(new PanelRealtime()); } }
From source file:tv.dyndns.kishibe.qmaclone.client.setting.PanelSetting.java
License:Open Source License
@Inject public PanelSetting(final PanelSettingUserCodePresenter.View.Factory userCodeFactory) { super(120);/*from ww w. ja v a2s .c om*/ setWidth("800px"); add("", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingTop(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingIcon(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return userCodeFactory.create().asWidget(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingRatioReport(); } }); add("?", new LazyPanel() { @Override protected Widget createWidget() { return PanelSettingChat.getInstance(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingThemeQuery(new PanelSettingThemeQueryView(), Service.Util.getInstance(), Scheduler.get()).asWidget().asWidget(); } }); add("<br>", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingThemeModeEditLog(new PanelSettingThemeModeEditLogView(), Service.Util.getInstance()).asWidget().asWidget(); } }); add("?", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingImageLink(); } }); add("?", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingIndicatedProblems(); } }); add("???", new LazyPanel() { @Override protected Widget createWidget() { return new OtherUi(); } }); if (SharedData.get().isAdministoratorMode()) { add("?", new LazyPanel() { @Override protected Widget createWidget() { return new PanelSettingAdministrator(); } }); } }
From source file:tv.dyndns.kishibe.qmaclone.client.statistics.PanelStatistics.java
License:Open Source License
public PanelStatistics() { super(200);//w w w. j a va 2 s . c om setWidth("800px"); add("", new LazyPanel() { @Override protected Widget createWidget() { return new PanelStatisticsTop(); } }); add("?", new LazyPanel() { @Override protected Widget createWidget() { return new PanelStatisticsNumberOfProblems(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return new PanelStatisticsAccuracyRate(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return PanelStatisticsUserAccuracyRate.getInstance(); } }); add("?<br>", new LazyPanel() { @Override protected Widget createWidget() { return new PanelStatisticsPrefectureRatingRanking(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return PanelStatisticsRatingHistory.getInstance(); } }); add("", new LazyPanel() { @Override protected Widget createWidget() { return new PanelStatisticsRatingDistribution(); } }); }