List of usage examples for com.google.gwt.user.client.ui HTMLPanel HTMLPanel
private HTMLPanel(Element elem)
From source file:com.gwtm.ui.client.widgets.DropDownList.java
License:Apache License
public DropDownList() { super(BoxOrient.vertical, BoxPack.start, BoxAlign.center); super.add(_listBox); _listBox.setStylePrimaryName("gwtm-inputbox"); if (!Utils.DeviceInfo.isIOS()) { super.add(new HTMLPanel("")); super.add(new HTMLPanel("")); super.add(new HTMLPanel("")); }/* ww w . ja va 2 s. c om*/ setStyleName("gwtm-DropDownList"); _listBox.addFocusHandler(this); _listBox.addBlurHandler(this); _listBox.addChangeHandler(this); }
From source file:com.gwtmobile.ui.client.widgets.DropDownList.java
License:Apache License
public DropDownList() { super();/* w w w . j av a 2 s . co m*/ super.add(_listBox); if (!Utils.isIOS()) { super.add(new HTMLPanel("")); super.add(new HTMLPanel("")); super.add(new HTMLPanel("")); } setStyleName("gwtm-DropDownList"); _listBox.addFocusHandler(this); _listBox.addBlurHandler(this); _listBox.addChangeHandler(this); }
From source file:com.gwtmodel.table.disclosure.HTMLDisc.java
License:Apache License
@Override public void startPublish(CellId cellId) { // HTMLPanel pa = new HTMLPanel(html); HTMLPanel pa = new HTMLPanel(html); DisclosurePanel di = new DisclosurePanel(iMess.getMessage(header)); di.addOpenHandler(new OpenH()); di.addCloseHandler(new CloseH()); di.setContent(pa);/* w w w .j ava 2s . c om*/ FormLineContainer fC = SlU.getFormLineContainer(publishType, this); if (fC != null) CreateFormView.setHtml(pa, fC.getfList(), null); // ISlotCustom sl = GetButtons.constructSlot(publishType); // ISlotSignalContext i = getSlContainer().getGetterCustom(sl); // if (i != null) { // GetButtons g = (GetButtons) i.getCustom(); // CreateFormView.IGetButtons iG = g.getValue(); CreateFormView.IGetButtons iG = SlU.getButtons(publishType, this); if (iG != null) CreateFormView.setHtml(pa, iG, null); publish(publishType, cellId, new GWidget(di)); }
From source file:com.gwtmodel.table.panelview.PanelView.java
License:Apache License
@Override public void createView(String html, BinderWidget b) { if (html == null && b == null) { int maxR = 0; int maxC = 0; for (CellId i : colM.keySet()) { PanelRowCell ro = colM.get(i); maxR = MaxI.max(maxR, ro.getRowNo()); maxC = MaxI.max(maxC, ro.getCellNo()); }//from w w w . j a v a 2 s. c om pView = GwtPanelViewFactory.construct(maxR + 1, maxC + 1); } else { bw = b; htmlWidget = html != null ? new HTMLPanel(html) : iB.create(bw); ISlotCustom sl = BinderWidgetSignal.constructGetWidgetSignal(dType); registerCaller(sl, new GetMainHtml(b)); } colM.keySet().forEach(ii -> registerSubscriber(dType, ii, new SetWidget())); // create publisher }
From source file:com.gwtmodel.table.view.binder.impl.CreateBinderWidget.java
License:Apache License
private Widget constructEmptyWidget(BinderWidget bw) { Widget w = null;/*from w w w . j a v a2 s . c o m*/ String html = ""; if (!CUtil.EmptyS(bw.getContentHtml())) html = PolymerUtil.convert(bw.getContentHtml()); switch (bw.getType()) { case HTMLPanel: w = new HTMLPanel(html); break; case Button: w = new Button(html); break; case Label: w = new Label(html); break; case HTML: w = new HTML(html); case PaperIconItem: w = new PaperIconItem(html); break; case IronIcon: w = new IronIcon(html); break; case PaperButton: w = new PaperButton(html); break; case PaperHeaderPanel: w = new PaperHeaderPanel(html); break; case PaperToolbar: w = new PaperToolbar(html); break; case Image: w = new Image(html); break; case PaperIconButton: w = new PaperIconButton(html); break; case PaperDrawerPanel: w = new PaperDrawerPanel(html); break; case PaperCheckbox: w = new PaperCheckbox(html); break; case PaperDialog: w = new PaperDialog(html); break; case PaperDialogScrollable: w = new PaperDialogScrollable(html); break; case PaperMenu: w = new PaperMenu(html); break; case PaperDropdownMenu: w = new PaperDropdownMenu(html); break; case PaperTabs: w = new PaperTabs(html); break; case PaperTab: w = new PaperTab(html); break; case PaperFab: w = new PaperFab(html); break; case PaperItem: w = new PaperItem(html); break; case PaperItemBody: w = new PaperItemBody(html); break; case PaperInput: w = new PaperInput(html); break; case PaperTextarea: w = new PaperTextarea(html); break; case PaperMaterial: w = new PaperMaterial(html); break; case PaperProgress: w = new PaperProgress(html); break; case PaperRadioButton: w = new PaperRadioButton(html); break; case PaperRadioGroup: w = new PaperRadioGroup(html); break; case PaperRipple: w = new PaperRipple(html); break; case PaperSpinner: w = new PaperSpinner(html); break; case PaperSlider: w = new PaperSlider(html); break; case InlineLabel: w = new InlineLabel(html); break; case FlowPanel: if (CUtil.EmptyS(html)) w = new FlowPanel(); else w = new FlowPanel(html); break; case PaperTooltip: w = new PaperTooltip(html); break; case PaperToast: w = new PaperToast(html); break; case PaperToggleButton: w = new PaperToggleButton(html); break; case IronAjax: w = new IronAjax(html); break; case IronCollapse: w = new IronCollapse(html); break; case IronImage: w = new IronImage(html); break; case IronList: w = new IronList(html); break; case IronSelector: w = new IronSelector(html); break; case VaadinGrid: w = new VaadinGrid(html); break; case VaadinComboBox: w = new VaadinComboBox(html); break; case VaadinDatePicker: w = new VaadinDatePicker(html); break; case VaadinUpload: w = new VaadinUpload(html); break; case VaadinSplitLayout: w = new VaadinSplitLayout(html); break; case VaadinContextMenu: w = new VaadinContextMenu(html); break; default: Utils.errAlertB(LogT.getT().PolymerWidgetNotImplemented(bw.getType().name())); break; } // switch return w; }
From source file:com.gwtmodel.table.view.stackvertical.StackPanelHtmlView.java
License:Apache License
StackPanelHtmlView(List<ControlButtonDesc> bList, IControlClick click, String html) { super(click); hPanel = new HTMLPanel(html); final List<ClickButtonType> cList = new ArrayList<ClickButtonType>(); final List<IGFocusWidget> buList = new ArrayList<IGFocusWidget>(); for (ControlButtonDesc bu : bList) { IGFocusWidget bt = constructButton(bu); buList.add(bt);// ww w. java 2 s . c o m cList.add(new ClickButtonType(bu.getActionId().getCustomButt())); } CreateFormView.setHtml(hPanel, new CreateFormView.IGetButtons() { @Override public List<ClickButtonType> getDList() { return cList; } @Override public List<IGFocusWidget> getBList() { return buList; } }, null); }
From source file:com.jawspeak.gwt.verysimpletemplate.client.template.VerySimpleGwtTemplate.java
License:Apache License
public HTMLPanel toHTMLPanel() { Map<String, Widget> idToWidget = new HashMap<String, Widget>(); for (Entry<String, Widget> entryByToken : widgets.entrySet()) { String id = DOM.createUniqueId(); htmlTemplate = htmlTemplate.replace(entryByToken.getKey(), "<span id='" + id + "'></span>"); idToWidget.put(id, entryByToken.getValue()); }// w w w . j ava2 s .c o m widgets = null; // finally all done using it HTMLPanel panel = new HTMLPanel(htmlTemplate); for (Entry<String, Widget> entryById : idToWidget.entrySet()) { panel.addAndReplaceElement(entryById.getValue(), entryById.getKey()); } verifyTemplateCompletelyFilledOut(); return panel; }
From source file:com.konakart.client.KKBaseWin.java
License:Open Source License
/** * Creates a panel containing the framework html * //from ww w . ja v a 2s . c o m * @param mode * Determines which framework to generate * * @return Return the panel */ protected HTMLPanel getContainerPanel(int mode) { String framework = ""; switch (mode) { case 1: // Add a msg-box div inside the body-content div framework = "<div class=\"body\">" + "<div id=\"" + HEADER_ID + "\" class=\"body-header\">" + "</div>" + "<div class=\"body-content-div\">" + "<div id=\"" + BODY_ID + "\" class=\"msg-box\">" + "</div>" + "</div>" + "</div>" + "<div id=\"" + BUTTON_ID + "\" class=\"tile\"></div>"; break; case 2: // Don't add a msg-box div framework = "<div class=\"body\">" + "<div id=\"" + HEADER_ID + "\" class=\"body-header\">" + "</div>" + "<div id=\"" + BODY_ID + "\" class=\"body-content-div\">" + "</div>" + "</div>" + "<div id=\"" + BUTTON_ID + "\" class=\"tile\"></div>"; break; default: break; } HTMLPanel containerPanel = new HTMLPanel(framework); return containerPanel; }
From source file:com.konakart.client.KKBaseWin.java
License:Open Source License
/** * Returns a panel with the buttons./*from ww w . j a v a 2 s . c o m*/ * * @param mode * If mode == 1 it returns a panel with a confirmation button. If mode == 2 it * returns a panel with a back and continue button. * @return Returns the panel */ protected Widget getButtons(int mode) { String divs = "<div class=\"button-left\"><div class=\"button-right\"><div class=\"button-bottom\"><div class=\"button-bottom-left\"><div class=\"button-bottom-right\"><div class=\"button-top\"><div class=\"button-top-left\"><div class=\"button-top-right\">" + "<div id=\"kk-buttons\" class=\"button-tile\">" + "</div>" + "</div></div></div></div></div></div></div>"; HTMLPanel panel = new HTMLPanel(divs); FlexTable buttonFT = getTable(0, "97%", 0, 0, null); if (mode == 1) { formatCell(buttonFT, 0, 0, null, "right", null, null); buttonFT.setWidget(0, 0, confirmOrderCssButton); } else if (mode == 2) { formatCell(buttonFT, 0, 0, null, "left", null, null); formatCell(buttonFT, 0, 1, null, "right", null, null); buttonFT.setWidget(0, 0, backCssButton); buttonFT.setWidget(0, 1, continueCssButton); } if (debug) { buttonFT.setWidget(1, 0, debugFT); } panel.add(buttonFT, "kk-buttons"); return panel; }
From source file:com.konakart.client.SearchBody.java
License:Open Source License
/** * Creates a panel containing the framework html * //w ww.j ava 2 s . com * @param mode * Determines which framework to generate * * @return Return the panel */ protected HTMLPanel getContainerPanel() { String framework = "<div id=\"" + BODY_ID + "\" class=\"suggested-search-input\">" + "</div>"; HTMLPanel containerPanel = new HTMLPanel(framework); return containerPanel; }