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

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

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

Window.getState介绍

暂无

代码示例

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

/**
 *
 * @return true if a delay is used before recalculating sizes, false if
 *         sizes are recalculated immediately.
 */
public boolean isResizeLazy() {
  return getState(false).resizeLazy;
}

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

/**
 * Gets the current mode of the window.
 *
 * @see WindowMode
 * @return the mode of the window.
 */
public WindowMode getWindowMode() {
  return getState(false).windowMode;
}

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

/**
 * Sets the accessibility prefix for the window caption.
 *
 * This prefix is read to assistive device users before the window caption,
 * but not visible on the page.
 *
 * @param prefix
 *            String that is placed before the window caption
 */
public void setAssistivePrefix(String prefix) {
  getState().assistivePrefix = prefix;
}

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

/**
 * Gets the accessibility postfix for the window caption.
 *
 * This postfix is read to assistive device users after the window caption,
 * but not visible on the page.
 *
 * @return The accessibility postfix
 */
public String getAssistivePostfix() {
  return getState(false).assistivePostfix;
}

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

/**
 * Get if it is prevented to leave a window with the tab key.
 *
 * @return true when the focus is limited to inside the window, false when
 *         focus can leave the window
 */
public boolean isTabStopEnabled() {
  return getState(false).assistiveTabStop;
}

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

/**
 * Returns the closable status of the window. If a window is closable, it
 * typically shows an X in the upper right corner. Clicking on the X sends a
 * close event to the server. Setting closable to false will remove the X
 * from the window and prevent the user from closing the window.
 *
 * @return true if the window can be closed by the user.
 */
public boolean isClosable() {
  return getState(false).closable;
}

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

/**
 * Enables or disables that a window can be dragged (moved) by the user. By
 * default a window is draggable.
 * <p/>
 *
 * @param draggable
 *            true if the window can be dragged by the user
 */
public void setDraggable(boolean draggable) {
  getState().draggable = draggable;
}

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

/**
 * Sets the accessibility postfix for the window caption.
 *
 * This postfix is read to assistive device users after the window caption,
 * but not visible on the page.
 *
 * @param assistivePostfix
 *            String that is placed after the window caption
 */
public void setAssistivePostfix(String assistivePostfix) {
  getState().assistivePostfix = assistivePostfix;
}

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

/**
 * Gets the distance of Window left border in pixels from left border of the
 * containing (main window) when the window is in {@link WindowMode#NORMAL}.
 *
 * @return the Distance of Window left border in pixels from left border of
 *         the containing (main window).or -1 if unspecified
 * @since 4.0.0
 */
public int getPositionX() {
  return getState(false).positionX;
}

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

/**
 * Sets window resizable.
 *
 * @param resizable
 *            true if resizability is to be turned on
 */
public void setResizable(boolean resizable) {
  getState().resizable = resizable;
}

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

/**
 * Sets this window to be centered relative to its parent window. Affects
 * windows only. If the window is resized as a result of the size of its
 * content changing, it will keep itself centered as long as its position is
 * not explicitly changed programmatically or by the user.
 * <p>
 * <b>NOTE:</b> This method has several issues as currently implemented.
 * Please refer to http://dev.vaadin.com/ticket/8971 for details.
 */
public void center() {
  getState().centered = true;
}

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

/**
 * @return true if this window is modal.
 */
public boolean isModal() {
  return getState(false).modal;
}

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

/**
 *
 * @return true if window is resizable by the end-user, otherwise false.
 */
public boolean isResizable() {
  return getState(false).resizable;
}

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

/**
 * Indicates whether a window can be dragged or not. By default a window is
 * draggable.
 *
 * @return {@code true} if window is draggable; {@code false} if not
 */
public boolean isDraggable() {
  return getState(false).draggable;
}

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

/**
 * Gets the accessibility prefix for the window caption.
 *
 * This prefix is read to assistive device users before the window caption,
 * but not visible on the page.
 *
 * @return The accessibility prefix
 */
public String getAssistivePrefix() {
  return getState(false).assistivePrefix;
}

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

/**
 * Gets the message that is provided to users of assistive devices when the
 * user reaches the top of the window when leaving a window with the tab key
 * is prevented.
 *
 * @return the top message
 */
public String getTabStopTopAssistiveText() {
  return getState(false).assistiveTabStopTopText;
}

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

/**
 * Gets the message that is provided to users of assistive devices when the
 * user reaches the bottom of the window when leaving a window with the tab
 * key is prevented.
 *
 * @return the bottom message
 */
public String getTabStopBottomAssistiveText() {
  return getState(false).assistiveTabStopBottomText;
}

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

@Override
  public void windowMoved(int x, int y) {
    if (x != getState(false).positionX) {
      setPositionX(x);
    }
    if (y != getState(false).positionY) {
      setPositionY(y);
    }
  }
};

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

/**
 * Sets window modality. When a modal window is open, components outside
 * that window cannot be accessed.
 * <p>
 * Keyboard navigation is restricted by blocking the tab key at the top and
 * bottom of the window by activating the tab stop function internally.
 *
 * @param modal
 *            true if modality is to be turned on
 */
public void setModal(boolean modal) {
  getState().modal = modal;
  center();
}

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

protected void fireWindowWindowModeChange() {
  fireEvent(
      new Window.WindowModeChangeEvent(this, getState().windowMode));
}

相关文章