ClientInfoEvent"
From Documentation
Jumperchen (talk | contribs) (Created page with "{{ZKComponentReferencePageHeader}} = OrientationEvent = *Demonstration: N/A *Java API: <javadoc>org.zkoss.zk.ui.event.OrientationEvent </javadoc> *JavaScript API: N/A = Employ...") |
Jumperchen (talk | contribs) |
(No difference)
|
Revision as of 09:31, 6 August 2012
OrientationEvent
- Demonstration: N/A
- Java API: OrientationEvent
- JavaScript API: N/A
Employment/Purpose
Represents orientation change event on tablet when user changes the orientation.
Note: All root components of all pages of the desktop will receives this event.
Example
To register this event can resize the layout to fit the whole screen for user.
<tabbox id="tbx" height="400px" width="600px">
<attribute name="onOrientationChange"><![CDATA[
OrientationEvent oe = (OrientationEvent) event;
String orient = oe.getOrientation();
lbl.setValue(orient);
if (orient.equals("portrait")) {
tbx.setHeight("600px");
tbx.setWidth("400px");
} else {
tbx.setHeight("400px");
tbx.setWidth("600px");
}
]]></attribute>
<tabs>
<tab label="tab 1" />
</tabs>
<tabpanels>
<tabpanel>
Current Orientation: <label id="lbl"/>
</tabpanel>
</tabpanels>
</tabbox>
Supported events
None | None |
Supported Children
*NONE
Use cases
Version | Description | Example Location |
---|---|---|
Version History
Version | Date | Content |
---|---|---|
6.5.0 | July, 2012 | Add a way to listen onOrientationChange for tablet device |