|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.StatefulCanvas
com.smartgwt.client.widgets.StretchImg
public class StretchImg
The StretchImg widget class implements a widget type that displays a list of multiple images that make up a single image.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet, scClassName |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
StretchImg()
|
|
StretchImg(JavaScriptObject jsObj)
|
Method Summary | |
---|---|
protected JavaScriptObject |
create()
|
int |
getCapSize()
If the default items are used, capSize is the size in pixels of the first and last images in this stretchImg. |
String |
getGripImgSuffix()
Suffix used the 'grip' image if showGrip is true. |
String |
getHSrc()
Base URL for the image if vertical is false and src is unset. |
ImageStyle |
getImageType()
Indicates whether the image should be tiled/cropped, stretched, or centered when the size of this widget does not match the size of the image. |
String |
getItemBaseStyle()
If specified this css class will be applied to the individual item images within this StretchImg. |
static StretchImg |
getOrCreateRef(JavaScriptObject jsObj)
|
Boolean |
getShowDownGrip()
If showGrip is true, this property determines whether to show
the 'Down' state on the grip image when the user mousedown's on this widget. |
Boolean |
getShowGrip()
Should we show a "grip" image floating above the center of this widget? |
Boolean |
getShowRollOverGrip()
If showGrip is true, this property determines whether to show
the 'Over' state on the grip image when the user rolls over on this widget. |
Boolean |
getShowTitle()
Determines whether any specified title will be displayed
for this component.Applies to Image-based components only, where the title will be rendered out in a label floating over the component |
String |
getSrc()
The base URL for the image. |
Boolean |
getVertical()
Indicates whether the list of images is drawn vertically from top to bottom (true), or horizontally from left to right (false). |
String |
getVSrc()
Base URL for the image if vertical is true and src is unset. |
void |
setCapSize(int capSize)
If the default items are used, capSize is the size in pixels of the first and last images in this stretchImg. |
static void |
setDefaultProperties(StretchImg stretchImgProperties)
Class level method to set the default properties of this class. |
void |
setGripImgSuffix(String gripImgSuffix)
Suffix used the 'grip' image if showGrip is true. |
void |
setHSrc(String hSrc)
Base URL for the image if vertical is false and src is unset. |
void |
setImageType(ImageStyle imageType)
Indicates whether the image should be tiled/cropped, stretched, or centered when the size of this widget does not match the size of the image. |
void |
setItemBaseStyle(String itemBaseStyle)
If specified this css class will be applied to the individual item images within this StretchImg. |
void |
setShowDownGrip(Boolean showDownGrip)
If showGrip is true, this property determines whether to show
the 'Down' state on the grip image when the user mousedown's on this widget. |
void |
setShowGrip(Boolean showGrip)
Should we show a "grip" image floating above the center of this widget? |
void |
setShowRollOverGrip(Boolean showRollOverGrip)
If showGrip is true, this property determines whether to show
the 'Over' state on the grip image when the user rolls over on this widget. |
void |
setShowTitle(Boolean showTitle)
Determines whether any specified title will be displayed
for this component.Applies to Image-based components only, where the title will be rendered out in a label floating over the component |
void |
setSrc(String src)
The base URL for the image. |
void |
setState(String newState)
Set the specified image's state to newState and update the displayed image given by whichPart, or set the state for all images to newState and update the displayed images if whichPart is not provided. |
void |
setState(String newState,
String whichPart)
Set the specified image's state to newState and update the displayed image given by whichPart, or set the state for all images to newState and update the displayed images if whichPart is not provided. |
void |
setVertical(Boolean vertical)
Indicates whether the list of images is drawn vertically from top to bottom (true), or horizontally from left to right (false). |
void |
setVSrc(String vSrc)
Base URL for the image if vertical is true and src is unset. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public StretchImg()
public StretchImg(JavaScriptObject jsObj)
Method Detail |
---|
public static StretchImg getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create
in class StatefulCanvas
public void setCapSize(int capSize)
capSize
- capSize Default value is 2Appearance overview and related methods
public int getCapSize()
Appearance overview and related methods
public void setGripImgSuffix(String gripImgSuffix) throws IllegalStateException
showGrip
is true.
Note : This is an advanced setting
gripImgSuffix
- gripImgSuffix Default value is "grip"
IllegalStateException
- this property cannot be changed after the component has been createdpublic String getGripImgSuffix()
showGrip
is true.
public void setHSrc(String hSrc)
vertical
is false and src
is unset.
hSrc
- hSrc Default value is nullsetSrc(java.lang.String)
,
setVSrc(java.lang.String)
,
Appearance overview and related methods
public String getHSrc()
vertical
is false and src
is unset.
getSrc()
,
getVSrc()
,
Appearance overview and related methods
public void setImageType(ImageStyle imageType)
imageType
- imageType Default value is Img.STRETCHAppearance overview and related methods
public ImageStyle getImageType()
Appearance overview and related methods
public void setItemBaseStyle(String itemBaseStyle)
items
array
. This base style will have standard stateful suffixes appended to indicate the state of this component (as
described in baseStyle
).
itemBaseStyle
- itemBaseStyle Default value is nullpublic String getItemBaseStyle()
items
array
. This base style will have standard stateful suffixes appended to indicate the state of this component (as
described in baseStyle
).
public void setShowDownGrip(Boolean showDownGrip) throws IllegalStateException
showGrip
is true, this property determines whether to show
the 'Down' state on the grip image when the user mousedown's on this widget. Has no effect if showDown
is false.
Note : This is an advanced setting
showDownGrip
- showDownGrip Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getShowDownGrip()
showGrip
is true, this property determines whether to show
the 'Down' state on the grip image when the user mousedown's on this widget. Has no effect if showDown
is false.
public void setShowGrip(Boolean showGrip) throws IllegalStateException
Note : This is an advanced setting
showGrip
- showGrip Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getShowGrip()
public void setShowRollOverGrip(Boolean showRollOverGrip) throws IllegalStateException
showGrip
is true, this property determines whether to show
the 'Over' state on the grip image when the user rolls over on this widget. Has no effect if showRollOver
is false.
Note : This is an advanced setting
showRollOverGrip
- showRollOverGrip Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic Boolean getShowRollOverGrip()
showGrip
is true, this property determines whether to show
the 'Over' state on the grip image when the user rolls over on this widget. Has no effect if showRollOver
is false.
public void setShowTitle(Boolean showTitle)
title
will be displayed
for this component.Note : This is an advanced setting
showTitle
- showTitle Default value is falsepublic Boolean getShowTitle()
title
will be displayed
for this component.
public void setSrc(String src)
As with src
, the State
of the component is added to this URL. Then, the image segment name as specified by
items
is added.
For example, for a stretchImg in "Over"
state with a src
of "button.png" and a segment name of "stretch", the resulting URL would be
"button_Over_stretch.png".
If this method is called after the component has been drawn/initialized:
Changes the base src
for this stretchImg, redrawing if necessary.
src
- new URL for the image. Default value is nullsetHSrc(java.lang.String)
,
setVSrc(java.lang.String)
,
Appearance overview and related methods
public String getSrc()
As with src
, the State
of the component is added to this URL. Then, the image segment name as specified by
items
is added.
For example, for a stretchImg in "Over"
state with a src
of "button.png" and a segment name of "stretch", the resulting URL would be
"button_Over_stretch.png".
getHSrc()
,
getVSrc()
,
Appearance overview and related methods
public void setVertical(Boolean vertical)
vertical
- vertical Default value is trueAppearance overview and related methods
public Boolean getVertical()
Appearance overview and related methods
public void setVSrc(String vSrc)
vertical
is true and src
is unset.
vSrc
- vSrc Default value is nullsetSrc(java.lang.String)
,
setVSrc(java.lang.String)
,
Appearance overview and related methods
public String getVSrc()
vertical
is true and src
is unset.
getSrc()
,
getVSrc()
,
Appearance overview and related methods
public void setState(String newState)
newState
- name for the new state ("off", "down", etc)public void setState(String newState, String whichPart)
newState
- name for the new state ("off", "down", etc)whichPart
- name of the piece to set ("start", "stretch" or "end") if not specified, sets them allAppearance overview and related methods
public static void setDefaultProperties(StretchImg stretchImgProperties)
Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.
stretchImgProperties
- properties that should be used as new defaults when instances of this class are created
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |