List of usage examples for com.google.gwt.user.client.ui DockPanel NORTH
DockLayoutConstant NORTH
To view the source code for com.google.gwt.user.client.ui DockPanel NORTH.
Click Source Link
From source file:org.adamtacy.client.ui.effects.impl.browsers.EffectImplementationStandard.java
License:Apache License
/** * Reflects an image by creating a DockPanel where the original image is place * in the top and a canvas object containing a refection of the original image * is placed below. At the moment I can't seem to reuse the original canvas so * if any action is performed requiring the reflection to be re-drawn a new * canvas object is required (compare that to the Opera version where reuse is * possible)/* w w w .j a va2 s. co m*/ * * @param gap */ public void reflectImage(NEffectPanel thePanel, int height, double opacity, int gap, boolean setUp) { DockPanel container; Widget w; SimplePanel gapPanel; Canvas v; w = getReflectedImage(thePanel, setUp); if (setUp) { v = new Canvas(); container = (DockPanel) thePanel.getPanelWidget(); // Remove from panel now as this may make any animations look much // smoother // If not, there is a danger on slow(er) systems that the reflection hangs // out from image until re-drawn. container.remove(WHERE_IS_REFLECTION); } else { container = new DockPanel(); v = new Canvas(); } gapPanel = new SimplePanel(); gapPanel.setWidth("100%"); gapPanel.add(new HTML(" ")); gapPanel.setHeight(gap + "px"); int imgWidth = w.getOffsetWidth(); int imgHeight = w.getOffsetHeight(); int canvasHeight = (int) ((imgHeight * height) / 100); v.setSize(imgWidth, canvasHeight); reflect(v.getElement(), w.getElement(), canvasHeight, opacity); if (setUp) { container.add(v, DockPanel.SOUTH); } else { container.add(w, DockPanel.NORTH); container.add(v, DockPanel.SOUTH); thePanel.add(container); } container.add(gapPanel, DockPanel.CENTER); }
From source file:org.apache.openjpa.trader.client.MatchWindow.java
License:Apache License
public MatchWindow(final OpenTrader session, final Tradable tradable, final List<Match> matches) { super(false, true); this.session = session; setAnimationEnabled(true);//from www.java2s. c om DockPanel panel = new DockPanel(); panel.setHorizontalAlignment(DockPanel.ALIGN_CENTER); final HTML header = new HTML(); final boolean ask = (tradable instanceof Ask); String txt = (matches.isEmpty() ? "No" : "" + matches.size()) + " matching " + (ask ? "Bid" : "Ask") + " for " + toString(tradable) + "<br>"; header.setHTML(txt); header.addStyleName("table-caption"); Button close = new Button(matches.isEmpty() ? "OK" : "Cancel"); close.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { hide(); } }); FlexTable body = new FlexTable(); final RadioButton[] buttons = new RadioButton[matches.size()]; if (!matches.isEmpty()) { for (int i = 0; i < matches.size(); i++) { Match match = matches.get(i); Tradable t2 = ask ? match.getBid() : match.getAsk(); Trader cpty = ask ? match.getBid().getBuyer() : match.getAsk().getSeller(); buttons[i] = new RadioButton("matches"); buttons[i].setValue(i == 0); body.setWidget(i, 0, buttons[i]); body.setWidget(i, 1, FormatUtil.formatPrice(t2.getPrice())); body.setWidget(i, 2, FormatUtil.formatVolume(t2.getVolume())); body.setText(i, 3, " by " + cpty.getName()); } Button act = new Button(ask ? "Sell" : "Buy"); act.setFocus(true); body.setWidget(matches.size() + 1, 1, act); act.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { for (int i = 0; i < buttons.length; i++) { if (buttons[i].getValue()) { Match match = matches.get(i); Tradable t = ask ? match.getAsk() : match.getBid(); session.getService().trade(match, new TradeCallback(t)); hide(true); } } } }); body.setWidget(matches.size() + 1, 2, close); } else { body.setWidget(0, 0, new HTML("<p>Open a new browser page and login with a different Trader name<br>" + "to create a matching " + (ask ? "Bid" : "Ask") + "<p>")); close.setFocus(true); body.setWidget(1, 0, close); body.getFlexCellFormatter().setAlignment(1, 0, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE); } panel.add(header, DockPanel.NORTH); panel.add(body, DockPanel.CENTER); setWidget(panel); }
From source file:org.apache.openjpa.trader.client.ui.MessageBox.java
License:Apache License
private MessageBox() { super(false, true); setAnimationEnabled(true);//from w ww .j av a2s . com DockPanel panel = new DockPanel(); panel.setStyleName("messageBox"); panel.setHorizontalAlignment(DockPanel.ALIGN_CENTER); header = new HTML(); header.addStyleName("messageBox-caption"); Button close = new Button("OK"); close.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { hide(); } }); close.setEnabled(true); close.setFocus(true); message = new Label(); message.addStyleName("messageBox-content"); panel.add(header, DockPanel.NORTH); panel.add(close, DockPanel.SOUTH); panel.add(message, DockPanel.CENTER); setWidget(panel); }
From source file:org.cruxframework.crux.widgets.client.slideshow.SlideshowBaseController.java
License:Apache License
/** * //from w w w . jav a 2 s . c om * @param component * @param direction */ public void addComponent(SlideshowComponent component, Position position) { if (!useLayout && photoPanel == null) { setPhotoPanel(); } DockLayoutConstant direction; switch (position) { case lineStart: direction = DockPanel.LINE_START; break; case lineEnd: direction = DockPanel.LINE_END; break; case east: direction = DockPanel.EAST; break; case north: direction = DockPanel.NORTH; break; case south: direction = DockPanel.SOUTH; break; case west: direction = DockPanel.WEST; break; case none: direction = null; break; default: direction = DockPanel.CENTER; break; } if (direction != null) { table.add(component, direction); } components.add(component); component.setSlideShow(this); }
From source file:org.drools.brms.client.common.DatePicker.java
License:Apache License
public DatePicker() { initWidget(outer);// www . j av a2 s. c o m grid.setStyleName("table"); grid.setCellSpacing(0); outer.add(navbar, DockPanel.NORTH); outer.add(grid, DockPanel.CENTER); drawCalendar(); setStyleName("DatePicker"); }
From source file:org.freemedsoftware.gwt.client.screen.MainScreen.java
License:Open Source License
public MainScreen() { final DockPanel mainPanel = new DockPanel(); initWidget(mainPanel);/*from w w w . j a va 2 s. com*/ mainPanel.setSize("100%", "100%"); // CurrentState.retrieveUserConfiguration(true); CurrentState.retrieveSystemConfiguration(true); // populateLeftNavigationPanel(); JsonUtil.debug("MainScreen: call populateDefaultProvider"); populateDefaultProvider(); JsonUtil.debug("MainScreen: call populateDefaultFacility"); JsonUtil.debug("MainScreen: assign object to CurrentState static object"); CurrentState.assignMainScreen(this); /* * Top Header panel to use top header shortcuts e.g logoff,add patient * etc */ VerticalPanel topHeaderPanel = new VerticalPanel(); topHeaderPanel.ensureDebugId("topHeaderPanel"); topHeaderPanel.setStyleName(AppConstants.STYLE_HEADER_PANEL); topHeaderPanel.setWidth("100%"); Image logoImage = new Image(); logoImage.setUrl("resources/images/FreemedHeader.jpg"); logoImage.setSize("100%", "55px"); topHeaderPanel.add(logoImage); topHeaderPanel.setCellHorizontalAlignment(logoImage, HasHorizontalAlignment.ALIGN_CENTER); topHeaderPanel.setCellWidth(logoImage, "100%"); HorizontalPanel topHeaderHorPanel = new HorizontalPanel(); topHeaderHorPanel.setWidth("100%"); HorizontalPanel facilityInfoPanel = new HorizontalPanel(); facilityInfoPanel.setStyleName(AppConstants.STYLE_HEADER_PANEL); // adding userInfoPanel at top left HorizontalPanel userInfoPanel = new HorizontalPanel(); userInfoPanel.setStyleName(AppConstants.STYLE_HEADER_PANEL); Image userImage = new Image(); userImage.setUrl("resources/images/user-icon.png"); userImage.setSize("13px", "100%"); userInfoPanel.add(userImage); userInfoPanel.add(loginUserInfo);// Adding loginuserinfo link setLoginUserInfo(); // Adding UserInfoPanel into top headerhorpanel HorizontalPanel hp = new HorizontalPanel(); Image homeImage = new Image(); homeImage.setUrl("resources/images/home-icon.png"); homeImage.setSize("15px", "100%"); facilityInfoPanel.add(homeImage); facilityInfoPanel.add(facilityInfo); HTML separator = new HTML("|"); separator.setWidth("8px"); separator.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); hp.add(userInfoPanel); hp.add(separator); hp.add(facilityInfoPanel); // Adding UserInfoPanel into top headerhorpanel topHeaderHorPanel.add(hp); topHeaderHorPanel.setCellHorizontalAlignment(hp, HasHorizontalAlignment.ALIGN_LEFT); topHeaderHorPanel.setCellHorizontalAlignment(facilityInfoPanel, HasHorizontalAlignment.ALIGN_LEFT); // topHeaderHorPanel.setCellWidth(facilityInfoPanel, "20%"); // adding shortcuts panel at top right corder shortCutsPanel = new HorizontalPanel(); // Adding shortCutsPanel into top header topHeaderHorPanel.add(shortCutsPanel); topHeaderHorPanel.setCellHorizontalAlignment(shortCutsPanel, HasHorizontalAlignment.ALIGN_RIGHT); // Adding tophorpanel into top topheaderpanel topHeaderPanel.add(topHeaderHorPanel); topHeaderPanel.setCellWidth(topHeaderHorPanel, "100%"); // Adding top header to main panel mainPanel.add(topHeaderPanel, DockPanel.NORTH); mainPanel.setCellWidth(topHeaderPanel, "100%"); mainPanel.setCellHeight(topHeaderPanel, "3%"); /* * SimplePanel to hold (hopefully) a horizontal sub menu, going to try * to use the Menu Bar items to call each sub-menu -JA */ JsonUtil.debug("MainScreen: create accordion panel"); // Creating Left Navigation area with decorated stack panel stackPanel = new AccordionPanel(); stackPanel.setWidth("100%"); // stackPanel.setHeight("100%"); { JsonUtil.debug("MainScreen: add main pane"); mainAccPanel = new VerticalPanel(); mainAccPanel.setStyleName("accordion-panel"); mainAccPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); // adding Main Panel(System) into stack panel // stackPanel.add(mainAccPanel, // getHeaderString(AppConstants.SYSTEM_CATEGORY, null), true); JsonUtil.debug("MainScreen: add patient pane"); patientAccPanel = new VerticalPanel(); patientAccPanel.setStyleName("accordion-panel"); patientAccPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); // adding Patient Panel into stack panel // stackPanel.add(patientAccPanel, // getHeaderString(AppConstants.PATIENT_CATEGORY, null), true); JsonUtil.debug("MainScreen: add document pane"); documentAccPanel = new VerticalPanel(); documentAccPanel.setStyleName("accordion-panel"); documentAccPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); // adding Documents Panel into stack panel // stackPanel.add(documentAccPanel, // getHeaderString(AppConstants.DOCUMENTS_CATEGORY, null), true); JsonUtil.debug("MainScreen: add Billing pane"); billingAccPanel = new VerticalPanel(); billingAccPanel.setStyleName("accordion-panel"); billingAccPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); // adding Billing Panel into stack panel // stackPanel.add(billingAccPanel, // getHeaderString(AppConstants.BILLING_CATEGORY, null), true); JsonUtil.debug("MainScreen: add Reporting pane"); reportingAccPanel = new VerticalPanel(); reportingAccPanel.setStyleName("accordion-panel"); reportingAccPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); // adding Reporting Panel into stack panel // stackPanel.add(reportingAccPanel, // getHeaderString(AppConstants.REPORTING_CATEGORY, null), true); JsonUtil.debug("MainScreen: add utilities pane"); utilitiesAccPanel = new VerticalPanel(); utilitiesAccPanel.setStyleName("accordion-panel"); utilitiesAccPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); // adding Utilities Panel into stack panel // stackPanel.add(utilitiesAccPanel, // getHeaderString(AppConstants.UTILITIES_CATEGORY, null), true); // Disable for now // accordionPanel.selectPanel("Main"); } JsonUtil.debug("MainScreen: create container hpanel for accordion and tabs"); HorizontalPanel menuAndContent = new HorizontalPanel(); menuAndContent.setSize("100%", "100%"); // Jam them together, no space. menuAndContent.setSpacing(0); // menuAndContent.setCellWidth(accordionPanel, "250px"); JsonUtil.debug("MainScreen: add accordion and tab panel to container"); menuAndContent.add(stackPanel); stackPanel.ensureDebugId("cwStackPanel"); // defining left navigation area width menuAndContent.setCellWidth(stackPanel, "12%"); JsonUtil.debug("MainScreen: create tabPanel"); tabPanel = new DecoratedTabPanel(); tabPanel.setSize("100%", "100%"); tabPanel.setAnimationEnabled(true); menuAndContent.add(tabPanel); // defining content area width menuAndContent.setCellWidth(tabPanel, "88%"); menuAndContent.setCellHorizontalAlignment(tabPanel, HasHorizontalAlignment.ALIGN_LEFT); JsonUtil.debug("MainScreen: add container to dock panel"); mainPanel.add(menuAndContent, DockPanel.CENTER); JsonUtil.debug("MainScreen: add dashboard panel to tabs and select"); // tabPanel.add(dashboard, "Dashboard"); tabPanel.add(dashboardScreenNew, "Dashboard"); tabPanel.selectTab(0); JsonUtil.debug("MainScreen: pass tabPanel to static CurrentState"); CurrentState.assignTabPanel(tabPanel); // Get configuration CurrentState.retrieveUserConfiguration(true, new Command() { public void execute() { JsonUtil.debug("MainScreen: Set State of dashboard"); dashboardScreenNew.loadWidgets(); dashboardScreenNew.reloadDashboard(); } }); // Expand out main tabpanel to take up all extra room JsonUtil.debug("MainScreen: expand tabpanel"); // mainPanel.setCellWidth(tabPanel, "100%"); // mainPanel.setCellHeight(tabPanel, "100%"); final HTML poweredByLabel = new HTML(_("Powered By FreeMED™")); poweredByLabel.setStyleName(AppConstants.STYLE_LABEL_SMALL); mainPanel.add(poweredByLabel, DockPanel.SOUTH); mainPanel.setCellHorizontalAlignment(poweredByLabel, HasHorizontalAlignment.ALIGN_CENTER); JsonUtil.debug("MainScreen: split panel"); statusBarContainer = new HorizontalSplitPanel(); mainPanel.add(statusBarContainer, DockPanel.SOUTH); statusBarContainer.setSize("100%", "30px"); statusBarContainer.setSplitPosition("50%"); JsonUtil.debug("MainScreen: status bar"); statusBar1 = new Label(_("Ready")); statusBar1.setStyleName("statusBar"); statusBarContainer.add(statusBar1); CurrentState.assignStatusBar(statusBar1); statusBar2 = new Label("-"); statusBar2.setStyleName("statusBar"); statusBarContainer.add(statusBar2); if (Util.isStubbedMode()) { statusBar2.setText("STUBBED / TEST MODE"); } populateDefaultFacility(); // Create notification toaster JsonUtil.debug("MainScreen: create toaster"); if (CurrentState.getToaster() == null) { Toaster toaster = new Toaster(); CurrentState.assignToaster(toaster); toaster.setTimeout(7); } // Handle system notifications // notifications.setState(getCurrentState()); JsonUtil.debug("MainScreen: start notifications"); notifications.start(); if (Util.getProgramMode() == ProgramMode.STUBBED) initNavigations(); tabPanel.addSelectionHandler(new SelectionHandler<Integer>() { @Override public void onSelection(SelectionEvent<Integer> arg0) { if (tabPanel.getWidget(arg0.getSelectedItem()) instanceof ScreenInterface) { ScreenInterface screenInterface = ((ScreenInterface) tabPanel .getWidget(arg0.getSelectedItem())); String className = screenInterface.getClass().getName(); className = className.substring(className.lastIndexOf('.') + 1); CurrentState.assignCurrentPageHelp(className); } } }); // Force showing the screen // show(); }
From source file:org.freemedsoftware.gwt.client.widget.SchedulerWidget.java
License:Open Source License
public SchedulerWidget() { super(moduleName); ////////////Applying stored configurations//////////////// int startHour = 10; int endHour = 18; int intervalsPerHour = 4; show24HourClock = false;/*from w w w . j a v a2 s. c o m*/ int intervalHeight = 50; if (Util.getProgramMode() == ProgramMode.JSONRPC) { startHour = CurrentState.getSystemConfig("calshr") != null ? Integer.parseInt(CurrentState.getSystemConfig("calshr")) : startHour; endHour = CurrentState.getSystemConfig("calehr") != null ? Integer.parseInt(CurrentState.getSystemConfig("calehr")) : endHour; intervalsPerHour = CurrentState.getSystemConfig("calinterval") != null ? (60 / Integer.parseInt(CurrentState.getSystemConfig("calinterval"))) : intervalsPerHour; intervalHeight = CurrentState.getSystemConfig("calintervalheight") != null ? Integer.parseInt(CurrentState.getSystemConfig("calintervalheight")) : intervalHeight; show24HourClock = CurrentState.getSystemConfig("calshow24hourclock") != null ? (Integer.parseInt(CurrentState.getSystemConfig("calshow24hourclock")) == 1) : show24HourClock; } StringPanelRenderer panelRenderer = new StringPanelRenderer(); panelRenderer.setStartHour(startHour); panelRenderer.setEndHour(endHour); panelRenderer.setIntervalsPerHour(intervalsPerHour); panelRenderer.setShow24HourClock(show24HourClock); panelRenderer.setIntervalHeight(intervalHeight); ////////////End configurations//////////////// filterModulesAndMethods.put("ProviderModule", "GetDailyAppointmentsRange"); filterModulesAndMethods.put("ProviderGroups", "GetDailyAppointmentsRangeByProviderGroup"); SELECTED_MODULE = "ProviderModule"; eventCacheController = new EventCacheController(); multiPanel = new MultiView(eventCacheController, panelRenderer); panel.setWidth("100%"); final HorizontalPanel loadingContainer = new HorizontalPanel(); loadingContainer.add(new Image("resources/images/loading.gif")); loadingContainer.add(new HTML("<h3>" + "Loading" + "</h3>")); loadingDialog.setStylePrimaryName(SchedulerCss.EVENT_DIALOG); loadingDialog.setWidget(loadingContainer); loadingDialog.hide(); final VerticalPanel headerArea = new VerticalPanel(); headerArea.setWidth("100%"); final HorizontalPanel fields = new HorizontalPanel(); fields.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); fields.setWidth("100%"); headerArea.add(fields); panel.add(headerArea, DockPanel.NORTH); /* * fields.add(label); fields.setCellHeight(label, "50%"); */ final HorizontalPanel filterPanel = new HorizontalPanel(); fields.add(filterPanel); // fields.setCellWidth(filterPanel, "50%"); Label selectFilterLabel = new Label(_("Filter by") + " :"); selectFilterLabel.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD); filterPanel.add(selectFilterLabel); final CustomListBox selectFilter = new CustomListBox(); selectFilter.addItem(_("Provider"), "ProviderModule"); selectFilter.addItem(_("Provider Groups"), "ProviderGroups"); selectFilter.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent arg0) { SELECTED_MODULE = selectFilter.getStoredValue(); filterModule.setModuleName(SELECTED_MODULE); filterModule.setValue(0); } }); filterPanel.add(selectFilter); filterModule.setModuleName("ProviderModule"); filterModule.setWidth("300px"); filterModule.addValueChangeHandler(new ValueChangeHandler<Integer>() { @Override public void onValueChange(ValueChangeEvent<Integer> event) { Integer val = ((SupportModuleWidget) event.getSource()).getValue(); // Log.debug("Patient value = " + val.toString()); try { if (val.compareTo(new Integer(0)) != 0) { multiPanel.clearData(); eventCacheController.getEventsForRange(multiPanel.getCurrent().getFirstDateLogical(), multiPanel.getCurrent().getLastDateLogical(), val, filterModulesAndMethods.get(SELECTED_MODULE), multiPanel, true); } } catch (Exception e) { // Don't do anything if no patient is declared GWT.log("Caught exception", e); } } }); filterPanel.add(filterModule); CustomButton clearButton = new CustomButton(_("Clear"), AppConstants.ICON_CLEAR); clearButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { filterModule.setValue(0); eventCacheController.getEventsForRange(multiPanel.getCurrent().getFirstDateLogical(), multiPanel.getCurrent().getLastDateLogical(), multiPanel, true); } }); filterPanel.add(clearButton); final HorizontalPanel fields2Panel = new HorizontalPanel(); fields2Panel.setSpacing(5); CustomButton showPicker = new CustomButton(_("Jump")); fields2Panel.add(showPicker); if (CurrentState.isActionAllowed(blockSlotsModuleName, AppConstants.SHOW)) { CustomButton showBlockSlots = new CustomButton(_("Block Slots")); showBlockSlots.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { BlockTimeSlotPopup blockTimeSlotPopup = new BlockTimeSlotPopup(); blockTimeSlotPopup.show(); blockTimeSlotPopup.center(); } }); fields2Panel.add(showBlockSlots); } headerArea.add(fields2Panel); final VerticalPanel posPanel = new VerticalPanel(); posPanel.setVisible(false); posPanel.setWidth("100%"); HorizontalPanel pickerHolder = new HorizontalPanel(); pickerHolder.add(posPanel); pickerHolder.add(multiPanel); showPicker.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { posPanel.setVisible(!posPanel.isVisible()); if (posPanel.isVisible()) multiPanel.setPixelSize((Window.getClientWidth() * 78) / 100, (Window.getClientHeight() * 70) / 100); else multiPanel.setPixelSize((Window.getClientWidth() * 87) / 100, (Window.getClientHeight() * 70) / 100); } }); HTML space = new HTML(""); posPanel.add(space); space.setHeight("40px"); posPanel.add(navigator); // navigator.setVisible(false); // pickerHolder.setCellWidth(posPanel, "200px"); pickerHolder.setVerticalAlignment(VerticalPanel.ALIGN_TOP); pickerHolder.setCellWidth(multiPanel, "100%"); multiPanel.setWidth("100%"); multiPanel.setPixelSize((Window.getClientWidth() * 87) / 100, (Window.getClientHeight() * 300) / 100); // posPanel.setWidth("200px"); panel.add(pickerHolder, DockPanel.CENTER); pickerHolder.setWidth("100%"); onWindowResized(-1, Window.getClientHeight()); panel.setStyleName("whiteForDemo"); multiPanel.addDateListener(this); navigator.addDateListener(this); Window.addResizeHandler(this); multiPanel.scrollToHour(7); initWidget(panel); }
From source file:org.gems.ajax.client.figures.GPanel.java
License:Open Source License
/** * Subclasses that want to change how the header is constructed should * override this method.//from ww w . j a v a 2 s . co m */ protected void createHeaderPanel() { headerPanel_ = new HorizontalPanel(); headerPanel_.setStylePrimaryName(HEADER_PANEL_CONTAINER_STYLE); contentPanel_.add(headerPanel_, DockPanel.NORTH); headerLeftCorner_ = new SimplePanel(); headerLeftCorner_.setStylePrimaryName(HEADER_PANEL_LEFT_CORNER_STYLE); headerPanel_.add(headerLeftCorner_); titleContainer_ = new SimplePanel(); titleContainer_.setStylePrimaryName(HEADER_PANEL_STYLE); titleContainer_.add(titleLabel_); titleLabel_ = new Label("foo", false); titleLabel_.setStylePrimaryName(HEADER_PANEL_TITLE_STYLE); titleContainer_.add(titleLabel_); headerPanel_.add(titleContainer_); headerCenter_ = new SimplePanel(); headerCenter_.setStylePrimaryName(HEADER_PANEL_STYLE); headerPanel_.add(headerCenter_); headerPanel_.setCellWidth(headerCenter_, "100%"); toolBar_ = new HorizontalPanel(); toolBar_.setStylePrimaryName(HEADER_PANEL_TOOLBAR_STYLE); headerPanel_.add(toolBar_); headerRightCorner_ = new SimplePanel(); headerRightCorner_.setStylePrimaryName(HEADER_PANEL_RIGHT_CORNER_STYLE); headerPanel_.add(headerRightCorner_); }
From source file:org.gwm.client.tools.DebugWindow.java
License:Apache License
public DebugWindow() { frame = new DefaultGFrame("Debug Window"); this.dock = new DockPanel(); this.panel = new VerticalPanel(); this.clearLog = new Button("Clear window", new ClickListener() { public void onClick(Widget w) { clearPanel();// w ww . ja v a 2s.c om } }); this.clearLog.addStyleName("gwm_DebugWindow-ClearLogButton"); this.dock.addStyleName("gwm-DebugWindow"); this.dock.add(clearLog, DockPanel.NORTH); this.dock.add(panel, DockPanel.CENTER); this.dock.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); this.dock.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP); this.dock.setCellHorizontalAlignment(clearLog, HasHorizontalAlignment.ALIGN_CENTER); this.dock.setCellVerticalAlignment(clearLog, HasVerticalAlignment.ALIGN_TOP); frame.setContent(this.dock); }
From source file:org.gwm.splice.client.window.AbstractWindow.java
License:Apache License
public void show(int x, int y, boolean modal) { if (useWindowManager) { // do this now in case window manager needs to change name (e.g. "my window (2)") // or set default theme DesktopManager.getInstance().getWindowManager().addWindow(this); }// w w w .ja v a 2 s .com if (_theme != null) { super.setTheme(_theme); } setCaption(name); if ((x < 0 || y < 0) && !modal) { GwmUtilities.diplayAtScreenCenter(this); } else { setLocation(y, x); } if (this.url != null) { super.setUrl(url); if (modal) { super.showModal(); } else { setVisible(true); } return; } panel.setHeight("100%"); panel.setWidth("100%"); panel.add(toolbar, DockPanel.NORTH); panel.setCellHeight(toolbar, "26px"); panel.add(widget, DockPanel.CENTER); panel.setCellVerticalAlignment(widget, VerticalPanel.ALIGN_TOP); panel.setCellHeight(widget, "100%"); panel.add(controlbar, DockPanel.SOUTH); panel.setCellHeight(controlbar, "32px"); panel.setCellHorizontalAlignment(controlbar, HorizontalPanel.ALIGN_CENTER); panel.setCellVerticalAlignment(controlbar, VerticalPanel.ALIGN_MIDDLE); panel.setHeight("100%"); showToolbar(_showToolbar); showControlbar(_showControlbar); toolbar.addListener(this); super.setContent(panel); if (modal) { super.showModal(); } else { setVisible(true); } }