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:
Errorbox, Menupopup, 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
 void close(Map opts)
          Closes this popup at the client.
 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.
 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, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doRightClick_, doSelect_, 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, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onChildAdded_, onChildRemoved_, 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_, 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 on the left.
  • before_end
    the popup appears above the anchor, aligned on the right.
  • after_start
    the popup appears below the anchor, aligned on the left.
  • after_end
    the popup appears below the anchor, aligned on the right.
  • start_before
    the popup appears to the left of the anchor, aligned on the top.
  • start_after
    the popup appears to the left of the anchor, aligned on the bottom.
  • end_before
    the popup appears to the right of the anchor, aligned on the top.
  • end_after
    the popup appears to the right of the anchor, aligned on the bottom.
  • overlap
    the popup overlaps the anchor, with the top-left corners of both the anchor and popup aligned.
  • overlap_end
    the popup overlaps the anchor, with the top-right corners of both the anchor and popup aligned.
  • overlap_before
    the popup overlaps the anchor, with the bottom-left corners of both the anchor and popup aligned.
  • overlap_after
    the popup overlaps the anchor, with the bottom-right corners of both the anchor and popup aligned.
  • after_pointer
    the popup appears with the top aligned with the bottom of the anchor, with the topleft corner of the popup at the horizontal position of the mouse pointer.

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.

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.


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