public DeviceUc(SimplePanel wrapperPanel, HeaderUc headerUc) { initWidget(uiBinder.createAndBindUi(this)); this.headerUc = headerUc; this.wrapperPanel = wrapperPanel; androidSectiondiv.getElement().setId("pnlAndroidSectiondiv"); ipadSectiondiv.getElement().setId("pnlIpadSectiondiv"); msglinkPanel.getElement().setId("pnlMsglinkPanel"); msgPanel.getElement().setId("pnlMsgPanel"); closeAndriodBtn.getElement().setId("imgCloseAndriodBtn"); closeIpadBtn.getElement().setId("imgCloseIpadBtn"); gooruPanel.getElement().setId("pnlGooruPanel"); ednovoPanel.getElement().setId("pnlEdnovoPanel"); appstorePanel.getElement().setId("pnlAppstorePanel"); viewAnchor.getElement().setId("lnkViewAnchor"); setUiText(); if (isIpad && !StringUtil.IPAD_MESSAGE_Close_Click) { ipadSectiondiv.setVisible(true); androidSectiondiv.setVisible(false); ipadSectiondiv.getElement().setAttribute("style", "margin-top:-20px;"); wrapperPanel.getElement().setAttribute("style", "margin-top:0px;"); headerUc.getElement().getFirstChildElement().setAttribute("style", "position:relative;"); } else if (isAndriod && !StringUtil.IPAD_MESSAGE_Close_Click) { ipadSectiondiv.setVisible(false); androidSectiondiv.setVisible(true); androidSectiondiv.getElement().setAttribute("style", "margin-top:-20px;"); wrapperPanel.getElement().setAttribute("style", "margin-top:0px;"); headerUc.getElement().getFirstChildElement().setAttribute("style", "position:relative;"); } }
/** * Page widgets. * * @param cellTree the cell tree */ public void createPageView(CellTree cellTree) { this.cellTree = cellTree; mainPanel.setStyleName("div-wrapper"); // main div SimplePanel leftPanel = new SimplePanel(); leftPanel.getElement().setId("leftPanel_SimplePanel"); leftPanel.setStyleName("div-first bottomPadding10px"); // left side div which will have tree SimplePanel rightPanel = new SimplePanel(); rightPanel.getElement().setId("rightPanel_SimplePanel"); rightPanel.setStyleName("div-second"); // right div having tree creation inputs. VerticalPanel treePanel = new VerticalPanel(); treePanel.getElement().setId("treePanel_VerticalPanel"); HorizontalPanel expandCollapse = new HorizontalPanel(); expandCollapse.getElement().setId("expandCollapse_HorizontalPanel"); expandCollapse.setStyleName("leftAndTopPadding"); expandCollapse.setSize("100px", "20px"); buttonExpand.setStylePrimaryName("expandAllButton"); buttonCollapse.setStylePrimaryName("collapseAllButton"); buttonExpand.setTitle("Expand All (Shift +)"); buttonCollapse.setTitle("Collapse All (Shift -)"); expandCollapse.add(buttonExpand); expandCollapse.add(buttonCollapse); buttonExpand.setFocus(true); buttonCollapse.setVisible(true); treePanel.add(expandCollapse); treePanel.add(cellTree); leftPanel.add(treePanel); SimplePanel bottomSavePanel = new SimplePanel(); bottomSavePanel.getElement().setId("bottomSavePanel_SimplePanel"); bottomSavePanel.setStyleName("div-first buttonPadding"); VerticalPanel vp = new VerticalPanel(); HorizontalPanel savePanel = new HorizontalPanel(); savePanel.getElement().setId("savePanel_VerticalPanel"); savePanel.add(new SpacerWidget()); // savePanel.add(errorMessageDisplay); vp.add(successMessageDisplay); // saveBtn.setTitle("Ctrl+Alt+s"); savePanel.add(saveBtn); validateBtn.setTitle("Validate"); savePanel.add(validateBtn); vp.add(warningMessageDisplay); vp.add(savePanel); bottomSavePanel.add(vp); SimplePanel errPanel = new SimplePanel(); errPanel.getElement().setId("errPanel_SimplePanel"); errPanel.add(errorMessageDisplay); mainPanel.add(errPanel); mainPanel.add(leftPanel); mainPanel.add(rightPanel); mainPanel.add(bottomSavePanel); focusPanel.addKeyDownHandler(this); focusPanel.addFocusHandler(this); cellTreeHandlers(); }
/** * Creates new dialog. * * @param title the title for popup window * @param question the question that user must interact * @param handler the handler that call after user interact */ public ProjectProblemDialog(String title, String question, final AskHandler handler) { this.handler = handler; setTitle(title); Widget widget = uiBinder.createAndBindUi(this); setWidget(widget); message.addStyleName(resources.centerPanelCss().label()); message.getElement().setInnerHTML(question); Button configureButton = createButton( "Configure...", "problem-dialog-configure", new ClickHandler() { @Override public void onClick(ClickEvent event) { handler.onConfigure(); onClose(); } }); Button keepBlankButton = createButton( "Keep Blank", "problem-dialog-keepBlank", new ClickHandler() { @Override public void onClick(ClickEvent event) { handler.onKeepBlank(); onClose(); } }); configureButton.addStyleName(resources.centerPanelCss().blueButton()); getFooter().add(configureButton); getFooter().add(keepBlankButton); }
private void show() { Element elem = panel.getElement(); // DOM.setStyleAttribute(elem, "left", String.valueOf(left) + "px"); // DOM.setStyleAttribute(elem, "top", String.valueOf(top) + "px"); DOM.setStyleAttribute(elem, "position", "absolute"); RootPanel.get().add(this); }
private SimplePanel horizontalWrapper(IsWidget child, String width) { SimplePanel wrapper = new SimplePanel(child.asWidget()); wrapper.setStyleName("goon-horizontalWrapper"); Style style = wrapper.getElement().getStyle(); style.setProperty("display", "table-cell"); if (childTextAlign != null) style.setTextAlign(childTextAlign); if (width != null) wrapper.setWidth(width); return wrapper; }
public AddRemoveRowPanel(Widget widget, boolean floatLeft, PushButton... buttons) { append(widget); this.buttons.clear(); for (PushButton button : buttons) { append(button, floatLeft); this.buttons.add(button); } div.getElement().getStyle().setClear(Clear.BOTH); add(div); }
@UiHandler("closeAndriodBtn") public void onAndriodCloseClick(ClickEvent clickEvent) { ipadSectiondiv.setVisible(false); StringUtil.IPAD_MESSAGE_Close_Click = true; androidSectiondiv.setVisible(false); wrapperPanel.getElement().setAttribute("style", "margin-top:36px;"); headerUc.getElement().getFirstChildElement().setAttribute("style", "position:fixed;"); LibraryView.onClosingAndriodorIpaddiv(); ShelfListView.onClosingAndriodorIpaddiv(); ShelfView.onClosingAndriodorIpaddiv(); DiscoverToolTip.onclickOfAndriodorIpadcloseDiv(); }
/** * Initialize popup menu. * * @param actionGroup action group * @param presentationFactory presentation factory * @param lockLayer lock layer, uses as root for attaching this popup menu * @param actionSelectedHandler handler for action selected event * @param keyBindingAgent agent for key binding * @param itemIdPrefix id prefix of the item */ private void initPopupMenu( ActionGroup actionGroup, PresentationFactory presentationFactory, MenuLockLayer lockLayer, ActionSelectedHandler actionSelectedHandler, KeyBindingAgent keyBindingAgent, String itemIdPrefix) { this.presentationFactory = presentationFactory; this.keyBindingAgent = keyBindingAgent; this.itemIdPrefix = itemIdPrefix; this.lockLayer = lockLayer; this.actionSelectedHandler = actionSelectedHandler; List<Utils.VisibleActionGroup> visibleActionGroupList = Utils.renderActionGroup( actionGroup, presentationFactory, actionManager, managerProvider.get()); list = new ArrayList<>(); for (Utils.VisibleActionGroup groupActions : visibleActionGroupList) { list.addAll(groupActions.getActionList()); } popupMenuPanel = new SimplePanel(); disableTextSelection(popupMenuPanel.getElement(), true); initWidget(popupMenuPanel); popupMenuPanel.addDomHandler( new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { closeSubPopupTimer.cancel(); PopupMenu.this.setStyleNormal(hoveredTR); hoveredTR = null; if (subPopupAnchor != null) { setStyleHovered(subPopupAnchor); } } }, MouseOutEvent.getType()); popupMenuPanel.setStyleName(POPUP_RESOURCES.popup().popupMenuMain()); hasCheckedItems = hasCheckedItems(); }
public LeftTabPanel() { initWidget(main); main.add(left); left.add(leftTree); DecoratorPanel decorator = new DecoratorPanel(); Style decoratorStyle = decorator.getElement().getStyle(); decoratorStyle.setPropertyPx("marginLeft", 15); Style rightStyle = right.getElement().getStyle(); rightStyle.setPropertyPx("margin", 5); decorator.add(right); main.add(decorator); leftTree.addSelectionHandler( new SelectionHandler<TreeItem>() { public void onSelection(SelectionEvent<TreeItem> event) { String name = event.getSelectedItem().getText(); setWidget(right, cogs.get(name)); } }); }
private final SimplePanel getColorMarker(String color) { SimplePanel p = new SimplePanel(); p.setHeight("3px"); p.getElement().getStyle().setBackgroundColor(color); return p; }
public RusdLibraryView() { setWidget(uiBinder.createAndBindUi(this)); partnerPanel.getElement().setId("spnlPartnerPanel"); }
/** initializeMap */ private void initializeMap() { m_map = MQATileMap.newInstance(m_mapHolder.getElement()); m_map.addControl(MQALargeZoomControl.newInstance()); m_map.setZoomLevel(1); m_map.setCenter(MQALatLng.newInstance("0,0")); m_map.addMoveEndHandler( new MoveEndHandler() { @Override public void onMoveEnd(final MoveEndEvent event) { m_eventBus.fireEvent(new MapPanelBoundsChangedEvent(getBounds())); } }); m_map.addClickHandler( new com.googlecode.gwtmapquest.transaction.event.ClickHandler() { @Override public void onClicked( final com.googlecode.gwtmapquest.transaction.event.ClickEvent event) { m_clickCounter.incrementCounter(event.getLL()); } }); m_map.addDblClickHandler( new DblClickHandler() { @Override public void onDblClicked(DblClickEvent event) { m_clickCounter.incrementCounter(event.getLL()); } }); m_map.addZoomEndHandler( new ZoomEndHandler() { @Override public void onZoomEnd(ZoomEndEvent event) { m_eventBus.fireEvent(new MapPanelBoundsChangedEvent(getBounds())); } }); m_map.addShapeAddedHandler( new ShapeAddedHandler() { @Override public void onShapeAdded(ShapeAddedEvent event) { Element mqPoiDiv = DOM.getElementById("mqpoidiv"); Element markerElement = Element.as(mqPoiDiv.getLastChild()); updatePOILayer(markerElement); } }); Window.addResizeHandler( new ResizeHandler() { @Override public void onResize(ResizeEvent event) { syncMapSizeWithParent(); } }); }
private void moveTo(int top, int left) { Element elem = panel.getElement(); DOM.setStyleAttribute(elem, "left", String.valueOf(left) + "px"); DOM.setStyleAttribute(elem, "top", String.valueOf(top) + "px"); }