zul.wgt
Class Popup

java.lang.Object
  extended by zk.Object
      extended by zk.Widget
          extended by zul.Widget
              extended by zul.wgt.Popup
Direct Known Subclasses:
DropUploadManager, Menupopup, Notification, UploadManager

public class Popup
extends Widget

A container that is displayed as a popup. The popup window does not have any special frame. Popups can be displayed when an element is clicked by assigning the id of the popup to either the Widget.setPopup(zul.wgt.Popup), Widget.setContext(zul.wgt.Popup) or Widget.setTooltip(zul.wgt.Popup) attribute of the element.

Default Widget.getZclass(): z-popup.


Field Summary
 
Fields inherited from class zk.Widget
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
protected  void afterCloseAnima_()
          The handling after the closing effect of popup.
protected  void afterOpenAnima_()
          The handling after the opening effect of popup.
 void close(Map opts)
          Closes this popup at the client.
protected  void closeAnima_()
          The effect for closing the popup.
 boolean isOpen()
          Returns whether the popup is visible.
 void open(String ref, Offset offset, String position, Map opts)
          Opens the popup.
 void open(Widget ref, Offset offset, String position, Map opts)
          Opens the popup.
protected  void openAnima_()
          The effect for opening the popup.
 void position(Widget ref, Offset offset, String position, Map opts)
          Sets the popup position.
protected  boolean shallStackup_()
          Returns whether to instantiate a stackup when open(_global_.String, _global_.Offset, _global_.String, _global_.Map) is called.
 
Methods inherited from class zul.Widget
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class zk.Widget
$, $f, $f, $f, $init, $n, $n, $o, $s, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, bindDoubleTap_, bindSwipe_, bindTapHold_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedraw_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseEnter_, doMouseLeave_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doResizeScroll_, doRightClick_, doSelect_, doSwipe_, doTooltipOut_, doTooltipOver_, dropEffect_, extraBind_, fire, fireX, focus_, focus, forcerender, fromPageCoord, get, getAction, getCaveNode, getChildAt, getChildIndex, getClass, getDraggable, getDragMessage_, getDragNode, getDragOptions_, getDrop_, getDroppable, getElementsById, getElementsByName, getFirstNode_, getFloatZIndex_, getHeight, getHflex, getId, getLeft, getMold, getOldWidget_, getPage, getRenderdefer, getSclass, getScrollLeft, getScrollTop, getStyle, getTextNode, getTooltiptext, getTop, getTopWidget, getVflex, getWidth, getZclass, getZIndex, hide, ignoreDescendantFloatUp_, ignoreDrag_, initDrag_, insertBefore, insertChildHTML_, isAutoId, isBinding, isFloating_, isListen, isRealElement, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onAfterSize, onChildAdded_, onChildRemoved_, onChildRenderDefer_, onChildReplaced_, onChildVisible_, onDrop_, redraw, redrawHTML_, register, removeChild, removeChild, removeChildHTML_, removeHTML_, replaceCavedChildren_, replaceChildHTML_, replaceHTML, replaceWidget, rerender, rerender, scrollIntoView, sendAU_, set, set, setAction, setChildren, setDomVisible_, setDraggable, setDroppable, setFloating_, setFloatZIndex_, setHeight, setHflex, setId, setLeft, setListener, setListener, setListeners, setMold, setRenderdefer, setSclass, setScrollLeft, setScrollTop, setStyle, setTooltiptext, setTop, setTopmost, setVflex, setVisible, setWidth, setZclass, setZIndex, shallChildROD_, shallIgnoreClick_, show, smartUpdate, unbind_, unbind, unbindChildren_, unbindDoubleTap_, unbindSwipe_, unbindTapHold_, uncloneDrag_, unlisten, unlistenOnFitSize_, updateDomClass_, updateDomStyle_, uuid, zsync
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isOpen

public boolean isOpen()
Returns whether the popup is visible.

Returns:
boolean

open

public void open(String ref,
                 Offset offset,
                 String position,
                 Map opts)
Opens the popup.

Note: the ref with the position parameter is prior to the offset parameter, if any.

