Class Drawer

All Implemented Interfaces:
Serializable, Cloneable, Component, Scope, ComponentCtrl

public class Drawer extends XulElement
A drawer.

Available in ZK EE.

Only support browsers that support Flex and CSS Transitions. (IE10+, Edge, Chrome, Firefox, Safari)

Since:
9.0.0
Author:
rudyhuang
See Also:
  • Constructor Details

    • Drawer

      public Drawer()
  • Method Details

    • getTitle

      public String getTitle()
      Returns the title of this drawer. null means no title.

      Default: null.

    • setTitle

      public void setTitle(String title)
      Sets the title of this drawer. null means no title.
      Parameters:
      title - the title.
    • getPosition

      public String getPosition()
      Returns the position of this drawer. Valid values are "left", "right", "top" and "bottom".

      Default: right.

    • setPosition

      public void setPosition(String position) throws WrongValueException
      Sets the position of this drawer. Valid values are "left", "right", "top" and "bottom".
      Parameters:
      position - the position of this drawer.
      Throws:
      WrongValueException - if value is not valid.
    • isMask

      public boolean isMask()
      Returns whether it is masked when opened.

      Default: true.

    • setMask

      public void setMask(boolean mask)
      Sets whether it is masked when opened.
      Parameters:
      mask - mask enabled?
    • isClosable

      public boolean isClosable()
      Returns whether it is closeable by user (a button).

      Default: false.

    • setClosable

      public void setClosable(boolean closable)
      Sets whether it is closeable by user (a button).
      Parameters:
      closable - closable enabled?
    • isAutodrop

      public boolean isAutodrop()
      Returns whether it is opened automatically when the mouse cursor is near the page edge.

      Default: false.

    • setAutodrop

      public void setAutodrop(boolean autodrop)
      Sets whether it is opened automatically when the mouse cursor is near the page edge.
      Parameters:
      autodrop - autodrop enabled?
    • renderProperties

      protected void renderProperties(ContentRenderer renderer) throws IOException
      Description copied from class: HtmlBasedComponent
      Renders the content of this component, excluding the enclosing tags and children.

      See also ZK Client-side Reference: Property Rendering

      Overrides:
      renderProperties in class XulElement
      Throws:
      IOException
    • service

      public void service(AuRequest request, boolean everError)
      Description copied from class: HtmlBasedComponent
      Processes an AU request.

      Default: it handles onClick, onDoubleClick, onRightClick onMove, onSize, onZIndex.

      Specified by:
      service in interface ComponentCtrl
      Overrides:
      service in class HtmlBasedComponent
      everError - whether any error ever occurred before processing this request.
      See Also:
    • getZclass

      public String getZclass()
      Description copied from class: HtmlBasedComponent
      Returns the ZK Cascading Style class for this component. It usually depends on the implementation of the mold (AbstractComponent.getMold()).

      Default: null (the default value depends on element).

      HtmlBasedComponent.setZclass(java.lang.String)) will completely replace the default style of a component. In other words, the default style of a component is associated with the default value of HtmlBasedComponent.getZclass(). Once it is changed, the default style won't be applied at all. If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String) instead.

      Overrides:
      getZclass in class HtmlBasedComponent
      See Also:
    • setHflex

      public void setHflex(String flex)
      Description copied from class: HtmlBasedComponent
      Sets horizontal flex hint of this component.

      Number flex indicates how this component's container distributes remaining empty space among its children horizontally. Flexible component grow and shrink to fit their given space. Flexible components with larger flex values will be made larger than components with lower flex values, at the ratio determined by all flexible components. The actual flex value is not relevant unless there are other flexible components within the same container. Once the default sizes of components in a container are calculated, the remaining space in the container is divided among the flexible components, according to their flex ratios.

      Specify a flex value of negative value, 0, or "false" has the same effect as leaving the flex attribute out entirely. Specify a flex value of "true" has the same effect as a flex value of 1.

      Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components.

      Overrides:
      setHflex in class HtmlBasedComponent
      Parameters:
      flex - horizontal flex hint of this component.
      See Also:
    • setVflex

      public void setVflex(String flex)
      Description copied from class: HtmlBasedComponent
      Sets vertical flexibility hint of this component.

      Number flex indicates how this component's container distributes remaining empty space among its children vertically. Flexible component grow and shrink to fit their given space. Flexible components with larger flex values will be made larger than components with lower flex values, at the ratio determined by all flexible components. The actual flex value is not relevant unless there are other flexible components within the same container. Once the default sizes of components in a container are calculated, the remaining space in the container is divided among the flexible components, according to their flex ratios.

      Specify a flex value of negative value, 0, or "false" has the same effect as leaving the flex attribute out entirely. Specify a flex value of "true" has the same effect as a flex value of 1.

      Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components.

      Overrides:
      setVflex in class HtmlBasedComponent
      Parameters:
      flex - the vertical flex hint.
      See Also:
    • open

      public void open()
      Opens the drawer.
    • close

      public void close()
      Closes the drawer.