Class AbstractUIPart

java.lang.Object
org.adempiere.webui.part.AbstractUIPart
All Implemented Interfaces:
ISupportMask, UIPart
Direct Known Subclasses:
AbstractADTabbox, AbstractADWindowContent, AbstractDesktop, ADWindow, MultiTabPart, WindowContainer, WLogin

public abstract class AbstractUIPart extends Object implements UIPart, ISupportMask
Abstract base class for UI block controller
Author:
Low Heng Sin
  • Field Details

    • page

      protected org.zkoss.zk.ui.Page page
    • showMaskWrapper

      protected ShowMaskWrapper showMaskWrapper
  • Constructor Details

    • AbstractUIPart

      public AbstractUIPart()
  • Method Details

    • createPart

      public org.zkoss.zk.ui.Component createPart(Object parent)
      Create UI block hosted by parent
      Specified by:
      createPart in interface UIPart
      Parameters:
      parent - Component or Page
      Returns:
      Component
    • doCreatePart

      protected abstract org.zkoss.zk.ui.Component doCreatePart(org.zkoss.zk.ui.Component parent)
      Sub class override this to create root UI block or child UI block
      Parameters:
      parent - parent Component or null for root UI block
      Returns:
      Component
    • showMask

      public void showMask()
      Show mask over this component.
      When override, remember to call Component.setAttribute(String, Object, int) with name ISupportMask.READY_SHOW_MASK_FLAG, value Integer(1) and scope Component.REQUEST_SCOPE.
      Call by LayoutUtils.
      Specified by:
      showMask in interface ISupportMask
    • hideMask

      public void hideMask()
      Hide mask. With ISupportMask return from showMask, call this function in handle close event of window.
      When override, remember check exists of key ISupportMask.READY_SHOW_MASK_FLAG at scope Component.REQUEST_SCOPE in attribute. If flag exists, don't hide mask.
      Call by LayoutUtils.
      Specified by:
      hideMask in interface ISupportMask
    • getMaskObj

      public Mask getMaskObj()
      Return cache Mask or create new Mask and return.
      Specified by:
      getMaskObj in interface ISupportMask
      Returns:
      Mask
    • getMaskComponent

      public org.zkoss.zk.ui.Component getMaskComponent()
      Return self if is a component or return component it manage.
      AbstractUIPart subclasses that implement this interface should return UIPart.getComponent(). knowIssue: because IDesktop.getComponent() return BorderLayout , don't append window to child list of it, in this case we must get parent of BorderLayout
      Specified by:
      getMaskComponent in interface ISupportMask
      Returns:
      Component