public String getCaption() { return textWrapper.getElement().getInnerText(); }
public void updateCaption(final String caption) { textWrapper.getElement().setInnerText(caption); setWidth(""); }
public VShellShowAllTabLabel(String label) { super(DOM.createElement("li")); addStyleName("show-all"); textWrapper.getElement().setInnerHTML(label); textWrapper.getElement().setClassName("tab-title"); this.add(textWrapper); }
public void setIcon(String icon) { textWrapper.getElement().getStyle().setDisplay(Display.INLINE_BLOCK); iconElement.setClassName(icon); iconElement.getStyle().setMarginRight(5, Style.Unit.PX); getElement().insertFirst(iconElement); } }
@Override public void render(RendererCellReference cell, RolloutRendererData text, VButton button) { final String creating = "CREATING"; button.setText(text.getName()); applystyle(button); // this is to allow the button to disappear, if the text is null button.setVisible(text.getName() != null); button.getElement().setId(new StringBuilder("link").append(".").append(text.getName()).toString()); /* * checking Rollout Status for applying button style. If Rollout status * is not "CREATING", then the Rollout button is applying hyperlink * style */ final boolean isStatusCreate = text.getStatus() != null && creating.equalsIgnoreCase(text.getStatus()); if (isStatusCreate) { button.addStyleName(getStyle("boldhide")); button.setEnabled(false); } else { button.setEnabled(true); } }
@Override public void render(RendererCellReference cell, RolloutRendererData text, VButton button) { final String creating = "CREATING"; button.setText(text.getName()); applystyle(button); // this is to allow the button to disappear, if the text is null button.setVisible(text.getName() != null); button.getElement().setId(new StringBuilder("link").append(".").append(text.getName()).toString()); /* * checking Rollout Status for applying button style. If Rollout status * is not "CREATING", then the Rollout button is applying hyperlink * style */ final boolean isStatusCreate = text.getStatus() != null && creating.equalsIgnoreCase(text.getStatus()); if (isStatusCreate) { button.addStyleName(getStyle("boldhide")); button.setEnabled(false); } else { button.setEnabled(true); } }
DOM.sinkEvents(button.getElement(), Event.ONMOUSEOVER | DOM.getEventsSunk(button.getElement()));
public MagnoliaTabLabel() { super(DOM.createElement("li")); indicatorsWrapper.addClassName("indicators-wrapper"); textWrapper.getElement().setClassName("tab-title"); this.add(textWrapper); indicatorsWrapper = getElement(); closeElement.setClassName("v-shell-tab-close"); closeElement.addClassName("icon-close"); notificationBox.setClassName("v-shell-tab-notification"); errorIndicator.setClassName("v-shell-tab-error"); getElement().appendChild(closeElement); getElement().appendChild(notificationBox); getElement().appendChild(errorIndicator); DOM.sinkEvents(getElement(), Event.MOUSEEVENTS | Event.TOUCHEVENTS| Event.FOCUSEVENTS | Event.KEYEVENTS); hideNotification(); setHasError(false); // MGNLUI-786: Fixes tab label sizing issue in Chrome. setWidth("100px"); }