List of usage examples for com.google.gwt.user.client.ui DecoratedPopupPanel DecoratedPopupPanel
public DecoratedPopupPanel()
From source file:com.googlecode.simplegwt.contextualpopup.client.ui.ContextualPopup.java
License:Apache License
/** * Creates and configures a new {@link PopupPanel}. Override to change {@link PopupPanel} * implementation, disable animation, etc. * /*from w w w .j a va 2 s . c o m*/ * @return the contextual {@link PopupPanel} */ protected PopupPanel createPopupPanel() { final DecoratedPopupPanel newPopupPanel = new DecoratedPopupPanel(); newPopupPanel.setAnimationEnabled(true); return newPopupPanel; }
From source file:com.objetdirect.gwt.gen.client.ui.popup.MessagePopUp.java
License:Open Source License
/** * Constructor with the message to be displayed by the popup. * @param message message to be displayed by the popup. *///from w ww.j a v a2 s .c om public MessagePopUp(String message) { closedCommand = null; popUpPanel = new DecoratedPopupPanel(); FlowPanel panel = new FlowPanel(); Button button = new Button("Close"); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (closedCommand != null) { closedCommand.execute(); } popUpPanel.hide(); } }); panel.add(button); panel.add(new HTML(message)); popUpPanel.add(panel); }
From source file:com.symantec.gwt.flot.client.Flot.java
License:Open Source License
public <C extends SeriesOptions<D>> Flot(C options) { this.seriesOptions = options; legend = new FlotLegend(); tooltip = new DecoratedPopupPanel(); series = new ArrayList<Series<D>>(); eventBus = new SimpleEventBus(); }
From source file:org.vectomatic.svg.chess.Main.java
License:Open Source License
/** * GWT entry point/*from www . jav a2 s. c om*/ */ public void onModuleLoad() { final DecoratedPopupPanel initBox = new DecoratedPopupPanel(); HorizontalPanel hpanel = new HorizontalPanel(); hpanel.add(new Label(ChessConstants.INSTANCE.waitMessage())); initBox.add(hpanel); initBox.center(); initBox.show(); // Inject CSS in the document headers StyleInjector.inject(Resources.INSTANCE.getCss().getText()); // Instantiate UI FocusPanel binderPanel = mainBinder.createAndBindUi(Main.this); modeListBox.addItem(ChessMode.whitesVsComputer.getDescription(), ChessMode.whitesVsComputer.name()); modeListBox.addItem(ChessMode.blacksVsComputer.getDescription(), ChessMode.blacksVsComputer.name()); modeListBox.addItem(ChessMode.whitesVsBlacks.getDescription(), ChessMode.whitesVsBlacks.name()); modeListBox.addItem(ChessMode.computerVsComputer.getDescription(), ChessMode.computerVsComputer.name()); modeListBox.setSelectedIndex(0); chessVariantListBox.addItem(ChessConstants.INSTANCE.standard()); chessVariantListBox.addItem(ChessConstants.INSTANCE.chess960()); chessVariantListBox.setSelectedIndex(0); timeListBox.addItem(ChessConstants.INSTANCE.mt1s(), "1"); timeListBox.addItem(ChessConstants.INSTANCE.mt3s(), "3"); timeListBox.addItem(ChessConstants.INSTANCE.mt7s(), "7"); timeListBox.addItem(ChessConstants.INSTANCE.mt10s(), "10"); timeListBox.addItem(ChessConstants.INSTANCE.mt15s(), "15"); timeListBox.addItem(ChessConstants.INSTANCE.mt30s(), "30"); timeListBox.setSelectedIndex(1); about.setHTML(ChessConstants.INSTANCE.about()); RootLayoutPanel.get().add(binderPanel); // Initialize engine new Timer() { public void run() { // Create a Carballo chess engine BitboardAttacks.USE_MAGIC = false; Config config = new Config(); config.setTranspositionTableSize(2); //config.setBook(new JSONBook()); config.setBook(new JSONBook()); engine = new SearchEngine(config); engine.setObserver(Main.this); board = engine.getBoard(); //advancedPanel.getHeaderTextAccessor().setText(constants.advanced()); // Parse the SVG chessboard and insert it in the HTML UI // Note that the elements must be imported in the UI since they come from another XML document boardDiv = boardContainer.getElement(); boardElt = OMSVGParser.parse(Resources.INSTANCE.getBoard().getText()); boardDiv.appendChild(boardElt.getElement()); // Create the SVG chessboard. Use a temporary chessboard // until the engine has been initialized chessboard = new ChessBoard(boardElt); chessboard.setMoveListener(Main.this); restart(); initBox.hide(); focusPanel.addKeyDownHandler(Main.this); focusPanel.setFocus(true); } }.schedule(500); // To let the interface be drawn }