List of usage examples for com.google.gwt.user.client.ui HTMLPanel HTMLPanel
private HTMLPanel(Element elem)
From source file:com.xpn.xwiki.watch.client.ui.dialog.PressReviewMailDialog.java
License:Open Source License
public PressReviewMailDialog(Watch watch, String dialogName, int buttonModes) { super(watch, dialogName, buttonModes); FlowPanel main = new FlowPanel(); main.addStyleName(getCSSName("main")); HTMLPanel invitationPanel = new HTMLPanel(app.getTranslation(getDialogTranslationName() + ".invitation")); invitationPanel.addStyleName(getCssPrefix() + "-invitation"); main.add(invitationPanel);// ww w.java 2s . c o m main.add(getParametersPanel()); main.add(getActionsPanel()); add(main); }
From source file:com.xpn.xwiki.watch.client.ui.dialog.PreviewFeedDialog.java
License:Open Source License
/** * Choice dialog/* w ww. j av a2 s . c o m*/ * @param app XWiki GWT App object to access translations and css prefix names * @param name dialog name * @param buttonModes button modes Dialog.BUTTON_CANCEL|Dialog.BUTTON_NEXT for Cancel / Next */ public PreviewFeedDialog(XWikiGWTApp app, String name, int buttonModes) { super(app, name, buttonModes); FlowPanel main = new FlowPanel(); main.addStyleName(getCSSName("main")); HTMLPanel invitationPanel = new HTMLPanel(app.getTranslation(getDialogTranslationName() + ".invitation")); invitationPanel.addStyleName(getCssPrefix() + "-invitation"); main.add(invitationPanel); main.add(getFramePanel()); main.add(getActionsPanel()); add(main); }
From source file:cz.filmtit.client.pages.Help.java
License:Open Source License
/** * Shows the page./*w w w . ja v a 2 s .c o m*/ */ public Help() { setElement(uiBinder.createAndBindUi(this)); Gui.getGuiStructure().contentPanel.setStyleName("help"); HTMLPanel htmlWrapper = new HTMLPanel(this.getElement().getInnerHTML()); Gui.getGuiStructure().contentPanel.setWidget(htmlWrapper); }
From source file:cz.filmtit.client.widgets.VLCWidget.java
License:Open Source License
/** * Construct a VLC widget for Workspace. Should be used instead of constructor which is protected. * @param path Path of file.//from w ww .ja va 2 s .co m * @param playerFixedPanel Top fixed panel where the player will be. * @param table Table of the player. * @param fixedWrapper Wrapper for the fixed class. * @param synchronizer Synchronizer, that holds the subtitles. * @param workspace Workspace that will get changed and that created the VLC widget. * @return The new VLC widget. */ public static VLCWidget initVLCWidget(String path, HTMLPanel playerFixedPanel, FlexTable table, HTMLPanel fixedWrapper, SubtitleSynchronizer synchronizer, TranslationWorkspace workspace) { HTMLPanel panelForVLC = Gui.getPanelForVLC(); panelForVLC.add(playerFixedPanel); playerFixedPanel.setWidth("100%"); playerFixedPanel.setHeight("250px"); playerFixedPanel.addStyleName("fixedPlayer"); table.addStyleName("tableMoved"); fixedWrapper.setWidth("984 px"); HTML leftLabel = new HTML(""); leftLabel.addStyleName("subtitleDisplayedLeft"); fixedWrapper.addStyleName("fixedPlayerWrapper"); fixedWrapper.add(leftLabel); HTML rightLabel = new HTML(""); rightLabel.addStyleName("subtitleDisplayedRight"); InlineLabel fromLabel = new InlineLabel("00:00:00"); InlineLabel toLabel = new InlineLabel("00:00:30"); Anchor pauseA = new Anchor("[pause]"); Anchor replayA = new Anchor("[replay]"); Anchor closeA = new Anchor("[close player]"); VLCWidget vlcPlayer = new VLCWidget(path, 400, 225, leftLabel, rightLabel, synchronizer, fromLabel, toLabel, pauseA, replayA, closeA, 0, workspace); vlcPlayer.addStyleName("vlcPlayerDisplayed"); fixedWrapper.add(vlcPlayer); fixedWrapper.add(rightLabel); HTMLPanel playerStatusPanel = new HTMLPanel(""); playerStatusPanel.add(new InlineLabel("currently playing from ")); playerStatusPanel.add(fromLabel); playerStatusPanel.add(new InlineLabel(" to ")); playerStatusPanel.add(toLabel); playerStatusPanel.add(new InlineLabel(" ")); playerStatusPanel.add(pauseA); playerStatusPanel.add(new InlineLabel(" ")); playerStatusPanel.add(replayA); playerStatusPanel.add(new InlineLabel(" ")); playerStatusPanel.add(closeA); fixedWrapper.add(playerStatusPanel); playerStatusPanel.addStyleName("statusPanel"); playerFixedPanel.add(fixedWrapper); return vlcPlayer; }
From source file:de.eckhartarnold.client.HTMLLayout.java
License:Apache License
/** * The constructor of class <code>HTMLLayout</code>. * //from www.ja v a2s . c o m * @param collection the image collection info object * @param HTMLChunk a chunk of HTML code that contains tags with * the id's "display", "controlPanel" and "caption" * @param configuration the configuration string of the layout */ public HTMLLayout(ImageCollectionInfo collection, String HTMLChunk, String configuration) { super(collection, configuration); htmlPanel = new HTMLPanel(HTMLChunk); htmlPanel.add(imagePanel, "display"); if (caption != null) { htmlPanel.add(caption, "caption"); // caption.setSpacing(true); } if (control != null && control instanceof Widget) { htmlPanel.add((Widget) control, "controlPanel"); } }
From source file:de.esoco.ewt.impl.gwt.material.layout.MaterialMainViewLayout.java
License:Apache License
/*************************************** * {@inheritDoc}//from w ww. j a v a2s .com */ @Override public HasWidgets createLayoutContainer(Container rContainer, StyleData rStyle) { return new HTMLPanel(""); }
From source file:de.fhrt.codenvy.bpmn.editor.widget.diagram.BpmnEditorDiagramWidget.java
License:Open Source License
private void initDiagramHtmlPanel() { diagramHtmlPanel = new HTMLPanel("<div class=\"canvas bpmnDigramWidget-diagramHtmlPanel-wrapper\" id=\"" + diagramHtmlWrapperId + "\"></div>"); diagramHtmlPanel.setSize("100%", "100%"); diagramHtmlPanel.addStyleName("bpmnDigramWidget-diagramHtmlPanel"); }
From source file:de.swm.commons.mobile.client.widgets.DropDownList.java
License:Apache License
/** * Default constructor./*from w w w. j av a 2 s . c o m*/ */ public DropDownList() { super(); myFlowPanel.add(listBox); if (!(SWMMobile.getOsDetection().isIOs())) { myFlowPanel.add(new HTMLPanel("")); myFlowPanel.add(new HTMLPanel("")); myFlowPanel.add(new HTMLPanel("")); } setStyleName(SWMMobile.getTheme().getMGWTCssBundle().getDropDownCss().dropDownList()); listBox.addFocusHandler(this); listBox.addBlurHandler(this); listBox.addChangeHandler(this); }
From source file:edu.caltech.ipac.fftools.core.MinimalLayoutManager.java
public void layout(String rootId) { AllPlots.getInstance().setToolBarIsPopup(false); init();/* ww w . j a v a2 s . com*/ Region visTB = getRegion(LayoutManager.VIS_TOOLBAR_REGION); Region visRO = getRegion(LayoutManager.VIS_READOUT_REGION); Region visPV = getRegion(LayoutManager.VIS_PREVIEW_REGION); Widget pvOrIcoArea = visPV.getDisplay(); // GwtUtil.setStyle(visPV.getContent(), "background", "url(images/ipac_bar.jpg)"); Widget readout = visRO == null ? new Label("") : visRO.getDisplay(); readout.setSize("100%", "100%"); HTMLPanel appBanner = new HTMLPanel("<div id='container' style='min-width:1060px;'>\n" + " <div style='float:right;'>\n" + " <div id='alt-app-icon' style='background: url(images/ipac_bar.jpg);height:74px'></div>\n" + " </div>\n" + " <div id='readout' style='background: url(images/ipac_bar.jpg);height:45px;'></div>\n" + " <div id='vis-toolbar' style=''></div>\n" + "</div>"); appBanner.add(readout, "readout"); appBanner.add(pvOrIcoArea, "alt-app-icon"); appBanner.add(visTB.getDisplay(), "vis-toolbar"); // -experiment Toolbar toolbar = Application.getInstance().getToolBar(); GwtUtil.setStyles(toolbar, "width", "100%", "height", "0", "position", "absolute"); GwtUtil.setStyles(toolbar.getDropdown(), "zIndex", "10", "position", "absolute"); getMenu().setDisplay(toolbar); // -experiment mainPanel.add(appBanner, DockPanel.NORTH); // -experiment mainPanel.add(toolbar.getDropdown(), DockPanel.NORTH); // -experiment mainPanel.setCellHeight(appBanner, "1px"); mainPanel.setSize("100%", "100%"); // making results area. Widget center = makeCenter(); mainPanel.add(center, DockPanel.CENTER); GwtUtil.setStyles(center, "position", "absolute", "left", "10px", "right", "10px", "top", "80px", "bottom", "1px"); RootPanel rp = null; if (rootId != null) { rp = RootPanel.get(rootId); } rp = rp == null ? RootPanel.get() : rp; rp.add(mainPanel); GwtUtil.setStyles(rp, "minWidth", getMinWidth() + "px", "minHeight", getMinHeight() + "px"); Application.getInstance().getProperties().setProperty("BackToSearch.show", "false"); ((FFToolsStandaloneCreator) Application.getInstance().getCreator()).getStandaloneUI().init(); }
From source file:edu.caltech.ipac.firefly.core.layout.IrsaLayoutManager.java
public void layout(String rootId) { AllPlots.getInstance().setToolBarIsPopup(false); init();/*ww w. ja v a2 s .c om*/ Region menuBar = getRegion(LayoutManager.MENU_REGION); Region appIcon = getRegion(LayoutManager.APP_ICON_REGION); Region adtlIcon = getRegion(LayoutManager.ADDTL_ICON_REGION); Region visTB = getRegion(LayoutManager.VIS_TOOLBAR_REGION); Region visRO = getRegion(LayoutManager.VIS_READOUT_REGION); Region visPV = getRegion(LayoutManager.VIS_PREVIEW_REGION); Widget pvOrIcoArea = visPV.getDisplay(); if (adtlIcon != null) { final DeckPanel previewOrAddlIcon = new DeckPanel(); previewOrAddlIcon.add(adtlIcon.getDisplay()); // idx 0 previewOrAddlIcon.add(visPV.getDisplay()); // idx 1 WebEventManager.getAppEvManager().addListener(Name.REGION_SHOW, new WebEventListener() { public void eventNotify(WebEvent ev) { Region source = (Region) ev.getSource(); if (VIS_PREVIEW_REGION.equals(source.getId())) { previewOrAddlIcon.showWidget(1); } else if (ADDTL_ICON_REGION.equals(source.getId())) { previewOrAddlIcon.showWidget(0); } else if (RESULT_REGION.equals(source.getId())) { // do nothing } } }); WebEventManager.getAppEvManager().addListener(Name.REGION_HIDE, new WebEventListener() { public void eventNotify(WebEvent ev) { Region source = (Region) ev.getSource(); if (VIS_PREVIEW_REGION.equals(source.getId())) { previewOrAddlIcon.showWidget(0); } } }); pvOrIcoArea = previewOrAddlIcon; } Widget readout = visRO == null ? new Label("") : visRO.getDisplay(); readout.setSize("100%", "100%"); HTMLPanel appBanner = new HTMLPanel("<div id='container' style='width:100%'>\n" + "<div id='app-icon' style='background: url(images/ipac_bar.jpg);height:75px;width:75px;float:left;'></div>\n" + "<div id='alt-app-icon' style='background: url(images/ipac_bar.jpg);height:75px;width:148px;float:right;'></div>\n" + "<div style='position:absolute;left:75px;right:148px;min-width:820px'>\n" + "<div id='readout' style='background: url(images/ipac_bar.jpg);height:45px;width:100%;'></div>\n" + "<div id='menu-bar' style='background: url(images/ipac_bar.jpg);height:30px;width:100%'></div>\n" + "</div>\n"); appBanner.add(menuBar.getDisplay(), "menu-bar"); appBanner.add(readout, "readout"); appBanner.add(appIcon.getDisplay(), "app-icon"); appBanner.add(pvOrIcoArea, "alt-app-icon"); // // now.. add the menu to the top Toolbar toolbar = Application.getInstance().getToolBar(); GwtUtil.setStyles(toolbar, "width", "100%", "position", "absolute"); GwtUtil.setStyles(toolbar.getDropdown(), "zIndex", "10", "position", "absolute"); getMenu().setDisplay(toolbar); mainPanel.add(appBanner, DockPanel.NORTH); mainPanel.setCellHeight(appBanner, "1px"); mainPanel.add(toolbar.getDropdown(), DockPanel.NORTH); mainPanel.setCellHeight(toolbar.getDropdown(), "1px"); // mainPanel.setCellHeight(toolbar.getDropDownComponent(), "1px"); mainPanel.add(visTB.getDisplay(), DockPanel.NORTH); mainPanel.setCellHeight(visTB.getDisplay(), "1px"); mainPanel.setSize("100%", "100%"); // making results area. Widget center = makeCenter(); mainPanel.add(center, DockPanel.CENTER); GwtUtil.setStyles(center, "position", "absolute", "left", "10px", "right", "10px", "top", "120px", "bottom", "1px"); if (rootId != null) { RootPanel root = RootPanel.get(rootId); if (root == null) { throw new RuntimeException("Application is not setup correctly; unable to find " + rootId); } root.add(mainPanel); GwtUtil.setStyles(root, "position", "absolute", "top", topOffset + "px", "left", "1px", "right", "1px", "bottom", "1px", "minWidth", getMinWidth() + "px", "minHeight", getMinHeight() + "px"); } else { RootPanel.get().add(mainPanel); } Image icon = Application.getInstance().getCreator().getMissionIcon(); if (icon != null) { icon.setSize("75px", "75px"); getRegion(APP_ICON_REGION).setDisplay(icon); } }