List of usage examples for com.google.gwt.user.client.ui DockPanel SOUTH
DockLayoutConstant SOUTH
To view the source code for com.google.gwt.user.client.ui DockPanel SOUTH.
Click Source Link
From source file:edu.caltech.ipac.firefly.visualize.graph.XYGraphWidget.java
public void makeNewChart() { if (_gcOverview != null) { _panel.remove(_gcOverview);/*from w ww . j a v a 2 s . c om*/ } if (_gcZoom != null) { _panel.remove(_gcZoom); } dummyChart(); zoomChart(); _panel.add(_gcOverview, DockPanel.CENTER); _panel.add(_gcZoom, DockPanel.SOUTH); }
From source file:edu.kit.ipd.sonar.client.NormalScreen.java
License:Open Source License
/** * Creates a new NormalScreen object./*from ww w . j ava 2 s . c o m*/ * * Registers itself with the event bus. */ public NormalScreen() { dockpanel.setHeight("100%"); dockpanel.setWidth("100%"); initWidget(dockpanel); GraphView graphview = new GraphView(); Label banner = new Label(); banner.setStyleName("banner"); Timeline timeline = new Timeline(); timeline.setWidth("100%"); timeline.getElement().setClassName("timeslider"); Menu menu = new Menu(timeline); dockpanel.add(banner, DockPanel.NORTH); dockpanel.setCellHeight(banner, "1px"); dockpanel.add(timeline, DockPanel.SOUTH); dockpanel.setCellHeight(timeline, "70px"); dockpanel.add(menu, DockPanel.WEST); dockpanel.setCellWidth(menu, "1px"); dockpanel.add(graphview, DockPanel.CENTER); GWT.log("NormalScreen created", null); }
From source file:edu.umb.jsVGL.client.VGL.CageUI.java
License:Open Source License
/** * This method sets up the panels for the Cage */// w ww .j a va 2 s . c o m private void setupOrganismPanel() { superPanel = new DockPanel(); DockPanel detailsPanel = new DockPanel(); final CaptionPanel captionedDetailsPanel; if (id > 1) { captionedDetailsPanel = new CaptionPanel("Offspring"); captionedDetailsPanel.add(detailsPanel); captionedDetailsPanel.setStyleName("jsVGL_RegularDetailsPanel"); } else { captionedDetailsPanel = new CaptionPanel("Organisms Collected From the Wild"); captionedDetailsPanel.add(detailsPanel); captionedDetailsPanel.setStyleName("jsVGL_FieldPopDetailsPanel"); } HorizontalPanel individualPanel = new HorizontalPanel(); CaptionPanel captionedOrganismPanel = new CaptionPanel("Organisms"); captionedOrganismPanel.setStyleName("jsVGL_CageInfoSubPanels"); VerticalPanel organismsPanel = new VerticalPanel(); captionedOrganismPanel.add(organismsPanel); CaptionPanel captionedCountsPanel = new CaptionPanel("Counts"); captionedCountsPanel.setStyleName("jsVGL_CageInfoSubPanels"); VerticalPanel countsPanel = new VerticalPanel(); captionedCountsPanel.add(countsPanel); // headers for the different traits CaptionPanel[] captionedTraitPanels = new CaptionPanel[numberOfTraits]; VerticalPanel[] traitPanels = new VerticalPanel[numberOfTraits]; // need to get the type of each trait // get one organism's pheno (it doesn't matter which one) ArrayList<Phenotype> phenotypes = childrenSortedByPhenotype[0].get(0).getPhenotypes(); for (int i = 0; i < numberOfTraits; i++) { traitPanels[i] = new VerticalPanel(); captionedTraitPanels[i] = new CaptionPanel( phenotypes.get(scrambledTraitOrder[i]).getTrait().getBodyPart()); captionedTraitPanels[i].setStyleName("jsVGL_CageInfoSubPanels"); captionedTraitPanels[i].add(traitPanels[i]); } if (isSuperCross) { childrenOrganismUIs = new OrganismUI[2 * numPhenosPresent][absoluteMaxOrgsPerRow]; } else { childrenOrganismUIs = new OrganismUI[2 * numPhenosPresent][maxOrgsInOneRow]; } //For each phenotype, setup its own panels for organismUIs,count and //pictures and add them to the right places in the organismpanel, // countspanel, phenotype panels //and the picturespanel for (int i = 0; i < numPhenosPresent; i++) { IndividualPanelSet panelSet = setupIndividualPanel(i); organismsPanel.add(panelSet.getOrganismPanel()); countsPanel.add(panelSet.getCountsPanel()); HorizontalPanel[] phenoPanels = panelSet.getPhenotypePanels(); for (int j = 0; j < numberOfTraits; j++) { traitPanels[j].add(phenoPanels[scrambledTraitOrder[j]]); } } for (int i = 0; i < numberOfTraits; i++) { individualPanel.add(captionedTraitPanels[i]); } individualPanel.add(captionedOrganismPanel); individualPanel.add(captionedCountsPanel); detailsPanel.add(individualPanel, DockPanel.NORTH); superPanel.add(captionedDetailsPanel, DockPanel.SOUTH); final CaptionPanel captionedParentInfoPanel = setupParentInfoPanel(); HorizontalPanel collapseExpandPanel = new HorizontalPanel(); collapseExpandPanel.setStyleName("jsVGL_CollapseExpandPanel"); final Button collapseExpandButton = new Button("Minimize"); collapseExpandButton.setStyleName("jsVGL_CollapseExpandButton"); collapseExpandButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (isMinimized) { collapseExpandButton.setText("Minimize"); isMinimized = false; superPanel.add(captionedDetailsPanel, DockPanel.SOUTH); if (id > 1) superPanel.add(captionedParentInfoPanel, DockPanel.NORTH); } else { collapseExpandButton.setText("Maximize"); isMinimized = true; superPanel.remove(captionedDetailsPanel); if (id > 1) superPanel.remove(captionedParentInfoPanel); } } }); collapseExpandPanel.add(collapseExpandButton); superPanel.add(collapseExpandPanel, DockPanel.NORTH); if (captionedParentInfoPanel != null) { superPanel.add(captionedParentInfoPanel, DockPanel.NORTH); } }
From source file:eu.nextstreet.gwt.components.client.ui.widget.suggest.multi.impl.MultiChoiceSuggestBox.java
License:Apache License
/** * Sets the widget at position//from ww w .j a va 2s .c o m * * @param position * position * @param widget * widget maybe null to remove widget */ protected void setPanelAt(DockPanel.DockLayoutConstant position, IsWidget widget) { if (position == DockPanel.WEST) textField.setLeftWidget(widget); else if (position == DockPanel.EAST) textField.setRightWidget(widget); else if (position == DockPanel.NORTH) textField.setTopWidget(widget); else if (position == DockPanel.SOUTH) textField.setBottomWidget(widget); }
From source file:eu.riscoss.client.report.ReportModule.java
License:Apache License
protected void showResults(JSONObject object) { page.clear();/*from w w w. ja v a2s .com*/ if (dock != null) { while (dock.getWidgetCount() > 0) { dock.remove(dock.getWidget(0)); } dock.removeFromParent(); dock = new DockPanel(); } if (object.get("results") == null) return; JSONArray response = object.get("results").isArray(); // Window.alert( "2: " + response ); RiskAnalysisReport report = new RiskAnalysisReport(); report.showResults(null, response, object.isObject().get("argumentation")); DisclosurePanel dp = new DisclosurePanel("Input values used for this evaluation"); JSONArray inputs = getArray(object, "inputs"); Grid inputgrid = new Grid(inputs.size(), 2); for (int i = 0; i < inputs.size(); i++) { JSONObject o = inputs.get(i).isObject(); // Window.alert( "" + o ); inputgrid.setWidget(i, 0, new Label(o.get("id").isString().stringValue())); inputgrid.setWidget(i, 1, new Label(o.get("value").isString().stringValue())); } dp.setContent(inputgrid); Anchor a = new Anchor("Change input values..."); a.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (inputForm != null) inputForm.show(new Callback<JSONObject>() { @Override public void onError(Throwable t) { Window.alert(t.getMessage()); } @Override public void onDone(JSONObject o) { startAnalysisWorkflow(EAnalysisOption.RunThrough, o); } }); } }); dock.setSize("100%", "100%"); // grid.setSize( "100%", "100%" ); dock.add( new HTML("<h1>" + "Risk analysis report of " + object.get("info").isObject().get("entity").isString().stringValue() + "</h1>"), DockPanel.NORTH); dock.add(report, DockPanel.CENTER); dock.add(a, DockPanel.NORTH); dock.add(dp, DockPanel.SOUTH); mainView.setStyleName("mainViewLayer"); mainView.setWidth("100%"); page.setWidth("100%"); Label title = new Label( "Risk analysis report of " + object.get("info").isObject().get("entity").isString().stringValue()); title.setStyleName("title"); page.add(title); a.setStyleName("leftPanel"); page.add(a); //report.setStyleName("leftPanel"); page.add(report); dp.setStyleName("leftPanel"); page.add(dp); //RootPanel.get().add( dock ); RootPanel.get().add(page); }
From source file:eu.riscoss.client.riskanalysis.Wizard.java
License:Apache License
public Wizard() { btnPrev = new Button("Back"); btnPrev.addClickHandler(new ClickHandler() { @Override//from w w w. j a v a 2 s .c o m public void onClick(ClickEvent event) { setSelectedIndex(getSelectedIndex() - 1); } }); bottomPanel.add(btnPrev); btnNext = new Button("Next"); btnNext.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { setSelectedIndex(getSelectedIndex() + 1); } }); bottomPanel.add(btnNext); bottomPanel.setCellHorizontalAlignment(btnNext, HorizontalPanel.ALIGN_RIGHT); dock.add(bottomPanel, DockPanel.SOUTH); dock.add(panel, DockPanel.CENTER); }
From source file:eu.riscoss.client.riskconfs.ModelSelectionDialog.java
License:Apache License
public void show(Callback<List<String>> cb) { this.callback = cb; RiscossJsonClient.listModels(new JsonCallback() { @Override//from ww w . ja v a 2 s .co m public void onFailure(Method method, Throwable exception) { Window.alert(exception.getMessage()); } @Override public void onSuccess(Method method, JSONValue response) { JsonModelList list = new JsonModelList(response); dialog = new DialogBox(true, true); //, new HtmlCaption( "Add model" ) ); dialog.setText("Model Selection"); Grid grid = new Grid(); grid.resize(list.getModelCount(), 1); for (int i = 0; i < list.getModelCount(); i++) { ModelInfo info = list.getModelInfo(i); CheckBox chk = new CheckBox(info.getName()); chk.setName(info.getName()); chk.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { CheckBox chk = (CheckBox) event.getSource(); boolean value = chk.getValue(); if (value == true) { selection.add(chk.getName()); } else { selection.remove(chk.getName()); } } }); grid.setWidget(i, 0, chk); } DockPanel dock = new DockPanel(); dock.add(grid, DockPanel.CENTER); Button ok = new Button("Ok", new ClickHandler() { @Override public void onClick(ClickEvent event) { dialog.hide(); if (callback != null) { callback.onDone(new ArrayList<String>(selection)); } } }); Button cancel = new Button("Cancel", new ClickHandler() { @Override public void onClick(ClickEvent event) { dialog.hide(); } }); ok.setStyleName("deleteButton"); cancel.setStyleName("deleteButton"); HorizontalPanel buttons = new HorizontalPanel(); buttons.add(ok); buttons.add(cancel); dock.add(buttons, DockPanel.SOUTH); dialog.add(dock); dialog.getElement().getStyle().setZIndex(Integer.MAX_VALUE); dialog.show(); } }); }
From source file:eu.riscoss.client.riskconfs.ModelSelectionDialog.java
License:Apache License
public void show(String l, SimpleRiskCconf rconf, Callback<List<String>> cb) { this.callback = cb; this.rc = rconf; this.layer = l; RiscossJsonClient.listModels(new JsonCallback() { @Override/*from w w w. ja v a 2 s .c o m*/ public void onFailure(Method method, Throwable exception) { Window.alert(exception.getMessage()); } @Override public void onSuccess(Method method, JSONValue response) { JsonModelList list = new JsonModelList(response); List<String> l = rc.getModelList(layer); dialog = new DialogBox(true, true); //, new HtmlCaption( "Add model" ) ); dialog.setText("Model Selection"); Grid grid = new Grid(); grid.resize(list.getModelCount(), 1); for (int i = 0; i < list.getModelCount(); i++) { ModelInfo info = list.getModelInfo(i); CheckBox chk = new CheckBox(info.getName()); chk.setName(info.getName()); chk.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { CheckBox chk = (CheckBox) event.getSource(); boolean value = chk.getValue(); if (value == true) { selection.add(chk.getName()); } else { selection.remove(chk.getName()); } } }); if (l.contains(info.getName())) { chk.setChecked(true); selection.add(chk.getName()); } grid.setWidget(i, 0, chk); } DockPanel dock = new DockPanel(); dock.add(grid, DockPanel.CENTER); Button ok = new Button("Ok", new ClickHandler() { @Override public void onClick(ClickEvent event) { dialog.hide(); if (callback != null) { callback.onDone(new ArrayList<String>(selection)); } } }); Button cancel = new Button("Cancel", new ClickHandler() { @Override public void onClick(ClickEvent event) { dialog.hide(); } }); ok.setStyleName("deleteButton"); cancel.setStyleName("deleteButton"); HorizontalPanel buttons = new HorizontalPanel(); buttons.add(ok); buttons.add(cancel); dock.add(buttons, DockPanel.SOUTH); dialog.add(dock); dialog.getElement().getStyle().setZIndex(Integer.MAX_VALUE); dialog.show(); } }); }
From source file:eu.riscoss.client.riskconfs.NewModelDialog.java
License:Apache License
public void show(String rcName) { // this.callback = cb; this.selectedRC = rcName; RiscossJsonClient.listModels(new JsonCallback() { @Override//from ww w . ja v a2s. c om public void onFailure(Method method, Throwable exception) { Window.alert(exception.getMessage()); } @Override public void onSuccess(Method method, JSONValue response) { JsonModelList list = new JsonModelList(response); dialog = new DialogBox(true, true); //, new HtmlCaption( "Add model" ) ); Grid grid = new Grid(); grid.resize(list.getModelCount(), 1); for (int i = 0; i < list.getModelCount(); i++) { ModelInfo info = list.getModelInfo(i); CheckBox chk = new CheckBox(info.getName()); chk.setName(info.getName()); chk.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { CheckBox chk = (CheckBox) event.getSource(); boolean value = chk.getValue(); if (value == true) { selection.add(chk.getName()); } else { selection.remove(chk.getName()); } } }); grid.setWidget(i, 0, chk); } DockPanel dock = new DockPanel(); dock.add(grid, DockPanel.CENTER); dock.add(new Button("Ok", new ClickHandler() { @Override public void onClick(ClickEvent event) { // SimpleRiskCconf rc = new SimpleRiskCconf( selection ); // RiscossJsonClient.setRCContent( selectedRC, rc, new JsonCallback() { // // @Override // public void onSuccess(Method method, JSONValue response) { // dialog.hide(); //// if( callback != null ) { //// callback.onDone( null ); //// } // } // // @Override // public void onFailure(Method method, Throwable exception) { // Window.alert( exception.getMessage() ); // } // }); } }), DockPanel.SOUTH); dialog.add(dock); dialog.show(); } }); }
From source file:fr.aliasource.webmail.client.composer.MailComposer.java
License:GNU General Public License
public MailComposer(View ui) { this.ui = ui; setWidth("100%"); northActions = new ComposerActions(ui, this); add(northActions, DockPanel.NORTH);/* w ww. jav a 2 s . c o m*/ setCellHorizontalAlignment(northActions, DockPanel.ALIGN_LEFT); enveloppe = new VerticalPanel(); enveloppeActions = new HorizontalPanel(); to = new RecipientsPanel(ui, I18N.strings.to() + ": "); cc = new RecipientsPanel(ui, I18N.strings.cc() + ": "); bcc = new RecipientsPanel(ui, I18N.strings.bcc() + ": "); subject = new SubjectField(ui); if (WebmailController.get().getSetting("identities/nb_identities") != null) { if (identities == null && WebmailController.get().hasIdentities()) { identities = new IdentitiesPanel(); enveloppe.add(identities); } } attach = new AttachmentsPanel(); // crp = new CannedResponsePanel(ui, this); enveloppe.add(to); enveloppe.add(cc); cc.setVisible(false); enveloppe.add(bcc); bcc.setVisible(false); enveloppe.add(enveloppeActions); enveloppe.add(subject); // enveloppe.add(crp); enveloppe.add(attach); HorizontalPanel sendParams = new HorizontalPanel(); sendParams.add(new Label()); highPriority = new CheckBox(I18N.strings.importantMessage()); sendParams.add(highPriority); askForDispositionNotification = new CheckBox(I18N.strings.askForDispositionNotification()); sendParams.add(askForDispositionNotification); enveloppe.add(sendParams); sendParams.setCellVerticalAlignment(highPriority, HasVerticalAlignment.ALIGN_MIDDLE); highPriority.setStyleName("enveloppeField"); enveloppe.setStyleName("enveloppe"); createEnveloppeActions(); add(enveloppe, DockPanel.NORTH); VerticalPanel vp = createBodyEditor(ui); add(vp, DockPanel.CENTER); southActions = new ComposerActions(ui, this); add(southActions, DockPanel.SOUTH); setCellHorizontalAlignment(southActions, DockPanel.ALIGN_LEFT); attach.registerUploadListener(northActions); attach.registerUploadListener(southActions); addTabPanelListener(); focusTo(); setTimerStarted(false); setEnableSaveButtons(false); addWindowResizeHandler(); }