org.zkoss.zk.ui.event
Class SizeEvent

java.lang.Object
  extended by org.zkoss.zk.ui.event.Event
      extended by org.zkoss.zk.ui.event.SizeEvent

public class SizeEvent
extends Event

Represents an event caused by a component being re-sized.

Component Implementation Note:
A sizable component must implement Sizable for the returned object of ComponentCtrl.getExtraCtrl().

Author:
tomyeh

Field Summary
static int ALT_KEY
          Indicates whether the Alt key is pressed.
static int CTRL_KEY
          Indicates whether the Ctrl key is pressed.
static int SHIFT_KEY
          Indicates whether the Shift key is pressed.
 
Constructor Summary
SizeEvent(java.lang.String name, Component target, java.lang.String width, java.lang.String height, int keys)
          Constructs a mouse relevant event.
 
Method Summary
 java.lang.String getHeight()
          Returns the height of the component after re-sized.
 int getKeys()
          Returns what keys were pressed when the component is resized, or 0 if none of them was pressed.
 java.lang.String getWidth()
          Returns the width of the component after re-sized.
 
Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALT_KEY

public static final int ALT_KEY
Indicates whether the Alt key is pressed. It might be returned as part of getKeys().

See Also:
Constant Field Values

CTRL_KEY

public static final int CTRL_KEY
Indicates whether the Ctrl key is pressed. It might be returned as part of getKeys().

See Also:
Constant Field Values

SHIFT_KEY

public static final int SHIFT_KEY
Indicates whether the Shift key is pressed. It might be returned as part of getKeys().

See Also:
Constant Field Values
Constructor Detail

SizeEvent

public SizeEvent(java.lang.String name,
                 Component target,
                 java.lang.String width,
                 java.lang.String height,
                 int keys)
Constructs a mouse relevant event.

Method Detail

getWidth

public final java.lang.String getWidth()
Returns the width of the component after re-sized.


getHeight

public final java.lang.String getHeight()
Returns the height of the component after re-sized.


getKeys

public final int getKeys()
Returns what keys were pressed when the component is resized, or 0 if none of them was pressed. It is a combination of CTRL_KEY, SHIFT_KEY and ALT_KEY.



Copyright © 2005-2009 Potix Corporation. All Rights Reserved.