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

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

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

Widget.addStyleName介绍

暂无

代码示例

代码示例来源:origin: kaaproject/kaa

label.addStyleName(REQUIRED);
oldPassword = new ExtendedPasswordTextBox();
table.setWidget(row, 0, label);
row++;
label = new Label(Utils.constants.newPassword());
label.addStyleName(REQUIRED);
newPassword = new ExtendedPasswordTextBox();
table.setWidget(row, 0, label);
row++;
label = new Label(Utils.constants.newPasswordAgain());
label.addStyleName(REQUIRED);
newPasswordAgain = new ExtendedPasswordTextBox();
table.setWidget(row, 0, label);

代码示例来源:origin: kaaproject/kaa

label.addStyleName(REQUIRED);
name = new KaaAdminSizedTextBox(SDK_NAME_TEXT_SIZE_BOX);
name.addInputHandler(this);
label.addStyleName(REQUIRED);
configurationSchemaVersion = new VersionListBox();
configurationSchemaVersion.setWidth("80px");
label.addStyleName(REQUIRED);
profileSchemaVersion = new VersionListBox();
profileSchemaVersion.setWidth("80px");
label.addStyleName(REQUIRED);
notificationSchemaVersion = new VersionListBox();
notificationSchemaVersion.setWidth("80px");
label.addStyleName(REQUIRED);
logSchemaVersion = new VersionListBox();
logSchemaVersion.setWidth("80px");

代码示例来源:origin: kaaproject/kaa

label.addStyleName(Utils.avroUiStyle.requiredField());
topic = new TopicListBox();
topic.setWidth("200px");

代码示例来源:origin: kaaproject/kaa

schemaVersionLabel.addStyleName(Utils.avroUiStyle.requiredField());
schemaBox = new SchemaInfoListBox();
schemaBox.setWidth("50px");

代码示例来源:origin: kaaproject/kaa

label.addStyleName(Utils.avroUiStyle.requiredField());
usernameOrEmail = new KaaAdminSizedTextBox(255);
table.setWidget(row, 0, label);

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Sets the content widget which can be opened and closed by this panel. If
 * there is a preexisting content widget, it will be detached.
 * 
 * @param content the widget to be used as the content panel
 */
public void setContent(Widget content) {
 final Widget currentContent = getContent();
 // Remove existing content widget.
 if (currentContent != null) {
  contentWrapper.setWidget(null);
  currentContent.removeStyleName(STYLENAME_CONTENT);
 }
 // Add new content widget if != null.
 if (content != null) {
  contentWrapper.setWidget(content);
  content.addStyleName(STYLENAME_CONTENT);
  setContentDisplay(false);
 }
}

代码示例来源:origin: com.google.gwt/gwt-servlet

child.addStyleName(CONTENT_STYLE);

代码示例来源:origin: com.google.gwt/gwt-servlet

private void setSelectionStyle(Widget item, boolean selected) {
  if (item != null) {
   if (selected) {
    item.addStyleName("gwt-TabBarItem-selected");
    setStyleName(DOM.getParent(item.getElement()),
      "gwt-TabBarItem-wrapper-selected", true);
   } else {
    item.removeStyleName("gwt-TabBarItem-selected");
    setStyleName(DOM.getParent(item.getElement()),
      "gwt-TabBarItem-wrapper-selected", false);
   }
  }
 }
}

代码示例来源:origin: com.google.gwt/gwt-servlet

child.addStyleName(CONTENT_STYLE);

代码示例来源:origin: GwtMaterialDesign/gwt-material

protected void applyActiveStyle(Widget widget, boolean active) {
  if (active) {
    widget.removeStyleName(CssName.INACTIVE);
    widget.addStyleName(CssName.ACTIVE);
  } else {
    widget.removeStyleName(CssName.ACTIVE);
    widget.addStyleName(CssName.INACTIVE);
  }
}

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

/**
   * {@inheritDoc}
   */
  @Override
  public void add(final Widget w) {
    w.addStyleName(Styles.ACTIVE);
    super.add(w);
  }
}

代码示例来源:origin: gwtbootstrap/gwt-bootstrap

/**
 * {@inheritDoc}
 */
@Override
public void setWidget(Widget w) {
  super.setWidget(w);
  
  if(widget != null) {
    widget.addStyleName(Constants.COLLAPSE);
  }
  
}

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

/**
   * {@inheritDoc}
   */
  @Override
  public void add(final Widget w) {
    w.addStyleName(Styles.ACTIVE);
    super.add(w);
    children.add(w);
  }
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

@Override
  public void add(final Widget child) {
    if (child instanceof MaterialImage) {
      child.addStyleName(CssName.ACTIVATOR);
    }
    add(child, (Element) getElement());
  }
}

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

/** {@inheritDoc} */
@Override
public void add(final Widget w) {
  if (w instanceof ListBox || w instanceof FileUpload) {
    w.addStyleName(Styles.FORM_CONTROL);
  }
  add(w, (Element) getElement());
}

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

/** {@inheritDoc} */
@Override
public void add(final Widget w) {
  if (w instanceof ListBox || w instanceof FileUpload) {
    w.addStyleName(Styles.FORM_CONTROL);
  }
  add(w, (Element) getElement());
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

public void makeActive(Widget child) {
  parent.clearActive();
  // mark the collapsible item as active
  MaterialCollapsibleItem item = findCollapsibleItemParent(child);
  if (item != null) {
    item.expand();
  }
  child.addStyleName(CssName.ACTIVE);
}

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

@Override
public void setDataTargetWidgets(final List<Widget> widgets) {
  final String styleName = Document.get().createUniqueId();
  for (final Widget widget : widgets) {
    widget.addStyleName(styleName);
  }
  this.setDataTarget("." + styleName);
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void testMaximize() {
  workbenchLayout.maximize(widget);
  verify(widget).addStyleName(WorkbenchLayoutImpl.UF_MAXIMIZED_PANEL);
  verify(((RequiresResize) widget),
      never()).onResize();
}

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

@Override
protected void onAttach() {
  if (!isOrWasAttached() && children.size() > 0) {
    final Widget lastWidget = children.get(children.size() - 1);
    lastWidget.addStyleName(Styles.ACTIVE);
  }
  super.onAttach();
}

相关文章