com.google.gwt.user.client.ui.Widget.getStyleName()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中com.google.gwt.user.client.ui.Widget.getStyleName()方法的一些代码示例,展示了Widget.getStyleName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.getStyleName()方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Widget
类名称:Widget
方法名:getStyleName

Widget.getStyleName介绍

暂无

代码示例

代码示例来源:origin: stephenh/tessell

@Override
public String getStyleName() {
 return delegate.getStyleName();
}

代码示例来源:origin: jqm4gwt/jqm4gwt

public static boolean hasStyle(Widget widget, String style) {
  if (widget == null) return false;
  String styles = widget.getStyleName();
  return styles != null && (indexOfName(styles, style) >= 0);
}

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library

public static boolean hasStyle(Widget widget, String style) {
  if (widget == null) return false;
  String styles = widget.getStyleName();
  return styles != null && (indexOfName(styles, style) >= 0);
}

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone

public static boolean hasStyle(Widget widget, String style) {
  if (widget == null) return false;
  String styles = widget.getStyleName();
  return styles != null && (indexOfName(styles, style) >= 0);
}

代码示例来源:origin: de.esoco/gewt

/***************************************
 * {@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;
}

代码示例来源:origin: jbossas/console

protected boolean isItemActive(int idx) {
  return menu.getWidget(idx).getStyleName().contains("active");
 }
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

/**
 * 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;
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-addins

@Override
public void load() {
  for (Widget w : getChildren()) {
    if (!w.getStyleName().contains(AddinsCssName.IGNORED)) {
      load(w.getElement(), w);
    }
  }
}

代码示例来源:origin: kiegroup/appformer

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;
  }
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3-extras

@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());

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3-extras

@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());

代码示例来源:origin: org.apache.james.hupa/hupa-widgets

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);
}
/*

代码示例来源:origin: korpling/ANNIS

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;
}

相关文章