Interface Visualizer


public interface Visualizer
A part of Execution for visualizing the components whose visual parts are modified. There is one-to-one relationship between the visualizer and the execution.

Its implementation highly depends on UiEngine.

Author:
tomyeh
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Adds the responses to the first Visualizer if it is caused by async-update.
    void
    Disables this visualizer.
    boolean
    disableClientUpdate(Component comp, boolean disable)
    Sets whether to disable the update of the client widget.
    void
    Enables this visualizer.
    Returns the execution that this visualizer is associated with.
    Returns the owner component for this execution, or null if this execution is not owned by any component.
    boolean
    Whether the execution associated with this visualizer is caused by an async-update.
    boolean
    Returns whether it is in recovering.
  • Method Details

    • getExecution

      Execution getExecution()
      Returns the execution that this visualizer is associated with.
    • getOwner

      Component getOwner()
      Returns the owner component for this execution, or null if this execution is not owned by any component.

      The include component is a typical owner.

      Since:
      5.0.0
    • isEverAsyncUpdate

      boolean isEverAsyncUpdate()
      Whether the execution associated with this visualizer is caused by an async-update.

      Note: There might be a chain of executions. Execution.isAsyncUpdate(org.zkoss.zk.ui.Page) returns whether a page is in async-update in the execution being called, On the other hand, this method returns whether this first execution (of the whole chain) is caused by async-update.

    • addToFirstAsyncUpdate

      boolean addToFirstAsyncUpdate(List<AuResponse> responses)
      Adds the responses to the first Visualizer if it is caused by async-update.
      Returns:
      true if responses are added; false if the first Visualizer is NOT caused by async responses.
    • isRecovering

      boolean isRecovering()
      Returns whether it is in recovering. In other words, it is in the invocation of FailoverManager.recover(org.zkoss.zk.ui.Session, org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.Desktop). If in recovering, no response is sent to the client.
    • disable

      void disable()
      Disables this visualizer. Once disabled, any update of components won't be synchronized to the client. In other words, it ignores any updates to components.

      Currently, it is called only when removing a desktop. You rarely need to call this method.

      Since:
      3.0.2
    • enable

      void enable()
      Enables this visualizer. Once enabled, any update of components will be synchronized to the client.
      Since:
      10.0.0
    • disableClientUpdate

      boolean disableClientUpdate(Component comp, boolean disable)
      Sets whether to disable the update of the client widget. By default, if a component is attached to a page, modifications that change the visual representation will be sent to the client to ensure the consistency.
      Returns:
      whether it has been disabled before this invocation, i.e., the previous disable status
      Since:
      10.1.0