public class Canvas extends BaseWidget implements HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasDropHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers
config, configOnly, id, isElementSet, nativeObject, scClassName
Constructor and Description |
---|
Canvas() |
Canvas(com.google.gwt.core.client.JavaScriptObject jsObj) |
Canvas(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
Canvas |
addChild(Canvas newChild)
Adds newChild as a child of this widget, set up a named object reference (i.e., this[name]) to the new widget if name
argument is provided, and draw the child if this widget has been drawn already.
|
Canvas |
addChild(Canvas newChild,
java.lang.String name) |
Canvas |
addChild(Canvas newChild,
java.lang.String name,
boolean autoDraw)
Adds newChild as a child of this widget, set up a named object reference (i.e., this[name]) to the new widget if name
argument is provided, and draw the child if this widget has been drawn already.
|
Canvas |
addChild(Canvas newChild,
java.lang.String name,
java.lang.Boolean autoDraw)
Adds newChild as a child of this widget, set up a named object reference (i.e., this[name]) to the new widget if name
argument is provided, and draw the child if this widget has been drawn already.
|
void |
addChild(com.google.gwt.user.client.ui.Widget widget)
Adds newChild as a child of this widget, set up a named object reference (i.e., this[name]) to the new widget if
name argument is provided, and draw the child if this widget has been drawn already.
|
com.google.gwt.event.shared.HandlerRegistration |
addClickHandler(ClickHandler handler)
Add a click handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDoubleClickHandler(DoubleClickHandler handler)
Add a doubleClick handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragMoveHandler(DragMoveHandler handler)
Add a dragMove handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragRepositionMoveHandler(DragRepositionMoveHandler handler)
Add a dragRepositionMove handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragRepositionStartHandler(DragRepositionStartHandler handler)
Add a dragRepositionStart handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragRepositionStopHandler(DragRepositionStopHandler handler)
Add a dragRepositionStop handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragResizeMoveHandler(DragResizeMoveHandler handler)
Add a dragResizeMove handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragResizeStartHandler(DragResizeStartHandler handler)
Add a dragResizeStart handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragResizeStopHandler(DragResizeStopHandler handler)
Add a dragResizeStop handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragStartHandler(DragStartHandler handler)
Add a dragStart handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragStopHandler(DragStopHandler handler)
Add a dragStop handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDropHandler(DropHandler handler)
Add a drop handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDropMoveHandler(DropMoveHandler handler)
Add a dropMove handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDropOutHandler(DropOutHandler handler)
Add a dropOut handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDropOverHandler(DropOverHandler handler)
Add a dropOver handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addFocusChangedHandler(FocusChangedHandler handler)
Add a focusChanged handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addHoverHandler(HoverHandler handler)
Add a hover handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addHoverHiddenHandler(HoverHiddenHandler handler)
Add a hoverHidden handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addKeyDownHandler(KeyDownHandler handler)
Add a keyDown handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addKeyPressHandler(KeyPressHandler handler)
Add a keyPress handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseDownHandler(MouseDownHandler handler)
Add a mouseDown handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseMoveHandler(MouseMoveHandler handler)
Add a mouseMove handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseOutHandler(MouseOutHandler handler)
Add a mouseOut handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseOverHandler(MouseOverHandler handler)
Add a mouseOver handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseStillDownHandler(MouseStillDownHandler handler)
Add a mouseStillDown handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseUpHandler(MouseUpHandler handler)
Add a mouseUp handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseWheelHandler(MouseWheelHandler handler)
Add a mouseWheel handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addMovedHandler(MovedHandler handler)
Add a moved handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addParentMovedHandler(ParentMovedHandler handler)
Add a parentMoved handler.
|
Canvas |
addPeer(Canvas newPeer)
Adds newPeer as a peer of this widget (also making it a child of this widget's parent, if any), set up a named object
reference (i.e., this[name]) to the new widget if name is provided, and draw the peer if this widget has been drawn
already.
|
Canvas |
addPeer(Canvas newPeer,
java.lang.String name) |
Canvas |
addPeer(Canvas newPeer,
java.lang.String name,
java.lang.Boolean autoDraw) |
Canvas |
addPeer(Canvas newPeer,
java.lang.String name,
java.lang.Boolean autoDraw,
java.lang.Boolean preDraw)
Adds newPeer as a peer of this widget (also making it a child of this widget's parent, if any), set up a named object
reference (i.e., this[name]) to the new widget if name is provided, and draw the peer if this widget has been drawn
already.
|
com.google.gwt.event.shared.HandlerRegistration |
addResizedHandler(ResizedHandler handler)
Add a resized handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addRightMouseDownHandler(RightMouseDownHandler handler)
Add a rightMouseDown handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addScrolledHandler(ScrolledHandler handler)
Add a scrolled handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addShowContextMenuHandler(ShowContextMenuHandler handler)
Add a showContextMenu handler.
|
void |
addStyleName(java.lang.String style)
Multiple styles are currently not supported.
|
com.google.gwt.event.shared.HandlerRegistration |
addVisibilityChangedHandler(VisibilityChangedHandler handler)
Add a visibilityChanged handler.
|
void |
adjustForContent(boolean immediate)
This method tells a component to adjust for size changes made to content by external code.
|
void |
animateFade(int opacity)
Animate a change in opacity from the widget's current opacity to the specified opacity.
|
void |
animateFade(int opacity,
AnimationCallback callback)
Animate a change in opacity from the widget's current opacity to the specified opacity.
|
void |
animateFade(int opacity,
AnimationCallback callback,
int duration)
Animate a change in opacity from the widget's current opacity to the specified opacity.
|
void |
animateFade(java.lang.Integer opacity)
Animate a change in opacity from the widget's current opacity to the specified opacity.
|
void |
animateFade(java.lang.Integer opacity,
AnimationCallback callback) |
void |
animateFade(java.lang.Integer opacity,
AnimationCallback callback,
java.lang.Integer duration) |
void |
animateFade(java.lang.Integer opacity,
AnimationCallback callback,
java.lang.Integer duration,
AnimationAcceleration acceleration)
Animate a change in opacity from the widget's current opacity to the specified opacity.
|
void |
animateHide(AnimationEffect effect)
Hide a canvas by shrinking it vertically to zero height over a period of time.
|
void |
animateHide(AnimationEffect effect,
AnimationCallback callback)
Hide a canvas by shrinking it vertically to zero height over a period of time.
|
void |
animateHide(AnimationEffect effect,
AnimationCallback callback,
int duration)
Hide a canvas by shrinking it vertically to zero height over a period of time.
|
void |
animateMove(java.lang.Integer left,
java.lang.Integer top)
Animate a reposition of this canvas from its current position to the specified position
|
void |
animateMove(java.lang.Integer left,
java.lang.Integer top,
AnimationCallback callback) |
void |
animateMove(java.lang.Integer left,
java.lang.Integer top,
AnimationCallback callback,
java.lang.Integer duration) |
void |
animateMove(java.lang.Integer left,
java.lang.Integer top,
AnimationCallback callback,
java.lang.Integer duration,
AnimationAcceleration acceleration)
Animate a reposition of this canvas from its current position to the specified position
|
void |
animateRect(java.lang.Integer left,
java.lang.Integer top,
java.lang.Integer width,
java.lang.Integer height)
Animate a reposition / resize of this canvas from its current size and position.
|
void |
animateRect(java.lang.Integer left,
java.lang.Integer top,
java.lang.Integer width,
java.lang.Integer height,
AnimationCallback callback) |
void |
animateRect(java.lang.Integer left,
java.lang.Integer top,
java.lang.Integer width,
java.lang.Integer height,
AnimationCallback callback,
java.lang.Integer duration) |
void |
animateRect(java.lang.Integer left,
java.lang.Integer top,
java.lang.Integer width,
java.lang.Integer height,
AnimationCallback callback,
java.lang.Integer duration,
AnimationAcceleration acceleration)
Animate a reposition / resize of this canvas from its current size and position.
|
void |
animateResize(java.lang.Integer width,
java.lang.Integer height)
Animate a resize of this canvas from its current size to the specified size
|
void |
animateResize(java.lang.Integer width,
java.lang.Integer height,
AnimationCallback callback) |
void |
animateResize(java.lang.Integer width,
java.lang.Integer height,
AnimationCallback callback,
java.lang.Integer duration) |
void |
animateResize(java.lang.Integer width,
java.lang.Integer height,
AnimationCallback callback,
java.lang.Integer duration,
AnimationAcceleration acceleration)
Animate a resize of this canvas from its current size to the specified size
|
void |
animateScroll(java.lang.Integer scrollLeft,
java.lang.Integer scrollTop)
Animate a scroll from the current scroll position to the specified position.
|
void |
animateScroll(java.lang.Integer scrollLeft,
java.lang.Integer scrollTop,
AnimationCallback callback) |
void |
animateScroll(java.lang.Integer scrollLeft,
java.lang.Integer scrollTop,
AnimationCallback callback,
java.lang.Integer duration) |
void |
animateScroll(java.lang.Integer scrollLeft,
java.lang.Integer scrollTop,
AnimationCallback callback,
java.lang.Integer duration,
AnimationAcceleration acceleration)
Animate a scroll from the current scroll position to the specified position.
|
void |
animateScroll(int scrollLeft,
int scrollTop,
AnimationCallback callback)
Animate a scroll from the current scroll position to the specified position.
|
void |
animateScroll(int scrollLeft,
int scrollTop,
AnimationCallback callback,
int duration)
Animate a scroll from the current scroll position to the specified position.
|
void |
animateShow(AnimationEffect effect)
Show a canvas by growing it vertically to its fully drawn height over a period of time.
|
void |
animateShow(AnimationEffect effect,
AnimationCallback callback)
Show a canvas by growing it vertically to its fully drawn height over a period of time.
|
void |
animateShow(AnimationEffect effect,
AnimationCallback callback,
int duration)
Show a canvas by growing it vertically to its fully drawn height over a period of time.
|
static <T extends Canvas> |
asSGWTComponent(com.google.gwt.core.client.JavaScriptObject jsObj)
Returns the existing SGWT widget, or creates and returns one if none exist,
associated with the supplied
JavaScriptObject . |
void |
blur()
If this canvas has keyboard focus, blur it.
|
void |
bringToFront()
Puts this widget at the top of the stacking order, so it appears in front of all other widgets in the same parent.
|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
void |
clear()
Remove all visual representation of a Canvas, including all child or member Canvases, or managed top-level components
such as the ListGrid drop location indicator.
|
java.lang.Boolean |
clickMaskUp()
Determines whether a clickmask is showing
|
java.lang.Boolean |
clickMaskUp(java.lang.String ID)
Determines whether a clickmask is showing
|
java.lang.Boolean |
contains(Canvas canvas)
Returns true if element is a descendant of this widget (i.e., exists below this widget in the containment
hierarchy); and false otherwise.
|
java.lang.Boolean |
contains(Canvas canvas,
java.lang.Boolean testSelf)
Returns true if element is a descendant of this widget (i.e., exists below this widget in the containment
hierarchy); and false otherwise.
|
java.lang.Boolean |
containsEvent()
Return true if the last event's mouse coordinates are within the bounds of this component.
|
java.lang.Boolean |
containsFocus()
Returns true if the keyboard focus is in this Canvas or any child of this Canvas.
|
java.lang.Boolean |
containsPoint(int x,
int y)
Return whether or not this object contains the specified global (x,y) coordinates.
|
java.lang.Boolean |
containsPoint(int x,
int y,
java.lang.Boolean withinViewport)
Return whether or not this object contains the specified global (x,y) coordinates.
|
protected com.google.gwt.core.client.JavaScriptObject |
create() |
void |
deparent()
Remove this canvas from its parent if it has one.
|
void |
depeer()
Make this Canvas no longer a peer of its master
|
void |
disable()
Disables this widget and any children and peers of this widget.
|
void |
enable()
Enables this widget and any children / peers of this widget.
|
void |
focus()
If this canvas can accept focus, give it keyboard focus.
|
void |
focusInNextTabElement()
Shifts focus to the next focusable element after this one.
|
void |
focusInPreviousTabElement()
Shifts focus to the previous focusable element before this one.
|
int |
getAbsoluteLeft() |
int |
getAbsoluteTop() |
java.lang.String |
getAccessKey()
If specified this governs the accessKey for the widget.
|
AnimationAcceleration |
getAnimateAcceleration()
Default acceleration effect to apply to all animations on this Canvas.
|
java.lang.Integer |
getAnimateFadeTime()
Default time for performing an animated fade.
|
AnimationAcceleration |
getAnimateHideAcceleration()
Default acceleration function for performing an animated hide.
|
java.lang.Integer |
getAnimateHideTime()
Default time for performing an animated hide.
|
AnimationAcceleration |
getAnimateMoveAcceleration()
Default acceleration effect for performing an animated move.
|
java.lang.Integer |
getAnimateMoveTime()
Default time for performing an animated move.
|
AnimationAcceleration |
getAnimateRectAcceleration()
Default acceleration function for performing an animated move and resize.
|
java.lang.Integer |
getAnimateRectTime()
Default time for performing an animated setRect.
|
AnimationAcceleration |
getAnimateResizeAcceleration()
Default acceleration function for performing an animated resize.
|
java.lang.Integer |
getAnimateResizeTime()
Default time for performing an animated resize.
|
AnimationAcceleration |
getAnimateScrollAcceleration()
Default acceleration function for performing an animated scroll.
|
java.lang.Integer |
getAnimateScrollTime()
Default time for performing an animated scroll.
|
AnimationAcceleration |
getAnimateShowAcceleration()
Default acceleration function for performing an animated show.
|
AnimationEffect |
getAnimateShowEffect()
Default animation effect to use if
Canvas#animateShow() is called without an explicit effect parameter. |
java.lang.Integer |
getAnimateShowTime()
Default time for performing an animated show.
|
int |
getAnimateTime()
Default total duration of animations.
|
java.lang.String |
getAppImgDir()
Default directory for app-specific images, relative to the Page-wide
appImgDir . |
java.lang.String |
getAriaRole()
ARIA role of this component.
|
java.lang.Boolean |
getAutoDraw()
If true, this canvas will draw itself immediately after it is created.
|
java.lang.Boolean |
getAutoShowParent()
If set to true, the widget's parent (if any) will automatically be shown whenever the widget is shown.
|
java.lang.String |
getBackgroundColor()
The background color for this widget.
|
java.lang.String |
getBackgroundImage()
URL for a background image for this widget (corresponding to the CSS "background-image" attribute).
|
java.lang.String |
getBackgroundPosition()
Specifies how the background image should be positioned on the widget.
|
BackgroundRepeat |
getBackgroundRepeat()
Specifies how the background image should be tiled if this widget is larger than the image.
|
java.lang.String |
getBorder()
Set the CSS border of this component, as a CSS string including border-width, border-style, and/or color (eg "2px solid
blue").
|
int |
getBottom()
Return the bottom coordinate of this object as rendered, relative to its enclosing context, in pixels.
|
static Canvas |
getById(java.lang.String ID)
Retrieve a Canvas by it's global
ID . |
static <T extends Canvas> |
getByJSObject(com.google.gwt.core.client.JavaScriptObject jsObj)
Retrieve a Canvas from it's
JavaScriptObject . |
Canvas |
getByLocalId(java.lang.String ID)
Retrieve a child of this Canvas by it's local ID.
|
java.lang.Boolean |
getCanAcceptDrop()
Indicates that this object can receive dropped widgets (i.e.
|
java.lang.Boolean |
getCanDrag()
Indicates whether this widget can initiate custom drag-and-drop operations (other than reposition or resize).
|
java.lang.Boolean |
getCanDragReposition()
Indicates whether this widget can be moved by a user of your application by simply dragging with the mouse.
|
java.lang.Boolean |
getCanDragResize()
Indicates whether this widget can be resized by dragging on the edges and/or corners of the widget with the mouse.
|
java.lang.Boolean |
getCanDragScroll()
If this Canvas is canAcceptDrop:true, when the user drags a droppable widget over an edge of the widget, should we
scroll to show the rest of the widget's content? Returned from canvas.shouldDragScroll() if there are scrollbars.
|
java.lang.Boolean |
getCanDrop()
Indicates that this object can be dropped on top of other widgets.
|
java.lang.Boolean |
getCanDropBefore()
When explicitly set to false, disallows drop before this member in the Layout.
|
java.lang.Boolean |
getCanFocus()
Can this widget be allowed to become the target of keyboard events?
|
java.lang.Boolean |
getCanHover()
Will this Canvas fire hover events when the user hovers over it, or one of its children?
|
java.lang.Boolean |
getCanSelectText()
Whether native drag selection of contained text is allowed within this Canvas.
|
Canvas |
getCanvasAutoChild(java.lang.String autoChildName)
Returns the
Canvas AutoChild named autoChildName if already created. |
CanvasItem |
getCanvasItem()
If this canvas is being displayed in a
CanvasItem , this property will be
set to point at the item. |
Canvas[] |
getChildren()
Array of all Canvii that are immediate children of this Canvas.
|
java.lang.Boolean |
getChildrenSnapResizeToGrid()
If true, causes this canvas's children to snap to its grid when resizing.
|
java.lang.Boolean |
getChildrenSnapToGrid()
If true, causes this canvas's children to snap to its grid when dragging.
|
java.lang.String |
getClassName()
Returns the javascript class name.
|
com.google.gwt.dom.client.Element |
getContentElement()
Returns the DOM element for this Canvas which contains the
contents , or for parent components , the DOM elements for
any drawn children. |
java.lang.String |
getContents()
The contents of a canvas or label widget.
|
Menu |
getContextMenu()
Context menu to show for this object, an instance of the Menu widget.
|
Cursor |
getCursor()
Specifies the cursor image to display when the mouse pointer is over this widget.
|
java.lang.String |
getDataPath()
A dataPath may be specified on any canvas.
|
int |
getDefaultHeight()
For custom components, establishes a default height for the component.
|
int |
getDefaultWidth()
For custom components, establishes a default width for the component.
|
java.lang.Boolean |
getDestroyed()
If this property is set to
true , the destroy() method
has been called on this canvas. |
java.lang.Boolean |
getDestroying()
This property is set to true when the
Canvas.destroy method is called
on a widget. |
boolean |
getDisabled()
If set to true, the widget will be disabled.
|
Cursor |
getDisabledCursor()
Specifies the cursor image to display when the mouse pointer is over this widget if this widget is disabled.
|
int |
getDoubleClickDelay()
Amount of time (in msec) between which two clicks are considered a single click
|
DragAppearance |
getDragAppearance()
Visual appearance to show when the object is being dragged.
|
DragIntersectStyle |
getDragIntersectStyle()
This indicates how the system will test for droppable targets: either by intersection with the mouse or intersection
with the rectangle of the dragMoveTarget.
|
java.lang.Integer |
getDragOpacity()
If this widget has dragAppearance
"target" , this value specifies the opacity to render the target while it
is being dragged. |
DragAppearance |
getDragRepositionAppearance()
If
canDragReposition is true, this attributes specifies
the visual appearance to show during drag reposition. |
Cursor |
getDragRepositionCursor()
Cursor to switch to if the mouse is over a widget that is drag repositionable.
|
DragAppearance |
getDragResizeAppearance()
If
canDragResize is true, this attributes specifies the
visual appearance to show during drag resize. |
int |
getDragScrollDelay()
If this widget supports drag-scrolling, This property specifies how many ms the user must hover over the
drag-scroll threshold before scrolling begins.
|
int |
getDragStartDistance()
Number of pixels the cursor needs to move before the EventHandler starts a drag operation.
|
Canvas |
getDragTarget()
A different widget that should be actually dragged when dragging initiates on this
widget.
|
java.lang.String |
getDragType()
The "type" of thing given as a string that can be dragged from this widget.
|
java.lang.String[] |
getDropTypes() |
java.lang.Boolean |
getDynamicContents()
Dynamic contents allows the contents string to be treated as a simple, but powerful
template.
|
java.lang.String |
getEdgeBackgroundColor()
Background color for the EdgedCanvas created to decorate this component.
|
java.lang.String |
getEdgeCenterBackgroundColor()
Background color for the center section only.
|
java.lang.String |
getEdgeImage()
Base name of images for edges.
|
int |
getEdgeMarginSize()
How far into the edge of an object do we consider the "edge" for drag resize purposes?
|
java.lang.Integer |
getEdgeOffset()
Amount the contained Canvas should be offset.
|
java.lang.Integer |
getEdgeOpacity()
Opacity of the edges.
|
java.lang.Boolean |
getEdgeShowCenter()
Whether to show media in the center section, that is, behind the decorated Canvas.
|
int |
getEdgeSize()
Size in pixels for corners and edges
|
static EdgeName |
getEventEdge()
Check if an event is within an "edge" of this canvas.
|
static EdgeName |
getEventEdge(EdgeName... edgeMask)
Check if an event is within an "edge" of this canvas.
|
int |
getExtraSpace()
When this Canvas is included as a member in a Layout, extra blank space that should be left after this member in a
Layout.
|
java.lang.String |
getFacetId()
|
FormItem |
getFormItemAutoChild(java.lang.String autoChildName)
Returns the
FormItem AutoChild named autoChildName if already created. |
java.lang.String |
getFullDataPath()
Returns a fully qualified DataPath for this canvas.
|
java.lang.String |
getGroupBorderCSS()
Sets the style for the grouping frame around the canvas.
|
java.lang.String |
getGroupLabelBackgroundColor()
If set, the background color of the grouping label.
|
java.lang.String |
getGroupLabelStyleName()
Sets the style for the grouping label.
|
java.lang.String |
getGroupTitle()
The title/label for the grouping.
|
java.lang.Integer |
getHeight() |
java.lang.String |
getHeightAsString() |
boolean |
getHideUsingDisplayNone()
When this widget is hidden (see
visibility and Canvas.hide ), should display:none be applied to the outer element ? |
Alignment |
getHoverAlign()
If
this.showHover is true, this property can be used to customize the alignment of content in the hover
canvas. |
java.lang.Boolean |
getHoverAutoDestroy()
If
this.showHover is true and Canvas.getHoverComponent is implemented, should the hoverCanvas returned from it be automatically destroyed when it is
hidden? |
Canvas |
getHoverComponent()
When
showHoverComponents is true, this method is
called to get the component to show as a hover for this Canvas. |
int |
getHoverDelay()
If
this.canHover is true, how long should the mouse be kept over this widget before the hover event is
fired |
java.lang.Integer |
getHoverHeight()
If
this.showHover is true, this property can be used to customize the height of the hover canvas shown. |
java.lang.String |
getHoverHTML()
If
this.showHover is true, when the user holds the mouse over this Canvas for long enough to trigger a
hover event, a hover canvas is shown by default. |
java.lang.Boolean |
getHoverMoveWithMouse()
If
this.showHover is true, should this widget's hover canvas be moved with the mouse while visible? |
java.lang.Integer |
getHoverOpacity()
If
this.showHover is true, should the hover canvas be shown with opacity other than 100? |
java.lang.String |
getHoverStyle()
If
this.showHover is true, this property can be used to specify the css style to apply to the hover canvas. |
VerticalAlignment |
getHoverVAlign()
If
this.showHover is true, this property can be used to customize the vertical alignment of content in the
hover canvas. |
java.lang.Integer |
getHoverWidth()
If
this.showHover is true, this property can be used to
customize the width of the hover canvas shown. |
java.lang.Boolean |
getHoverWrap()
If
this.showHover is true, this property can be used to customize the whether content in the hover canvas
is displayed in a single line, or wraps. |
int |
getHSnapOrigin()
Get an offset to be used when calculating snap positioning.
|
int |
getHSnapOrigin(Canvas snapChild)
Get an offset to be used when calculating snap positioning.
|
int |
getHSnapPosition(int coordinate)
Override this method to provide a custom snap-to grid.
|
int |
getHSnapPosition(int coordinate,
java.lang.String direction)
Override this method to provide a custom snap-to grid.
|
DrawPosition |
getHtmlPosition()
If
htmlElement is specified, this attribute specifies the
position where the canvas should be inserted relative to the htmlElement in the DOM. |
com.google.gwt.dom.client.Element |
getImage(java.lang.String identifier)
Retrieve a native image element by name.
|
static java.lang.String |
getImgURL(java.lang.String URL)
Return the full URL for an image to be drawn in this canvas.
|
static java.lang.String |
getImgURL(java.lang.String URL,
java.lang.String imgDir)
Return the full URL for an image to be drawn in this canvas.
|
int |
getInnerContentHeight()
Returns the amount of space available for interior content (or relatively positioned child widget(s)) without
introducing clipping, scrolling or overflow.
This is the space within the viewport of the widget (not including padding, and excluding margins, borders or scrollbars) rendered at its specified size. |
int |
getInnerContentWidth()
Returns the amount of space available for interior content (or relatively positioned child widget(s)) without
introducing clipping, scrolling or overflow.
This is the space within the viewport of the widget (not including padding, and excluding margins, borders or scrollbars) rendered at its specified size. |
int |
getInnerHeight()
Returns the amount of space available for (an) absolutely positioned child widget(s) or absolutely positioned HTML
content, without introducing clipping, scrolling or overflow.
|
int |
getInnerWidth()
Returns the amount of space available for absolutely positioned child widget(s) or absolutely positioned HTML content,
without introducing clipping, scrolling or overflow.
|
boolean |
getIsGroup()
Should a grouping frame be shown around this canvas.
|
java.lang.Boolean |
getKeepInParentRect()
Constrains drag-resizing and drag-repositioning of this canvas to either the rect of its parent (if set to true) or an
arbitrary rect based its parent (if set to a [Left,Top,Width,Height] rect array).
|
Alignment |
getLayoutAlign()
When this Canvas is included as a member in a Layout, layoutAlign controls alignment on the breadth axis of the layout.
|
int |
getLeft()
Number of pixels the left side of the widget is offset to the right from its default drawing context (either its
parent's topleft corner, or the document flow, depending on the value of the
position property). |
java.lang.String |
getLeftAsString()
Number of pixels the left side of the widget is offset to the right from its default drawing context (either its
parent's topleft corner, or the document flow, depending on the value of the
position property). |
LocatorStrategy |
getLocateChildrenBy()
Strategy to use when locating children in this canvas from an autoTest locator string.
|
LocatorTypeStrategy |
getLocateChildrenType()
LocatorTypeStrategy to use when finding children within this canvas. |
LocatorStrategy |
getLocatePeersBy()
Strategy to use when locating peers of this canvas from an autoTest locator string.
|
LocatorTypeStrategy |
getLocatePeersType()
LocatorTypeStrategy to use when finding peers of this canvas. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure() |
java.lang.Integer |
getMargin()
Set the CSS Margin, in pixels, for this component.
|
Canvas |
getMasterElement()
This Canvas's "master" (the Canvas to which it was added as a peer), if any.
|
java.lang.Boolean |
getMatchElement()
If
htmlElement is specified, should this canvas initially be
drawn at the same dimensions as the htmlElement?Note: setting this property will not force the canvas to resize if the element subsequently resizes (for example due to page reflow). |
int |
getMaxHeight()
Maximum height that this Canvas can be resized to.
|
int |
getMaxWidth()
Maximum width that this Canvas can be resized to.
|
java.lang.String |
getMenuConstructor()
Default class used to construct menus created by this component, including context menus.
|
int |
getMinHeight()
Minimum height that this Canvas can be resized to by a user.
|
int |
getMinWidth()
Minimum width that this Canvas can be resized to.
|
int |
getMouseStillDownDelay()
Amount of time (in msec) between 'mouseStillDown' events for this object
|
int |
getMouseStillDownInitialDelay()
Amount of time (in msec) before mouseStillDown events start to be fired for this object.
|
int |
getNextZIndex()
get the next zIndex for the next item to be drawn.
|
java.lang.Boolean |
getNoDoubleClicks()
If true, this canvas will receive all mouse-clicks as single click events rather than doubleClicks.
|
int |
getOffsetHeight() |
int |
getOffsetWidth() |
int |
getOffsetX()
Return the X-coordinate of the last event relative to the left edge of the content of this Canvas.
NOTE: To get a coordinate relative to the viewport of this Canvas, subtract this.getScrollLeft() |
int |
getOffsetY()
Return the Y-coordinate of the last event, relative to the top edge of the content of this Canvas.
NOTE: To get a coordinate relative to the viewport of this Canvas, subtract this.getScrollTop() |
java.lang.Integer |
getOpacity()
Renders the widget to be partly transparent.
|
static Canvas |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
com.google.gwt.dom.client.Element |
getOuterElement()
Returns the outer DOM element of this Canvas.
|
Overflow |
getOverflow()
Controls what happens when the drawn size of the content of a Canvas is either greater or smaller than the specified
size of the Canvas.
|
java.lang.Integer |
getPadding()
Set the CSS padding of this component, in pixels.
|
int |
getPageBottom()
Return the page-relative bottom coordinate of this object, in pixels.
|
int |
getPageLeft()
Returns the page-relative left coordinate of the widget on the page, in pixels.
|
Rectangle |
getPageRect() |
int |
getPageRight()
Return the page-relative right coordinate of this object, in pixels.
|
int |
getPageTop()
Returns the page-relative top coordinate of the widget on the page, in pixels
|
Canvas |
getParentElement()
This Canvas's immediate parent, if any.
|
Canvas[] |
getPeers()
Array of all Canvii that are peers of this Canvas.
|
PercentBoxModel |
getPercentBox()
Governs the model to be used when sizing canvases with percentage width or height, or positioning widgets with a
specified
snapTo . |
Canvas |
getPercentSource()
If this canvas has its size specified as a percentage, this property allows the user to explicitly designate another
canvas upon which sizing will be based.
|
Positioning |
getPosition()
Absolute or relative, corresponding to the "absolute" (with respect to parent) or
"relative" (with respect to document flow) values for the CSS position attribute.
|
java.lang.String |
getPrefix() |
java.lang.Boolean |
getPrintChildrenAbsolutelyPositioned()
Should this canvas print its children absolutely positioned when generating
printable HTML . |
static void |
getPrintHTML(java.lang.Object[] components,
PrintProperties printProperties,
PrintHTMLCallback callback)
Returns print-formatted HTML for the specified list of components.
|
java.lang.String |
getPrintHTML(PrintProperties printProperties,
PrintHTMLCallback callback)
Retrieves printable HTML for this component and all printable subcomponents.
|
java.lang.String |
getPrompt()
Prompt displayed in hover canvas if
showHover is true. |
Rectangle |
getRect()
Get all four coordinates, relative to the enclosing context, at one.
|
java.lang.Boolean |
getRedrawOnResize()
Should this element be redrawn in response to a resize?
|
java.lang.String |
getResizeBarTarget()
When this Canvas is included as a member in a Layout, and
showResizeBar is set to true so that a resizeBar is created, resizeBarTarget:"next" can be
set to indicate that the resizeBar should resize the next member of the layout rather than this one. |
EdgeName[] |
getResizeFrom()
When drag resizing is enabled via
canDragResize , restricts
resizes to only certain edges or corners. |
int |
getRight()
Return the right coordinate of this object as rendered, relative to its enclosing context, in pixels.
|
int |
getScrollbarSize()
How thick should we make the scrollbars for this canvas.
NOTE: has no effect if showCustomScrollbars is false. |
int |
getScrollBottom()
Returns the scrollTop required to scroll vertically to the end of this widget's content.
|
int |
getScrollHeight()
Returns the scrollable height of the widget's contents, including children, ignoring clipping.
|
int |
getScrollLeft()
Get the number of pixels this Canvas is scrolled from its left edge.
|
int |
getScrollRight()
Returns the scrollLeft required to scroll horizontally to the end of this widget's content.
|
int |
getScrollTop()
Get the number of pixels this Canvas is scrolled from its top edge.
|
int |
getScrollWidth()
Returns the scrollable width of the widget's contents, including children, ignoring clipping.
|
int |
getShadowDepth()
Depth of the shadow, or the virtual height above the page of the widget throwing the shadow.
|
java.lang.String |
getShadowImage()
Base name of the series of images for the sides, corners, and center of the shadow.
|
java.lang.Integer |
getShadowOffset()
Offset of the shadow.
|
java.lang.Integer |
getShadowSoftness()
Softness, or degree of blurring, of the shadow.
|
java.lang.Boolean |
getShouldPrint()
Whether this canvas should be included in a printable view.
|
java.lang.Boolean |
getShowCustomScrollbars()
Whether to use the browser's native scrollbars or Smart GWT-based scrollbars.
|
java.lang.Boolean |
getShowDragShadow()
When this widget is dragged, if its dragAppearance is
"target" , should we show a shadow behind the canvas
during the drag. |
java.lang.Boolean |
getShowEdges()
Whether an
EdgedCanvas should be used to show image-based edges around this
component. |
java.lang.Boolean |
getShowHover()
If
this.canHover is true, should we show the global hover canvas by default when the user hovers over this
canvas? |
java.lang.Boolean |
getShowHoverComponents()
When set to true, shows a widget hovering at the mouse point instead of the builtin hover label.
|
java.lang.Boolean |
getShowResizeBar()
When this Canvas is included as a member in a
Layout , whether a resizeBar
should be shown after this member in the layout, to allow it to be resized. |
java.lang.Boolean |
getShowShadow()
Whether to show a drop shadow for this Canvas
|
java.lang.String |
getSkinImgDir()
Default directory for skin images (those defined by the class), relative to the Page-wide
skinDir . |
java.lang.String |
getSnapAxis()
Describes which axes to apply snap-to-grid to.
|
java.lang.String |
getSnapEdge()
If
snapTo is defined to this widget, this property can be used to
define which edge of this widget should be snapped to an edge of the master or parent element. |
java.lang.String |
getSnapHDirection()
The horizontal snap direction.
|
int |
getSnapHGap()
The horizontal grid size to use, in pixels, when snap-to-grid is enabled.
|
java.lang.Integer |
getSnapOffsetLeft()
If
snapTo is defined for this widget, this property can be used to
specify an offset in px or percentage for the left coordinate of this widget. |
java.lang.Integer |
getSnapOffsetTop()
If
snapTo is defined for this widget, this property can be used to
specify an offset in px or percentage for the top coordinate of this widget. |
java.lang.Boolean |
getSnapOnDrop()
When this canvas is dropped onto an object supporting snap-to-grid, should it snap to the grid (true, the default) or
just drop wherever the mouse is (false).
|
java.lang.Boolean |
getSnapResizeToGrid()
Causes this canvas to snap to its parent's grid when resizing.
|
java.lang.String |
getSnapTo()
Position this widget such that it is aligned with ("snapped to") an edge of its
masterElement (if specified), or its parentElement . |
java.lang.Boolean |
getSnapToGrid()
Causes this canvas to snap to its parent's grid when dragging.
|
java.lang.String |
getSnapVDirection()
The vertical snap direction.
|
int |
getSnapVGap()
The vertical grid size to use, in pixels, when snap-to-grid is enabled.
|
java.lang.String |
getStyleName()
The CSS class applied to this widget as a whole.
|
java.lang.Integer |
getTabIndex()
If specified this governs the tabIndex of the widget in the page's tab order.
|
protected Canvas |
getTestInstance() |
java.lang.String |
getTitle()
Synonym for
getPrompt() |
java.lang.String |
getTooltip()
Synonym for
getPrompt() |
int |
getTop()
Number of pixels the top of the widget is offset down from its default drawing context (either its parent's top-left
corner, or the document flow, depending on the value of the
position property). |
java.lang.String |
getTopAsString()
Number of pixels the top of the widget is offset down from its default drawing context (either its parent's top-left
corner, or the document flow, depending on the value of the
position property). |
Canvas |
getTopElement()
The top-most Canvas (i.e., not a child of any other Canvas), if any, in this widget's containment hierarchy.
|
java.lang.Boolean |
getUseBackMask()
In earlier versions of Internet Explorer (pre IE9), a native limitation exists whereby if HTML elements are overlapping
on the page, certain elements can appear to "burn through" elements in the same position with a higher z-index.
|
java.lang.Boolean |
getUseOpacityFilter()
Configures where the Opacity filter is used for IE6-8.
|
ValuesManager |
getValuesManager()
ValuesManager for managing values displayed in this component. |
int |
getViewportHeight()
Returns the height of the viewport onto the scrollable content.
|
int |
getViewportWidth()
Returns the width of the viewport onto the scrollable content.
|
Visibility |
getVisibility()
Controls widget visibility when the widget is initialized.
|
int |
getVisibleHeight()
Return the visible height of the Canvas.
|
int |
getVisibleWidth()
Return the visible width of the Canvas.
|
int |
getVSnapOrigin()
Get an offset to be used when calculating snap positioning.
|
int |
getVSnapOrigin(Canvas snapChild)
Get an offset to be used when calculating snap positioning.
|
int |
getVSnapPosition(int coordinate)
Override this method to provide a custom snap-to grid.
|
int |
getVSnapPosition(int coordinate,
java.lang.String direction)
Override this method to provide a custom snap-to grid.
|
java.lang.Integer |
getWidth() |
java.lang.String |
getWidthAsString() |
int |
getZIndex()
Get the z-Index of this canvas.
|
void |
handleHover()
Handler fired on a delay when the user hovers the mouse over this hover-target.
|
void |
hide()
Sets the widget's CSS visibility attribute to "hidden".
|
void |
hideClickMask()
Hides the click mask associated with this canvas.
|
void |
hideClickMask(java.lang.String ID)
Hides the click mask associated with this canvas.
|
void |
hideContextMenu()
The default implementation of this method hides the contextMenu currently being shown for this component (which occurs
when the mouse button that toggles the context menu is released).
|
static java.lang.String |
imgHTML(java.lang.String src)
Generates the HTML for an image unique to this Canvas.
|
static java.lang.String |
imgHTML(java.lang.String src,
int width,
int height) |
static java.lang.String |
imgHTML(java.lang.String src,
int width,
int height,
java.lang.String name,
java.lang.String extraStuff,
java.lang.String imgDir)
Generates the HTML for an image unique to this Canvas.
|
java.lang.Boolean |
intersects(Canvas other)
Returns true if the rectangles of this widget and the specified widget overlap.
|
java.lang.Boolean |
isDirty()
Returns whether a canvas is waiting to be redrawn.
|
java.lang.Boolean |
isDisabled()
Is this canvas disabled? Note that the disabled state is inherited - this method will return true if this widget, or any
of its ancestors are marked disabled.
|
java.lang.Boolean |
isDrawn()
Returns the boolean true, if the widget has been completely drawn, and false otherwise.
|
boolean |
isVisible()
Returns true if the widget is visible, taking all parents into account, so that a widget which is not hidden
might still report itself as not visible if it is within a hidden parent.
|
java.lang.Boolean |
keyUp()
Executed when a key is released on a focusable widget (
canFocus :
true). |
void |
layoutChildren(java.lang.String reason)
layoutChildren() is where a Canvas should implement a sizing policy for it's Canvas children. |
java.lang.String |
linkHTML(java.lang.String href)
Generates the HTML for a standard link (anchor) element.
|
java.lang.String |
linkHTML(java.lang.String href,
java.lang.String text) |
java.lang.String |
linkHTML(java.lang.String href,
java.lang.String text,
java.lang.String target) |
java.lang.String |
linkHTML(java.lang.String href,
java.lang.String text,
java.lang.String target,
java.lang.String ID) |
java.lang.String |
linkHTML(java.lang.String href,
java.lang.String text,
java.lang.String target,
java.lang.String ID,
java.lang.Integer tabIndex) |
java.lang.String |
linkHTML(java.lang.String href,
java.lang.String text,
java.lang.String target,
java.lang.String ID,
java.lang.Integer tabIndex,
java.lang.String accessKey)
Generates the HTML for a standard link (anchor) element.
|
void |
markForDestroy()
destroy() this canvas on a timeout. |
void |
markForRedraw()
Marks the widget as "dirty" so that it will be added to a queue for redraw.
|
void |
markForRedraw(java.lang.String reason)
Marks the widget as "dirty" so that it will be added to a queue for redraw.
|
void |
moveAbove(Canvas canvas)
Puts this widget just above the specified widget in the stacking order, so it appears in front of the specified widget
if both widgets have the same parent.
|
void |
moveBelow(Canvas canvas)
Puts this widget just below the specified widget in the stacking order, so it appears behind the specified widget if
both widgets have the same parent.
|
java.lang.Boolean |
moveBy(int deltaX,
int deltaY)
Moves the widget deltaX pixels to the right and deltaY pixels down.
|
boolean |
moveTo(int left,
int top)
Moves the widget so that its top-left corner is at the specified coordinates.
|
protected void |
onAttach() |
protected void |
onDetach() |
protected void |
onInit() |
protected void |
parentResized()
Fires when the interior size of the parent changes, including parent resize and scrollbar introduction or removal.
|
static void |
printComponents(java.lang.Object[] components)
Generate printable HTML for the designated components and trigger the native print dialog, without ever showing the
printable HTML to the user.
|
void |
redraw()
Redraws the widget immediately with its current property values.
|
void |
redraw(java.lang.String reason)
Redraws the widget immediately with its current property values.
|
void |
removeChild(Canvas child)
Remove a child from this parent.
|
void |
removeChild(Canvas child,
java.lang.String name)
Remove a child from this parent.
|
void |
removePeer(Canvas peer)
Remove a peer from this Canvas
|
void |
removePeer(Canvas peer,
java.lang.String name)
Remove a peer from this Canvas
|
java.lang.Boolean |
resizeBy(int deltaX,
int deltaY)
Resizes the widget, adding deltaX to its width and deltaY to its height (moves the right and/or bottom sides of
the widget).
|
java.lang.Boolean |
resizeTo(int width,
int height)
Resizes the widget to the specified width and height (moves the right and/ or bottom sides of the widget).
|
java.lang.Boolean |
resizeTo(java.lang.String width,
java.lang.String height)
Resizes the widget to the specified width and height (moves the right and/ or bottom sides of the widget).
|
void |
scrollBy(int dX,
int dY)
Scroll this widget by some pixel increment in either (or both) direction(s).
|
void |
scrollByPercent(int dX,
int dY)
Scroll this widget by some percentage of scroll size in either (or both) direction(s).
|
void |
scrollTo()
Scrolls the content of the widget so that the origin (top-left corner) of the content is left pixels to the left and top
pixels above the widget's top-left corner (but still clipped by the widget's dimensions).
|
void |
scrollTo(java.lang.Integer left) |
void |
scrollTo(java.lang.Integer left,
java.lang.Integer top)
Scrolls the content of the widget so that the origin (top-left corner) of the content is left pixels to the left and top
pixels above the widget's top-left corner (but still clipped by the widget's dimensions).
|
void |
scrollToBottom()
Vertically scrolls the content of the widget to the end of its content
|
void |
scrollToLeft()
Horizontally scrolls the content of the widget to 0
|
void |
scrollToPercent(int left,
int top)
Scroll this widget to some position specified as a percentage of scroll size in either (or both) direction(s).
|
void |
scrollToRight()
Horizontally scrolls the content of the widget to the end of its content
|
void |
scrollToTop()
Vertically scrolls the content of the widget to 0
|
void |
sendToBack()
Puts this widget at the bottom of the stacking order, so it appears behind all other widgets in the same parent.
|
void |
setAccessKey(java.lang.String accessKey)
If specified this governs the accessKey for the widget.
|
void |
setAlign(Alignment align) |
static void |
setAllowExternalFilters(boolean allExternalFilters)
Changes the system-wide
allowExternalFilters setting. |
void |
setAnimateAcceleration(AnimationAcceleration animateAcceleration)
Default acceleration effect to apply to all animations on this Canvas.
|
void |
setAnimateFadeTime(java.lang.Integer animateFadeTime)
Default time for performing an animated fade.
|
void |
setAnimateHideAcceleration(AnimationAcceleration animateHideAcceleration)
Default acceleration function for performing an animated hide.
|
void |
setAnimateHideTime(java.lang.Integer animateHideTime)
Default time for performing an animated hide.
|
void |
setAnimateMoveAcceleration(AnimationAcceleration animateMoveAcceleration)
Default acceleration effect for performing an animated move.
|
void |
setAnimateMoveTime(java.lang.Integer animateMoveTime)
Default time for performing an animated move.
|
void |
setAnimateRectAcceleration(AnimationAcceleration animateRectAcceleration)
Default acceleration function for performing an animated move and resize.
|
void |
setAnimateRectTime(java.lang.Integer animateRectTime)
Default time for performing an animated setRect.
|
void |
setAnimateResizeAcceleration(AnimationAcceleration animateResizeAcceleration)
Default acceleration function for performing an animated resize.
|
void |
setAnimateResizeTime(java.lang.Integer animateResizeTime)
Default time for performing an animated resize.
|
void |
setAnimateScrollAcceleration(AnimationAcceleration animateScrollAcceleration)
Default acceleration function for performing an animated scroll.
|
void |
setAnimateScrollTime(java.lang.Integer animateScrollTime)
Default time for performing an animated scroll.
|
void |
setAnimateShowAcceleration(AnimationAcceleration animateShowAcceleration)
Default acceleration function for performing an animated show.
|
void |
setAnimateShowEffect(AnimationEffect animateShowEffect)
Default animation effect to use if
Canvas#animateShow() is called without an explicit effect parameter. |
void |
setAnimateShowTime(java.lang.Integer animateShowTime)
Default time for performing an animated show.
|
void |
setAnimateTime(int animateTime)
Default total duration of animations.
|
void |
setAppImgDir(java.lang.String appImgDir)
Default directory for app-specific images, relative to the Page-wide
appImgDir . |
void |
setAriaRole(java.lang.String ariaRole)
ARIA role of this component.
|
void |
setAriaState(java.lang.String stateName,
java.lang.Object stateValue)
Set a specific ARIA state mapping for this component.
|
void |
setAutoChildConstructor(java.lang.String autoChildName,
java.lang.String className)
Sets the SmartClient constructor for the AutoChild named
autoChildName . |
void |
setAutoChildProperties(java.lang.String autoChildName,
Canvas properties)
Sets the properties for creating a
Canvas AutoChild named autoChildName . |
void |
setAutoChildProperties(java.lang.String autoChildName,
FormItem properties)
Sets the properties for creating a
FormItem AutoChild named autoChildName . |
void |
setAutoChildVisibility(java.lang.String autoChildName,
boolean visible)
Sets whether to create and show the AutoChild named
autoChildName . |
void |
setAutoDraw(java.lang.Boolean autoDraw)
If true, this canvas will draw itself immediately after it is created.
|
void |
setAutoHeight()
Set the minimum value for height.
|
void |
setAutoShowParent(java.lang.Boolean autoShowParent)
If set to true, the widget's parent (if any) will automatically be shown whenever the widget is shown.
|
void |
setAutoWidth()
Set the minimum value for width.
|
void |
setBackgroundColor(java.lang.String backgroundColor)
The background color for this widget.
|
void |
setBackgroundImage(java.lang.String backgroundImage)
URL for a background image for this widget (corresponding to the CSS "background-image" attribute).
|
void |
setBackgroundPosition(java.lang.String backgroundPosition)
Specifies how the background image should be positioned on the widget.
|
void |
setBackgroundRepeat(BackgroundRepeat backgroundRepeat)
Specifies how the background image should be tiled if this widget is larger than the image.
|
void |
setBorder(java.lang.String border)
Set the CSS border of this component, as a CSS string including border-width, border-style, and/or color (eg "2px solid
blue").
|
void |
setBottom(int bottom)
Resizes the widget vertically to position its bottom edge at the specified coordinate.
|
void |
setCanAcceptDrop(java.lang.Boolean canAcceptDrop)
Indicates that this object can receive dropped widgets (i.e.
|
void |
setCanDrag(java.lang.Boolean canDrag)
Indicates whether this widget can initiate custom drag-and-drop operations (other than reposition or resize).
|
void |
setCanDragReposition(java.lang.Boolean canDragReposition)
Indicates whether this widget can be moved by a user of your application by simply dragging with the mouse.
|
void |
setCanDragResize(java.lang.Boolean canDragResize)
Indicates whether this widget can be resized by dragging on the edges and/or corners of the widget with the mouse.
|
void |
setCanDragScroll(java.lang.Boolean canDragScroll)
If this Canvas is canAcceptDrop:true, when the user drags a droppable widget over an edge of the widget, should we
scroll to show the rest of the widget's content? Returned from canvas.shouldDragScroll() if there are scrollbars.
|
void |
setCanDrop(java.lang.Boolean canDrop)
Indicates that this object can be dropped on top of other widgets.
|
void |
setCanDropBefore(java.lang.Boolean canDropBefore)
When explicitly set to false, disallows drop before this member in the Layout.
|
void |
setCanFocus(java.lang.Boolean canFocus)
Can this widget be allowed to become the target of keyboard events?
|
void |
setCanHover(java.lang.Boolean canHover)
Will this Canvas fire hover events when the user hovers over it, or one of its children?
|
void |
setCanSelectText(java.lang.Boolean canSelectText)
Whether native drag selection of contained text is allowed within this Canvas.
|
void |
setCanvasItem(CanvasItem canvasItem)
If this canvas is being displayed in a
CanvasItem , this property will be
set to point at the item. |
void |
setChildren(Canvas... children)
Array of all Canvii that are immediate children of this Canvas.
|
void |
setChildrenSnapResizeToGrid(java.lang.Boolean childrenSnapResizeToGrid)
If true, causes this canvas's children to snap to its grid when resizing.
|
void |
setChildrenSnapToGrid(java.lang.Boolean childrenSnapToGrid)
If true, causes this canvas's children to snap to its grid when dragging.
|
void |
setContents(java.lang.String contents)
The contents of a canvas or label widget.
|
void |
setContextMenu(Menu contextMenu)
Context menu to show for this object, an instance of the Menu widget.
|
void |
setCursor(Cursor cursor)
Specifies the cursor image to display when the mouse pointer is over this widget.
|
void |
setDataPath(java.lang.String dataPath)
A dataPath may be specified on any canvas.
|
void |
setDefaultHeight(int defaultHeight)
For custom components, establishes a default height for the component.
|
static void |
setDefaultProperties(Canvas canvasProperties)
Class level method to set the default properties of this class.
|
void |
setDefaultWidth(int defaultWidth)
For custom components, establishes a default width for the component.
|
void |
setDisabled(boolean disabled)
If set to true, the widget will be disabled.
|
void |
setDisabledCursor(Cursor disabledCursor)
Specifies the cursor image to display when the mouse pointer is over this widget if this widget is disabled.
|
void |
setDoubleClickDelay(int doubleClickDelay)
Amount of time (in msec) between which two clicks are considered a single click
|
void |
setDragAppearance(DragAppearance dragAppearance)
Visual appearance to show when the object is being dragged.
|
void |
setDragIntersectStyle(DragIntersectStyle dragIntersectStyle)
This indicates how the system will test for droppable targets: either by intersection with the mouse or intersection
with the rectangle of the dragMoveTarget.
|
void |
setDragOpacity(java.lang.Integer dragOpacity)
If this widget has dragAppearance
"target" , this value specifies the opacity to render the target while it
is being dragged. |
void |
setDragRepositionAppearance(DragAppearance dragRepositionAppearance)
If
canDragReposition is true, this attributes specifies
the visual appearance to show during drag reposition. |
void |
setDragRepositionCursor(Cursor dragRepositionCursor)
Cursor to switch to if the mouse is over a widget that is drag repositionable.
|
void |
setDragResizeAppearance(DragAppearance dragResizeAppearance)
If
canDragResize is true, this attributes specifies the
visual appearance to show during drag resize. |
void |
setDragScrollDelay(int dragScrollDelay)
If this widget supports drag-scrolling, This property specifies how many ms the user must hover over the
drag-scroll threshold before scrolling begins.
|
void |
setDragStartDistance(int dragStartDistance)
Number of pixels the cursor needs to move before the EventHandler starts a drag operation.
|
void |
setDragTarget(Canvas dragTarget)
A different widget that should be actually dragged when dragging initiates on this
widget.
|
void |
setDragType(java.lang.String dragType)
The "type" of thing given as a string that can be dragged from this widget.
|
void |
setDropTypes(java.lang.String... dropTypes)
The "type" of thing(s) that can be dropped on this widget specified as a string or an array of strings
(indicating multiple types).
|
void |
setDynamicContents(java.lang.Boolean dynamicContents)
Dynamic contents allows the contents string to be treated as a simple, but powerful
template.
|
void |
setEdgeBackgroundColor(java.lang.String edgeBackgroundColor)
Background color for the EdgedCanvas created to decorate this component.
|
void |
setEdgeCenterBackgroundColor(java.lang.String edgeCenterBackgroundColor)
Background color for the center section only.
|
void |
setEdgeImage(java.lang.String edgeImage)
Base name of images for edges.
|
void |
setEdgeMarginSize(int edgeMarginSize)
How far into the edge of an object do we consider the "edge" for drag resize purposes?
|
void |
setEdgeOffset(java.lang.Integer edgeOffset)
Amount the contained Canvas should be offset.
|
void |
setEdgeOpacity(java.lang.Integer edgeOpacity)
Opacity of the edges.
|
void |
setEdgeShowCenter(java.lang.Boolean edgeShowCenter)
Whether to show media in the center section, that is, behind the decorated Canvas.
|
void |
setEdgeSize(int edgeSize)
Size in pixels for corners and edges
|
void |
setExtraSpace(int extraSpace)
When this Canvas is included as a member in a Layout, extra blank space that should be left after this member in a
Layout.
|
void |
setFacetId(java.lang.String facetId)
If a Canvas is dropped onto a
CubeGrid , and it has a facetId property specified then
the Cube treats this as adding that facetId at the drop location. |
void |
setGroupBorderCSS(java.lang.String groupBorderCSS)
Sets the style for the grouping frame around the canvas.
|
void |
setGroupLabelBackgroundColor(java.lang.String groupLabelBackgroundColor)
If set, the background color of the grouping label.
|
void |
setGroupLabelStyleName(java.lang.String groupLabelStyleName)
Sets the style for the grouping label.
|
void |
setGroupTitle(java.lang.String groupTitle)
The title/label for the grouping.
|
void |
setHeight(int height)
Size for this component's vertical dimension.
|
void |
setHeight(java.lang.String height) |
void |
setHeight100()
Convenience method that sets the height to 100%.
|
void |
setHideUsingDisplayNone(boolean hideUsingDisplayNone)
When this widget is hidden (see
visibility and Canvas.hide ), should display:none be applied to the outer element ? |
void |
setHoverAlign(Alignment hoverAlign)
If
this.showHover is true, this property can be used to customize the alignment of content in the hover
canvas. |
void |
setHoverAutoDestroy(java.lang.Boolean hoverAutoDestroy)
If
this.showHover is true and Canvas.getHoverComponent is implemented, should the hoverCanvas returned from it be automatically destroyed when it is
hidden? |
void |
setHoverDelay(int hoverDelay)
If
this.canHover is true, how long should the mouse be kept over this widget before the hover event is
fired |
void |
setHoverHeight(java.lang.Integer hoverHeight)
If
this.showHover is true, this property can be used to customize the height of the hover canvas shown. |
void |
setHoverMoveWithMouse(java.lang.Boolean hoverMoveWithMouse)
If
this.showHover is true, should this widget's hover canvas be moved with the mouse while visible? |
void |
setHoverOpacity(java.lang.Integer hoverOpacity)
If
this.showHover is true, should the hover canvas be shown with opacity other than 100? |
void |
setHoverStyle(java.lang.String hoverStyle)
If
this.showHover is true, this property can be used to specify the css style to apply to the hover canvas. |
void |
setHoverVAlign(VerticalAlignment hoverVAlign)
If
this.showHover is true, this property can be used to customize the vertical alignment of content in the
hover canvas. |
void |
setHoverWidth(java.lang.Integer hoverWidth)
If
this.showHover is true, this property can be used to
customize the width of the hover canvas shown. |
void |
setHoverWrap(java.lang.Boolean hoverWrap)
If
this.showHover is true, this property can be used to customize the whether content in the hover canvas
is displayed in a single line, or wraps. |
void |
setHtmlPosition(DrawPosition htmlPosition)
If
htmlElement is specified, this attribute specifies the
position where the canvas should be inserted relative to the htmlElement in the DOM. |
void |
setImage(java.lang.String identifier,
java.lang.String URL)
Set the URL of an image element by name.
|
void |
setImage(java.lang.String identifier,
java.lang.String URL,
java.lang.String imgDir)
Set the URL of an image element by name.
|
void |
setIsGroup(boolean isGroup)
Should a grouping frame be shown around this canvas.
|
void |
setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj) |
void |
setKeepInParentRect(java.lang.Boolean keepInParentRect)
Constrains drag-resizing and drag-repositioning of this canvas to either the rect of its parent (if set to true) or an
arbitrary rect based its parent (if set to a [Left,Top,Width,Height] rect array).
|
void |
setKeepInParentRect(java.lang.Integer... keepInParentRect)
Constrains drag-resizing and drag-repositioning of this canvas to either the rect of its parent (if set to true) or an
arbitrary rect based its parent (if set to a [Left,Top,Width,Height] rect array).
|
void |
setKeepInParentRect(Rectangle rectangle) |
void |
setLayoutAlign(Alignment layoutAlign)
When this Canvas is included as a member in a Layout, layoutAlign controls alignment on the breadth axis of the layout.
|
void |
setLayoutAlign(VerticalAlignment layoutAlign)
When this Canvas is included as a member in a Layout, layoutAlign controls alignment on the breadth axis of the layout.
|
void |
setLeft(int left)
Number of pixels the left side of the widget is offset to the right from its default drawing context (either its
parent's topleft corner, or the document flow, depending on the value of the
position property). |
void |
setLeft(java.lang.String left)
Number of pixels the left side of the widget is offset to the right from its default drawing context (either its
parent's topleft corner, or the document flow, depending on the value of the
position property). |
void |
setLocateChildrenBy(LocatorStrategy locateChildrenBy)
Strategy to use when locating children in this canvas from an autoTest locator string.
|
void |
setLocateChildrenType(LocatorTypeStrategy locateChildrenType)
LocatorTypeStrategy to use when finding children within this canvas. |
void |
setLocatePeersBy(LocatorStrategy locatePeersBy)
Strategy to use when locating peers of this canvas from an autoTest locator string.
|
void |
setLocatePeersType(LocatorTypeStrategy locatePeersType)
LocatorTypeStrategy to use when finding peers of this canvas. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.CanvasLogicalStructure s) |
void |
setMargin(java.lang.Integer margin)
Set the CSS Margin, in pixels, for this component.
|
void |
setMatchElement(java.lang.Boolean matchElement)
If
htmlElement is specified, should this canvas initially be
drawn at the same dimensions as the htmlElement?Note: setting this property will not force the canvas to resize if the element subsequently resizes (for example due to page reflow). |
void |
setMaxHeight(int maxHeight)
Maximum height that this Canvas can be resized to.
|
void |
setMaxWidth(int maxWidth)
Maximum width that this Canvas can be resized to.
|
void |
setMenuConstructor(java.lang.String menuConstructor)
Default class used to construct menus created by this component, including context menus.
|
void |
setMinHeight(int minHeight)
Minimum height that this Canvas can be resized to by a user.
|
void |
setMinWidth(int minWidth)
Minimum width that this Canvas can be resized to.
|
void |
setMouseStillDownDelay(int mouseStillDownDelay)
Amount of time (in msec) between 'mouseStillDown' events for this object
|
void |
setMouseStillDownInitialDelay(int mouseStillDownInitialDelay)
Amount of time (in msec) before mouseStillDown events start to be fired for this object.
|
static void |
setNeverUseFilters(boolean neverUseFilters)
Changes the system-wide
neverUseFilters setting. |
void |
setNoDoubleClicks(java.lang.Boolean noDoubleClicks)
If true, this canvas will receive all mouse-clicks as single click events rather than doubleClicks.
|
void |
setOpacity(java.lang.Integer opacity)
Renders the widget to be partly transparent.
|
void |
setOverflow(Overflow overflow)
Controls what happens when the drawn size of the content of a Canvas is either greater or smaller than the specified
size of the Canvas.
|
void |
setPadding(java.lang.Integer padding)
Set the CSS padding of this component, in pixels.
|
void |
setPageLeft(int left)
Set the page-relative left coordinate of this widget.
|
void |
setPageTop(int top)
Set the page-relative top coordinate of this widget.
|
void |
setParentElement(Canvas parentElement)
This Canvas's immediate parent, if any.
|
void |
setPeers(Canvas... peers)
Array of all Canvii that are peers of this Canvas.
|
void |
setPercentBox(PercentBoxModel percentBox)
Governs the model to be used when sizing canvases with percentage width or height, or positioning widgets with a
specified
snapTo . |
void |
setPercentSource(Canvas percentSource)
If this canvas has its size specified as a percentage, this property allows the user to explicitly designate another
canvas upon which sizing will be based.
|
void |
setPosition(Positioning position)
Absolute or relative, corresponding to the "absolute" (with respect to parent) or
"relative" (with respect to document flow) values for the CSS position attribute.
|
void |
setPrefix(java.lang.String prefix) |
void |
setPrintChildrenAbsolutelyPositioned(java.lang.Boolean printChildrenAbsolutelyPositioned)
Should this canvas print its children absolutely positioned when generating
printable HTML . |
void |
setPrompt(java.lang.String prompt)
Prompt displayed in hover canvas if
showHover is true. |
void |
setRect(int left,
int top,
int width,
int height)
Set all four coordinates, relative to the enclosing context, at once.
|
void |
setRect(Rectangle rectangle)
Set all four coordinates, relative to the enclosing context, at once.
|
void |
setRedrawOnResize(java.lang.Boolean redrawOnResize)
Should this element be redrawn in response to a resize?
|
void |
setResizeBarTarget(java.lang.String resizeBarTarget)
When this Canvas is included as a member in a Layout, and
showResizeBar is set to true so that a resizeBar is created, resizeBarTarget:"next" can be
set to indicate that the resizeBar should resize the next member of the layout rather than this one. |
void |
setResizeFrom(EdgeName... resizeFrom)
When drag resizing is enabled via
canDragResize , restricts
resizes to only certain edges or corners. |
void |
setResizeFrom(java.lang.String... resizeFrom)
Deprecated.
use
#setResizeFrom(EdgeName) instead. |
void |
setRight(int right)
Resizes the widget horizontally to position its right side at the specified coordinate.
|
void |
setScrollbarConstructor(java.lang.String scrollbarConstructor)
The class that will be used to create custom scrollbars for this component.
|
void |
setScrollbarSize(int scrollbarSize)
How thick should we make the scrollbars for this canvas.
NOTE: has no effect if showCustomScrollbars is false. |
void |
setShadowDepth(int shadowDepth)
Depth of the shadow, or the virtual height above the page of the widget throwing the shadow.
|
void |
setShadowImage(java.lang.String shadowImage)
Base name of the series of images for the sides, corners, and center of the shadow.
|
void |
setShadowOffset(java.lang.Integer shadowOffset)
Offset of the shadow.
|
void |
setShadowSoftness(java.lang.Integer shadowSoftness)
Softness, or degree of blurring, of the shadow.
|
void |
setShouldPrint(java.lang.Boolean shouldPrint)
Whether this canvas should be included in a printable view.
|
void |
setShowCustomScrollbars(java.lang.Boolean showCustomScrollbars)
Whether to use the browser's native scrollbars or Smart GWT-based scrollbars.
|
void |
setShowDragShadow(java.lang.Boolean showDragShadow)
When this widget is dragged, if its dragAppearance is
"target" , should we show a shadow behind the canvas
during the drag. |
void |
setShowEdges(java.lang.Boolean showEdges)
Whether an
EdgedCanvas should be used to show image-based edges around this
component. |
void |
setShowHover(java.lang.Boolean showHover)
If
this.canHover is true, should we show the global hover canvas by default when the user hovers over this
canvas? |
void |
setShowHoverComponents(java.lang.Boolean showHoverComponents)
When set to true, shows a widget hovering at the mouse point instead of the builtin hover label.
|
void |
setShowResizeBar(java.lang.Boolean showResizeBar)
When this Canvas is included as a member in a
Layout , whether a resizeBar
should be shown after this member in the layout, to allow it to be resized. |
void |
setShowShadow(java.lang.Boolean showShadow)
Whether to show a drop shadow for this Canvas
If this method is called after the component has been drawn/initialized: Method to update showShadow . |
void |
setSkinImgDir(java.lang.String skinImgDir)
Default directory for skin images (those defined by the class), relative to the Page-wide
skinDir . |
void |
setSmoothFade(java.lang.Boolean smoothFade) |
void |
setSnapAxis(java.lang.String snapAxis)
Describes which axes to apply snap-to-grid to.
|
void |
setSnapEdge(java.lang.String snapEdge)
If
snapTo is defined to this widget, this property can be used to
define which edge of this widget should be snapped to an edge of the master or parent element. |
void |
setSnapHDirection(java.lang.String snapHDirection)
The horizontal snap direction.
|
void |
setSnapHGap(int snapHGap)
The horizontal grid size to use, in pixels, when snap-to-grid is enabled.
|
void |
setSnapOffsetLeft(java.lang.Integer snapOffsetLeft)
If
snapTo is defined for this widget, this property can be used to
specify an offset in px or percentage for the left coordinate of this widget. |
void |
setSnapOffsetTop(java.lang.Integer snapOffsetTop)
If
snapTo is defined for this widget, this property can be used to
specify an offset in px or percentage for the top coordinate of this widget. |
void |
setSnapOnDrop(java.lang.Boolean snapOnDrop)
When this canvas is dropped onto an object supporting snap-to-grid, should it snap to the grid (true, the default) or
just drop wherever the mouse is (false).
|
void |
setSnapResizeToGrid(java.lang.Boolean snapResizeToGrid)
Causes this canvas to snap to its parent's grid when resizing.
|
void |
setSnapTo(java.lang.String snapTo)
Position this widget such that it is aligned with ("snapped to") an edge of its
masterElement (if specified), or its parentElement . |
void |
setSnapToGrid(java.lang.Boolean snapToGrid)
Causes this canvas to snap to its parent's grid when dragging.
|
void |
setSnapVDirection(java.lang.String snapVDirection)
The vertical snap direction.
|
void |
setSnapVGap(int snapVGap)
The vertical grid size to use, in pixels, when snap-to-grid is enabled.
|
void |
setStyleName(java.lang.String styleName)
The CSS class applied to this widget as a whole.
|
void |
setTabIndex(java.lang.Integer tabIndex)
If specified this governs the tabIndex of the widget in the page's tab order.
|
void |
setTitle(java.lang.String title)
Synonym for
setPrompt(String) |
void |
setTooltip(java.lang.String tooltip)
Synonym for
setPrompt(String) |
void |
setTop(int top)
Number of pixels the top of the widget is offset down from its default drawing context (either its parent's top-left
corner, or the document flow, depending on the value of the
position property). |
void |
setTop(java.lang.String top)
Number of pixels the top of the widget is offset down from its default drawing context (either its parent's top-left
corner, or the document flow, depending on the value of the
position property). |
void |
setUseBackMask(java.lang.Boolean useBackMask)
In earlier versions of Internet Explorer (pre IE9), a native limitation exists whereby if HTML elements are overlapping
on the page, certain elements can appear to "burn through" elements in the same position with a higher z-index.
|
void |
setUseOpacityFilter(java.lang.Boolean useOpacityFilter)
Configures where the Opacity filter is used for IE6-8.
|
void |
setValuesManager(ValuesManager valuesManager)
ValuesManager for managing values displayed in this component. |
void |
setVisibility(Visibility visibility)
Controls widget visibility when the widget is initialized.
|
void |
setVisible(boolean visible) |
void |
setWidth(int width)
Size for this component's horizontal dimension.
|
void |
setWidth(java.lang.String width)
Size for this component's horizontal dimension.
|
void |
setWidth100()
Convenience method that sets the width to 100%.
|
void |
setZIndex(int newIndex)
Set the z-Index of the canvas.
|
void |
shouldDragScroll()
If this widget is showing scrollbars, and a user drags close to the edge of the viewport, should we scroll the viewport
in the appropriate direction? Returns this.canDragScroll if there are scrollbars, else false.
|
void |
show()
Sets this widget's visibility to "inherit", so that it becomes visible if all of its parents are visible or it has no
parents.
|
java.lang.String |
showClickMask(Function clickActionCallback,
ClickMaskMode mode,
Canvas[] unmaskedTargets)
Show a clickMask over the entire screen that intercepts mouse clicks and fires some action.
|
void |
showNextTo(Canvas otherWidget)
Show this widget next to another widget on the page, positioned such that it will not extend beyond the browser
viewport.
|
void |
showNextTo(Canvas otherWidget,
java.lang.String side) |
void |
showNextTo(Canvas otherWidget,
java.lang.String side,
boolean canOcclude) |
void |
showNextTo(Canvas otherWidget,
java.lang.String side,
boolean canOcclude,
boolean skipAnimation)
Show this widget next to another widget on the page, positioned such that it will not extend beyond the browser
viewport.
|
static void |
showPrintPreview(Canvas component)
Show a PrintWindow containing a printable view of the component passed in containing print HTML.
|
static void |
showPrintPreview(java.lang.Object[] components)
Show a Print containing a printable view of the components passed in.
|
static void |
showPrintPreview(java.lang.Object[] components,
PrintProperties printProperties,
java.lang.String title,
PrintPreviewCallback callback)
Show a Print containing a printable view of the components passed in.
|
static void |
showPrintPreview(java.lang.Object[] components,
PrintProperties printProperties,
java.lang.String title,
PrintPreviewCallback callback,
Window printWindowProperties,
java.lang.String printButtonTitle)
Show a Print containing a printable view of the components passed in.
|
void |
showRecursively()
Recursively show the canvas and all it's parents so the canvas will be visible.
|
void |
updateHover()
If this canvas is currently showing a hover (see
Canvas.handleHover ), this method can be called to update the contents of the hover. |
void |
updateHover(java.lang.String hoverHTML)
If this canvas is currently showing a hover (see
Canvas.handleHover ), this method can be called to update the contents of the hover. |
void |
updateShadow()
Update the canvas shadow.
|
java.lang.Boolean |
visibleAtPoint(int x,
int y,
boolean withinViewport,
Canvas ignoreWidgets,
Canvas upToParent)
Does this widget contain the specified global (x,y) coordinates, and have no other widgets also at the specified
position, obscuring this one? This is commonly used for (for example) drag and drop interactions.
|
java.lang.Boolean |
willAcceptDrop()
Returns true if the widget object being dragged can be dropped on this widget, and false otherwise.
|
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
public Canvas()
public Canvas(com.google.gwt.core.client.JavaScriptObject jsObj)
public Canvas(java.lang.String id)
public static Canvas getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
create
in class BaseWidget
public void setAccessKey(java.lang.String accessKey)
The accessKey can be set to any alphanumeric character (symbols not supported) Having set an accessKey, the canvas will be given focus when the user hits Alt+[accessKey], or in Mozilla Firefox 2.0 and above, Shift+Alt+[accessKey].
Note : This is an advanced setting
accessKey
- Character to use as an accessKey for this widget. Case Insensitive.. See String
. Default value is nullFocus overview and related methods
public java.lang.String getAccessKey()
String
Focus overview and related methods
public void setAnimateAcceleration(AnimationAcceleration animateAcceleration)
Note : This is an advanced setting
animateAcceleration
- animateAcceleration Default value is "smoothEnd"public AnimationAcceleration getAnimateAcceleration()
public void setAnimateFadeTime(java.lang.Integer animateFadeTime)
this.animateTime
will be used by default instead
Note : This is an advanced setting
animateFadeTime
- animateFadeTime Default value is nullpublic java.lang.Integer getAnimateFadeTime()
this.animateTime
will be used by default insteadpublic void setAnimateHideAcceleration(AnimationAcceleration animateHideAcceleration)
this.animateAcceleration
will be
used by default instead
Note : This is an advanced setting
animateHideAcceleration
- animateHideAcceleration Default value is nullpublic AnimationAcceleration getAnimateHideAcceleration()
this.animateAcceleration
will be
used by default insteadpublic void setAnimateHideTime(java.lang.Integer animateHideTime)
this.animateTime
will be used by default instead
Note : This is an advanced setting
animateHideTime
- animateHideTime Default value is nullpublic java.lang.Integer getAnimateHideTime()
this.animateTime
will be used by default insteadpublic void setAnimateMoveAcceleration(AnimationAcceleration animateMoveAcceleration)
this.animateAcceleration
will be
used by default instead
Note : This is an advanced setting
animateMoveAcceleration
- animateMoveAcceleration Default value is nullpublic AnimationAcceleration getAnimateMoveAcceleration()
this.animateAcceleration
will be
used by default insteadpublic void setAnimateMoveTime(java.lang.Integer animateMoveTime)
this.animateTime
will be used by default instead
Note : This is an advanced setting
animateMoveTime
- animateMoveTime Default value is nullpublic java.lang.Integer getAnimateMoveTime()
this.animateTime
will be used by default insteadpublic void setAnimateRectAcceleration(AnimationAcceleration animateRectAcceleration)
this.animateAcceleration
will be used by default instead
Note : This is an advanced setting
animateRectAcceleration
- animateRectAcceleration Default value is nullpublic AnimationAcceleration getAnimateRectAcceleration()
this.animateAcceleration
will be used by default insteadpublic void setAnimateRectTime(java.lang.Integer animateRectTime)
this.animateTime
will be used by default
instead
Note : This is an advanced setting
animateRectTime
- animateRectTime Default value is nullpublic java.lang.Integer getAnimateRectTime()
this.animateTime
will be used by default
insteadpublic void setAnimateResizeAcceleration(AnimationAcceleration animateResizeAcceleration)
this.animateAcceleration
will
be used by default instead
Note : This is an advanced setting
animateResizeAcceleration
- animateResizeAcceleration Default value is nullpublic AnimationAcceleration getAnimateResizeAcceleration()
this.animateAcceleration
will
be used by default insteadpublic void setAnimateResizeTime(java.lang.Integer animateResizeTime)
this.animateTime
will be used by default instead
Note : This is an advanced setting
animateResizeTime
- animateResizeTime Default value is nullpublic java.lang.Integer getAnimateResizeTime()
this.animateTime
will be used by default insteadpublic void setAnimateScrollAcceleration(AnimationAcceleration animateScrollAcceleration)
this.animateAcceleration
will
be used by default instead
Note : This is an advanced setting
animateScrollAcceleration
- animateScrollAcceleration Default value is nullpublic AnimationAcceleration getAnimateScrollAcceleration()
this.animateAcceleration
will
be used by default insteadpublic void setAnimateScrollTime(java.lang.Integer animateScrollTime)
this.animateTime
will be used by default instead
Note : This is an advanced setting
animateScrollTime
- animateScrollTime Default value is nullpublic java.lang.Integer getAnimateScrollTime()
this.animateTime
will be used by default insteadpublic void setAnimateShowAcceleration(AnimationAcceleration animateShowAcceleration)
this.animateAcceleration
will be
used by default instead
Note : This is an advanced setting
animateShowAcceleration
- animateShowAcceleration Default value is nullpublic AnimationAcceleration getAnimateShowAcceleration()
this.animateAcceleration
will be
used by default insteadpublic void setAnimateShowTime(java.lang.Integer animateShowTime)
this.animateTime
will be used by default instead
Note : This is an advanced setting
animateShowTime
- animateShowTime Default value is nullpublic java.lang.Integer getAnimateShowTime()
this.animateTime
will be used by default insteadpublic void setAnimateTime(int animateTime)
duration
parameter into the appropriate animate...() method.
Note : This is an advanced setting
animateTime
- animateTime Default value is 300public int getAnimateTime()
duration
parameter into the appropriate animate...() method.public void setAppImgDir(java.lang.String appImgDir)
appImgDir
.
Note : This is an advanced setting
appImgDir
- . See String
. Default value is ""Images overview and related methods
public java.lang.String getAppImgDir()
appImgDir
.String
Images overview and related methods
public void setAriaRole(java.lang.String ariaRole) throws java.lang.IllegalStateException
ariaRole
- . See String
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdAccessibility overview and related methods
public java.lang.String getAriaRole()
String
Accessibility overview and related methods
public void setAutoDraw(java.lang.Boolean autoDraw) throws java.lang.IllegalStateException
Note that you should turn this OFF for any canvases that are provided as children of other canvases, or they will draw initially, then be clear()ed and drawn again when added as children, causing a large performance penalty.
For example, the following code is incorrect and will cause extra draw()s:
isc.Layout.create({ members : [ isc.ListGrid.create() ] });It should instead be:
isc.Layout.create({ members : [ isc.ListGrid.create({ autoDraw: false }) ] });In order to avoid unwanted autoDrawing systematically, it is recommend that you call
isc.setAutoDraw(false)
immediately after Smart GWT is loaded
and before any components are created, then set autoDraw:true
or call
draw() explicitly to draw components.
Otherwise, if the global setting for autoDraw remains true
, you must set
autoDraw:false, as shown above, on every component in your application that
should not immediately draw: all Canvas children, Layout members, Window items, Tab
panes, etc, however deeply nested. Forgetting to set autoDraw:false will result in one
more clear()s - these are reported on the Results tab of the
Developer Console
, and can be tracked to individual components by
using the "clears" log category in the Developer Console.
autoDraw
- autoDraw Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawing overview and related methods
public java.lang.Boolean getAutoDraw()
Note that you should turn this OFF for any canvases that are provided as children of other canvases, or they will draw initially, then be clear()ed and drawn again when added as children, causing a large performance penalty.
For example, the following code is incorrect and will cause extra draw()s:
isc.Layout.create({ members : [ isc.ListGrid.create() ] });It should instead be:
isc.Layout.create({ members : [ isc.ListGrid.create({ autoDraw: false }) ] });In order to avoid unwanted autoDrawing systematically, it is recommend that you call
isc.setAutoDraw(false)
immediately after Smart GWT is loaded
and before any components are created, then set autoDraw:true
or call
draw() explicitly to draw components.
Otherwise, if the global setting for autoDraw remains true
, you must set
autoDraw:false, as shown above, on every component in your application that
should not immediately draw: all Canvas children, Layout members, Window items, Tab
panes, etc, however deeply nested. Forgetting to set autoDraw:false will result in one
more clear()s - these are reported on the Results tab of the
Developer Console
, and can be tracked to individual components by
using the "clears" log category in the Developer Console.
Drawing overview and related methods
public void setAutoShowParent(java.lang.Boolean autoShowParent)
Note : This is an advanced setting
autoShowParent
- autoShowParent Default value is falseAppearance overview and related methods
public java.lang.Boolean getAutoShowParent()
Appearance overview and related methods
public void setBackgroundColor(java.lang.String backgroundColor)
newColor
.backgroundColor
- new background color, or null
to remove the current background color.. See String
. Default value is nullAppearance overview and related methods
public java.lang.String getBackgroundColor()
String
Appearance overview and related methods
public void setBackgroundImage(java.lang.String backgroundImage)
backgroundImage
- new URL (local to Page image directory) for background image. See SCImgURL
. Default value is nullAppearance overview and related methods
public java.lang.String getBackgroundImage()
SCImgURL
Appearance overview and related methods
public void setBackgroundPosition(java.lang.String backgroundPosition) throws java.lang.IllegalStateException
backgroundPosition
- . See String
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdAppearance overview and related methods
public java.lang.String getBackgroundPosition()
String
Appearance overview and related methods
public void setBackgroundRepeat(BackgroundRepeat backgroundRepeat) throws java.lang.IllegalStateException
background-repeat
attribute. The default of null means no background-repeat
CSS will be
written out. See BackgroundRepeat
type for details on other settings.
NOTE: this
setting directly sets the CSS property background-repeat
but does not attempt to work around various known
bugs with this setting, or lack of support in IE6. If you need to apply CSS-based workarounds for browser limitations
with this setting, it's best to do so via setting styleName
.
backgroundRepeat
- backgroundRepeat Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdAppearance overview and related methods
public BackgroundRepeat getBackgroundRepeat()
background-repeat
attribute. The default of null means no background-repeat
CSS will be
written out. See BackgroundRepeat
type for details on other settings.
NOTE: this
setting directly sets the CSS property background-repeat
but does not attempt to work around various known
bugs with this setting, or lack of support in IE6. If you need to apply CSS-based workarounds for browser limitations
with this setting, it's best to do so via setting styleName
.
Appearance overview and related methods
public void setBorder(java.lang.String border)
This property applies the same border to all four sides of this component. Different per-side borders can
be set in a CSS style and applied via styleName
.
If isGroup
is set to true then border is derived from the groupBorderCSS
attribute, not from the explicit border property.
If this method is called after the component has been drawn/initialized:
Set the CSS border of this component, as a CSS string including border-width, border-style, and/or color (eg "2px solid blue").
This property applies the same border to all four sides of this component. Different per-side borders can be set in a CSS style and applied via styleName
.
border
- new border to set to (eg: "2px solid black"). See String
. Default value is nullAppearance overview and related methods
public java.lang.String getBorder()
This property applies the same border to all four sides of this component. Different per-side borders can
be set in a CSS style and applied via styleName
.
If isGroup
is set to true then border is derived from the groupBorderCSS
attribute, not from the explicit border property.
String
Appearance overview and related methods
public void setCanAcceptDrop(java.lang.Boolean canAcceptDrop)
Note : This is an advanced setting
canAcceptDrop
- canAcceptDrop Default value is falseDragdrop overview and related methods
,
Drag create Examplepublic java.lang.Boolean getCanAcceptDrop()
Dragdrop overview and related methods
,
Drag create Examplepublic void setCanDrag(java.lang.Boolean canDrag)
Note : This is an advanced setting
canDrag
- canDrag Default value is falseDragdrop overview and related methods
,
Drag create Examplepublic java.lang.Boolean getCanDrag()
Dragdrop overview and related methods
,
Drag create Examplepublic void setCanDragReposition(java.lang.Boolean canDragReposition)
Note : This is an advanced setting
canDragReposition
- canDragReposition Default value is falseDragdrop overview and related methods
,
Drag effects Examplepublic java.lang.Boolean getCanDragReposition()
Dragdrop overview and related methods
,
Drag effects Examplepublic void setCanDragResize(java.lang.Boolean canDragResize)
Note : This is an advanced setting
canDragResize
- canDragResize Default value is falseDragdrop overview and related methods
,
Drag resize Examplepublic java.lang.Boolean getCanDragResize()
Dragdrop overview and related methods
,
Drag resize Examplepublic void setCanDragScroll(java.lang.Boolean canDragScroll)
Note : This is an advanced setting
canDragScroll
- canDragScroll Default value is trueshouldDragScroll()
public java.lang.Boolean getCanDragScroll()
shouldDragScroll()
public void setCanDrop(java.lang.Boolean canDrop)
Note : This is an advanced setting
canDrop
- canDrop Default value is falseDragdrop overview and related methods
,
Drag create Examplepublic java.lang.Boolean getCanDrop()
Dragdrop overview and related methods
,
Drag create Examplepublic void setCanDropBefore(java.lang.Boolean canDropBefore)
Note : This is an advanced setting
canDropBefore
- canDropBefore Default value is nullLayout
,
LayoutMember overview and related methods
public java.lang.Boolean getCanDropBefore()
Layout
,
LayoutMember overview and related methods
public void setCanFocus(java.lang.Boolean canFocus)
If canFocus is unset (the default), only scrollable widgets with visible scrollbars are focusable, to allow for keyboard scrolling.
A widget normally
receives focus by being clicked on or tabbed to.
If this method is called after the component has been drawn/initialized:
Change whether a widget can accept keyboard focus.
Note : This is an advanced setting
canFocus
- whether the widget should now accept focus. Default value is nullFocus overview and related methods
,
Focus & Tabbing Examplepublic java.lang.Boolean getCanFocus()
If canFocus is unset (the default), only scrollable widgets with visible scrollbars are focusable, to allow for keyboard scrolling.
A widget normally receives focus by being clicked on or tabbed to.
Focus overview and related methods
,
Focus & Tabbing Examplepublic void setCanHover(java.lang.Boolean canHover)
canHover
- canHover Default value is nullsetShowHover(java.lang.Boolean)
,
HoverEvent
public java.lang.Boolean getCanHover()
getShowHover()
,
HoverEvent
public void setCanSelectText(java.lang.Boolean canSelectText)
Note that setting this property to
false
will not avoid text selection which is initiated outside this Canvas from continuing into this
Canvas, even if text selection began in another Canvas.
Note : This is an advanced setting
canSelectText
- canSelectText Default value is falsepublic java.lang.Boolean getCanSelectText()
Note that setting this property to
false
will not avoid text selection which is initiated outside this Canvas from continuing into this
Canvas, even if text selection began in another Canvas.
public void setCanvasItem(CanvasItem canvasItem) throws java.lang.IllegalStateException
CanvasItem
, this property will be
set to point at the item. Otherwise this property will be null.canvasItem
- canvasItem Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic CanvasItem getCanvasItem()
CanvasItem
, this property will be
set to point at the item. Otherwise this property will be null.public Canvas[] getChildren()
Use Canvas.addChild
and Canvas.removeChild
to add and remove children after a Canvas has been created/drawn.
Containment overview and related methods
public void setChildrenSnapResizeToGrid(java.lang.Boolean childrenSnapResizeToGrid)
snapToGrid
or snapResizeToGrid
value on the child.childrenSnapResizeToGrid
- childrenSnapResizeToGrid Default value is nullDragdrop overview and related methods
public java.lang.Boolean getChildrenSnapResizeToGrid()
snapToGrid
or snapResizeToGrid
value on the child.Dragdrop overview and related methods
public void setChildrenSnapToGrid(java.lang.Boolean childrenSnapToGrid)
snapToGrid
value on the child.childrenSnapToGrid
- childrenSnapToGrid Default value is nullDragdrop overview and related methods
public java.lang.Boolean getChildrenSnapToGrid()
snapToGrid
value on the child.Dragdrop overview and related methods
public void setContents(java.lang.String contents)
When dynamicContents
is set, setContents()
can also be called with no arguments to cause contents to be re-evaluated.
Note : This is an advanced setting
contents
- an HTML string to be set as the contents of this widget. See HTMLString
. Default value is " "setDynamicContents(java.lang.Boolean)
public java.lang.String getContents()
HTMLString
getDynamicContents()
public void setContextMenu(Menu contextMenu)
Note: if Canvas.destroy
is called on a canvas, any specified context menu is not
automatically destroyed as well. This is in contrast to MenuButton
s which
automatically destroy their specified menu
by default. The
behavior is intentional as context menus are commonly reused across components.
Note : This is an advanced setting
contextMenu
- contextMenu Default value is nullShowContextMenuEvent
,
Cues overview and related methods
,
Context menus Examplepublic Menu getContextMenu()
Note: if Canvas.destroy
is called on a canvas, any specified context menu is not
automatically destroyed as well. This is in contrast to MenuButton
s which
automatically destroy their specified menu
by default. The
behavior is intentional as context menus are commonly reused across components.
ShowContextMenuEvent
,
Cues overview and related methods
,
Context menus Examplepublic void setCursor(Cursor cursor)
Note : This is an advanced setting
cursor
- new cursor. Default value is Canvas.DEFAULTCues overview and related methods
,
Drag create Example,
Cursors Examplepublic Cursor getCursor()
Cues overview and related methods
,
Drag create Example,
Cursors Examplepublic void setDataPath(java.lang.String dataPath)
For components which support displaying or editing data values, (such as DynamicForm
or
ListGrid
components), the dataPath may be set to specify how the components
data is
accessed. In this case the dataPath essentially specifies a nested object to edit - typically
a path to a field value within a dataSource record. Note that a ValuesManager will be required
to handle connecting the dataBoundcomponent to the appropriate sub object. This may be explicitly
specified on the component, or a parent of the component, or automatically generated
if a DataSource is specified on either the component or a parent thereof.
To provide a simple example - if a complex object existed with the following format:
{ companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } }a developer could specify a DynamicForm instance with 'dataPath' set to "address" to edit the nested address object:
isc.ValuesManager.create({ ID:'vm', values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } } }); isc.DynamicForm.create({ valuesManager:"vm", dataPath:"address", items:[{name:"street"}, {name:"city"}, {name:"state"}] });If a component is specified with a
dataPath
attribute but does not have an
explicitly specified valuesManager, it will check its parent element chain for a specified
valuesManager and automatically bind to that. This simplifies binding multiple components used
to view or edit a nested data structure as the valuesManager needs only be defined once at a
reasonably high level component. Here's an example of this approach:
isc.ValuesManager.create({ ID:'vm', values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } } }); isc.Layout.create({ valuesManager:"vm", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName"}] }), isc.DynamicForm.create({ dataPath:"address", items:[{name:"street"}, {name:"city"}, {name:"state"}] }) ] });Note that in this case the valuesManager is specified on a Layout, which has no 'values' management behavior of its own, but contains items with a specified dataPath which do. In this example you'd see 2 forms allowing editing of the nested data structure.
dataPaths from multiple nested components may also be combined. For example:
isc.ValuesManager.create({ ID:'vm', values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } parentCompany:{ companyName:"Some Corporation", address:{ street:"1 High Street", city:"New York", state:"NY" } } } }); isc.Layout.create({ valuesManager:"vm", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName"}] }), isc.DynamicForm.create({ dataPath:"address", items:[{name:"street"}, {name:"city"}, {name:"state"}] }), isc.Layout.create({ dataPath:"parentCompany", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName", type:"staticText"}] }), isc.DetailViewer.create({ dataPath:"address", fields:[{name:"street", name:"city", name:"state"}] }) ] }) ] });In this example the detailViewer will display data from the
parentCompany.address
object within the base record.
Note that if a component has a specified dataSource and shows child components with a
specified dataPath, there is no need to explicitly declare a valuesManager at all. If a component
with a dataPath has a dataSource, or an ancestor with a dataSource specified, it will, a
valuesManager will automatically be generated on the higher level component (and be available as
component.valuesManager
).
If this method is called after the component has been drawn/initialized:
Setter for the dataPath
attribute. This method may be called directly at runtime to set the dataPath on a component, and will also be re-run automatically whenever a canvas' parentElement changes due to a call to addChild(). This method handles automatically binding the component to the appropriate valuesManager if necessary.
Note : This is an advanced setting
dataPath
- new dataPath. See DataPath
. Default value is nullpublic java.lang.String getDataPath()
For components which support displaying or editing data values, (such as DynamicForm
or
ListGrid
components), the dataPath may be set to specify how the components
data is
accessed. In this case the dataPath essentially specifies a nested object to edit - typically
a path to a field value within a dataSource record. Note that a ValuesManager will be required
to handle connecting the dataBoundcomponent to the appropriate sub object. This may be explicitly
specified on the component, or a parent of the component, or automatically generated
if a DataSource is specified on either the component or a parent thereof.
To provide a simple example - if a complex object existed with the following format:
{ companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } }a developer could specify a DynamicForm instance with 'dataPath' set to "address" to edit the nested address object:
isc.ValuesManager.create({ ID:'vm', values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } } }); isc.DynamicForm.create({ valuesManager:"vm", dataPath:"address", items:[{name:"street"}, {name:"city"}, {name:"state"}] });If a component is specified with a
dataPath
attribute but does not have an
explicitly specified valuesManager, it will check its parent element chain for a specified
valuesManager and automatically bind to that. This simplifies binding multiple components used
to view or edit a nested data structure as the valuesManager needs only be defined once at a
reasonably high level component. Here's an example of this approach:
isc.ValuesManager.create({ ID:'vm', values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } } }); isc.Layout.create({ valuesManager:"vm", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName"}] }), isc.DynamicForm.create({ dataPath:"address", items:[{name:"street"}, {name:"city"}, {name:"state"}] }) ] });Note that in this case the valuesManager is specified on a Layout, which has no 'values' management behavior of its own, but contains items with a specified dataPath which do. In this example you'd see 2 forms allowing editing of the nested data structure.
dataPaths from multiple nested components may also be combined. For example:
isc.ValuesManager.create({ ID:'vm', values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } parentCompany:{ companyName:"Some Corporation", address:{ street:"1 High Street", city:"New York", state:"NY" } } } }); isc.Layout.create({ valuesManager:"vm", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName"}] }), isc.DynamicForm.create({ dataPath:"address", items:[{name:"street"}, {name:"city"}, {name:"state"}] }), isc.Layout.create({ dataPath:"parentCompany", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName", type:"staticText"}] }), isc.DetailViewer.create({ dataPath:"address", fields:[{name:"street", name:"city", name:"state"}] }) ] }) ] });In this example the detailViewer will display data from the
parentCompany.address
object within the base record.
Note that if a component has a specified dataSource and shows child components with a
specified dataPath, there is no need to explicitly declare a valuesManager at all. If a component
with a dataPath has a dataSource, or an ancestor with a dataSource specified, it will, a
valuesManager will automatically be generated on the higher level component (and be available as
component.valuesManager
).
DataPath
public void setDefaultHeight(int defaultHeight)
For a component that should potentially be
sized automatically by a Layout, set this property rather than height
directly, because Layouts regard a height setting as an explicit size that shouldn't be changed.
Note : This is an advanced setting
defaultHeight
- defaultHeight Default value is 100Sizing overview and related methods
public int getDefaultHeight()
For a component that should potentially be
sized automatically by a Layout, set this property rather than height
directly, because Layouts regard a height setting as an explicit size that shouldn't be changed.
Sizing overview and related methods
public void setDefaultWidth(int defaultWidth)
For a component that should potentially be
sized automatically by a Layout, set this property rather than width
directly, because Layouts regard a width setting as an explicit size that shouldn't be changed.
Note : This is an advanced setting
defaultWidth
- defaultWidth Default value is 100Sizing overview and related methods
public int getDefaultWidth()
For a component that should potentially be
sized automatically by a Layout, set this property rather than width
directly, because Layouts regard a width setting as an explicit size that shouldn't be changed.
Sizing overview and related methods
public java.lang.Boolean getDestroyed() throws java.lang.IllegalStateException
true
, the destroy()
method
has been called on this canvas. This implies the canvas is no longer valid. Its ID has been removed from global scope,
and calling standard canvas APIs on it is likely to result in errors.
Note : This method should be called only after the widget has been rendered.
java.lang.IllegalStateException
- if this widget has not yet been rendered.BaseWidget.destroy()
public java.lang.Boolean getDestroying() throws java.lang.IllegalStateException
Canvas.destroy
method is called
on a widget. If this property is true, but destroyed
is not,
this indicates the canvas is in the process of being destroyed.
Note : This method should be called only after the widget has been rendered.
java.lang.IllegalStateException
- if this widget has not yet been rendered.BaseWidget.destroy()
public void setDisabledCursor(Cursor disabledCursor)
Note : This is an advanced setting
disabledCursor
- disabledCursor Default value is Canvas.DEFAULTCues overview and related methods
public Cursor getDisabledCursor()
Cues overview and related methods
public void setDoubleClickDelay(int doubleClickDelay)
Note : This is an advanced setting
doubleClickDelay
- doubleClickDelay Default value is 250public int getDoubleClickDelay()
public void setDragAppearance(DragAppearance dragAppearance)
dragResizeAppearance
and dragRepositionAppearance
.
Note : This is an advanced setting
dragAppearance
- dragAppearance Default value is EventHandler.OUTLINEDragdrop overview and related methods
public DragAppearance getDragAppearance()
dragResizeAppearance
and dragRepositionAppearance
.Dragdrop overview and related methods
public void setDragIntersectStyle(DragIntersectStyle dragIntersectStyle)
Note : This is an advanced setting
dragIntersectStyle
- dragIntersectStyle Default value is "mouse"Dragdrop overview and related methods
public DragIntersectStyle getDragIntersectStyle()
Dragdrop overview and related methods
public void setDragOpacity(java.lang.Integer dragOpacity)
"target"
, this value specifies the opacity to render the target while it
is being dragged. A null value implies we do not modify the opacity.
Note : This is an advanced setting
dragOpacity
- dragOpacity Default value is nullDragdrop overview and related methods
,
Drag effects Examplepublic java.lang.Integer getDragOpacity()
"target"
, this value specifies the opacity to render the target while it
is being dragged. A null value implies we do not modify the opacity.Dragdrop overview and related methods
,
Drag effects Examplepublic void setDragRepositionAppearance(DragAppearance dragRepositionAppearance)
canDragReposition
is true, this attributes specifies
the visual appearance to show during drag reposition. If unset dragAppearance
will be used.
Note : This is an advanced setting
dragRepositionAppearance
- dragRepositionAppearance Default value is nullDragdrop overview and related methods
public DragAppearance getDragRepositionAppearance()
canDragReposition
is true, this attributes specifies
the visual appearance to show during drag reposition. If unset dragAppearance
will be used.Dragdrop overview and related methods
public void setDragRepositionCursor(Cursor dragRepositionCursor)
Note : This is an advanced setting
dragRepositionCursor
- dragRepositionCursor Default value is Canvas.MOVEDragdrop overview and related methods
public Cursor getDragRepositionCursor()
Dragdrop overview and related methods
public void setDragResizeAppearance(DragAppearance dragResizeAppearance)
canDragResize
is true, this attributes specifies the
visual appearance to show during drag resize. If unset dragAppearance
will be used.
Note : This is an advanced setting
dragResizeAppearance
- dragResizeAppearance Default value is nullDragdrop overview and related methods
public DragAppearance getDragResizeAppearance()
canDragResize
is true, this attributes specifies the
visual appearance to show during drag resize. If unset dragAppearance
will be used.Dragdrop overview and related methods
public void setDragScrollDelay(int dragScrollDelay)
Note : This is an advanced setting
dragScrollDelay
- dragScrollDelay Default value is 100public int getDragScrollDelay()
public void setDragStartDistance(int dragStartDistance)
Note : This is an advanced setting
dragStartDistance
- dragStartDistance Default value is 5Dragdrop overview and related methods
public int getDragStartDistance()
Dragdrop overview and related methods
public void setDragType(java.lang.String dragType)
Note : This is an advanced setting
dragType
- . See String
. Default value is nullsetDropTypes(java.lang.String...)
,
Dragdrop overview and related methods
public java.lang.String getDragType()
String
getDropTypes()
,
Dragdrop overview and related methods
public void setDynamicContents(java.lang.Boolean dynamicContents)
You can use this feature to build some simple custom components. For example, let's say you want to show the value of a Slider in a Canvas somewhere on the screen. You can do this by observing the valueChanged() method on the slider and calling setContents() on your canvas with the new string or you can set the contents of the canvas to something like:
"The slider value is \${sliderInstance.getValue()}."
Next you set dynamicContents: true on the canvas, observe valueChanged() on the slider and call canvas.markForRedraw() in that observation. This approach is cleaner than setContents() when the Canvas is aggregating several values or dynamic expressions. Like so:
Slider.create({ ID: "mySlider" }); Canvas.create({ ID: "myCanvas", dynamicContents: true, contents: "The slider value is \${mySlider.getValue()}." }); myCanvas.observe(mySlider, "valueChanged", "observer.markForRedraw()");You can embed an arbitrary number of dynamic expressions in the contents string. The search and replace is optimized for speed.
If an error occurs during the evaluation of one of the expressions, a warning is logged to the ISC Developer Console and the error string is embedded in place of the expected value in the Canvas.
The value of a function is its return value. The value of any variable is the same as that returned by its toString() representation.
Inside the evaluation contentext, this
points to the canvas instance that
has the dynamicContents string as its contents - in other words the canvas instance on
which the template is declared.
Note : This is an advanced setting
dynamicContents
- dynamicContents Default value is falsesetContents(java.lang.String)
,
com.smartgwt.client.widgets.Canvas#setDynamicContentsVars
public java.lang.Boolean getDynamicContents()
You can use this feature to build some simple custom components. For example, let's say you want to show the value of a Slider in a Canvas somewhere on the screen. You can do this by observing the valueChanged() method on the slider and calling setContents() on your canvas with the new string or you can set the contents of the canvas to something like:
"The slider value is \${sliderInstance.getValue()}."
Next you set dynamicContents: true on the canvas, observe valueChanged() on the slider and call canvas.markForRedraw() in that observation. This approach is cleaner than setContents() when the Canvas is aggregating several values or dynamic expressions. Like so:
Slider.create({ ID: "mySlider" }); Canvas.create({ ID: "myCanvas", dynamicContents: true, contents: "The slider value is \${mySlider.getValue()}." }); myCanvas.observe(mySlider, "valueChanged", "observer.markForRedraw()");You can embed an arbitrary number of dynamic expressions in the contents string. The search and replace is optimized for speed.
If an error occurs during the evaluation of one of the expressions, a warning is logged to the ISC Developer Console and the error string is embedded in place of the expected value in the Canvas.
The value of a function is its return value. The value of any variable is the same as that returned by its toString() representation.
Inside the evaluation contentext, this
points to the canvas instance that
has the dynamicContents string as its contents - in other words the canvas instance on
which the template is declared.
getContents()
,
com.smartgwt.client.widgets.Canvas#getDynamicContentsVars
public void setEdgeBackgroundColor(java.lang.String edgeBackgroundColor) throws java.lang.IllegalStateException
edgeBackgroundColor
- . See Color
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getEdgeBackgroundColor()
Color
public void setEdgeCenterBackgroundColor(java.lang.String edgeCenterBackgroundColor) throws java.lang.IllegalStateException
edgeCenterBackgroundColor
- . See Color
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getEdgeCenterBackgroundColor()
Color
public void setEdgeImage(java.lang.String edgeImage) throws java.lang.IllegalStateException
The full list of extensions is: "_TL", "_TR", "_BL", "_BR", "_T", "_L", "_B", "_R", "_center".
edgeImage
- . See SCImgURL
. Default value is "[SKIN]edge.gif"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getEdgeImage()
The full list of extensions is: "_TL", "_TR", "_BL", "_BR", "_T", "_L", "_B", "_R", "_center".
SCImgURL
public void setEdgeMarginSize(int edgeMarginSize)
Note : This is an advanced setting
edgeMarginSize
- edgeMarginSize Default value is 5Dragdrop overview and related methods
,
Drag resize Examplepublic int getEdgeMarginSize()
Dragdrop overview and related methods
,
Drag resize Examplepublic void setEdgeOffset(java.lang.Integer edgeOffset) throws java.lang.IllegalStateException
edgeOffset
- edgeOffset Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getEdgeOffset()
public void setEdgeOpacity(java.lang.Integer edgeOpacity) throws java.lang.IllegalStateException
Canvas.setOpacity
is called on a Canvas where edgeOpacity is set, edgeOpacity will be considered a percentage of the
parent's opacity (so 50% opaque parent plus edgeOpacity 50 means 25% opaque edges)
edgeOpacity
and mark the canvas for redrawedgeOpacity
- new edge-opacity level. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getEdgeOpacity()
Canvas.setOpacity
is called on a Canvas where edgeOpacity is set, edgeOpacity will be considered a percentage of the
parent's opacity (so 50% opaque parent plus edgeOpacity 50 means 25% opaque edges)public void setEdgeShowCenter(java.lang.Boolean edgeShowCenter) throws java.lang.IllegalStateException
edgeShowCenter
- edgeShowCenter Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getEdgeShowCenter()
public void setEdgeSize(int edgeSize) throws java.lang.IllegalStateException
edgeSize
- edgeSize Default value is 10java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getEdgeSize()
public void setExtraSpace(int extraSpace) throws java.lang.IllegalStateException
extraSpace
- extraSpace Default value is 0java.lang.IllegalStateException
- this property cannot be changed after the component has been createdLayoutSpacer
,
LayoutMember overview and related methods
public int getExtraSpace()
LayoutSpacer
,
LayoutMember overview and related methods
public void setGroupBorderCSS(java.lang.String groupBorderCSS) throws java.lang.IllegalStateException
isGroup
is set to true.groupBorderCSS
- . See String
. Default value is "2px solid black"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdAppearance overview and related methods
public java.lang.String getGroupBorderCSS()
isGroup
is set to true.String
Appearance overview and related methods
public void setGroupLabelBackgroundColor(java.lang.String groupLabelBackgroundColor)
isGroup
is set to true. This corresponds to the CSS background-color property on the grouping label. You can set this property to an RGB value (e.g. #22AAFF) or a named color (e.g. red) from a list of browser supported color names.
The getter for this attribute, getGroupLabelBackgroundColor()
, returns the color that will actually be used; i.e. if groupLabelBackgroundColor is
left unset or is set to null, then getGroupLabelBackgroundColor() returns the color string that will be used.
If this method is called after the component has been drawn/initialized:
Setter for groupLabelBackgroundColor
.
groupLabelBackgroundColor
- the new grouping label background color.. See CSSColor
. Default value is nullAppearance overview and related methods
public java.lang.String getGroupLabelBackgroundColor()
isGroup
is set to true. This corresponds to the CSS background-color property on the grouping label. You can set this property to an RGB value (e.g. #22AAFF) or a named color (e.g. red) from a list of browser supported color names.
The getter for this attribute, getGroupLabelBackgroundColor()
, returns the color that will actually be used; i.e. if groupLabelBackgroundColor is
left unset or is set to null, then getGroupLabelBackgroundColor() returns the color string that will be used.
CSSColor
Appearance overview and related methods
public void setGroupLabelStyleName(java.lang.String groupLabelStyleName) throws java.lang.IllegalStateException
isGroup
is set to true. Note that groupLabelBackgroundColor
overrides any background-color of this style.
groupLabelStyleName
- . See CSSStyleName
. Default value is "groupLabel"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdAppearance overview and related methods
public java.lang.String getGroupLabelStyleName()
isGroup
is set to true. Note that groupLabelBackgroundColor
overrides any background-color of this style.
CSSStyleName
Appearance overview and related methods
public void setGroupTitle(java.lang.String groupTitle)
isGroup
is
set to true.
groupTitle
.groupTitle
- The new title for the grouping.. See HTMLString
. Default value is nullAppearance overview and related methods
public java.lang.String getGroupTitle()
isGroup
is
set to true.HTMLString
Appearance overview and related methods
public void setHideUsingDisplayNone(boolean hideUsingDisplayNone) throws java.lang.IllegalStateException
visibility
and Canvas.hide
), should display:none be applied to the outer element
? This setting is not supported for general use, but in certain cases, it has been shown that display:none is a work-around for browser bugs involving burn-through of iframes or plugins, where the content of the iframe or plugin may still be visible despite the containing widget being hidden.
Note : This is an advanced setting
hideUsingDisplayNone
- hideUsingDisplayNone Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdAppearance overview and related methods
public boolean getHideUsingDisplayNone()
visibility
and Canvas.hide
), should display:none be applied to the outer element
? This setting is not supported for general use, but in certain cases, it has been shown that display:none is a work-around for browser bugs involving burn-through of iframes or plugins, where the content of the iframe or plugin may still be visible despite the containing widget being hidden.
Appearance overview and related methods
public void setHoverAlign(Alignment hoverAlign)
this.showHover
is true, this property can be used to customize the alignment of content in the hover
canvas.hoverAlign
- hoverAlign Default value is nullsetShowHover(java.lang.Boolean)
public Alignment getHoverAlign()
this.showHover
is true, this property can be used to customize the alignment of content in the hover
canvas.getShowHover()
public void setHoverAutoDestroy(java.lang.Boolean hoverAutoDestroy)
this.showHover
is true and Canvas.getHoverComponent
is implemented, should the hoverCanvas returned from it be automatically destroyed when it is
hidden? The default of null indicates that the component will be automatically destroyed. Set to false to prevent this.
hoverAutoDestroy
- hoverAutoDestroy Default value is nullsetShowHover(java.lang.Boolean)
public java.lang.Boolean getHoverAutoDestroy()
this.showHover
is true and Canvas.getHoverComponent
is implemented, should the hoverCanvas returned from it be automatically destroyed when it is
hidden? The default of null indicates that the component will be automatically destroyed. Set to false to prevent this.
getShowHover()
public void setHoverDelay(int hoverDelay)
this.canHover
is true, how long should the mouse be kept over this widget before the hover event is
firedhoverDelay
- hoverDelay Default value is 300setCanHover(java.lang.Boolean)
,
HoverEvent
public int getHoverDelay()
this.canHover
is true, how long should the mouse be kept over this widget before the hover event is
firedgetCanHover()
,
HoverEvent
public void setHoverHeight(java.lang.Integer hoverHeight)
this.showHover
is true, this property can be used to customize the height of the hover canvas shown.hoverHeight
- hoverHeight Default value is nullsetShowHover(java.lang.Boolean)
public java.lang.Integer getHoverHeight()
this.showHover
is true, this property can be used to customize the height of the hover canvas shown.getShowHover()
public void setHoverMoveWithMouse(java.lang.Boolean hoverMoveWithMouse)
this.showHover
is true, should this widget's hover canvas be moved with the mouse while visible?hoverMoveWithMouse
- hoverMoveWithMouse Default value is nullsetShowHover(java.lang.Boolean)
public java.lang.Boolean getHoverMoveWithMouse()
this.showHover
is true, should this widget's hover canvas be moved with the mouse while visible?getShowHover()
public void setHoverOpacity(java.lang.Integer hoverOpacity)
this.showHover
is true, should the hover canvas be shown with opacity other than 100?hoverOpacity
- hoverOpacity Default value is nullsetShowHover(java.lang.Boolean)
,
Hovers / Tooltips Examplepublic java.lang.Integer getHoverOpacity()
this.showHover
is true, should the hover canvas be shown with opacity other than 100?getShowHover()
,
Hovers / Tooltips Examplepublic void setHoverStyle(java.lang.String hoverStyle)
this.showHover
is true, this property can be used to specify the css style to apply to the hover canvas.hoverStyle
- . See CSSStyleName
. Default value is nullsetShowHover(java.lang.Boolean)
,
Hovers / Tooltips Examplepublic java.lang.String getHoverStyle()
this.showHover
is true, this property can be used to specify the css style to apply to the hover canvas.CSSStyleName
getShowHover()
,
Hovers / Tooltips Examplepublic void setHoverVAlign(VerticalAlignment hoverVAlign)
this.showHover
is true, this property can be used to customize the vertical alignment of content in the
hover canvas.hoverVAlign
- hoverVAlign Default value is nullsetShowHover(java.lang.Boolean)
public VerticalAlignment getHoverVAlign()
this.showHover
is true, this property can be used to customize the vertical alignment of content in the
hover canvas.getShowHover()
public void setHoverWidth(java.lang.Integer hoverWidth)
this.showHover
is true, this property can be used to
customize the width of the hover canvas shown.hoverWidth
- hoverWidth Default value is nullsetShowHover(java.lang.Boolean)
,
Hovers / Tooltips Examplepublic java.lang.Integer getHoverWidth()
this.showHover
is true, this property can be used to
customize the width of the hover canvas shown.getShowHover()
,
Hovers / Tooltips Examplepublic void setHoverWrap(java.lang.Boolean hoverWrap)
this.showHover
is true, this property can be used to customize the whether content in the hover canvas
is displayed in a single line, or wraps.hoverWrap
- hoverWrap Default value is nullsetShowHover(java.lang.Boolean)
public java.lang.Boolean getHoverWrap()
this.showHover
is true, this property can be used to customize the whether content in the hover canvas
is displayed in a single line, or wraps.getShowHover()
public void setHtmlPosition(DrawPosition htmlPosition)
htmlElement
is specified, this attribute specifies the
position where the canvas should be inserted relative to the htmlElement
in the DOM.
htmlPosition
.
Note : This is an advanced setting
htmlPosition
- New htmlPosition for this canvas. Default value is "afterBegin"Positioning overview and related methods
public DrawPosition getHtmlPosition()
htmlElement
is specified, this attribute specifies the
position where the canvas should be inserted relative to the htmlElement
in the DOM.Positioning overview and related methods
public void setIsGroup(boolean isGroup) throws java.lang.IllegalStateException
isGroup
- isGroup Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdsetGroupBorderCSS(java.lang.String)
,
setGroupLabelStyleName(java.lang.String)
,
setGroupLabelBackgroundColor(java.lang.String)
public boolean getIsGroup()
getGroupBorderCSS()
,
getGroupLabelStyleName()
,
getGroupLabelBackgroundColor()
public void setKeepInParentRect(java.lang.Boolean keepInParentRect)
If this canvas has no parent, constrains dragging to within the browser window.
Affects target and outline dragAppearance, not tracker.
Note: keepInParentRect affects only user drag interactions, not programmatic moves.
Example use cases:
keepInParentRect: true
-
confine to parent
keepInParentRect: [0, 0, 500, 500]
- confine to top left 500x500 region within
parent
keepInParentRect: [0, 0, 10000, 10000]
- in combination with overflow: "auto", confine to
parent, but allow moving off the right and bottom of the parent to force scrolling (and hence enlarge the scrollWidth of
the parent).
Note : This is an advanced setting
keepInParentRect
- keepInParentRect Default value is nullDragdrop overview and related methods
,
Drag create Examplepublic java.lang.Boolean getKeepInParentRect()
If this canvas has no parent, constrains dragging to within the browser window.
Affects target and outline dragAppearance, not tracker.
Note: keepInParentRect affects only user drag interactions, not programmatic moves.
Example use cases:
keepInParentRect: true
-
confine to parent
keepInParentRect: [0, 0, 500, 500]
- confine to top left 500x500 region within
parent
keepInParentRect: [0, 0, 10000, 10000]
- in combination with overflow: "auto", confine to
parent, but allow moving off the right and bottom of the parent to force scrolling (and hence enlarge the scrollWidth of
the parent).
Dragdrop overview and related methods
,
Drag create Examplepublic void setKeepInParentRect(java.lang.Integer... keepInParentRect)
If this canvas has no parent, constrains dragging to within the browser window.
Affects target and outline dragAppearance, not tracker.
Note: keepInParentRect affects only user drag interactions, not programmatic moves.
Example use cases:
keepInParentRect: true
-
confine to parent
keepInParentRect: [0, 0, 500, 500]
- confine to top left 500x500 region within
parent
keepInParentRect: [0, 0, 10000, 10000]
- in combination with overflow: "auto", confine to
parent, but allow moving off the right and bottom of the parent to force scrolling (and hence enlarge the scrollWidth of
the parent).
Note : This is an advanced setting
keepInParentRect
- keepInParentRect Default value is nullDragdrop overview and related methods
,
Drag create Examplepublic void setLayoutAlign(Alignment layoutAlign) throws java.lang.IllegalStateException
layoutAlign
- layoutAlign Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdLayoutMember overview and related methods
public Alignment getLayoutAlign()
LayoutMember overview and related methods
public void setLayoutAlign(VerticalAlignment layoutAlign) throws java.lang.IllegalStateException
layoutAlign
- layoutAlign Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdLayoutMember overview and related methods
public void setLocateChildrenBy(LocatorStrategy locateChildrenBy)
Note : This is an advanced setting
locateChildrenBy
- locateChildrenBy Default value is nullpublic LocatorStrategy getLocateChildrenBy()
public void setLocateChildrenType(LocatorTypeStrategy locateChildrenType)
LocatorTypeStrategy
to use when finding children within this canvas.
Note : This is an advanced setting
locateChildrenType
- locateChildrenType Default value is nullpublic LocatorTypeStrategy getLocateChildrenType()
LocatorTypeStrategy
to use when finding children within this canvas.public void setLocatePeersBy(LocatorStrategy locatePeersBy)
Note : This is an advanced setting
locatePeersBy
- locatePeersBy Default value is nullpublic LocatorStrategy getLocatePeersBy()
public void setLocatePeersType(LocatorTypeStrategy locatePeersType)
LocatorTypeStrategy
to use when finding peers of this canvas.
Note : This is an advanced setting
locatePeersType
- locatePeersType Default value is nullpublic LocatorTypeStrategy getLocatePeersType()
LocatorTypeStrategy
to use when finding peers of this canvas.public void setMargin(java.lang.Integer margin)
This property
sets the same thickness of margin on every side. Differing per-side margins can be set in a CSS style and applied via
styleName
.
Note that the specified size of the widget will
be the size including the margin thickness on each side.
If this method is called after the component has been drawn/initialized:
Set the CSS Margin, in pixels, for this component. Margin provides blank space outside of the border.
This property sets the same thickness of margin on every side. Differing per-side margins can be set in a CSS style and applied via styleName
.
Note that the specified size of the widget will be the size including the margin thickness on each side.
margin
- new margin in pixels. Default value is nullAppearance overview and related methods
public java.lang.Integer getMargin()
This property
sets the same thickness of margin on every side. Differing per-side margins can be set in a CSS style and applied via
styleName
.
Note that the specified size of the widget will be the size including the margin thickness on each side.
Appearance overview and related methods
public Canvas getMasterElement() throws java.lang.IllegalStateException
Note : This method should be called only after the widget has been rendered.
java.lang.IllegalStateException
- if this widget has not yet been rendered.Containment overview and related methods
public void setMatchElement(java.lang.Boolean matchElement)
htmlElement
is specified, should this canvas initially be
drawn at the same dimensions as the htmlElement?Note : This is an advanced setting
matchElement
- matchElement Default value is nullpublic java.lang.Boolean getMatchElement()
htmlElement
is specified, should this canvas initially be
drawn at the same dimensions as the htmlElement?public void setMaxHeight(int maxHeight)
Note : This is an advanced setting
maxHeight
- maxHeight Default value is 10000Sizing overview and related methods
public int getMaxHeight()
Sizing overview and related methods
public void setMaxWidth(int maxWidth)
Note : This is an advanced setting
maxWidth
- maxWidth Default value is 10000Sizing overview and related methods
public int getMaxWidth()
Sizing overview and related methods
public void setMenuConstructor(java.lang.String menuConstructor) throws java.lang.IllegalStateException
menuConstructor
- . See SCClassName
. Default value is "Menu"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdShowContextMenuEvent
,
Cues overview and related methods
public java.lang.String getMenuConstructor()
SCClassName
ShowContextMenuEvent
,
Cues overview and related methods
public void setMinHeight(int minHeight)
Note that a Canvas with overflow:"visible" has an implicit minimum size based on it's contents.
Note that minHeight
affects only user-initiated drag
resizes. To set the minimum height of a Canvas embedded in a Layout, you can set minMemberSize
to affect the minimum height of all members of
the Layout.
Note : This is an advanced setting
minHeight
- minHeight Default value is 10Sizing overview and related methods
public int getMinHeight()
Note that a Canvas with overflow:"visible" has an implicit minimum size based on it's contents.
Note that minHeight
affects only user-initiated drag
resizes. To set the minimum height of a Canvas embedded in a Layout, you can set minMemberSize
to affect the minimum height of all members of
the Layout.
Sizing overview and related methods
public void setMinWidth(int minWidth)
Note that a Canvas with overflow:"visible" has an implicit minimize size based on it's contents.
Note that minWidth
affects only user-initiated drag resizes. To
set the minimum width of a Canvas embedded in a Layout, you can set minMemberSize
to affect the minimum width of all members of
the Layout.
Note : This is an advanced setting
minWidth
- minWidth Default value is 10Sizing overview and related methods
public int getMinWidth()
Note that a Canvas with overflow:"visible" has an implicit minimize size based on it's contents.
Note that minWidth
affects only user-initiated drag resizes. To
set the minimum width of a Canvas embedded in a Layout, you can set minMemberSize
to affect the minimum width of all members of
the Layout.
Sizing overview and related methods
public void setMouseStillDownDelay(int mouseStillDownDelay)
Note : This is an advanced setting
mouseStillDownDelay
- mouseStillDownDelay Default value is 100public int getMouseStillDownDelay()
public void setMouseStillDownInitialDelay(int mouseStillDownInitialDelay)
Note : This is an advanced setting
mouseStillDownInitialDelay
- mouseStillDownInitialDelay Default value is 400public int getMouseStillDownInitialDelay()
public void setNoDoubleClicks(java.lang.Boolean noDoubleClicks)
Note : This is an advanced setting
noDoubleClicks
- noDoubleClicks Default value is nullpublic java.lang.Boolean getNoDoubleClicks()
public void setOpacity(java.lang.Integer opacity)
In older versions of Internet Explorer
(Pre IE9 / HTML5), opacity is achieved through proprietary filters. If filters have been disabled
within this application developers
must set useOpacityFilter
to true for specific components
on which opacity support is required.
Also note that opacity is incompatible with backMasks
.
If this method is called after the component has been drawn/initialized:
Sets the opacity for the widget to the newOpacity value. This newOpacity value must be within the range of 0 (transparent) to 100 (opaque). Null means don't specify opacity directly. Note that heavy use of opacity may have a performance impact on some older browsers.
In older versions of Internet Explorer (Pre IE9 / HTML5), opacity is achieved through proprietary filters. If filters have been disabled
within this application developers must set useOpacityFilter
to true for specific components on which opacity support is required.
Also note that opacity is incompatible with backMasks
.
Note : This is an advanced setting
opacity
- new opacity level. Default value is nullCues overview and related methods
public java.lang.Integer getOpacity()
In older versions of Internet Explorer
(Pre IE9 / HTML5), opacity is achieved through proprietary filters. If filters have been disabled
within this application developers
must set useOpacityFilter
to true for specific components
on which opacity support is required.
Also note that opacity is incompatible with backMasks
.
Cues overview and related methods
public void setOverflow(Overflow overflow)
overflow
of a Canvas after it has been created.overflow
- New overflow value.. Default value is Canvas.VISIBLESizing overview and related methods
public Overflow getOverflow()
Sizing overview and related methods
public void setPadding(java.lang.Integer padding)
This property sets the same thickness of padding on every side. Differing per-side padding can be set in
a CSS style and applied via styleName
.
Note that CSS padding
does not affect the placement of children
. To provide a blank
area around children, either use CSS margins
or use a Layout
as the parent instead, and use properties such as layoutMargin
to create blank space.
If this method is called after the component has been drawn/initialized:
Set the CSS padding of this component, in pixels. Padding provides space between the border and the component's contents.
This property sets the same thickness of padding on every side. Differing per-side padding can be set in a CSS style and applied via styleName
.
padding
- new padding in pixels. Default value is nullAppearance overview and related methods
public java.lang.Integer getPadding()
This property sets the same thickness of padding on every side. Differing per-side padding can be set in
a CSS style and applied via styleName
.
Note that CSS padding
does not affect the placement of children
. To provide a blank
area around children, either use CSS margins
or use a Layout
as the parent instead, and use properties such as layoutMargin
to create blank space.
Appearance overview and related methods
public void setParentElement(Canvas parentElement) throws java.lang.IllegalStateException
addChild()
and removeChild()
calls on the parent.
Note : This is an advanced setting
parentElement
- parentElement Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdContainment overview and related methods
public Canvas getParentElement()
addChild()
and removeChild()
calls on the parent.Containment overview and related methods
public void setPeers(Canvas... peers) throws java.lang.IllegalStateException
Use Canvas.addPeer
and Canvas.removePeer
to add and remove peers
after a Canvas has been created/drawn.
Note : This is an advanced setting
peers
- peers Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdContainment overview and related methods
public Canvas[] getPeers()
Use Canvas.addPeer
and Canvas.removePeer
to add and remove peers
after a Canvas has been created/drawn.
Containment overview and related methods
public void setPercentBox(PercentBoxModel percentBox) throws java.lang.IllegalStateException
snapTo
. Only affects widgets with a a specified
percentSource
, or widgets that have snapTo
set and are peers of some other canvas
.
Determines whether the coordinates used for
sizing (for percentage sized widgets) and positioning (if snapTo
is set) should be relative to the visible
size or the viewport size of the percentSource or masterElement widget.
Note : This is an advanced setting
percentBox
- percentBox Default value is "visible"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdSizing overview and related methods
public PercentBoxModel getPercentBox()
snapTo
. Only affects widgets with a a specified
percentSource
, or widgets that have snapTo
set and are peers of some other canvas
.
Determines whether the coordinates used for
sizing (for percentage sized widgets) and positioning (if snapTo
is set) should be relative to the visible
size or the viewport size of the percentSource or masterElement widget.
Sizing overview and related methods
public void setPercentSource(Canvas percentSource)
If unset percentage sizing is based on
- the masterElement
if there is one and snapTo
is set,
- otherwise on the amount of space available in this
widget's parentElement, if this is a child of some other widget
- otherwise the page size.
If this method is called after the component has been drawn/initialized:
Setter method for the percentSource
attribute.
Note : This is an advanced setting
percentSource
- eterNew percent source (if omitted existing percentSource will just be cleared).. Default value is nullsetPercentBox(com.smartgwt.client.types.PercentBoxModel)
,
Sizing overview and related methods
public Canvas getPercentSource()
If unset percentage sizing is based on
- the masterElement
if there is one and snapTo
is set,
- otherwise on the amount of space available in this
widget's parentElement, if this is a child of some other widget
- otherwise the page size.
getPercentBox()
,
Sizing overview and related methods
public void setPosition(Positioning position)
Setting position:"relative"
enables Smart GWT components to be embedded
directly into the native HTML flow of a page, causing the component to be rendered
within an existing DOM structure.
This attribute should only be set to "relative"
on a top level component
(a component with no parentElement
).
There are 2 ways to embed relatively positioned canvases in the DOM - by default the
component will be written out inline when it gets drawn()n
. For example
to embed a canvas in an HTML table you could use this code:
<table> <tr> <td> <script> isc.Canvas.create({autoDraw:true, backgroundColor:"red", position:"relative"}); </script> <td> </tr> </table>Alternatively you can make use of the
htmlElement
attribute.
Relative positioning is intended as a short-term integration scenario while incrementally
upgrading existing applications.
Note that relative positioning is not used to manage layout within Smart GWT components -
instead the Layout
class would typically be used.
For best consistency and flexibility across browsers, all Smart GWT layout managers
use absolute positioning.
For canvases with a specified htmlElement
, this attribute
defaults to
"relative"
. In all other cases the default value will be
"absolute"
.
Note : This is an advanced setting
position
- position Default value is nullPositioning overview and related methods
public Positioning getPosition()
Setting position:"relative"
enables Smart GWT components to be embedded
directly into the native HTML flow of a page, causing the component to be rendered
within an existing DOM structure.
This attribute should only be set to "relative"
on a top level component
(a component with no parentElement
).
There are 2 ways to embed relatively positioned canvases in the DOM - by default the
component will be written out inline when it gets drawn()n
. For example
to embed a canvas in an HTML table you could use this code:
<table> <tr> <td> <script> isc.Canvas.create({autoDraw:true, backgroundColor:"red", position:"relative"}); </script> <td> </tr> </table>Alternatively you can make use of the
htmlElement
attribute.
Relative positioning is intended as a short-term integration scenario while incrementally
upgrading existing applications.
Note that relative positioning is not used to manage layout within Smart GWT components -
instead the Layout
class would typically be used.
For best consistency and flexibility across browsers, all Smart GWT layout managers
use absolute positioning.
For canvases with a specified htmlElement
, this attribute
defaults to
"relative"
. In all other cases the default value will be
"absolute"
.
Positioning overview and related methods
public void setPrintChildrenAbsolutelyPositioned(java.lang.Boolean printChildrenAbsolutelyPositioned)
printable HTML
. By default explicitly specified absolute positioning and sizing is ignored when generating print HTML. This is done intentionally: there is no way for the framework to predict how explicit sizes will translate to a the printed page and if HTML for printing includes the same absolute positioning and sizing as is displayed within an application it is very common to encounter undesirable effects, such as seeing tables get broken over several pages horizontally when there is enough room to print them on a single page of paper.
In some cases, however, a developer may wish to have explicit sizing and positioning respected
within the print-view. Setting this attribute to true
will cause this to occur.
Note : This is an advanced setting
printChildrenAbsolutelyPositioned
- printChildrenAbsolutelyPositioned Default value is falsePrinting overview and related methods
public java.lang.Boolean getPrintChildrenAbsolutelyPositioned()
printable HTML
. By default explicitly specified absolute positioning and sizing is ignored when generating print HTML. This is done intentionally: there is no way for the framework to predict how explicit sizes will translate to a the printed page and if HTML for printing includes the same absolute positioning and sizing as is displayed within an application it is very common to encounter undesirable effects, such as seeing tables get broken over several pages horizontally when there is enough room to print them on a single page of paper.
In some cases, however, a developer may wish to have explicit sizing and positioning respected
within the print-view. Setting this attribute to true
will cause this to occur.
Printing overview and related methods
public void setPrompt(java.lang.String prompt)
showHover
is true.prompt
- . See HTMLString
. Default value is nullpublic java.lang.String getPrompt()
showHover
is true.HTMLString
public void setRedrawOnResize(java.lang.Boolean redrawOnResize)
Should be set to true for components whose inner HTML
will not automatically reflow to fit the component's new
size.
Note : This is an advanced setting
redrawOnResize
- redrawOnResize Default value is trueDrawing overview and related methods
public java.lang.Boolean getRedrawOnResize()
Should be set to true for components whose inner HTML
will not automatically reflow to fit the component's new
size.
Drawing overview and related methods
public void setResizeBarTarget(java.lang.String resizeBarTarget) throws java.lang.IllegalStateException
showResizeBar
is set to true
so that a resizeBar is created, resizeBarTarget:"next"
can be
set to indicate that the resizeBar should resize the next member of the layout rather than this one. For resizeBars
that support hiding their target member when clicked on, resizeBarTarget:"next"
also means that the next
member will be the one hidden. This is typically used to create a 3-way split pane, where left and right-hand sections can be resized or hidden to allow a center section to expand.
NOTE: as with any Layout, to ensure all available space is used, one or more members must maintain a flexible size (eg 75%, or *). In a two pane Layout with a normal resize bar, to fill all space after a user resizes, the member on the right should have flexible size. With resizeBarTarget:"next", the member on the left should have flexible size.
resizeBarTarget
- . See String
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdsetShowResizeBar(java.lang.Boolean)
,
LayoutMember overview and related methods
public java.lang.String getResizeBarTarget()
showResizeBar
is set to true
so that a resizeBar is created, resizeBarTarget:"next"
can be
set to indicate that the resizeBar should resize the next member of the layout rather than this one. For resizeBars
that support hiding their target member when clicked on, resizeBarTarget:"next"
also means that the next
member will be the one hidden. This is typically used to create a 3-way split pane, where left and right-hand sections can be resized or hidden to allow a center section to expand.
NOTE: as with any Layout, to ensure all available space is used, one or more members must maintain a flexible size (eg 75%, or *). In a two pane Layout with a normal resize bar, to fill all space after a user resizes, the member on the right should have flexible size. With resizeBarTarget:"next", the member on the left should have flexible size.
String
getShowResizeBar()
,
LayoutMember overview and related methods
public void setResizeFrom(EdgeName... resizeFrom)
canDragResize
, restricts
resizes to only certain edges or corners. The default of null indicates the widget can be resized from any corner or
edge (if canDragResize
is true).
To restrict resizing to only certain corners, set
resizeFrom
to an Array of EdgeName
s.
Note : This is an advanced setting
resizeFrom
- resizeFrom Default value is nullDragdrop overview and related methods
,
Drag resize Examplepublic EdgeName[] getResizeFrom()
canDragResize
, restricts
resizes to only certain edges or corners. The default of null indicates the widget can be resized from any corner or
edge (if canDragResize
is true).
To restrict resizing to only certain corners, set
resizeFrom
to an Array of EdgeName
s.
Dragdrop overview and related methods
,
Drag resize Examplepublic void setScrollbarConstructor(java.lang.String scrollbarConstructor) throws java.lang.IllegalStateException
Note : This is an advanced setting
scrollbarConstructor
- . See String
. Default value is "Scrollbar"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdScrolling overview and related methods
public void setScrollbarSize(int scrollbarSize)
Note : This is an advanced setting
scrollbarSize
- scrollbarSize Default value is 16getScrollbarSize()
,
Scrolling overview and related methods
public int getScrollbarSize()
this.scrollbarSize
getScrollbarSize()
,
Scrolling overview and related methods
public void setShadowDepth(int shadowDepth) throws java.lang.IllegalStateException
This is a single
parameter that can be used to control both shadowSoftness
and shadowOffset
.
shadowDepth
- shadowDepth Default value is 4java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getShadowDepth()
This is a single
parameter that can be used to control both shadowSoftness
and shadowOffset
.
public void setShadowImage(java.lang.String shadowImage) throws java.lang.IllegalStateException
The actual image names fetched
for the dropShadow combine the segment name and the shadowDepth
setting. For example, given "ds.png" as
the base name, a depth of 4, and the top-left segment of the shadow, we'd use "ds4_TL.png".
The names for segments
are the same as those given for controlling resizable edges; see resizeFrom
. The center segment has the name "center". The center segment is the only segment that doesn't include the
depth in the URL, so the final image name for the center given a baseName of "ds.png" would be just "ds_center.png".
Note : This is an advanced setting
shadowImage
- . See SCImgURL
. Default value is "[SKIN]ds.png"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getShadowImage()
The actual image names fetched
for the dropShadow combine the segment name and the shadowDepth
setting. For example, given "ds.png" as
the base name, a depth of 4, and the top-left segment of the shadow, we'd use "ds4_TL.png".
The names for segments
are the same as those given for controlling resizable edges; see resizeFrom
. The center segment has the name "center". The center segment is the only segment that doesn't include the
depth in the URL, so the final image name for the center given a baseName of "ds.png" would be just "ds_center.png".
SCImgURL
public void setShadowOffset(java.lang.Integer shadowOffset)
shadowDepth
if unset. Because of the blurred edges, a shadow
is larger than the originating component by 2xsoftness. An shadowOffset
of 0 means that the shadow will
extend around the originating component equally in all directions.
Note : This is an advanced setting
shadowOffset
- shadowOffset Default value is nullpublic java.lang.Integer getShadowOffset()
shadowDepth
if unset. Because of the blurred edges, a shadow
is larger than the originating component by 2xsoftness. An shadowOffset
of 0 means that the shadow will
extend around the originating component equally in all directions.
public void setShadowSoftness(java.lang.Integer shadowSoftness)
A shadow with softness:x
is 2x pixels larger in each
direction than the element throwing the shadow, and the media for each edge should be x pixels wide/tall.
Defaults
to shadowDepth
if unset.
Note : This is an advanced setting
shadowSoftness
- shadowSoftness Default value is nullpublic java.lang.Integer getShadowSoftness()
A shadow with softness:x
is 2x pixels larger in each
direction than the element throwing the shadow, and the media for each edge should be x pixels wide/tall.
Defaults
to shadowDepth
if unset.
public void setShouldPrint(java.lang.Boolean shouldPrint)
Default is to:
omitControls
) shouldPrint
- shouldPrint Default value is nullPrinting overview and related methods
public java.lang.Boolean getShouldPrint()
Default is to:
omitControls
) Printing overview and related methods
public void setShowCustomScrollbars(java.lang.Boolean showCustomScrollbars)
Smart GWT-based scrollbars are skinnable, giving you complete control over look and
feel. Smart GWT-based scrollbars also enable some interactions not possible with
native scrollbars, such as variable height
records
in grids in combination with data paging
.
Native browser scrollbars are slightly faster simply because there are less Smart GWT components that need to be created, drawn and updated. Each visible Smart GWT-based scrollbar on the screen has roughly the impact of two StretchImgButtons.
Smart GWT is always aware of the size of the scrollbar, regardless of whether native
or custom scrollbars are used, and regardless of what operating system and/or operating
system "theme" or "skin" is in use. This means Smart GWT will correctly report the
viewport size
, that is, the interior area of the
widget excluding space taken by scrollbars, which is key for exactly filling a component
with content without creating unnecessary scrolling.
The showCustomScrollbars
setting is typically overridden in load_skin.js in
order to change the default for all Smart GWT components at once.
This may be achieved via the static Canvas.setShowCustomScrollbars
method or
via a simple addProperties block, like so:
isc.Canvas.addProperties({ showCustomScrollbars:false });
Note : This is an advanced setting
showCustomScrollbars
- showCustomScrollbars Default value is trueScrolling overview and related methods
public java.lang.Boolean getShowCustomScrollbars()
Smart GWT-based scrollbars are skinnable, giving you complete control over look and
feel. Smart GWT-based scrollbars also enable some interactions not possible with
native scrollbars, such as variable height
records
in grids in combination with data paging
.
Native browser scrollbars are slightly faster simply because there are less Smart GWT components that need to be created, drawn and updated. Each visible Smart GWT-based scrollbar on the screen has roughly the impact of two StretchImgButtons.
Smart GWT is always aware of the size of the scrollbar, regardless of whether native
or custom scrollbars are used, and regardless of what operating system and/or operating
system "theme" or "skin" is in use. This means Smart GWT will correctly report the
viewport size
, that is, the interior area of the
widget excluding space taken by scrollbars, which is key for exactly filling a component
with content without creating unnecessary scrolling.
The showCustomScrollbars
setting is typically overridden in load_skin.js in
order to change the default for all Smart GWT components at once.
This may be achieved via the static Canvas.setShowCustomScrollbars
method or
via a simple addProperties block, like so:
isc.Canvas.addProperties({ showCustomScrollbars:false });
Scrolling overview and related methods
public void setShowDragShadow(java.lang.Boolean showDragShadow)
"target"
, should we show a shadow behind the canvas
during the drag.
Note : This is an advanced setting
showDragShadow
- showDragShadow Default value is nullDragdrop overview and related methods
,
Drag effects Examplepublic java.lang.Boolean getShowDragShadow()
"target"
, should we show a shadow behind the canvas
during the drag.Dragdrop overview and related methods
,
Drag effects Examplepublic void setShowEdges(java.lang.Boolean showEdges) throws java.lang.IllegalStateException
EdgedCanvas
should be used to show image-based edges around this
component.showEdges
- showEdges Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowEdges()
EdgedCanvas
should be used to show image-based edges around this
component.public void setShowHover(java.lang.Boolean showHover)
this.canHover
is true, should we show the global hover canvas by default when the user hovers over this
canvas?showHover
- showHover Default value is truegetHoverHTML()
public java.lang.Boolean getShowHover()
this.canHover
is true, should we show the global hover canvas by default when the user hovers over this
canvas?getHoverHTML()
public void setShowHoverComponents(java.lang.Boolean showHoverComponents)
getHoverComponent
to provide the Canvas to show as the
hoverComponent.
Note : This is an advanced setting
showHoverComponents
- showHoverComponents Default value is falsepublic java.lang.Boolean getShowHoverComponents()
getHoverComponent
to provide the Canvas to show as the
hoverComponent.public void setShowResizeBar(java.lang.Boolean showResizeBar)
Layout
, whether a resizeBar
should be shown after this member in the layout, to allow it to be resized. Whether a resizeBar is actually shown
also depends on the defaultResizeBars
attribute
of the layout, and whether this Canvas is the last layout member.
By default the resize bar acts on the Canvas that
it is declared on. If you want the resize bar to instead act on the next member of the Layout (e.g. to collapse down or
to the right), set resizeBarTarget
as well.
If this method is called after the component has been drawn/initialized:
When this Canvas is included as a member in a Layout
, dynamically updates whether a resizeBar should be shown after this member in the layout, to allow it to be resized.
Whether a resizeBar is actually shown also depends on the defaultResizeBars
attribute of the layout, and whether this Canvas is the last layout member.
showResizeBar
- setting for this.showResizeBar. Default value is falsesetResizeBarTarget(java.lang.String)
,
Layout.setDefaultResizeBars(com.smartgwt.client.types.LayoutResizeBarPolicy)
,
LayoutMember overview and related methods
,
Nesting Examplepublic java.lang.Boolean getShowResizeBar()
Layout
, whether a resizeBar
should be shown after this member in the layout, to allow it to be resized. Whether a resizeBar is actually shown
also depends on the defaultResizeBars
attribute
of the layout, and whether this Canvas is the last layout member.
By default the resize bar acts on the Canvas that
it is declared on. If you want the resize bar to instead act on the next member of the Layout (e.g. to collapse down or
to the right), set resizeBarTarget
as well.
getResizeBarTarget()
,
Layout.getDefaultResizeBars()
,
LayoutMember overview and related methods
,
Nesting Examplepublic void setShowShadow(java.lang.Boolean showShadow)
showShadow
.showShadow
- true if the shadow should be visible false if not. Default value is falsepublic java.lang.Boolean getShowShadow()
public void setSkinImgDir(java.lang.String skinImgDir)
skinDir
.
Note : This is an advanced setting
skinImgDir
- . See String
. Default value is "images/"Images overview and related methods
public java.lang.String getSkinImgDir()
skinDir
.String
Images overview and related methods
public void setSnapAxis(java.lang.String snapAxis)
snapAxis
- . See String
. Default value is "both"setSnapToGrid(java.lang.Boolean)
,
setSnapResizeToGrid(java.lang.Boolean)
,
setChildrenSnapToGrid(java.lang.Boolean)
,
setChildrenSnapResizeToGrid(java.lang.Boolean)
,
Dragdrop overview and related methods
public java.lang.String getSnapAxis()
String
getSnapToGrid()
,
getSnapResizeToGrid()
,
getChildrenSnapToGrid()
,
getChildrenSnapResizeToGrid()
,
Dragdrop overview and related methods
public void setSnapEdge(java.lang.String snapEdge)
snapTo
is defined to this widget, this property can be used to
define which edge of this widget should be snapped to an edge of the master or parent element. If unspecified the,
default snapTo behavior is set up to align the "snapTo" edge of this widget with the snapTo edge of the master or
parent.
If this method is called after the component has been drawn/initialized:
Set the snapEdge property of this canvas, and handle repositioning.
snapEdge
- new snapEdge value. See String
. Default value is nullsetSnapTo(java.lang.String)
,
Sizing overview and related methods
public java.lang.String getSnapEdge()
snapTo
is defined to this widget, this property can be used to
define which edge of this widget should be snapped to an edge of the master or parent element. If unspecified the, default snapTo behavior is set up to align the "snapTo" edge of this widget with the snapTo edge of the master or parent.
String
getSnapTo()
,
Sizing overview and related methods
public void setSnapHDirection(java.lang.String snapHDirection)
snapHDirection
- . See String
. Default value is "after"setSnapToGrid(java.lang.Boolean)
,
setSnapResizeToGrid(java.lang.Boolean)
,
setChildrenSnapToGrid(java.lang.Boolean)
,
setChildrenSnapResizeToGrid(java.lang.Boolean)
,
Dragdrop overview and related methods
public java.lang.String getSnapHDirection()
String
getSnapToGrid()
,
getSnapResizeToGrid()
,
getChildrenSnapToGrid()
,
getChildrenSnapResizeToGrid()
,
Dragdrop overview and related methods
public void setSnapHGap(int snapHGap)
snapHGap
- snapHGap Default value is 20setSnapToGrid(java.lang.Boolean)
,
setSnapResizeToGrid(java.lang.Boolean)
,
setChildrenSnapToGrid(java.lang.Boolean)
,
setChildrenSnapResizeToGrid(java.lang.Boolean)
,
Dragdrop overview and related methods
public int getSnapHGap()
public void setSnapOffsetLeft(java.lang.Integer snapOffsetLeft)
snapTo
is defined for this widget, this property can be used to
specify an offset in px or percentage for the left coordinate of this widget. For example if snapTo
is
specified as "L"
and snapOffsetLeft
is set to 6, this widget will be rendered 6px inside the
left edge of its parent or master element. Alternatively if snapTo
was set to "R"
, a
snapOffsetLeft
value of -6 would cause the component to be rendered 6px inside the right edge of its parent
or masterElement.
snapOffsetLeft
- snapOffsetLeft Default value is nullsetSnapTo(java.lang.String)
,
Sizing overview and related methods
public java.lang.Integer getSnapOffsetLeft()
snapTo
is defined for this widget, this property can be used to
specify an offset in px or percentage for the left coordinate of this widget. For example if snapTo
is
specified as "L"
and snapOffsetLeft
is set to 6, this widget will be rendered 6px inside the
left edge of its parent or master element. Alternatively if snapTo
was set to "R"
, a
snapOffsetLeft
value of -6 would cause the component to be rendered 6px inside the right edge of its parent
or masterElement.
getSnapTo()
,
Sizing overview and related methods
public void setSnapOffsetTop(java.lang.Integer snapOffsetTop)
snapTo
is defined for this widget, this property can be used to
specify an offset in px or percentage for the top coordinate of this widget. For example if snapTo
is
specified as "T"
and snapOffsetTop
is set to 6, this widget will be rendered 6px below the top
edge of its parent or master element. . Alternatively if snapTo
was set to "B"
, a
snapOffsetTop
value of -6 would cause the component to be rendered 6px inside the bottom edge of its parent
or masterElement.
snapOffsetTop
- snapOffsetTop Default value is nullsetSnapTo(java.lang.String)
,
Sizing overview and related methods
public java.lang.Integer getSnapOffsetTop()
snapTo
is defined for this widget, this property can be used to
specify an offset in px or percentage for the top coordinate of this widget. For example if snapTo
is
specified as "T"
and snapOffsetTop
is set to 6, this widget will be rendered 6px below the top
edge of its parent or master element. . Alternatively if snapTo
was set to "B"
, a
snapOffsetTop
value of -6 would cause the component to be rendered 6px inside the bottom edge of its parent
or masterElement.
getSnapTo()
,
Sizing overview and related methods
public void setSnapOnDrop(java.lang.Boolean snapOnDrop)
Note : This is an advanced setting
snapOnDrop
- snapOnDrop Default value is truesetSnapToGrid(java.lang.Boolean)
,
com.smartgwt.client.widgets.Canvas#shouldSnapOnDrop
,
Dragdrop overview and related methods
public java.lang.Boolean getSnapOnDrop()
getSnapToGrid()
,
com.smartgwt.client.widgets.Canvas#shouldSnapOnDrop
,
Dragdrop overview and related methods
public void setSnapResizeToGrid(java.lang.Boolean snapResizeToGrid)
snapToGrid
value if undefined.snapResizeToGrid
- snapResizeToGrid Default value is nullDragdrop overview and related methods
public java.lang.Boolean getSnapResizeToGrid()
snapToGrid
value if undefined.Dragdrop overview and related methods
public void setSnapTo(java.lang.String snapTo)
masterElement
(if specified), or its parentElement
. Note that this property also impacts the sizing
of this widget. If this widgets size is specified as a percent value, and has no explicit percentSource
, sizing will be calculated based on the size of the
masterElement when snapTo is set.
Possible values: BR, BL, TR, TL, R, L, B, T, C where B=Bottom, T=Top, L=Left, R=right and C=center
Standard snapTo behavior will attach the outer edge of the widget to the parent or master
element - for example setting snapTo
to "B"
would align the bottom edge of this component with
the bottom edge of the master or parent element (and center this component horizontally over its master or parent
element). snapEdge
can be specified to change this behavior
allowing the developer to, for example, align the top edge of this component with the bottom edge of its masterElement.
snapOffsetLeft
and snapOffsetTop
may also be specified to offset the element from
exact snapTo alignment.
If this method is called after the component has been drawn/initialized:
Set the snapTo property of this canvas, and handle repositioning.
snapTo
- new snapTo value. See String
. Default value is nullsetSnapEdge(java.lang.String)
,
setPercentBox(com.smartgwt.client.types.PercentBoxModel)
,
Sizing overview and related methods
public java.lang.String getSnapTo()
masterElement
(if specified), or its parentElement
. Note that this property also impacts the sizing
of this widget. If this widgets size is specified as a percent value, and has no explicit percentSource
, sizing will be calculated based on the size of the
masterElement when snapTo is set.
Possible values: BR, BL, TR, TL, R, L, B, T, C where B=Bottom, T=Top, L=Left, R=right and C=center
Standard snapTo behavior will attach the outer edge of the widget to the parent or master
element - for example setting snapTo
to "B"
would align the bottom edge of this component with
the bottom edge of the master or parent element (and center this component horizontally over its master or parent
element). snapEdge
can be specified to change this behavior
allowing the developer to, for example, align the top edge of this component with the bottom edge of its masterElement.
snapOffsetLeft
and snapOffsetTop
may also be specified to offset the element from
exact snapTo alignment.
String
getSnapEdge()
,
getPercentBox()
,
Sizing overview and related methods
public void setSnapToGrid(java.lang.Boolean snapToGrid)
snapToGrid
- snapToGrid Default value is nullsetChildrenSnapToGrid(java.lang.Boolean)
,
Dragdrop overview and related methods
public java.lang.Boolean getSnapToGrid()
getChildrenSnapToGrid()
,
Dragdrop overview and related methods
public void setSnapVDirection(java.lang.String snapVDirection)
snapVDirection
- . See String
. Default value is "after"setSnapToGrid(java.lang.Boolean)
,
setSnapResizeToGrid(java.lang.Boolean)
,
setChildrenSnapToGrid(java.lang.Boolean)
,
setChildrenSnapResizeToGrid(java.lang.Boolean)
,
Dragdrop overview and related methods
public java.lang.String getSnapVDirection()
String
getSnapToGrid()
,
getSnapResizeToGrid()
,
getChildrenSnapToGrid()
,
getChildrenSnapResizeToGrid()
,
Dragdrop overview and related methods
public void setSnapVGap(int snapVGap)
snapVGap
- snapVGap Default value is 20setSnapToGrid(java.lang.Boolean)
,
setSnapResizeToGrid(java.lang.Boolean)
,
setChildrenSnapToGrid(java.lang.Boolean)
,
setChildrenSnapResizeToGrid(java.lang.Boolean)
,
Dragdrop overview and related methods
public int getSnapVGap()
public void setStyleName(java.lang.String styleName)
setStyleName
in class com.google.gwt.user.client.ui.UIObject
styleName
- new CSS style name. See CSSStyleName
. Default value is "normal"Appearance overview and related methods
,
CSS styles Examplepublic java.lang.String getStyleName()
getStyleName
in class com.google.gwt.user.client.ui.UIObject
CSSStyleName
Appearance overview and related methods
,
CSS styles Examplepublic void setTabIndex(java.lang.Integer tabIndex)
canvas.tabIndex
cannot be set to greater than TAB_INDEX_FLOOR
- as we reserve the values above this range for
auto-assigned tab-indices.
Note : This is an advanced setting
tabIndex
- New tabIndex for this widget. Must be less than TAB_INDEX_FLOOR
to avoid interfering with auto-assigned
tab indices on the page.. Default value is nullFocus overview and related methods
public java.lang.Integer getTabIndex()
canvas.tabIndex
cannot be set to greater than TAB_INDEX_FLOOR
- as we reserve the values above this range for
auto-assigned tab-indices.Focus overview and related methods
public Canvas getTopElement() throws java.lang.IllegalStateException
Note : This method should be called only after the widget has been rendered.
java.lang.IllegalStateException
- if this widget has not yet been rendered.Containment overview and related methods
public void setUseBackMask(java.lang.Boolean useBackMask)
The backMask is a workaround for this issue. If useBackMask
is set to
true
, the component will render an empty <IFRAME> element behind the canvas, which prevents this
effect in all known cases.
Has no effect in other browsers.
Note : This is an advanced setting
useBackMask
- useBackMask Default value is falsepublic java.lang.Boolean getUseBackMask()
The backMask is a workaround for this issue. If useBackMask
is set to
true
, the component will render an empty <IFRAME> element behind the canvas, which prevents this
effect in all known cases.
Has no effect in other browsers.
public void setUseOpacityFilter(java.lang.Boolean useOpacityFilter) throws java.lang.IllegalStateException
With the default of null, opacity filters are used unless
neverUseFilters
has been set. When set explicitly to true,
opacity filters are used even if neverUseFilters
is true.
See IEFilters
for background.
useOpacityFilter
- useOpacityFilter Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdIEFilters overview and related methods
public java.lang.Boolean getUseOpacityFilter()
With the default of null, opacity filters are used unless
neverUseFilters
has been set. When set explicitly to true,
opacity filters are used even if neverUseFilters
is true.
See IEFilters
for background.
IEFilters overview and related methods
public void setValuesManager(ValuesManager valuesManager)
ValuesManager
for managing values displayed in this component. If specified at
initialization time, this component will be added to the valuesManager via ValuesManager.addMember
. ValuesManagers allow different fields of a single object to be displayed or edited across multiple UI components. Given a single values object, a valuesManager will handle determining the appropriate field values for its member components and displaying them / responding to edits if the components support this.
Data may be derived simply from the specified fieldNames within the member components, or for complex nested data structures can be specified by both component and field-level DataPath.
Note that components may be automatically bound to an existing valuesManager attached to a parent
component if dataPath is specified. See dataPath
for more
information. Also note that if a databound component has a specified dataSource and dataPath but no specified
valuesManager object one will be automatically generated as part of the databinding process
If this method is called after the component has been drawn/initialized:
Setter for the valuesManager
attribute. This method may be called directly at runtime to set the ValuesManager for a component; it has the same effect as calling ValuesManager.addMember
, passing in this DataBoundComponent.
Note : This is an advanced setting
valuesManager
- new dataPath. Default value is nullpublic ValuesManager getValuesManager()
ValuesManager
for managing values displayed in this component. If specified at
initialization time, this component will be added to the valuesManager via ValuesManager.addMember
. ValuesManagers allow different fields of a single object to be displayed or edited across multiple UI components. Given a single values object, a valuesManager will handle determining the appropriate field values for its member components and displaying them / responding to edits if the components support this.
Data may be derived simply from the specified fieldNames within the member components, or for complex nested data structures can be specified by both component and field-level DataPath.
Note that components may be automatically bound to an existing valuesManager attached to a parent
component if dataPath is specified. See dataPath
for more
information. Also note that if a databound component has a specified dataSource and dataPath but no specified
valuesManager object one will be automatically generated as part of the databinding process
public void setVisibility(Visibility visibility)
If the widget has not yet been drawn (and doesn't have a parent or master), this method calls the draw method as well.
visibility
- visibility Default value is Canvas.INHERITAppearance overview and related methods
public Visibility getVisibility()
NOTE: Undrawn widgets will report themselves as visible if they would be visible if drawn.
Appearance overview and related methods
public Canvas addChild(Canvas newChild)
If newChild has a parent it will be removed from it. If it has a master, it will be detached from it if the master is a child of a different parent. If newChild has peers, they'll be added to this widget as children as well.
newChild
- new child canvas to addContainment overview and related methods
public Canvas addChild(Canvas newChild, java.lang.String name, java.lang.Boolean autoDraw)
If newChild has a parent it will be removed from it. If it has a master, it will be detached from it if the master is a child of a different parent. If newChild has peers, they'll be added to this widget as children as well.
newChild
- new child canvas to addname
- name to assign to child (eg: this[name] == child)autoDraw
- if false, child will not automatically be drawn (only for advanced use)Containment overview and related methods
public Canvas addPeer(Canvas newPeer)
The widget to be added as a peer will be removed from its old master and/or parent, if any, and it will be added as a child to the parent of this canvas (if any)
newPeer
- new peer widget to addContainment overview and related methods
public Canvas addPeer(Canvas newPeer, java.lang.String name, java.lang.Boolean autoDraw)
Canvas#addPeer()}
public Canvas addPeer(Canvas newPeer, java.lang.String name, java.lang.Boolean autoDraw, java.lang.Boolean preDraw)
The widget to be added as a peer will be removed from its old master and/or parent, if any, and it will be added as a child to the parent of this canvas (if any)
newPeer
- new peer widget to addname
- name to assign to peer (eg: this[peer] == child)autoDraw
- if true, peer will not automatically be drawn (only for advanced use)preDraw
- if true, when draw is called on the master widget, the peer will be drawn before the masterContainment overview and related methods
public void adjustForContent(boolean immediate)
This is for very advanced use in which the contents of a Canvas are being directly updated by Ajax techniques, which is required for integration with some third-party libraries. Calling this method is required because browsers do not provide consistent events by which Smart GWT can be notified of external content changes.
Only contents supplied to a widget via contents
or via an override of Canvas.getInnerHTML
should be manipulated directly. Contents
automatically generated by Smart GWT components (such as the basic structure of a Button) should never be manipulated:
these structures are considered internal, differ by platform, and will change without notice.
immediate
- By default the adjustment will occur on a small delay for performance reasons. Pass in this parameter to force
immediate adjustment.Sizing overview and related methods
public void animateFade(java.lang.Integer opacity)
opacity
- desired final opacitypublic void animateFade(java.lang.Integer opacity, AnimationCallback callback)
Canvas#animateFade()}
public void animateFade(java.lang.Integer opacity, AnimationCallback callback, java.lang.Integer duration)
Canvas#animateFade()}
public void animateFade(java.lang.Integer opacity, AnimationCallback callback, java.lang.Integer duration, AnimationAcceleration acceleration)
opacity
- desired final opacitycallback
- When the fade completes this callback will be fired. Single 'earlyFinish' parameter will be
passed if the animation was cut short by a call to finishAnimationduration
- Duration in ms of the animated fadeacceleration
- Optional animation acceleration to bias the ratiospublic void animateMove(java.lang.Integer left, java.lang.Integer top)
left
- new left position (or null for unchanged)top
- new top position (or null for unchanged)public void animateMove(java.lang.Integer left, java.lang.Integer top, AnimationCallback callback)
Canvas#animateMove()}
public void animateMove(java.lang.Integer left, java.lang.Integer top, AnimationCallback callback, java.lang.Integer duration)
Canvas#animateMove()}
public void animateMove(java.lang.Integer left, java.lang.Integer top, AnimationCallback callback, java.lang.Integer duration, AnimationAcceleration acceleration)
left
- new left position (or null for unchanged)top
- new top position (or null for unchanged)callback
- When the move completes this callback will be fired. Single 'earlyFinish' parameter will be
passed if the animation was cut short by a call to finishAnimationduration
- Duration in ms of the animated moveacceleration
- Optional acceleration effect to bias the ratiospublic void animateRect(java.lang.Integer left, java.lang.Integer top, java.lang.Integer width, java.lang.Integer height)
left
- new left position (or null for unchanged)top
- new top position (or null for unchanged)width
- new width (or null for unchanged)height
- new height (or null for unchanged)public void animateRect(java.lang.Integer left, java.lang.Integer top, java.lang.Integer width, java.lang.Integer height, AnimationCallback callback)
Canvas#animateRect()}
public void animateRect(java.lang.Integer left, java.lang.Integer top, java.lang.Integer width, java.lang.Integer height, AnimationCallback callback, java.lang.Integer duration)
Canvas#animateRect()}
public void animateRect(java.lang.Integer left, java.lang.Integer top, java.lang.Integer width, java.lang.Integer height, AnimationCallback callback, java.lang.Integer duration, AnimationAcceleration acceleration)
left
- new left position (or null for unchanged)top
- new top position (or null for unchanged)width
- new width (or null for unchanged)height
- new height (or null for unchanged)callback
- When the setRect completes this callback will be fired. Single 'earlyFinish' parameter will
be passed if the animation was cut short by a call to finishAnimationduration
- Duration in ms of the animated setRectacceleration
- Optional acceleration effect to apply to the animationpublic void animateResize(java.lang.Integer width, java.lang.Integer height)
width
- new width (or null for unchanged)height
- new height (or null for unchanged)public void animateResize(java.lang.Integer width, java.lang.Integer height, AnimationCallback callback)
Canvas#animateResize()}
public void animateResize(java.lang.Integer width, java.lang.Integer height, AnimationCallback callback, java.lang.Integer duration)
Canvas#animateResize()}
public void animateResize(java.lang.Integer width, java.lang.Integer height, AnimationCallback callback, java.lang.Integer duration, AnimationAcceleration acceleration)
width
- new width (or null for unchanged)height
- new height (or null for unchanged)callback
- When the resize completes this callback will be fired. Single 'earlyFinish' parameter will
be passed if the animation was cut short by a call to finishAnimationduration
- Duration in ms of the animated resizeacceleration
- Optional acceleration effect to apply to the resizepublic void animateScroll(java.lang.Integer scrollLeft, java.lang.Integer scrollTop)
scrollLeft
- desired final left scroll positionscrollTop
- desired final top scroll positionpublic void animateScroll(java.lang.Integer scrollLeft, java.lang.Integer scrollTop, AnimationCallback callback)
Canvas#animateScroll()}
public void animateScroll(java.lang.Integer scrollLeft, java.lang.Integer scrollTop, AnimationCallback callback, java.lang.Integer duration)
Canvas#animateScroll()}
public void animateScroll(java.lang.Integer scrollLeft, java.lang.Integer scrollTop, AnimationCallback callback, java.lang.Integer duration, AnimationAcceleration acceleration)
scrollLeft
- desired final left scroll positionscrollTop
- desired final top scroll positioncallback
- When the scroll completes this callback will be fired. Single 'earlyFinish' parameter will
be passed if the animation was cut short by a call to finishAnimationduration
- Duration in ms of the animated scrollacceleration
- Optional acceleration to bias the animation ratiospublic void blur()
Focus overview and related methods
public void bringToFront()
public void clear()
This is more expensive than hide(), because in order to become visible
again, the Canvas must be draw()n again. Generally, application code has no reason to call clear() unless it is
attempting to do advanced memory management. If you want to temporarily hide a Canvas, use hide() and show(), and if
you want to permanently destroy a Canvas, use Canvas.destroy
.
You would only use clear() if you were managing a very large pool of components and you wanted to reclaim some of the memory used by components that had not been used in a while, while still being able to just draw() them to make them active and visible again.
Note: a clear() will happen as part of moving a Canvas to a different parent. See Canvas.addChild
.
public com.google.gwt.event.shared.HandlerRegistration addClickHandler(ClickHandler handler)
Executed when the left mouse is clicked (pressed and then released) on this widget. No default implementation.
addClickHandler
in interface HasClickHandlers
handler
- the click handlerHandlerRegistration
used to remove this handlerpublic java.lang.Boolean clickMaskUp()
showClickMask(com.smartgwt.client.core.Function, com.smartgwt.client.types.ClickMaskMode, com.smartgwt.client.widgets.Canvas[])
public java.lang.Boolean clickMaskUp(java.lang.String ID)
ID
- optional ID of specific clickMask to check. If not passed, checks for the click mask associated
with this widget only.showClickMask(com.smartgwt.client.core.Function, com.smartgwt.client.types.ClickMaskMode, com.smartgwt.client.widgets.Canvas[])
public java.lang.Boolean contains(Canvas canvas)
canvas
- the canvas to be testedContainment overview and related methods
public java.lang.Boolean contains(Canvas canvas, java.lang.Boolean testSelf)
canvas
- the canvas to be testedtestSelf
- If passed this method will return true if the the canvas parameter is a pointer to this
widget.Containment overview and related methods
public java.lang.Boolean containsEvent()
Positioning overview and related methods
public java.lang.Boolean containsFocus()
Focus overview and related methods
public java.lang.Boolean containsPoint(int x, int y)
Will return false if any parentElement does not contain the specified point, (EG: you're hovering over an element's absolute location, but it is scrolled out of view in a parent element)
x
- GLOBAL x-coordinatey
- GLOBAL y-coordinatePositioning overview and related methods
public java.lang.Boolean containsPoint(int x, int y, java.lang.Boolean withinViewport)
Will return false if any parentElement does not contain the specified point, (EG: you're hovering over an element's absolute location, but it is scrolled out of view in a parent element)
x
- GLOBAL x-coordinatey
- GLOBAL y-coordinatewithinViewport
- point lies specifically within our viewport (drawn area excluding margins
and scrollbars if present)Positioning overview and related methods
public void deparent()
public void depeer()
public void disable()
Enable overview and related methods
public com.google.gwt.event.shared.HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
Executed when the left mouse button is clicked twice in rapid succession (within doubleClickDelay
by default) in this object.
addDoubleClickHandler
in interface HasDoubleClickHandlers
handler
- the doubleClick handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragMoveHandler(DragMoveHandler handler)
Executed every time the mouse moves while dragging this canvas.
addDragMoveHandler
in interface HasDragMoveHandlers
handler
- the dragMove handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragRepositionMoveHandler(DragRepositionMoveHandler handler)
Executed every time the mouse moves while drag-repositioning. If this method does not Call DragRepositionMoveEvent.cancel()
from within DragRepositionMoveHandler.onDragRepositionMove(com.smartgwt.client.widgets.events.DragRepositionMoveEvent)
, the dragTarget
(or outline if dragAppearance
is set to "outline") will
automatically be moved as appropriate whenever the mouse moves.
addDragRepositionMoveHandler
in interface HasDragRepositionMoveHandlers
handler
- the dragRepositionMove handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragRepositionStartHandler(DragRepositionStartHandler handler)
Executed when dragging first starts. No default implementation. Create this handler to set things up for the drag reposition.
addDragRepositionStartHandler
in interface HasDragRepositionStartHandlers
handler
- the dragRepositionStart handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragRepositionStopHandler(DragRepositionStopHandler handler)
Executed when the mouse button is released at the end of the drag. Your widget can use this opportunity to fire custom code based upon where the mouse button was released, etc.
Returning true from this handler will cause the dragTarget
(or outline if dragAppearance
is set to "outline") to be left in its current
location. Returning false from this handler will cause it to snap back to its original location.
addDragRepositionStopHandler
in interface HasDragRepositionStopHandlers
handler
- the dragRepositionStop handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragResizeMoveHandler(DragResizeMoveHandler handler)
Executed every time the mouse moves while drag-resizing. If this method does not Call DragResizeMoveEvent.cancel()
from within DragResizeMoveHandler.onDragResizeMove(com.smartgwt.client.widgets.events.DragResizeMoveEvent)
, the dragTarget
(or
outline if dragAppearance
is set to "outline") will
automatically be moved as appropriate whenever the mouse moves.
addDragResizeMoveHandler
in interface HasDragResizeMoveHandlers
handler
- the dragResizeMove handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragResizeStartHandler(DragResizeStartHandler handler)
Executed when resize dragging first starts. No default implementation. Create this handler to set things up for the drag resize.
addDragResizeStartHandler
in interface HasDragResizeStartHandlers
handler
- the dragResizeStart handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragResizeStopHandler(DragResizeStopHandler handler)
Executed when the mouse button is released at the end of the drag resize. Your widget can use this opportunity to fire custom code based upon where the mouse button was released, etc.
Returning true from this handler will cause the
dragTarget
(or outline if dragAppearance
is set to "outline") to be left at its current
size. Returning false from this handler will cause it to snap back to its original location size
addDragResizeStopHandler
in interface HasDragResizeStopHandlers
handler
- the dragResizeStop handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragStartHandler(DragStartHandler handler)
Executed when dragging first starts. Your widget can use this opportunity to set things up for the drag, such as setting the drag tracker. Returning false from this event handler will cancel the drag action entirely.
A drag action is
considered to be begin when the mouse has moved dragStartDistance
with the left mouse down.
addDragStartHandler
in interface HasDragStartHandlers
handler
- the dragStart handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragStopHandler(DragStopHandler handler)
Executed when the mouse button is released at the end of the drag. Your widget can use this opportunity to fire code based on the last location of the drag or reset any visual state that was sent.
addDragStopHandler
in interface HasDragStopHandlers
handler
- the dragStop handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDropMoveHandler(DropMoveHandler handler)
Executed whenever the compatible dragged object is moved over this drop target. You can use this to show a custom visual indication of where the drop would occur within the widget.
addDropMoveHandler
in interface HasDropMoveHandlers
handler
- the dropMove handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDropOutHandler(DropOutHandler handler)
Executed when the dragged object is moved out of the rectangle of this drop target. If you have set a visual indication in dropOver or dropMove, you should reset it to its normal state in dropOut.
addDropOutHandler
in interface HasDropOutHandlers
handler
- the dropOut handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDropOverHandler(DropOverHandler handler)
Executed when the compatible dragged object is first moved over this drop target. Your implementation can use this to show a custom visual indication that the object can be dropped here.
addDropOverHandler
in interface HasDropOverHandlers
handler
- the dropOver handlerHandlerRegistration
used to remove this handlerpublic void enable()
Enable overview and related methods
public void focus()
Focus overview and related methods
public com.google.gwt.event.shared.HandlerRegistration addFocusChangedHandler(FocusChangedHandler handler)
Notification function fired when this widget receives or loses keyboard focus.
addFocusChangedHandler
in interface HasFocusChangedHandlers
handler
- the focusChanged handlerHandlerRegistration
used to remove this handlerpublic void focusInNextTabElement()
Canvas
or FormItem
that is focusable
, and is not disabled
or masked
. Note that the movement of focus to a FormItem
is managed by the containing DynamicForm
; calling this method on a
DynamicForm
will move the focus to the next focusable FormItem
in the form if there is one,
and onto the next focusable Canvas
if not. NOTE: This method only considers Smart GWT elements.
Native elements that you create directly - for example, with HTMLFlow.setContents
or by creating a custom widget with Canvas.getInnerHTML
that has focusable elements that are not child Canvases - will not be noticed by this method.
public void focusInPreviousTabElement()
Canvas
or FormItem
that is focusable
, and is not disabled
or masked
. Note that the movement of focus to a FormItem
is managed by the containing DynamicForm
; calling this method on a
DynamicForm
will move the focus to the previous focusable FormItem
in the form if there is
one, and onto the previous focusable Canvas
if not.
NOTE: This method only considers Smart
GWT elements. Native elements that you create directly - for example, with HTMLFlow.setContents
or by creating a custom widget with Canvas.getInnerHTML
that has focusable elements that are not child
Canvases - will not be noticed by this method.
public int getBottom()
Sizing overview and related methods
public com.google.gwt.dom.client.Element getContentElement()
contents
, or for parent components
, the DOM elements for
any drawn children. This method is provided for the very rare cases where a programmer needs to examine the DOM
hierarchy created by a drawn Smart GWT component. Direct manipulation of the DOM elements created by Smart GWT
components is not supported. Smart GWT components should be rendered or cleared using standard methods such as Canvas.draw
, Canvas.clear
. If
direct integration with existing DOM structures is required, this should be achieved via the htmlElement
attribute, rather than by attempting to move the
component's outer element via native browser APIs.
The content of Smart GWT components' DOM elements should also not
be directly manipulated using native browser APIs - standard methods such as Canvas.setContents
, Canvas.addChild
, Canvas.removeChild
, Canvas.markForRedraw
and Canvas.redraw
should be used instead.
In some cases, the element returned
may match the element returned by Canvas.getOuterElement
, but
this will not always be the case.
If the widget is undrawn, this method will return null
.
public java.lang.String getFullDataPath()
DataPath
with the dataPath
of any parent canvases up to
whichever canvas has a specified valuesManager
specified to
actually manage values from this component.public java.lang.String getHoverHTML()
this.showHover
is true, when the user holds the mouse over this Canvas for long enough to trigger a
hover event, a hover canvas is shown by default. This method returns the contents of that hover canvas. Default
implementation returns this.prompt
- override for custom hover HTML. Note that returning null
or an empty string will suppress the hover canvas altogether.getShowHover()
public int getHSnapOrigin()
getHSnapPosition(int)
,
Positioning overview and related methods
public int getHSnapOrigin(Canvas snapChild)
snapChild
- the child that is being snappedgetHSnapPosition(int)
,
Positioning overview and related methods
public int getHSnapPosition(int coordinate)
snapHGap
and snapVGap
. You should only override this method if you want to provide support for a grid of irregularly-placed pointscoordinate
- x-coordinate of the drag event relative to the inside of this widgetDragdrop overview and related methods
public int getHSnapPosition(int coordinate, java.lang.String direction)
snapHGap
and snapVGap
. You should only override this method if you want to provide support for a grid of irregularly-placed pointscoordinate
- x-coordinate of the drag event relative to the inside of this widgetdirection
- "before" or "after" denoting whether the returned coordinate should match the left or right edge of the current
square. If unset snapHDirection
will be used by defaultDragdrop overview and related methods
public com.google.gwt.dom.client.Element getImage(java.lang.String identifier)
The image element must have been created from HTML generated by calling
Canvas.imgHTML
on this particular Canvas.
identifier
- name of the image to get, as originally passed to imgHTML()
Images overview and related methods
public int getInnerContentHeight()
getInnerContentWidth()
,
getInnerHeight()
,
getInnerWidth()
,
Sizing overview and related methods
public int getInnerContentWidth()
getInnerContentHeight()
,
getInnerHeight()
,
getInnerWidth()
,
Sizing overview and related methods
public int getInnerHeight()
This is the space within the viewport of the widget (including padding, but excluding margins, borders or scrollbars) rendered at its specified size.
getInnerWidth()
,
getInnerContentHeight()
,
getInnerContentWidth()
,
Sizing overview and related methods
public int getInnerWidth()
This is the space within the viewport of the widget (including padding, but excluding margins, borders or scrollbars) rendered at its specified size.
getInnerHeight()
,
getInnerContentHeight()
,
getInnerContentWidth()
,
Sizing overview and related methods
public int getOffsetX()
Positioning overview and related methods
public int getOffsetY()
Positioning overview and related methods
public com.google.gwt.dom.client.Element getOuterElement()
Direct manipulation of the DOM elements created
by Smart GWT components is not supported. Smart GWT components should be rendered or cleared using standard methods such
as Canvas.draw
, Canvas.clear
. If direct integration with existing DOM structures is required, this should be achieved via the htmlElement
attribute, rather than by attempting to move the
component's outer element via native browser APIs.
The content of Smart GWT components' DOM elements should also not
be directly manipulated using native browser APIs - standard methods such as Canvas.setContents
, Canvas.addChild
, Canvas.removeChild
, Canvas.markForRedraw
and Canvas.redraw
should be used instead.
In some cases, the element returned
may match the element returned by Canvas.getContentElement
, but this will not always be the case.
If the widget is undrawn, this method will return
null
.
public int getPageBottom()
Positioning overview and related methods
public int getPageLeft()
Positioning overview and related methods
public int getPageRight()
Positioning overview and related methods
public int getPageTop()
Positioning overview and related methods
public int getRight()
Sizing overview and related methods
public int getScrollBottom()
Scrolling overview and related methods
public int getScrollHeight()
Sizing overview and related methods
public int getScrollLeft()
Positioning overview and related methods
public int getScrollRight()
Scrolling overview and related methods
public int getScrollTop()
Positioning overview and related methods
public int getScrollWidth()
Sizing overview and related methods
public int getViewportHeight()
Sizing overview and related methods
public int getViewportWidth()
Sizing overview and related methods
public int getVisibleHeight()
Sizing overview and related methods
public int getVisibleWidth()
Sizing overview and related methods
public int getVSnapOrigin()
getVSnapPosition(int)
,
Positioning overview and related methods
public int getVSnapOrigin(Canvas snapChild)
snapChild
- the child that is being snappedgetVSnapPosition(int)
,
Positioning overview and related methods
public int getVSnapPosition(int coordinate)
snapHGap
and snapVGap
. You should only override this method if you want to provide support for a grid of irregularly-placed pointscoordinate
- y-coordinate of the drag event relative to the inside of this widgetDragdrop overview and related methods
public int getVSnapPosition(int coordinate, java.lang.String direction)
snapHGap
and snapVGap
. You should only override this method if you want to provide support for a grid of irregularly-placed pointscoordinate
- y-coordinate of the drag event relative to the inside of this widgetdirection
- "before" or "after" denoting whether the returned coordinate should match the top or bottom edge of the current
square. If unset snapHDirection
will be used by defaultDragdrop overview and related methods
public void handleHover()
this.hover()
(if defined), and handle showing the hover canvas if this.showHover
is true.getCanHover()
,
getShowHover()
,
HoverEvent
public void hide()
public void hideClickMask()
public void hideClickMask(java.lang.String ID)
ID
- optional ID of specific clickMask to hide. If not passed, defaults to hiding the click mask
associated with this widget only.showClickMask(com.smartgwt.client.core.Function, com.smartgwt.client.types.ClickMaskMode, com.smartgwt.client.widgets.Canvas[])
public void hideContextMenu()
public com.google.gwt.event.shared.HandlerRegistration addHoverHandler(HoverHandler handler)
If canHover
is true for this widget, the hover
string method will be fired when the user
hovers over this canvas. If this method returns false, it will suppress the default behavior of showing a hover canvas
if this.showHover
is true.
addHoverHandler
in interface HasHoverHandlers
handler
- the hover handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addHoverHiddenHandler(HoverHiddenHandler handler)
If showHover
is true for this canvas, this notification method
will be fired whenever the hover shown in response to handleHover()
is hidden. This method may be observed or overridden.
addHoverHiddenHandler
in interface HasHoverHiddenHandlers
handler
- the hoverHidden handlerHandlerRegistration
used to remove this handlerpublic java.lang.Boolean intersects(Canvas other)
other
- other canvas to test for intersectionPositioning overview and related methods
public java.lang.Boolean isDirty()
Canvas.markForRedraw
has been called, but this canvas has not yet been
redrawn.Drawing overview and related methods
public java.lang.Boolean isDisabled()
Enable overview and related methods
public java.lang.Boolean isDrawn()
isDrawn
in class BaseWidget
Drawing overview and related methods
public com.google.gwt.event.shared.HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
Executed when a key is pressed on a focusable widget (canFocus
:
true).
Use EventHandler.getKey
to find out the String of the
key that was pressed, and use EventHandler.shiftKeyDown
and
related functions to determine whether modifier keys were down.
addKeyDownHandler
in interface HasKeyDownHandlers
handler
- the keyDown handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
Executed when a key is pressed and released on a focusable widget (canFocus
: true).
Use EventHandler.getKey
to find out the
String of the key that was pressed, and use EventHandler.shiftKeyDown
and related functions to determine whether modifier keys were down.
addKeyPressHandler
in interface HasKeyPressHandlers
handler
- the keyPress handlerHandlerRegistration
used to remove this handlerpublic java.lang.Boolean keyUp()
canFocus
:
true). Use EventHandler.getKey
to find out the String of the
key that was pressed, and use EventHandler.shiftKeyDown
and
related functions to determine whether modifier keys were down.
getCanFocus()
public void layoutChildren(java.lang.String reason)
layoutChildren()
is where a Canvas should implement a sizing policy for it's Canvas children. Since
layoutChildren
calls parentResized() on its children, Canvas.parentResized
is a good place for a child to implement a layout
policy that can be used within any parent. Recommended practice for a Canvas that manages Canvas children is to create those children without any initial coordinate or size settings and do all sizing when layoutChildren() is called.
layoutChildren() is always called at least once before children are drawn, and is called automatically whenever the viewport size changes (which includes both resizing and introduction/removal of scrolling). layoutChildren() can also be manually invoked in any other component-specific situation which changes the layout.
NOTE: layoutChildren() may be called before draw() if a widget is resized before draw(), so be sure to avoid errors such as assuming that any children you automatically create have already been created.
NOTE: auto-sizing: layoutChildren() is also called once during the initial draw(), before children are drawn, with a "reason" of "initial draw". During this invocation of layoutChildren() it is legal to directly draw children (call child.draw()), which is otherwise never allowed. This allows a Canvas to implement an auto-sizing layout policy by drawing some children before deciding on the sizes of remaining children, which is far more efficient than drawing all children and resizing some of them after they are drawn.
reason
- reason why layoutChildren() is being called, passed when framework code invokes layoutChildren()Sizing overview and related methods
public java.lang.String linkHTML(java.lang.String href)
href
- URL for the link to point topublic java.lang.String linkHTML(java.lang.String href, java.lang.String text)
Canvas#linkHTML()}
public java.lang.String linkHTML(java.lang.String href, java.lang.String text, java.lang.String target)
Canvas#linkHTML()}
public java.lang.String linkHTML(java.lang.String href, java.lang.String text, java.lang.String target, java.lang.String ID)
Canvas#linkHTML()}
public java.lang.String linkHTML(java.lang.String href, java.lang.String text, java.lang.String target, java.lang.String ID, java.lang.Integer tabIndex)
Canvas#linkHTML()}
public java.lang.String linkHTML(java.lang.String href, java.lang.String text, java.lang.String target, java.lang.String ID, java.lang.Integer tabIndex, java.lang.String accessKey)
href
- URL for the link to point totext
- HTML to display in the link element (defaults to the href). See HTMLString
target
- Target window for the link (defaults to opening in a new, unnamed window)ID
- optional ID for the link element to be written outtabIndex
- optional tabIndex for the linkaccessKey
- optional accessKey for the linkpublic void markForDestroy()
destroy()
this canvas on a timeout. This method should be used
instead of calling canvas.destroy()
directly unless there's a reason a the canvas needs to be destroyed
synchronously. By using a timeout, this method ensures the destroy()
will occur after the current thread of
execution completes. This allows you to easily mark canvases for destruction while they're handling events, which must
complete before the canvas can be destroyed.BaseWidget.destroy()
public void markForRedraw()
markForRedraw()
instead of calling Canvas.redraw
directly. Since this method queues the redraw, multiple calls to markForRedraw() within a single thread
of execution will only lead to a single DOM manipulation which greatly improves application performance.Drawing overview and related methods
public void markForRedraw(java.lang.String reason)
markForRedraw()
instead of calling Canvas.redraw
directly. Since this method queues the redraw, multiple calls to markForRedraw() within a single thread
of execution will only lead to a single DOM manipulation which greatly improves application performance.reason
- reason for performing the redrawDrawing overview and related methods
public com.google.gwt.event.shared.HandlerRegistration addMouseDownHandler(MouseDownHandler handler)
Executed when the left mouse down is pressed on this widget. No default implementation.
addMouseDownHandler
in interface HasMouseDownHandlers
handler
- the mouseDown handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler)
Executed when the mouse moves within this widget. No default implementation.
addMouseMoveHandler
in interface HasMouseMoveHandlers
handler
- the mouseMove handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler(MouseOutHandler handler)
Executed when the mouse leaves this widget. No default implementation.
addMouseOutHandler
in interface HasMouseOutHandlers
handler
- the mouseOut handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(MouseOverHandler handler)
Executed when mouse enters this widget. No default implementation.
addMouseOverHandler
in interface HasMouseOverHandlers
handler
- the mouseOver handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addMouseStillDownHandler(MouseStillDownHandler handler)
Executed repeatedly (every mouseStillDownDelay
by
default) when the system is idle - i.e. not busy running other scripts - and the left mouse button is held down after
having been pressed in the object. This event is not native to JavaScript, but is provided by the ISC system.
Note:
The event handling system waits mouseStillDownInitialDelay
before calling mouseStillDown for the first time on the widget. Subsequently the method is
called every mouseStillDownDelay
. Both attributes are
configurable per widget instance.
This method is called only when the left mouse is held down.
addMouseStillDownHandler
in interface HasMouseStillDownHandlers
handler
- the mouseStillDown handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addMouseUpHandler(MouseUpHandler handler)
Executed when the left mouse is released on this widget. No default implementation.
addMouseUpHandler
in interface HasMouseUpHandlers
handler
- the mouseUp handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler)
Executed when the mouse wheel is actuated.
addMouseWheelHandler
in interface HasMouseWheelHandlers
handler
- the mouseWheel handlerHandlerRegistration
used to remove this handlerpublic void moveAbove(Canvas canvas)
canvas
- canvas to move aboveZIndex overview and related methods
,
Layer Examplepublic void moveBelow(Canvas canvas)
canvas
- canvas to move belowZIndex overview and related methods
,
Layer Examplepublic java.lang.Boolean moveBy(int deltaX, int deltaY)
deltaX
- amount to move horizontally (may be negative)deltaY
- amount to move vertically (may be negative)Positioning overview and related methods
,
Move Examplepublic com.google.gwt.event.shared.HandlerRegistration addMovedHandler(MovedHandler handler)
Notification method fired when this component is explicitly moved. Note that a component's position on the screen may
also changed due to an ancestor being moved. The Canvas.parentMoved
method provides a notification entry point to catch that case as well.
addMovedHandler
in interface HasMovedHandlers
handler
- the moved handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDropHandler(DropHandler handler)
Notification method fired when the user drops another canvas onto this one. Returning false
from this
method will prevent any default drop behavior from occurring
addDropHandler
in interface HasDropHandlers
handler
- the drop handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addParentMovedHandler(ParentMovedHandler handler)
Notification method fire when an ancestor of this component's position changes.
addParentMovedHandler
in interface HasParentMovedHandlers
handler
- the parentMoved handlerHandlerRegistration
used to remove this handlerpublic void redraw()
Drawing overview and related methods
public void redraw(java.lang.String reason)
reason
- reason for performing the redrawDrawing overview and related methods
public void removeChild(Canvas child)
child
- Child canvas to remove from this parent.Containment overview and related methods
public void removeChild(Canvas child, java.lang.String name)
child
- Child canvas to remove from this parent.name
- If the child canvas was assigned a name when added via addChild(), it should be passed in here to
ensure no reference is kept to the childContainment overview and related methods
public void removePeer(Canvas peer)
peer
- Peer to be removed from this canvasContainment overview and related methods
public void removePeer(Canvas peer, java.lang.String name)
peer
- Peer to be removed from this canvasname
- If this peer was assigned a name when added via addPeer(), it should be passed in here to ensure
no reference is kept to the peerContainment overview and related methods
public com.google.gwt.event.shared.HandlerRegistration addResizedHandler(ResizedHandler handler)
Observable method called whenever a Canvas changes size. Note that if this canvas is overflow:"visible"
, and is waiting for a queued redraw (see Canvas.isDirty
), the value for Canvas.getVisibleWidth
and Canvas.getVisibleHeight
will be unreliable until
redraw()
fires.
addResizedHandler
in interface HasResizedHandlers
handler
- the resized handlerHandlerRegistration
used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addRightMouseDownHandler(RightMouseDownHandler handler)
Executed when the right mouse down is pressed on this widget. No default implementation.
addRightMouseDownHandler
in interface HasRightMouseDownHandlers
handler
- the rightMouseDown handlerHandlerRegistration
used to remove this handlerpublic void scrollBy(int dX, int dY)
dX
- Number of pixels to scroll horizontallydY
- Number of pixels to scroll verticallyScrolling overview and related methods
public com.google.gwt.event.shared.HandlerRegistration addScrolledHandler(ScrolledHandler handler)
Notification that this component has just scrolled. Use with observation.
Fires for both CSS and "synthetic" scrollbars
.
addScrolledHandler
in interface HasScrolledHandlers
handler
- the scrolled handlerHandlerRegistration
used to remove this handlerpublic void scrollTo()
This is guaranteed to be called whenever this Canvas is scrolled, whether scrolling is initiated programmatically, by custom scrollbars, or a by a native scrollbar.
public void scrollTo(java.lang.Integer left)
Canvas#scrollTo()}
public void scrollTo(java.lang.Integer left, java.lang.Integer top)
This is guaranteed to be called whenever this Canvas is scrolled, whether scrolling is initiated programmatically, by custom scrollbars, or a by a native scrollbar.
left
- the left coordinatetop
- the top coordinateScrolling overview and related methods
public void scrollToBottom()
public void scrollToLeft()
public void scrollToRight()
public void scrollToTop()
public void sendToBack()
public void setBottom(int bottom)
NOTE: if you're setting multiple coordinates, use setRect(), moveTo() or resizeTo() instead
bottom
- new bottom coordinateSizing overview and related methods
public void setImage(java.lang.String identifier, java.lang.String URL)
The image element must have been created from HTML generated by calling
canvas.imgHTML()
on this particular Canvas.
identifier
- name of the image to change, as originally passed to imgHTML
URL
- URL for the image. See SCImgURL
Images overview and related methods
public void setImage(java.lang.String identifier, java.lang.String URL, java.lang.String imgDir)
The image element must have been created from HTML generated by calling
canvas.imgHTML()
on this particular Canvas.
identifier
- name of the image to change, as originally passed to imgHTML
URL
- URL for the image. See SCImgURL
imgDir
- optional image directory, overrides the default for this CanvasImages overview and related methods
public void setPageLeft(int left)
left
- new left coordinate in pixelsPositioning overview and related methods
public void setPageTop(int top)
top
- new top coordinate in pixelsPositioning overview and related methods
public void setRight(int right)
NOTE: if you're setting multiple coordinates, use setRect(), moveTo() or resizeTo() instead
right
- new right coordinateSizing overview and related methods
public void shouldDragScroll()
public void show()
If the widget has not yet been drawn (and doesn't have a parent or master), this method calls the draw method as well.
public com.google.gwt.event.shared.HandlerRegistration addShowContextMenuHandler(ShowContextMenuHandler handler)
Executed when the right mouse button is clicked. The default implementation of this method auto-creates a Menu
from the contextMenu
property on this component and then calls Menu.showContextMenu
on it to show it.
If you want to show a standard context menu, you can simply define your Menu and set it as the contextMenu property on your component - you do not need to override this method.
If you want to do some other processing before showing a menu or do something else entirely, then you should override this method. Note that the return value from this method controls whether or not the native browser context menu is shown.
addShowContextMenuHandler
in interface HasShowContextMenuHandlers
handler
- the showContextMenu handlerHandlerRegistration
used to remove this handlerpublic void showNextTo(Canvas otherWidget)
Note that this method simply sets the coordinates of the widget and displays it (using a Canvas.animateShow
by default). It will not change the parentElement
of either component.
An example use case might be showing a menu next to a menu-button.
otherWidget
- Canvas to show next topublic void showNextTo(Canvas otherWidget, java.lang.String side)
Canvas#showNextTo()}
public void showNextTo(Canvas otherWidget, java.lang.String side, boolean canOcclude)
Canvas#showNextTo()}
public void showNextTo(Canvas otherWidget, java.lang.String side, boolean canOcclude, boolean skipAnimation)
Note that this method simply sets the coordinates of the widget and displays it (using a Canvas.animateShow
by default). It will not change the parentElement
of either component.
An example use case might be showing a menu next to a menu-button.
otherWidget
- Canvas to show next toside
- which side to show on, defaults to "right"canOcclude
- This argument controls whether this canvas can be positioned on top of the other widget if there isn't room to put it
next to the other widget extending out of the browser viewportskipAnimation
- If false
do not use an animation to show the component.public void showRecursively()
If the widget has not yet been drawn, this method calls the draw method as well.
public void updateHover()
Canvas.handleHover
), this method can be called to update the contents of the hover. Has no effect if the hover canvas
is not showing for this widget.public void updateHover(java.lang.String hoverHTML)
Canvas.handleHover
), this method can be called to update the contents of the hover. Has no effect if the hover canvas
is not showing for this widget.hoverHTML
- Option to specify new HTML for the hover. If not passed, the result of this.getHoverHTML()
will be used instead. Note that if the hover HTML
is empty the hover will be hidden.public com.google.gwt.event.shared.HandlerRegistration addVisibilityChangedHandler(VisibilityChangedHandler handler)
Notification fired when this canvas becomes visible or hidden to the user. Note - this method is fired when the Canvas.isVisible
state of this component changes. It may be fired in
response an explicit call to Canvas.show
or Canvas.hide
or Canvas.setVisibility
, or in response to a parent component being shown or hidden when this widgets visibility
is set to "inherit".
Note that a call to Canvas.show
or Canvas.hide
will
not always fire this notification. If this widget has a hidden parent, show or hide would change this components
visibility
property, and may update the CSS visibility
attribute of the drawn handle in the DOM, but would not actually hide or reveal the component to the user and as such
the notification would not fire.
Note also that this notification will only be fired for components which have been
drawn
.
addVisibilityChangedHandler
in interface HasVisibilityChangedHandlers
handler
- the visibilityChanged handlerHandlerRegistration
used to remove this handlerpublic static EdgeName getEventEdge()
getResizeFrom()
public static EdgeName getEventEdge(EdgeName... edgeMask)
edgeMask
- Array of legal edges. Default is all the edges that allow resizing (see resizeFrom
)getResizeFrom()
public static void setAllowExternalFilters(boolean allExternalFilters)
allowExternalFilters
setting.allExternalFilters
- new settingpublic static void setNeverUseFilters(boolean neverUseFilters)
neverUseFilters
setting.neverUseFilters
- new settingpublic static void setDefaultProperties(Canvas canvasProperties)
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.
canvasProperties
- properties that should be used as new defaults when instances of this class are createdprotected Canvas getTestInstance()
public static Canvas getById(java.lang.String ID)
ID
.ID
- global ID of the Canvaspublic static <T extends Canvas> T getByJSObject(com.google.gwt.core.client.JavaScriptObject jsObj)
JavaScriptObject
.jsObj
- SmartClient object associated with Canvaspublic static <T extends Canvas> T asSGWTComponent(com.google.gwt.core.client.JavaScriptObject jsObj)
JavaScriptObject
. If
the supplied object is not a SmartClient Canvas, a warning will be logged and null
returned; otherwise the widget will be returned as the appropriate subtype of SGWT
Canvas.jsObj
- SmartClient Canvas whose wrapper is wantedpublic Canvas getByLocalId(java.lang.String ID)
A "local ID" is name for a child widget which is unique only for this parent, and not globally
unique as is required for ID
.
Widgets receive local IDs when loaded via
com.smartgwt.client.client.rpc.RPCManager#loadScreen()
or com.smartgwt.client.rpc.RPCManager#cacheScreens()
and
com.smartgwt.client.rpc.RPCManager#createScreen()
.
ID
- global ID of the Canvaspublic java.lang.String getClassName()
getClassName
in class BaseWidget
protected void onInit()
onInit
in class BaseWidget
protected void onDetach()
onDetach
in class com.google.gwt.user.client.ui.Widget
protected void onAttach()
onAttach
in class com.google.gwt.user.client.ui.Widget
public void addStyleName(java.lang.String style)
setStyleName(String)
addStyleName
in class com.google.gwt.user.client.ui.UIObject
style
- the style namesetStyleName(String)
public void setVisible(boolean visible)
setVisible
in interface com.google.gwt.user.client.ui.HasVisibility
setVisible
in class com.google.gwt.user.client.ui.UIObject
public void setHeight(int height)
Can be a number of pixels, or a percentage like "50%". See
documentation for width
for details on who percentage values
are resolved actual size.
Note that if overflow
is set
to "visible", this size is a minimum, and the component may overflow to show all content and/or children.
If
trying to establish a default height for a custom component, set defaultHeight
instead. Resizes the widget vertically to the specified height (moves the bottom side of the
widget). The height parameter can be expressed as a percentage of viewport size or as the number of pixels.
NOTE: if you're setting multiple coordinates, use resizeTo() or setRect() instead
height
- new height. Default value is nullpublic void setHeight100()
public void setWidth100()
public void setHeight(java.lang.String height)
setHeight
in class com.google.gwt.user.client.ui.UIObject
public java.lang.Integer getHeight()
public java.lang.String getHeightAsString()
public void setTitle(java.lang.String title)
setPrompt(String)
setTitle
in class BaseWidget
title
- the titlepublic java.lang.String getTitle()
getPrompt()
getTitle
in class BaseWidget
public void setTooltip(java.lang.String tooltip)
setPrompt(String)
tooltip
- the tooltippublic java.lang.String getTooltip()
getPrompt()
public void setWidth(int width)
Can be a number of pixels, or a percentage like "50%". Percentage sizes are resolved to pixel values as follows:
percentSource
, sizing will be a percentage of the size
of that widget (see also percentBox
).masterElement
, and
snapTo
is set for the widget, sizing will be a percentage
of the size of that widget (see also percentBox
).parentElement
's viewport. Layout
may specially interpret percentage sizes on their children, and also
allow "*" as a size.
Note that if overflow
is set to
"visible", this size is a minimum, and the component may overflow to show all content and/or children.
If
trying to establish a default width for a custom component, set defaultWidth
instead. Resizes the widget horizontally to the specified width (moves the right side of the
widget). The width parameter can be expressed as a percentage of viewport size or as the number of pixels.
NOTE: if you're setting multiple coordinates, use resizeTo() or setRect() instead
width
- new width. Default value is nullpublic void setWidth(java.lang.String width)
Can be a number of pixels, or a percentage like "50%". Percentage sizes are resolved to pixel values as follows:
percentSource
, sizing will be a percentage of the size
of that widget (see also percentBox
).masterElement
, and
snapTo
is set for the widget, sizing will be a percentage
of the size of that widget (see also percentBox
).parentElement
's viewport. Layout
may specially interpret percentage sizes on their children, and also
allow "*" as a size.
Note that if overflow
is set to
"visible", this size is a minimum, and the component may overflow to show all content and/or children.
If
trying to establish a default width for a custom component, set defaultWidth
instead. Resizes the widget horizontally to the specified width (moves the right side of the
widget). The width parameter can be expressed as a percentage of viewport size or as the number of pixels.
NOTE: if you're setting multiple coordinates, use resizeTo() or setRect() instead
setWidth
in class com.google.gwt.user.client.ui.UIObject
width
- new width. Default value is nullpublic java.lang.Integer getWidth()
public java.lang.String getWidthAsString()
public void setLeft(int left)
position
property). Can also be set as a percentage, specified as a
String ending in '%', eg, "50%". In this case the top coordinate is considered as a percentage of the specified width
of the 'parent'
.
Set the left coordinate of this object, relative to its enclosing context, in pixels. NOTE: if you're setting multiple coordinates, use setRect(), moveTo() or resizeTo() instead
left
- new left coordinate. Default value is 0public int getLeft()
position
property). Can also be set as a percentage, specified as a
String ending in '%', eg, "50%". In this case the top coordinate is considered as a percentage of the specified width
of the 'parent'
.
public void setLeft(java.lang.String left)
position
property). Can also be set as a percentage, specified as a
String ending in '%', eg, "50%". In this case the top coordinate is considered as a percentage of the specified width
of the 'parent'
.
Set the left coordinate of this object, relative to its enclosing context, in pixels. NOTE: if you're setting multiple coordinates, use setRect(), moveTo() or resizeTo() instead
left
- new left coordinate. Default value is 0public java.lang.String getLeftAsString()
position
property). Can also be set as a percentage, specified as a
String ending in '%', eg, "50%". In this case the top coordinate is considered as a percentage of the specified width
of the 'parent'
.
public void setTop(int top)
position
property). Can also be set as a percentage, specified as a String ending in '%', eg, "50%". In this case
the top coordinate is considered as a percentage of the specified height of the 'parent'
.
Set the top coordinate of this object, relative to its enclosing context, in pixels.
NOTE: if you're setting multiple coordinates, use setRect() or moveTo() instead
top
- new top coordinate. Default value is 0public java.lang.String getFacetId()
CubeGrid
, and it has a facetId
property specified then the Cube treats this as adding that facetId at the drop location.public void setFacetId(java.lang.String facetId)
CubeGrid
, and it has a facetId property specified then
the Cube treats this as adding that facetId at the drop location.facetId
- the facet idpublic int getTop()
position
property). Can also be set as a percentage, specified as a String ending in '%', eg, "50%". In this case
the top coordinate is considered as a percentage of the specified height of the 'parent'
.
public void setTop(java.lang.String top)
position
property). Can also be set as a percentage, specified as a String ending in '%', eg, "50%". In this case
the top coordinate is considered as a percentage of the specified height of the 'parent'
.
Set the top coordinate of this object, relative to its enclosing context, in pixels.
NOTE: if you're setting multiple coordinates, use setRect() or moveTo() instead
top
- new top coordinate. Default value is 0public java.lang.String getTopAsString()
position
property). Can also be set as a percentage, specified as a String ending in '%', eg, "50%". In this case
the top coordinate is considered as a percentage of the specified height of the 'parent'
.
public void setAlign(Alignment align)
public int getAbsoluteLeft()
getAbsoluteLeft
in class com.google.gwt.user.client.ui.UIObject
public int getAbsoluteTop()
getAbsoluteTop
in class com.google.gwt.user.client.ui.UIObject
public void setAnimateShowEffect(AnimationEffect animateShowEffect)
Canvas#animateShow()
is called without an explicit effect parameter.animateShowEffect
- the animate show effect. Default is "wipe"public AnimationEffect getAnimateShowEffect()
Canvas#animateShow()
is called without an explicit effect parameter.public void setDisabled(boolean disabled)
Note : This is an advanced setting
disabled
- new disabled state of this object - pass true
to disable the widget. Default value is falsepublic boolean getDisabled()
public void setDragTarget(Canvas dragTarget)
null
(default) [this widget is its own drag target]"parent"
drag target is this widget's
parentElement
"top"
drag target is this widget's
topElement
Note : This is an advanced setting
dragTarget
- dragTarget Default value is nullpublic Canvas getDragTarget()
null
(default) [this widget is its own drag target]"parent"
drag target is this widget's
parentElement
"top"
drag target is this widget's
topElement
public java.lang.Boolean willAcceptDrop()
dragType
of the
dragTarget
(the component being dragged from) with the list of dropTypes
on this Canvas. If the dropTypes
list contains the dragType
value, then this method returns true. Otherwise it returns
false.
protected void parentResized()
This method allows a child to implement a layout policy that can be used within any parent, such as a Resizer component
that always snaps to the parent's bottom-right corner. The default implementation of this method applies a child's
percent sizes, if any, or implements layout based on the snapTo
property.
Make sure you call super.parentResized() if you'd like the default behavior to apply.
Note: This is an override point
public Canvas getHoverComponent()
showHoverComponents
is true, this method is
called to get the component to show as a hover for this Canvas. There is no default implementation of this method, so
you need to override it with an implementation that returns a Canvas that suits your needs. By default, components
returned by getHoverComponent()
will not be automatically destroyed when the hover is hidden. To enforce
this, set hoverAutoDestroy
to true on the returned
component.
Note: this is an override point
public void setSmoothFade(java.lang.Boolean smoothFade) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void setKeepInParentRect(Rectangle rectangle)
public void setPrefix(java.lang.String prefix)
public java.lang.String getPrefix()
public void setResizeFrom(java.lang.String... resizeFrom)
#setResizeFrom(EdgeName)
instead.resizeFrom
- resizeFrom valuespublic void setDropTypes(java.lang.String... dropTypes)
Note : This is an advanced setting
dropTypes
- dropTypes Default value is Canvas.ANYTHINGpublic java.lang.String[] getDropTypes()
public boolean moveTo(int left, int top)
left
- x-coordinate to move to in LOCAL coordinatestop
- y-coordinate to move to in LOCAL coordinatespublic java.lang.Boolean resizeBy(int deltaX, int deltaY)
deltaX
- amount to resize horizontally (may be negative)deltaY
- amount to resize vertically (may be negative)public java.lang.Boolean resizeTo(java.lang.String width, java.lang.String height)
width
- new width for canvasheight
- new height for canvaspublic java.lang.Boolean resizeTo(int width, int height)
width
- new width for canvasheight
- new height for canvaspublic void scrollByPercent(int dX, int dY)
dX
- Percentage to scroll horizontally.dY
- Percentage to scroll vertically.public void scrollToPercent(int left, int top)
left
- left Percentage position to scroll totop
- top Percentage position to scroll topublic boolean isVisible()
NOTE: Undrawn widgets will report themselves as visible if they would be visible if drawn.
isVisible
in interface com.google.gwt.user.client.ui.HasVisibility
isVisible
in class com.google.gwt.user.client.ui.UIObject
public void animateScroll(int scrollLeft, int scrollTop, AnimationCallback callback)
scrollLeft
- desired final left scroll postionscrollTop
- desired final top scroll postioncallback
- When the scroll completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimationpublic void animateScroll(int scrollLeft, int scrollTop, AnimationCallback callback, int duration)
scrollLeft
- desired final left scroll postionscrollTop
- desired final top scroll postioncallback
- When the scroll completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimationduration
- Duration in ms of the animated scrollpublic void animateFade(int opacity)
opacity
- desired final opacitypublic void animateFade(int opacity, AnimationCallback callback)
opacity
- desired final opacitycallback
- When the fade completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimationpublic void animateFade(int opacity, AnimationCallback callback, int duration)
opacity
- desired final opacitycallback
- When the fade completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimationduration
- Duration in ms of the animated fadepublic void animateHide(AnimationEffect effect)
"visible"
or "hidden"
.effect
- How should the content of the window be hidden during the hide? If ommitted, default behavior can
be configured via animateHideEffect
public void animateHide(AnimationEffect effect, AnimationCallback callback)
"visible"
or "hidden"
.effect
- How should the content of the window be hidden during the hide? If ommitted, default behavior
can be configured via animateHideEffect
callback
- When the hide completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimation.public void animateHide(AnimationEffect effect, AnimationCallback callback, int duration)
"visible"
or "hidden"
.effect
- How should the content of the window be hidden during the hide? If ommitted, default behavior
can be configured via animateHideEffect
callback
- When the hide completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimation.duration
- Duration in ms of the animated hide. If unset, duration will be picked up from animateHideTime
public void animateShow(AnimationEffect effect)
"visible"
or
"hidden"
.effect
- Animation effect to use when revealing the widget. If ommitted, default behavior can be
configured via animateShowEffect
public void animateShow(AnimationEffect effect, AnimationCallback callback)
"visible"
or
"hidden"
.effect
- Animation effect to use when revealing the widget. If ommitted, default behavior can be
configured via animateShowEffect
callback
- When the show completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimation.public void animateShow(AnimationEffect effect, AnimationCallback callback, int duration)
"visible"
or
"hidden"
.effect
- Animation effect to use when revealing the widget. If ommitted, default behavior can be
configured via animateShowEffect
callback
- When the show completes this callback will be fired. Single
'earlyFinish' parameter will be passed if the animation was cut
short by a call to finishAnimation.duration
- Duration in ms of the animated show. If unset, duration will be picked up from animateShowTime
public void updateShadow()
public int getZIndex()
public int getNextZIndex()
public void setZIndex(int newIndex)
newIndex
- the new zIndex to set topublic Rectangle getPageRect()
public void setRect(Rectangle rectangle)
Moves the widget so that its top-left corner is at the specified top-left coordinates, then resizes it to the specified width and height.
rectangle
- new coordinatespublic void setRect(int left, int top, int width, int height)
Moves the widget so that its top-left corner is at the specified top-left coordinates, then resizes it to the specified width and height.
left
- new left coordinate, Array of coordinates in
parameter order, or Object with left, top, width,
height properties. If an Array or Object is
passed, the remaining parameters are ignoredtop
- new top coordinatewidth
- new widthheight
- new heightpublic Rectangle getRect()
public static java.lang.String getImgURL(java.lang.String URL)
If the passed URL begins with the special prefix "[SKIN]", it will have the widget.skinImgDir and Page.skinImgDir prepended. Otherwise the image is assumed to be application-specific, and will have the widget.appImgDir and Page.appImgDir automatically prepended.
Note that if passed an absolute path (starting with "/" or "http://" for example), no extra image directory information will be prepended to the generated URL.//
URL
- URL local to skin or application image directorypublic static java.lang.String getImgURL(java.lang.String URL, java.lang.String imgDir)
If the passed URL begins with the special prefix "[SKIN]", it will have the widget.skinImgDir and Page.skinImgDir prepended. Otherwise the image is assumed to be application-specific, and will have the widget.appImgDir and Page.appImgDir automatically prepended.
Note that if passed an absolute path (starting with "/" or "http://" for example), no extra image directory information will be prepended to the generated URL.//
URL
- URL local to skin or application image directoryimgDir
- optional image directory to override the default for this Canvaspublic static java.lang.String imgHTML(java.lang.String src)
The full URL for the image will be formed
according to the rules documented for
. getImgURL(java.lang.String)
The created image will have an identifier unique to this Canvas, and subsequent calls to
and getImage(java.lang.String)
with the name passed to this function will act on the image object produced by the HTML returned from this
call.setImage(java.lang.String, java.lang.String)
src
- URL local to the skin or application directory.public static java.lang.String imgHTML(java.lang.String src, int width, int height, java.lang.String name, java.lang.String extraStuff, java.lang.String imgDir)
The full URL for the image will be formed
according to the rules documented for
. getImgURL(java.lang.String)
The created image will have an identifier unique to this Canvas, and subsequent calls to
and getImage(java.lang.String)
with the name passed to this function will act on the image object produced by the HTML returned from this
call.setImage(java.lang.String, java.lang.String)
src
- URL local to the skin or application directory.width
- width of the imageheight
- height of the imagename
- name for the imageextraStuff
- additional attributes to write in the tagimgDir
- image-specific image directory to override the default for
this Canvaspublic static java.lang.String imgHTML(java.lang.String src, int width, int height)
public static void showPrintPreview(Canvas component)
component
- to get printable HTML for.public static void showPrintPreview(java.lang.Object[] components)
components
- components to get the print HTML for. May also include raw HTML strings which will be folded into the generated print
outputpublic static void showPrintPreview(java.lang.Object[] components, PrintProperties printProperties, java.lang.String title, PrintPreviewCallback callback)
components
- components to get the print HTML for. May also include raw HTML strings which will be folded into the generated print
outputprintProperties
- for customizing the print HTML output. If this parameter is passed as null, it will be ignored.title
- for the print windowcallback
- to fire when the print preview window has been created and shownpublic static void showPrintPreview(java.lang.Object[] components, PrintProperties printProperties, java.lang.String title, PrintPreviewCallback callback, Window printWindowProperties, java.lang.String printButtonTitle)
components
- components to get the print HTML for. May also include raw HTML strings which will be folded into the generated print
outputprintProperties
- for customizing the print HTML output. If this parameter is passed as null, it will be ignored.title
- for the print windowcallback
- to fire when the print preview window has been created and shownprintWindowProperties
- the print window propertiesprintButtonTitle
- the brint button titlepublic static void getPrintHTML(java.lang.Object[] components, PrintProperties printProperties, PrintHTMLCallback callback)
components
- Components to get the print HTML for. Strings of raw HTML may also be included in this array, and will be integrated
into the final HTML at the appropriate point.
HTML
.printProperties
- for customizing the print HTML output. If this parameter is passed as null, it will be ignored.callback
- to fire when the HTML has been generatedpublic java.lang.String getPrintHTML(PrintProperties printProperties, PrintHTMLCallback callback)
By default any Canvas with children will simply collect the printable HTML of its children
by calling getPrintHTML() on each child that is considered printable
.
If a callback is provided, then null is always returned and the callback is fired asynchronously.
If overriding this method for a custom component, you should either return a String of printable HTML directly or return null and fire the callback (if not null).
To return an empty print representation, return an empty string ("") rather than null.
The printProperties
argument, if passed, must be passed to any subcomponents on
which getPrintHTML() is called.
NOTE: Expecting a direct return value from the default implementation is deprecated usage. This is because small changes to an application (such as adding a few more data points to a chart or adding another button) or using certain browsers can make it necessary to generate the HTML asynchronously. Thus, application code should not rely on the return value and always pass a callback.
This is an override point.
printProperties
- properties to configure printing behavior - may be null.callback
- optional callback to fire. Generated HTML should be passed to the
PrintHTMLCallback.setHTML(String)
method of the callback.
This is required to handle cases where HTML generation is asynchronous - if a method
generates HTML asynchronously, it should return null, and fire the specified callback
on completion of HTML generation. The callback is only called if null is returned.
Furthermore, the default getPrintHTML() implementation always returns null and fires
the callback when a callback is provided.Printing overview and related methods
public static void printComponents(java.lang.Object[] components)
components
- components to get the print HTML for. May also include raw HTML strings which will be folded into the generated
print outputpublic void setAutoChildConstructor(java.lang.String autoChildName, java.lang.String className)
autoChildName
.autoChildName
- the name of the AutoChildclassName
- the SmartClient class name to use when constructing the AutoChild.AutoChildUsage
public void setAutoChildProperties(java.lang.String autoChildName, Canvas properties)
Canvas
AutoChild named autoChildName
.
properties
must not have already been created (properties.isCreated()
must be false
).
NOTE: Overrides at override points are not applied to the AutoChild created from
properties
; that is, if the Java Class
of properties
overrides a Smart GWT override point, the custom method implementation will not be called.
java.lang.IllegalStateException
- if properties
has been created.AutoChildUsage
public void setAutoChildProperties(java.lang.String autoChildName, FormItem properties)
FormItem
AutoChild named autoChildName
.
properties
must not have already been created (properties.isCreated()
must be false
).
NOTE: Overrides at override points are not applied to the AutoChild created from
properties
; that is, if the Java Class
of properties
overrides a Smart GWT override point, the custom method implementation will not be called.
java.lang.IllegalStateException
- if properties
has been created.AutoChildUsage
public void setAutoChildVisibility(java.lang.String autoChildName, boolean visible)
autoChildName
.
NOTE: This API is not valid for all AutoChildren because some AutoChildren cannot be hidden without destroying the main functions of the component.
autoChildName
- name of an AutoChildvisible
- whether to show the AutoChildpublic final Canvas getCanvasAutoChild(java.lang.String autoChildName)
Canvas
AutoChild named autoChildName
if already created.autoChildName
- name of an AutoChild to return.java.lang.RuntimeException
- if no AutoChild named autoChildName
has been created
or the AutoChild is not a SmartClient Canvas
object.AutoChildUsage
public final FormItem getFormItemAutoChild(java.lang.String autoChildName)
FormItem
AutoChild named autoChildName
if already created.autoChildName
- name of an AutoChild to return.java.lang.RuntimeException
- if no AutoChild named autoChildName
has been created
or the AutoChild is not a SmartClient FormItem
object.AutoChildUsage
public void addChild(com.google.gwt.user.client.ui.Widget widget)
If newChild has a parent it will be removed from it. If it has a master, it will be detached from it if the master is a child of a different parent. If newChild has peers, they'll be added to this widget as children as well.
newChild
- new child canvas to addpublic Canvas addChild(Canvas newChild, java.lang.String name, boolean autoDraw)
If newChild has a parent it will be removed from it. If it has a master, it will be detached from it if the master is a child of a different parent. If newChild has peers, they'll be added to this widget as children as well.
newChild
- new child canvas to addname
- name to assign to child (eg: this[name] == child)autoDraw
- if false, child will not automatically be drawn (only for advanced use)Containment overview and related methods
public void setChildren(Canvas... children)
Note : This is an advanced setting
children
- children Default value is nullpublic int getOffsetHeight()
getOffsetHeight
in class com.google.gwt.user.client.ui.UIObject
public int getOffsetWidth()
getOffsetWidth
in class com.google.gwt.user.client.ui.UIObject
public void setAutoHeight()
For use with setOverflow(Overflow.VISIBLE), where widgets render only as large as their contents and/or children, and height and width settings act as a minimum size.
public void setAutoWidth()
For use with setOverflow(Overflow.VISIBLE), where widgets render only as large as their contents and/or children, and height and width settings act as a minimum size.
public java.lang.String showClickMask(Function clickActionCallback, ClickMaskMode mode, Canvas[] unmaskedTargets)
clickActionCallback
- action to fire when the user clicks on the maskmode
- whether to automatically hide the clickMask on mouseDown and suppress the mouseDown
event from reaching the target under the mouseunmaskedTargets
- initially unmasked targets for this clickMask. Note that if this is a "hard"
mask, unmasked children of
masked parents are not supported so any non-top-level widgets passed in will have their parents unmasked. Children of
masked parents can never be masked.public java.lang.Boolean visibleAtPoint(int x, int y, boolean withinViewport, Canvas ignoreWidgets, Canvas upToParent)
x
- GLOBAL x-coordinatey
- GLOBAL y-coordinatewithinViewport
- point lies within our viewport rather than just our drawn areaignoreWidgets
- If passed ignore widget(s), do not check whether those widgets occludes this oneupToParent
- If passed, only check for siblings occluding the component up as far as the specified parent widgetPositioning overview and related methods
public void setAriaState(java.lang.String stateName, java.lang.Object stateValue)
com.smartgwt.docs.Accessibility
.stateName
- stateValue
- public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.CanvasLogicalStructure s)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class BaseWidget