protected void createUploadInterface() { _upload = new AbsolutePanel(); _upload.setStyleName("GetStuff"); _upload.add(MsoyUI.createLabel(_msgs.getStuffTitle(), "GetStuffTitle"), 60, 10); _upload.add(MsoyUI.createHTML(_dmsgs.xlateGetStuffBuy(_type), "GetStuffBuy"), 165, 85); _upload.add(MsoyUI.createHTML(_dmsgs.xlateGetStuffCreate(_type), "GetStuffCreate"), 360, 85); _upload.add( new StretchButton( StretchButton.BLUE_THICK, _msgs.getStuffShop(), Link.createHandler(Pages.SHOP, _type + "")), 10, 90); _upload.add( MsoyUI.createButton( MsoyUI.MEDIUM_THICK, _msgs.getStuffUpload(), NaviUtil.onCreateItem(_type, 0)), 535, 90); }
protected void init(final GameData data) { clear(); SmartTable header = new SmartTable("Header", 0, 10); header.setText(0, 0, data.info.name, 1, "Title"); header.setWidget(0, 1, MsoyUI.createHTML(_msgs.egTip(), null), 1, "Tip"); Button delete = new Button(_msgs.egDelete()); header.setWidget(0, 2, delete); header.getFlexCellFormatter().setHorizontalAlignment(0, 2, HasAlignment.ALIGN_RIGHT); add(header); // wire up the delete button new ClickCallback<Void>(delete, _msgs.egDeleteConfirm()) { @Override protected boolean callService() { _gamesvc.deleteGame(data.info.gameId, this); return true; } @Override protected boolean gotResult(Void result) { Link.go(Pages.EDGAMES, "m"); return true; } }; // add our giant tab list of doom add( _tabs = new NaviTabPanel(Pages.EDGAMES) { protected Args getTabArgs(int tabIdx) { return Args.compose("e", _gameId, tabIdx); } }); _tabs.add( new LazyPanel() { protected Widget createWidget() { return new InfoEditorPanel(data); } }, _msgs.egTabInfo()); _tabs.add( new LazyPanel() { protected Widget createWidget() { return new CodeEditorPanel(data.info, data.devCode); } }, _msgs.egTabCode()); _tabs.add( new LazyPanel() { protected Widget createWidget() { return new PublishPanel(data); } @Override public void setVisible(boolean visible) { if (!visible) { setWidget(null); // clear out our panel when we change tabs } super.setVisible(visible); } }, _msgs.egTabPublish()); _tabs.add( new LazyPanel() { protected Widget createWidget() { return new FacebookGameInfoEditorPanel(data.facebook); } }, _msgs.egTabFacebook()); // NOTE: if you add a tab here, you have to adjust StuffPage.PRE_ITEM_TABS for (final MsoyItemType type : GameItem.TYPES) { _tabs.add( new LazyPanel() { protected Widget createWidget() { return new GameItemEditorPanel(data.info.gameId, type); } }, _dmsgs.xlateItemsType(type)); } }