public void showContainerSizePanel() { CaptionPanel bodySize = new CaptionPanel(constants.containerSizeTitle()); bodySize.setWidth("185px"); final VerticalPanel content = new VerticalPanel(); containerSizeListBox = new CustomListBox(); content.add(containerSizeListBox); bodySize.setContentWidget(content); HorizontalPanel setSizePanel = new HorizontalPanel(); setSizeDisclosurePanel = new DisclosurePanel(constants.sizeInPixel()); setSizeDisclosurePanel.setAnimationEnabled(true); setSizeDisclosurePanel.setOpen(true); setSizeDisclosurePanel.setVisible(false); setSizeDisclosurePanel.add(setSizePanel); customSizeTextBox = new TextBox(); customSizeTextBox.setWidth("50px"); setSizePanel.add(customSizeTextBox); validCustomSizeButton = new Button("OK"); setSizePanel.add(validCustomSizeButton); content.add(setSizeDisclosurePanel); builderContent.add(bodySize); }
public void showHTMLCode(String codeSource) { final DialogBox codePopup = new DialogBox(true, true); codePopup.setGlassEnabled(true); codePopup.setText(constants.showCodeTitle()); String[] lignesCode = codeSource.split("\n"); VerticalPanel tab = new VerticalPanel(); for (String ligneCode : lignesCode) { String maLigne = new String(ligneCode); String[] ligne = ligneCode.split("\t"); for (String texte : ligne) { if (texte.equals("")) { maLigne = " " + maLigne; } } maLigne = maLigne.replace("<", "<"); maLigne = maLigne.replace("div", "<span style='color: blue;'>div</span>"); maLigne = maLigne.replace("id=", "<span style='color: red;'>id</span>="); maLigne = maLigne.replace("class", "<span style='color: red;'>class</span>"); int commentBegin = maLigne.indexOf("<!--"); if (commentBegin != -1) { int commentEnd = maLigne.indexOf("-->"); String comment = maLigne.substring(commentBegin, commentEnd + 3); maLigne = maLigne.replace(comment, "<span style='color: #008000;'>" + comment + "</span>"); } HTML htmlLine = new HTML(maLigne); htmlLine.setStyleName("builder-source"); tab.add(htmlLine); } Button closeButton = new Button( constants.close(), new ClickHandler() { public void onClick(ClickEvent event) { codePopup.hide(); } }); tab.add(closeButton); tab.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_CENTER); codePopup.add(tab); codePopup.center(); codePopup.show(); }
public void showZonesPanel() { CaptionPanel splitContent = new CaptionPanel(constants.customContentTitle()); splitContent.setWidth("185px"); listOfZoneDesigner = new FlexTable(); listOfZoneDesigner.setWidth("100%"); addRowButton = new Button(constants.addRow()); listOfZoneDesigner.setWidget(0, 1, addRowButton); splitContent.setContentWidget(listOfZoneDesigner); builderContent.add(splitContent); }
public void showCloseButtonPanel() { CaptionPanel closePanel = new CaptionPanel(constants.closeTitle()); closePanel.setWidth("185px"); VerticalPanel vp = new VerticalPanel(); vp.setWidth("100%"); vp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); closeButton = new Button(constants.close()); vp.add(closeButton); closePanel.setContentWidget(vp); builderContent.add(closePanel); }
public void showCodePreviewPanel() { CaptionPanel showCode = new CaptionPanel(constants.showCodeTitle()); showCode.setWidth("185px"); VerticalPanel vp = new VerticalPanel(); vp.setWidth("100%"); vp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); showCodeButton = new Button(constants.showCode()); vp.add(showCodeButton); showCode.setContentWidget(vp); builderContent.add(showCode); }
public void showSideBarPanel() { CaptionPanel bodyColumn = new CaptionPanel(constants.sideBarTitle()); bodyColumn.setWidth("185px"); sideBarPositionListBox = new CustomListBox(); bodyColumn.setContentWidget(sideBarPositionListBox); builderContent.add(bodyColumn); }
public ContainerBuilderWidget() { this.setModal(false); this.setAutoHideEnabled(false); this.setAnimationEnabled(true); this.setPopupPosition(10, Window.getScrollTop() + 10); this.setText(constants.windowTitle()); this.addStyleName("builder"); builderContent = new VerticalPanel(); this.add(builderContent); builderContent.setWidth("200px"); builderContent.setStyleName("builder"); }
public void showFooterPanel() { footerCheckBox = new CheckBox(constants.enableFooter()); builderContent.add(footerCheckBox); }
public void showHeaderPanel() { headerCheckBox = new CheckBox(constants.enableHeader()); builderContent.add(headerCheckBox); }