List of usage examples for com.google.gwt.user.client.ui DockLayoutPanel animate
public void animate(int duration)
From source file:com.eucalyptus.webui.client.view.ShellViewImpl.java
License:Open Source License
@UiHandler("splitter") void handleSplitterClick(ClickEvent e) { directoryHidden = !directoryHidden;// ww w .ja v a 2 s. c om DockLayoutPanel parent = (DockLayoutPanel) this.getWidget(); if (directoryHidden) { parent.setWidgetSize(directory, 0); splitter.removeStyleName(shellStyle.left()); splitter.addStyleName(shellStyle.right()); } else { parent.setWidgetSize(directory, DIRECTORY_WIDTH); splitter.removeStyleName(shellStyle.right()); splitter.addStyleName(shellStyle.left()); } parent.animate(ANIMATE_DURATION); }
From source file:com.eucalyptus.webui.client.view.ShellViewImpl.java
License:Open Source License
@Override public void showLogConsole() { DockLayoutPanel parent = (DockLayoutPanel) this.getWidget(); parent.setWidgetSize(this.log, LOG_HEIGHT); parent.animate(ANIMATE_DURATION); }
From source file:com.eucalyptus.webui.client.view.ShellViewImpl.java
License:Open Source License
@Override public void hideLogConsole() { DockLayoutPanel parent = (DockLayoutPanel) this.getWidget(); parent.setWidgetSize(this.log, 0); parent.animate(ANIMATE_DURATION); }
From source file:org.apache.openjpa.trader.client.OpenTrader.java
License:Apache License
/** * Builds up the widgets once the login is complete i.e. the server has supplied * the initialization data./*from ww w . j a v a 2 s . c o m*/ * */ void init(Trader trader, String uri, List<Stock> stocks) { this.trader = trader; _serviceURI = uri; Window.setTitle(trader.getName()); int W = Window.getClientWidth(); int H = 900;//Window.getClientHeight(); int headerHeight = 05 * H / 100; int westWidth = 25 * W / 100; int westHeight = 80 * H / 100; int centerWidth = 60 * W / 100; int centerHeight = 80 * H / 100; int footerHeight = 02 * H / 100; Unit unit = Unit.PX; stockPanel = new MarketDataPanel(this, westWidth - 10, 40 * westHeight / 100); int N = stocks.size(); for (int i = 0; i < N; i++) { stockPanel.insert(stocks.get(i)); } soldTradePanel = new TradeHistoryPanel(this, Ask.class, westWidth - 10, 20 * westHeight / 100); boughtTradePanel = new TradeHistoryPanel(this, Bid.class, westWidth - 10, 20 * westHeight / 100); serverPanel = new ServerLogPanel(this, centerWidth, 40 * centerHeight / 100); tradePanel = new TradingWindow(this, centerWidth, 40 * centerHeight / 100); orderPanel = new TradeOrderWindow(this, centerWidth, 10 * centerHeight / 100); FlowPanel west = new FlowPanel(); west.setSize((westWidth - 10) + "px", westHeight + "px"); west.add(decorate(stockPanel)); west.add(new HTML("<p>")); west.add(decorate(soldTradePanel)); west.add(new HTML("<p>")); west.add(decorate(boughtTradePanel)); FlowPanel center = new FlowPanel(); center.setSize(centerWidth + "px", centerHeight + "px"); center.add(decorate(orderPanel)); center.add(new HTML("<p>")); center.add(decorate(tradePanel)); center.add(new HTML("<p>")); center.add(decorate(serverPanel)); DockLayoutPanel main = new DockLayoutPanel(unit); main.addNorth(createHeader(), headerHeight); main.addSouth(createFooter(), footerHeight); main.addWest(west, westWidth); main.add(center); RootLayoutPanel.get().add(main); main.animate(500); setUpHelp(); stockPanel.startStockWatcher(); tradePanel.startTradableRefresher(); }