Class ShowMaskWrapper

java.lang.Object
org.adempiere.webui.ShowMaskWrapper
All Implemented Interfaces:
ISupportMask

public class ShowMaskWrapper extends Object implements ISupportMask
Helper class for ISupportMask implementation. Just make a instance of this class and let it do everything.
Author:
hieplq
  • Constructor Details

    • ShowMaskWrapper

      public ShowMaskWrapper(org.zkoss.zk.ui.Component comp)
      comp is component that implement ISupportMask
      Parameters:
      comp -
    • ShowMaskWrapper

      public ShowMaskWrapper(UIPart uiPart)
      this mask will show over component from UIPart.getComponent()
      Parameters:
      uiPart -
  • Method Details

    • 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. return new Mask when mask is not yet create
      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().
      Specified by:
      getMaskComponent in interface ISupportMask
      Returns:
      Component
    • setFlagShowMask

      public static void setFlagShowMask(org.zkoss.zk.ui.Component comp)
      Set flag ISupportMask.READY_SHOW_MASK_FLAG to Component.REQUEST_SCOPE
      Parameters:
      comp -
    • hasFlagShowMask

      public static boolean hasFlagShowMask(org.zkoss.zk.ui.Component comp)
      check flag ISupportMask.READY_SHOW_MASK_FLAG exists in scope Component.REQUEST_SCOPE
      Parameters:
      comp -
      Returns:
      true if flag exists