@Override public String getStyleName() { return delegate.getStyleName(); }
public static boolean hasStyle(Widget widget, String style) { if (widget == null) return false; String styles = widget.getStyleName(); return styles != null && (indexOfName(styles, style) >= 0); }
public static boolean hasStyle(Widget widget, String style) { if (widget == null) return false; String styles = widget.getStyleName(); return styles != null && (indexOfName(styles, style) >= 0); }
public static boolean hasStyle(Widget widget, String style) { if (widget == null) return false; String styles = widget.getStyleName(); return styles != null && (indexOfName(styles, style) >= 0); }
/*************************************** * {@inheritDoc} */ @Override public String toString() { String sName = getClass().getName(); String sStyleName = getWidget().getStyleName(); sName = sName.substring(sName.lastIndexOf('.') + 1); if (sStyleName.length() > 0) { sName += "(" + sStyleName + ")"; } return sName; }
protected boolean isItemActive(int idx) { return menu.getWidget(idx).getStyleName().contains("active"); } }
/** * Get the app that is currently open. * @return The currently open app or null if none are open. */ public Widget getCurrentApp(){ if (getWidgetCount() < 1) { return null; }else{ for (int w=0; w < getWidgetCount(); w++){ Widget app = getWidget(w); String style = app.getStyleName(); if (!app.getStyleName().contains("app-inactive")){ return app; } } } // No app is active. return null; }
@Override public void load() { for (Widget w : getChildren()) { if (!w.getStyleName().contains(AddinsCssName.IGNORED)) { load(w.getElement(), w); } } }
private Widget getMoveablePanel() { for (int index = 0; index < context.boundaryPanel.getWidgetCount(); index++) { final Widget w = context.boundaryPanel.getWidget(index); if (w.getStyleName().equals(DragClientBundle.INSTANCE.css().movablePanel())) { return w; } } return null; } }
@Override public void onClick(final ClickEvent event) { if (getParent() != null && getParent().getParent() != null) { if (getParent().getParent().getStyleName().contains(CardStyles.FLIPPED)) { getParent().getParent().removeStyleName(CardStyles.FLIPPED); } else { getParent().getParent().addStyleName(CardStyles.FLIPPED); } } } }, ClickEvent.getType());
@Override public void onClick(final ClickEvent event) { if (getParent() != null && getParent().getParent() != null) { if (getParent().getParent().getStyleName().contains(CardStyles.FLIPPED)) { getParent().getParent().removeStyleName(CardStyles.FLIPPED); } else { getParent().getParent().addStyleName(CardStyles.FLIPPED); } } } }, ClickEvent.getType());
public EnableHyperlink(String text, boolean asHTML, String historyToken) { link = historyToken != null ? new Hyperlink(text, asHTML, historyToken) : new Anchor(text); html = new HTML(); panel.setStyleName(WidgetsCSS.C_hyperlink); html.setStyleName(link.getStyleName()); html.addStyleDependentName("disabled"); if (asHTML) { html.setHTML(text); } else { html.setText(text); } panel.setWidget(link); initWidget(panel); } /*
private boolean startDrag(NativeEvent event) { VTransferable transferable = new VTransferable(); transferable.setDragSource(ConnectorMap.get(client).getConnector( this)); Element targetElement = (Element) event.getEventTarget().cast(); Paintable paintable; Widget w = WidgetUtil.findWidget(targetElement, null); if(!w.getStyleName().contains("drag-source-enabled")) { return false; } while (w != null && !(w instanceof Paintable)) { w = w.getParent(); } paintable = (Paintable) w; transferable.setData("component", paintable); VDragEvent dragEvent = VDragAndDropManager.get().startDrag( transferable, event, true); transferable.setData("clientX", event.getClientX()); transferable.setData("clientY", event.getClientY()); dragEvent.createDragImage(getElement(), true); return true; }