org.zkoss.gmaps
Class Gscreen

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.gmaps.Gscreen
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Mapitem, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Gscreen
extends org.zkoss.zk.ui.HtmlBasedComponent
implements Mapitem

A rectangular image on the Gmaps whose position remains fixed on the screen even you move the maps. It can be used in showing logos, heads-up display, etc.

Author:
henrichen
See Also:
Gimage, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
 
Field Summary
protected  java.lang.String _height
           
protected  java.lang.String _offsetX
           
protected  java.lang.String _offsetY
           
protected  java.lang.String _screenX
           
protected  java.lang.String _screenY
           
protected  java.lang.String _width
           
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Gscreen()
           
Gscreen(java.lang.String src, java.lang.String screenX, java.lang.String screenY, java.lang.String offsetX, java.lang.String offsetY, java.lang.String width, java.lang.String height)
          Google Screen image (GScreenOverlay).
 
Method Summary
 org.zkoss.image.Image getContent()
          Returns the content set by setContent(org.zkoss.image.Image).
 java.lang.String getHeight()
          Returns the image height.
 java.lang.String getOffsetX()
          Returns the X offset (in px or percentage of the maps size) to move left the image.
 java.lang.String getOffsetY()
          Returns the Y offset (in px or percentage of the maps size) to move down the image.
 java.lang.String getOuterAttrs()
           
 java.lang.String getScreenX()
          Returns the X coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.
 java.lang.String getScreenY()
          Returns the Y coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.
 java.lang.String getSrc()
          Returns the source URI of the image.
 java.lang.String getWidth()
          Returns the image width.
 boolean isChildable()
          Default: not childable.
 void setContent(org.zkoss.image.Image image)
          Sets the content directly.
 void setHeight(java.lang.String height)
          Sets the image height in px or percentage of the maps size.
 void setOffsetX(java.lang.String offsetX)
          Sets the X offset (in px or percentage of the maps size) to move left the image.
 void setOffsetY(java.lang.String offsetY)
          Sets the Y offset (in px or percentage of the maps size) to move left the image.
 void setScreenX(java.lang.String screenX)
          Sets the X coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.
 void setScreenY(java.lang.String screenY)
          Sets the Y coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.
 void setSrc(java.lang.String src)
          Sets the source URI of the image.
 void setWidth(java.lang.String width)
          Set the image width in px or percentage of the maps size.
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getDraggable, getDroppable, getInnerAttrs, getLeft, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getZIndex, newExtraCtrl, setClass, setDraggable, setDroppable, setLeft, setSclass, setStyle, setTooltiptext, setTop, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isAsapRequired, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getFellow, getFellowIfAny, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, setAttribute, setAttribute, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdateDeferred, unsetVariable
 

Field Detail

_screenX

protected java.lang.String _screenX

_screenY

protected java.lang.String _screenY

_offsetX

protected java.lang.String _offsetX

_offsetY

protected java.lang.String _offsetY

_width

protected java.lang.String _width

_height

protected java.lang.String _height
Constructor Detail

Gscreen

public Gscreen()

Gscreen

public Gscreen(java.lang.String src,
               java.lang.String screenX,
               java.lang.String screenY,
               java.lang.String offsetX,
               java.lang.String offsetY,
               java.lang.String width,
               java.lang.String height)
Google Screen image (GScreenOverlay).

Parameters:
src - the image source
screenX - the X coordinate (in px or percentage of the maps size, left-bottom corner) of the screen the image is going to be placed.
screenY - the Y coordinate (in px or percentage of the maps size, left-bottom corner) of the screen the image is going to be placed.
offsetX - the X offset (in px or percentage of the maps size) to move left the image.
offsetY - the Y offset (in px or percentage of the maps size) to move down the image. left-bottom corner of the image to be shown.
width - the width (in px or percentage of the maps size) of the image.
height - the height (in px or percentage of the maps size) of the image.
Method Detail

getScreenX

public java.lang.String getScreenX()
Returns the X coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.

Returns:
the screen Y coordinate

setScreenX

public void setScreenX(java.lang.String screenX)
Sets the X coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.

Parameters:
screenX - the X coordinate in px or percentage

getScreenY

public java.lang.String getScreenY()
Returns the Y coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.

Returns:
the screen Y coordinate

setScreenY

public void setScreenY(java.lang.String screenY)
Sets the Y coordinate (in px or percentage of the maps size, left-bottom corner as the origin) of the screen the image is going to be placed.

Parameters:
screenY - the Y coordinate in px or percentage

getOffsetX

public java.lang.String getOffsetX()
Returns the X offset (in px or percentage of the maps size) to move left the image.

Returns:
the X offset (in px or percentage of the maps size) to move left the image.

setOffsetX

public void setOffsetX(java.lang.String offsetX)
Sets the X offset (in px or percentage of the maps size) to move left the image.

Parameters:
offsetX - the X offset (in px or percentage of the maps size) to move left the image.

getOffsetY

public java.lang.String getOffsetY()
Returns the Y offset (in px or percentage of the maps size) to move down the image.

Returns:
the Y offset (in px or percentage of the maps size) to move down the image.

setOffsetY

public void setOffsetY(java.lang.String offsetY)
Sets the Y offset (in px or percentage of the maps size) to move left the image.

Parameters:
offsetY - the Y offset (in px or percentage of the maps size) to move left the image.

setWidth

public void setWidth(java.lang.String width)
Set the image width in px or percentage of the maps size.

Overrides:
setWidth in class org.zkoss.zk.ui.HtmlBasedComponent
Parameters:
width - the width (in px or percentage of the maps size) of the image.

getWidth

public java.lang.String getWidth()
Returns the image width.

Overrides:
getWidth in class org.zkoss.zk.ui.HtmlBasedComponent
Returns:
the image width.

setHeight

public void setHeight(java.lang.String height)
Sets the image height in px or percentage of the maps size.

Overrides:
setHeight in class org.zkoss.zk.ui.HtmlBasedComponent
Parameters:
height - the height (in px or percentage of the maps size) of the image.

getHeight

public java.lang.String getHeight()
Returns the image height.

Overrides:
getHeight in class org.zkoss.zk.ui.HtmlBasedComponent
Returns:
the image height.

getSrc

public java.lang.String getSrc()
Returns the source URI of the image.

Default: null.


setSrc

public void setSrc(java.lang.String src)
Sets the source URI of the image.

If setContent(org.zkoss.image.Image) is ever called with non-null, it takes heigher priority than this method.

Parameters:
src - the URI of the image source

setContent

public void setContent(org.zkoss.image.Image image)
Sets the content directly. Default: null.

Parameters:
image - the image to display. If not null, it has higher priority than getSrc().

getContent

public org.zkoss.image.Image getContent()
Returns the content set by setContent(org.zkoss.image.Image).

Note: it won't fetch what is set thru by setSrc(java.lang.String). It simply returns what is passed to setContent(org.zkoss.image.Image).


getOuterAttrs

public java.lang.String getOuterAttrs()
Overrides:
getOuterAttrs in class org.zkoss.zk.ui.HtmlBasedComponent

isChildable

public boolean isChildable()
Default: not childable.

Specified by:
isChildable in interface org.zkoss.zk.ui.Component
Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent


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