Parameters:
ref - the uuid of the ref widget.
offset - the offset of x and y
position - Possible values for the position attribute
opts - if opts.sendOnOpen exists, it will fire onOpen event. If opts.disableMask exists, it will show a disable mask. If opts.overflow exists, it allows the popup to appear out of the screen range. If opts.dodgeRef exists, it will avoid covering the reference element.
See Also:
open(zk.Widget, Offset, String, Map)

open

public void open(Widget ref,
                 Offset offset,
                 String position,
                 Map opts)
Opens the popup.

Note: the ref with the position parameter is prior to the offset parameter, if any.

Parameters:
ref - the referred widget.
offset - the offset of x and y
position -

Possible values for the position attribute are:

  • before_start
    the popup appears above the anchor, aligned to the left.
  • before_center
    the popup appears above the anchor, aligned to the center.
  • before_end
    the popup appears above the anchor, aligned to the right.
  • after_start
    the popup appears below the anchor, aligned to the left.
  • after_center
    the popup appears below the anchor, aligned to the center.
  • after_end
    the popup appears below the anchor, aligned to the right.
  • start_before
    the popup appears to the left of the anchor, aligned to the top.
  • start_center
    the popup appears to the left of the anchor, aligned to the middle.
  • start_after
    the popup appears to the left of the anchor, aligned to the bottom.
  • end_before
    the popup appears to the right of the anchor, aligned to the top.
  • end_center
    the popup appears to the right of the anchor, aligned to the middle.
  • end_after
    the popup appears to the right of the anchor, aligned to the bottom.
  • overlap/top_left
    the popup overlaps the anchor, with anchor and popup aligned at top-left.
  • top_center
    the popup overlaps the anchor, with anchor and popup aligned at top-center.
  • overlap_end/top_right
    the popup overlaps the anchor, with anchor and popup aligned at top-right.
  • middle_left
    the popup overlaps the anchor, with anchor and popup aligned at middle-left.
  • middle_center
    the popup overlaps the anchor, with anchor and popup aligned at middle-center.
  • middle_right
    the popup overlaps the anchor, with anchor and popup aligned at middle-right.
  • overlap_before/bottom_left
    the popup overlaps the anchor, with anchor and popup aligned at bottom-left.
  • bottom_center
    the popup overlaps the anchor, with anchor and popup aligned at bottom-center.
  • overlap_after/bottom_right
    the popup overlaps the anchor, with anchor and popup aligned at bottom-right.
  • at_pointer
    the popup appears with the upper-left aligned with the mouse cursor.
  • after_pointer
    the popup appears with the top aligned with the bottom of the mouse cursor, with the left side of the popup at the horizontal position of the mouse cursor.

opts - if opts.sendOnOpen exists, it will fire onOpen event. If opts.disableMask exists, it will show a disable mask. If opts.overflow exists, it allows the popup to appear out of the screen range. If opts.dodgeRef exists, it will avoid covering the reference element.

openAnima_

protected void openAnima_()
The effect for opening the popup. Override this function to provide opening effect. afterOpenAnima_ needs to be called after the effect.

Since:
6.0.1

afterOpenAnima_

protected void afterOpenAnima_()
The handling after the opening effect of popup.

Since:
6.0.1

shallStackup_

protected boolean shallStackup_()
Returns whether to instantiate a stackup when open(_global_.String, _global_.Offset, _global_.String, _global_.Map) is called.

If the derive class created its own stackup (such as creating a shadow), it shall override this method to return false.

Returns:
boolean

position

public void position(Widget ref,
                     Offset offset,
                     String position,
                     Map opts)
Sets the popup position.

Note: the ref with the position parameter is prior to the offset parameter, if any.

Parameters:
ref - the referred widget.
offset - the offset of x and y
position -

Possible values for the position attribute refer to open(_global_.String, _global_.Offset, _global_.String, _global_.Map).

opts - a map of addition options.
Allowed values: refer to jqzk.position(Dimension,String,Map).

close

public void close(Map opts)
Closes this popup at the client.

In most cases, the popup is closed automatically when the user clicks outside of the popup.

Parameters:
opts - if opts.sendOnOpen exists, it will fire onOpen event.

closeAnima_

protected void closeAnima_()
The effect for closing the popup. Override this function to provide closing effect. afterCloseAnima_ needs to be called after the effect.

Since:
6.0.1

afterCloseAnima_

protected void afterCloseAnima_()
The handling after the closing effect of popup.

Since:
6.0.1


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo