org.jboss.errai.common.client.dom.Button.getStyle()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(87)

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

Button.getStyle介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

Button myButton = new Button("HELP",Image.createImage("/help.ico"));
 myButton.getStyle().setBgImage(null);
 myButton.getStyle().setPadding(0, 0, 0, 0);
 myButton.getStyle().setBorder(null);
 myButton.getPressedStyle().setBgImage(null);
 myButton.getPressedStyle().setPadding(0, 0, 0, 0);
 myButton.getPressedStyle().setBorder(null);

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

private void setCloseButtonVisible(boolean visible) {
  closeCategoryButton.getStyle().removeProperty("display");
  if (!visible) {
    closeCategoryButton.getStyle().setProperty("display", "none");
  }
}

代码示例来源:origin: org.kie.workbench.widgets/kie-wb-common-ui

@Override
public void showYesButton( final boolean show ) {
  yesButton.getStyle().setProperty( "display", show ? "inline" : "none" );
}

代码示例来源:origin: org.kie.workbench.widgets/kie-wb-common-ui

@Override
public void showCancelButton( final boolean show ) {
  cancelButton.getStyle().setProperty( "display", show ? "inline" : "none" );
}

代码示例来源:origin: org.uberfire/uberfire-widgets-commons

@Override
public void setWidth(int minWidth) {
  dropDownButton.getStyle().setProperty("width",
                     minWidth + "px");
  dropDownPanel.getStyle().setProperty("width",
                     minWidth + "px");
}

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

@Override
public void setWidth(int minWidth) {
  dropDownButton.getStyle().setProperty("width",
                     minWidth + "px");
  dropDownPanel.getStyle().setProperty("width",
                     minWidth + "px");
}

代码示例来源:origin: org.kie.workbench.widgets/kie-wb-metadata-widget

@Override
public void setLinkModeVisibility(final boolean linkModeVisible) {
  editButton.getStyle()
      .setProperty("visibility",
             getVisibility(linkModeVisible));
    editButton.getStyle()
        .removeProperty("width");
    editButton.getStyle()
        .removeProperty("border");
    editButton.getStyle()
        .removeProperty("padding");
  } else {
               "0px");
    editButton.getStyle()
        .setProperty("width",
               "0px");
    editButton.getStyle()
        .setProperty("border",
               "0px");
    editButton.getStyle()
        .setProperty("padding",
               "0px");

代码示例来源:origin: org.dashbuilder/dashbuilder-renderer-default

@Override
public void setWidth(int percentage) {
  CSSStyleDeclaration style = item.getStyle();
  style.setProperty("width", percentage + "%");
  // Labels too long to fit into the button width will be trimmed and ended with "..."
  // Based on https://www.w3schools.com/cssref/css3_pr_text-overflow.asp
  style.setProperty("white-space","nowrap");
  style.setProperty("overflow","hidden");
  style.setProperty("text-overflow","ellipsis");
}

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

@Override
public void setWidth(int percentage) {
  CSSStyleDeclaration style = item.getStyle();
  style.setProperty("width", percentage + "%");
  // Labels too long to fit into the button width will be trimmed and ended with "..."
  // Based on https://www.w3schools.com/cssref/css3_pr_text-overflow.asp
  style.setProperty("white-space","nowrap");
  style.setProperty("overflow","hidden");
  style.setProperty("text-overflow","ellipsis");
}

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

@Override
public void setPerspectiveCreationVisible(boolean visible) {
  if (visible) {
    createSpan.getStyle().removeProperty("display");
    createPerspectiveAnchor.getStyle().removeProperty("display");
    createPerspectiveButton.getStyle().removeProperty("display");
  } else {
    createSpan.getStyle().setProperty("display", "none");
    createPerspectiveAnchor.getStyle().setProperty("display", "none");
    createPerspectiveButton.getStyle().setProperty("display", "none");
  }
}

代码示例来源:origin: org.dashbuilder/dashbuilder-cms-client

@Override
public void setPerspectiveCreationVisible(boolean visible) {
  if (visible) {
    createSpan.getStyle().removeProperty("display");
    createPerspectiveAnchor.getStyle().removeProperty("display");
    createPerspectiveButton.getStyle().removeProperty("display");
  } else {
    createSpan.getStyle().setProperty("display", "none");
    createPerspectiveAnchor.getStyle().setProperty("display", "none");
    createPerspectiveButton.getStyle().setProperty("display", "none");
  }
}

代码示例来源:origin: org.dashbuilder/dashbuilder-renderer-default

@Override
public void setWidth(int width) {
  if (width > 0) {
    dropDownButton.getStyle().setProperty("width", width + "px");
    dropDownMenu.getStyle().setProperty("width", width + "px");
    resetMenu.getStyle().setProperty("width", width + "px");
    dropDownText.getStyle().setProperty("max-width", (width - 30) + "px");
  } else {
    dropDownButton.getStyle().removeProperty("width");
    dropDownMenu.getStyle().removeProperty("width");
    resetMenu.getStyle().removeProperty("width");
    dropDownText.getStyle().removeProperty("max-width");
  }
}

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

@Override
public void setWidth(int width) {
  if (width > 0) {
    dropDownButton.getStyle().setProperty("width", width + "px");
    dropDownMenu.getStyle().setProperty("width", width + "px");
    resetMenu.getStyle().setProperty("width", width + "px");
    dropDownText.getStyle().setProperty("max-width", (width - 30) + "px");
  } else {
    dropDownButton.getStyle().removeProperty("width");
    dropDownMenu.getStyle().removeProperty("width");
    resetMenu.getStyle().removeProperty("width");
    dropDownText.getStyle().removeProperty("max-width");
  }
}

相关文章