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 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()); } }
public void onSuccess(List<PacketBbsThread> result) { for (final PacketBbsThread thread : result) { final LazyPanel lazyPanel = new LazyPanel() { @Override protected Widget createWidget() { DecoratorPanel decoratorPanel = new DecoratorPanel(); decoratorPanel.setWidget(new PanelThread((int) thread.id, thread.title)); return decoratorPanel; } }; OpenHandler<DisclosurePanel> openHandler = new OpenHandler<DisclosurePanel>() { @Override public void onOpen(OpenEvent<DisclosurePanel> event) { lazyPanel.ensureWidget(); } }; DisclosurePanel disclosurePanel = new DisclosurePanel(thread.title); disclosurePanel.setContent(lazyPanel); disclosurePanel.addOpenHandler(openHandler); add(disclosurePanel); } }
@Override public void setRanking(List<List<PacketRankingData>> rankings) { for (int i = 0; i < rankings.size(); ++i) { final int finalIndex = i; final List<PacketRankingData> ranking = rankings.get(i); add(LABELS[i], new LazyPanel() { @Override protected Widget createWidget() { PanelRanking panelRanking = panelRankingFactory.create(LABELS[finalIndex]); panelRanking.setRanking(ranking); return panelRanking; } }); } }
@Inject public PanelSetting(final PanelSettingUserCodePresenter.View.Factory userCodeFactory) { super(120); 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(); } }); } }
public PanelStatistics() { super(200); 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(); } }); }