com.vaadin.ui.Button.getState()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(118)

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

Button.getState介绍

暂无

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Returns the icon's alt text.
 *
 * @return String with the alt text
 */
public String getIconAlternateText() {
  return getState(false).iconAltText;
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Determines if a button is automatically disabled when clicked. See
 * {@link #setDisableOnClick(boolean)} for details.
 *
 * @return true if the button is disabled when clicked, false otherwise
 */
public boolean isDisableOnClick() {
  return getState(false).disableOnClick;
}

代码示例来源:origin: com.vaadin/vaadin-server

public void setIconAlternateText(String iconAltText) {
  getState().iconAltText = iconAltText;
}

代码示例来源:origin: com.vaadin/vaadin-server

@Override
protected NativeButtonState getState() {
  return (NativeButtonState) super.getState();
}

代码示例来源:origin: com.vaadin/vaadin-server

@Override
protected NativeButtonState getState(boolean markAsDirty) {
  return (NativeButtonState) super.getState(markAsDirty);
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Determines if a button is automatically disabled when clicked. If this is
 * set to true the button will be automatically disabled when clicked,
 * typically to prevent (accidental) extra clicks on a button.
 * <p>
 * Note that this is only used when the click comes from the user, not when
 * calling {@link #click()} method programmatically. Also, if developer
 * wants to re-enable the button, it needs to be done programmatically.
 * </p>
 *
 * @param disableOnClick
 *            true to disable button when it is clicked, false otherwise
 */
public void setDisableOnClick(boolean disableOnClick) {
  getState().disableOnClick = disableOnClick;
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Return HTML rendering setting.
 *
 * @return <code>true</code> if the caption text is to be rendered as HTML,
 *         <code>false</code> otherwise
 *
 * @deprecated as of 8.0.0, use {@link #isCaptionAsHtml()} instead.
 */
@Deprecated
public boolean isHtmlContentAllowed() {
  return getState(false).captionAsHtml;
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Set whether the caption text is rendered as HTML or not. You might need
 * to re-theme button to allow higher content than the original text style.
 *
 * If set to true, the captions are passed to the browser as html and the
 * developer is responsible for ensuring no harmful html is used. If set to
 * false, the content is passed to the browser as plain text.
 *
 * @param htmlContentAllowed
 *            <code>true</code> if caption is rendered as HTML,
 *            <code>false</code> otherwise
 *
 * @deprecated as of 8.0.0, use {@link #setCaptionAsHtml(boolean)} instead.
 */
@Deprecated
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
  getState().captionAsHtml = htmlContentAllowed;
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Removes the keyboard shortcut previously set with
 * {@link #setClickShortcut(int, int...)}.
 */
public void removeClickShortcut() {
  if (clickShortcut != null) {
    removeShortcutListener(clickShortcut);
    clickShortcut = null;
    getState().clickShortcutKeyCode = 0;
  }
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Sets the component's icon and alt text.
 * <p>
 * An alt text is shown when an image could not be loaded, and read by
 * assistive devices.
 *
 * @param icon
 *            the icon to be shown with the component's caption.
 * @param iconAltText
 *            String to use as alt text
 */
public void setIcon(Resource icon, String iconAltText) {
  super.setIcon(icon);
  getState().iconAltText = iconAltText == null ? "" : iconAltText;
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Makes it possible to invoke a click on this button by pressing the given
 * {@link KeyCode} and (optional) {@link ModifierKey}s.<br/>
 * The shortcut is global (bound to the containing Window).
 *
 * @param keyCode
 *            the keycode for invoking the shortcut
 * @param modifiers
 *            the (optional) modifiers for invoking the shortcut, null for
 *            none
 */
public void setClickShortcut(int keyCode, int... modifiers) {
  if (clickShortcut != null) {
    removeShortcutListener(clickShortcut);
  }
  clickShortcut = new ClickShortcut(this, keyCode, modifiers);
  addShortcutListener(clickShortcut);
  getState().clickShortcutKeyCode = clickShortcut.getKeyCode();
}

代码示例来源:origin: org.opencms/opencms-core

/**
   * @see com.vaadin.server.AbstractClientConnector#getState()
   */
  @Override
  protected CmsCopyToClipboardState getState() {

    return (CmsCopyToClipboardState)super.getState();
  }
}

代码示例来源:origin: org.opencms/opencms-core

/**
   * @see com.vaadin.ui.AbstractComponent#getState()
   */
  @Override
  protected CmsUploadState getState() {

    return (CmsUploadState)super.getState();
  }
}

代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets

@Override
public PopupButtonState getState() {
  return (PopupButtonState) super.getState();
}

代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets

@Override
protected CubaButtonState getState(boolean markAsDirty) {
  return (CubaButtonState) super.getState(markAsDirty);
}

代码示例来源:origin: org.vaadin.addons/popupbutton

@Override
public PopupButtonState getState() {
  return (PopupButtonState) super.getState();
}

代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets

@Override
protected CubaButtonState getState() {
  return (CubaButtonState) super.getState();
}

代码示例来源:origin: com.haulmont.thirdparty/popupbutton

@Override
public PopupButtonState getState() {
  return (PopupButtonState) super.getState();
}

相关文章

微信公众号

最新文章

更多