Class Gauge
- All Implemented Interfaces:
- HasAttachHandlers,- HasHandlers,- EventListener,- HasVisibility,- IsWidget,- LogicalStructure,- HasDrawEndHandlers,- HasDrawStartHandlers,- HasClearHandlers,- HasClickHandlers,- HasDoubleClickHandlers,- HasDragMoveHandlers,- HasDragRepositionMoveHandlers,- HasDragRepositionStartHandlers,- HasDragRepositionStopHandlers,- HasDragResizeMoveHandlers,- HasDragResizeStartHandlers,- HasDragResizeStopHandlers,- HasDragStartHandlers,- HasDragStopHandlers,- HasDropHandlers,- HasDropMoveHandlers,- HasDropOutHandlers,- HasDropOverHandlers,- HasFocusChangedHandlers,- HasHoverHandlers,- HasHoverHiddenHandlers,- HasKeyDownHandlers,- HasKeyPressHandlers,- HasMouseDownHandlers,- HasMouseMoveHandlers,- HasMouseOutHandlers,- HasMouseOverHandlers,- HasMouseStillDownHandlers,- HasMouseUpHandlers,- HasMouseWheelHandlers,- HasMovedHandlers,- HasParentMovedHandlers,- HasResizedHandlers,- HasRightMouseDownHandlers,- HasRuleContextChangedHandlers,- HasScrolledHandlers,- HasShowContextMenuHandlers,- HasVisibilityChangedHandlers
NOTE: you must load the standard Drawing module before you can use Gauge.
- 
Nested Class SummaryNested classes/interfaces inherited from class com.smartgwt.client.widgets.drawing.DrawPaneDrawPane.InvalidDrawingTypeExceptionNested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObjectUIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
- 
Field SummaryFields inherited from class com.smartgwt.client.widgets.BaseWidgetconfig, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassNameFields inherited from class com.google.gwt.user.client.ui.UIObjectDEBUG_ID_PREFIX
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintaddSector(double newSector) Adds a new sector.intaddSector(GaugeSector newSector) Adds a new sector.static voidchangeAutoChildDefaults(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName.static voidchangeAutoChildDefaults(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName.protected JavaScriptObjectcreate()protected StringformatLabelContents(float value) Formats a value as a string to be used as the contents of aDrawLabel.Color for gauge sector borders.intPixel width for gauge sector borders.protected StringgetDefaultFillColor(int sectorIndex) Gets the default fill color for the sector at indexsectorIndex.floatDeprecated.doubleRadius in pixels of the dial.booleanWhether the sectors are drawn clockwise, and increasing the value causes the needle to move clockwise.intFont size of sector labels.The label prefix.The label suffix.Getter implementing theLogicalStructureinterface, which supports Eclipse's logical structure debugging facility.floatDeprecated.doubleThe maximum dial value.floatDeprecated.doubleThe minimum dial value.AutoChild representing the needle shape that points to the gauge's current value.intThe number of major tick lines.intThe number of minor tick lines.intGets the number of sectors.static GaugegetOrCreateRef(JavaScriptObject jsObj) The pivot point of the needle.intDefault height of thepivotPointif no specific pivotPoint is specified.Default height of thepivotPointif no specific pivotPoint is specified.AutoChild representing the shape drawn at thepivotPoint(where all sectors of the gauge meet).String[]Array of preset fill colors used by the default implementation ofgetDefaultFillColor()to initialize the fill color of new sectors.getSectorFillColor(int sectorIndex) Gets the fill color of the sector at indexsectorIndex.getSectorLabelContents(int sectorIndex) Gets the label contents of the label for the sector at sectorIndex.The GaugeSectors contained in this Gauge.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.floatgetSectorValue(int sectorIndex) Deprecated.doublegetSectorValueAsDouble(int sectorIndex) Gets the value of the sector atsectorIndex.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.floatgetValue()Deprecated.doubleThe current value on the dial.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.protected voidonInit()voidResets the contents of all labels.voidremoveSector(int sectorIndex) Removes the sector at sectorIndex.setBorderColor(String borderColor) Color for gauge sector borders.setBorderWidth(int borderWidth) Pixel width for gauge sector borders.static voidsetDefaultProperties(Gauge gaugeProperties) Class level method to set the default properties of this class.setDialRadius(double dialRadius) Radius in pixels of the dial.setDialRadius(float dialRadius) Deprecated.setDrawnClockwise(boolean drawnClockwise) Whether the sectors are drawn clockwise, and increasing the value causes the needle to move clockwise.setFontSize(int fontSize) Font size of sector labels.setLabelPrefix(String labelPrefix) The label prefix.setLabelSuffix(String labelSuffix) The label suffix.Setter implementing theLogicalStructureinterface, which supports Eclipse's logical structure debugging facility.setMaxValue(double maxValue) The maximum dial value.setMaxValue(float maxValue) Deprecated.setMinValue(double minValue) The minimum dial value.setMinValue(float minValue) Deprecated.setNumMajorTicks(int numMajorTicks) The number of major tick lines.setNumMinorTicks(int numMinorTicks) The number of minor tick lines.setPivotPoint(Point pivotPoint) The pivot point of the needle.setPivotPointHeight(int pivotPointHeight) Default height of thepivotPointif no specific pivotPoint is specified.setPivotPointHeight(String pivotPointHeight) Default height of thepivotPointif no specific pivotPoint is specified.setSectorColors(String... sectorColors) Array of preset fill colors used by the default implementation ofgetDefaultFillColor()to initialize the fill color of new sectors.voidsetSectorFillColor(int sectorIndex, String fillColor) Sets the fill color of the sector atsectorIndex.setSectors(GaugeSector... sectors) The GaugeSectors contained in this Gauge.setValue(double value) The current value on the dial.setValue(float value) Deprecated.voidsetValueRange(double minValue, double maxValue) Sets the minimum and maximum dial values, rescaling all sectors and the dial value.Methods inherited from class com.smartgwt.client.widgets.drawing.DrawPaneaddDrawEndHandler, addDrawItem, addDrawStartHandler, addGradient, bezier, bezierExtrema, createLinearGradient, createRadialGradient, createSimpleGradient, destroyItems, erase, getBezierBoundingBox, getCanDragScroll, getDataURL, getDataURL, getDataURL, getDrawingHeight, getDrawingPoint, getDrawingType, getDrawingWidth, getDrawingX, getDrawingY, getDrawItems, getEditProxyConstructor, getGradient, getGradients, getPolygonPoints, getPrintHTML, getRegularPolygonPoints, getRotation, getRotationAsDouble, getSvgString, getTranslate, getUnderlyingGWTCanvas, getViewPortRectInViewBoxCoords, getZoomLevel, getZoomLevelAsDouble, refreshNow, removeGradient, rotate, scaleAndCenter, scaleAndCenterBezier, setAutoChildProperties, setCanDragScroll, setDefaultProperties, setDrawingHeight, setDrawingType, setDrawingWidth, setDrawItems, setEditProxyConstructor, setGradients, setLogicalStructure, setRotation, setRotation, setTranslate, setZoomLevel, setZoomLevel, zoom, zoomMethods inherited from class com.smartgwt.client.widgets.CanvasaddChild, addChild, addChild, addChild, addChild, addClearHandler, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsEventTarget, containsFocus, containsPoint, containsPoint, dataContextChanged, deparent, depeer, disable, doValueDictation, doVoiceCommand, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAriaRole, getAriaStateDefaults, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getChildTabPosition, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataContext, getDataPath, getDefaultHeight, getDefaultWidth, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverScreen, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getStyleName, getTabIndex, getTestDataContext, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUISummary, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, revealChild, revealChild, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAlign, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCorrectZoomOverflow, setCursor, setDataContext, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverScreen, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setStyleName, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startDebuggingOverflow, stopDebuggingOverflow, supportsValueDictation, supportsVoiceCommands, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDropMethods inherited from class com.smartgwt.client.widgets.BaseWidgetaddDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isDrawn, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toStringMethods inherited from class com.google.gwt.user.client.ui.WidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class com.google.gwt.user.client.ui.UIObjectaddStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEventMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlersfireEvent
- 
Constructor Details- 
Gaugepublic Gauge()
- 
Gauge
 
- 
- 
Method Details- 
getOrCreateRef
- 
changeAutoChildDefaultsChanges the defaults for Canvas AutoChildren namedautoChildName.- Parameters:
- 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. For usage tips on this param, see- SGWTProperties.
- See Also:
 
- 
changeAutoChildDefaultsChanges the defaults for FormItem AutoChildren namedautoChildName.- Parameters:
- 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. For usage tips on this param, see- SGWTProperties.
- See Also:
 
- 
create
- 
setBorderColorColor for gauge sector borders.- Parameters:
- borderColor- New borderColor value. Default value is "#333333"
- Returns:
- Gaugeinstance, for chaining setter calls
- Throws:
- IllegalStateException- this property cannot be changed after the component has been created
- See Also:
 
- 
getBorderColorColor for gauge sector borders.- Returns:
- Current borderColor value. Default value is "#333333"
- See Also:
 
- 
setBorderWidthPixel width for gauge sector borders.- Parameters:
- borderWidth- New borderWidth value. Default value is 1
- Returns:
- Gaugeinstance, for chaining setter calls
- Throws:
- IllegalStateException- this property cannot be changed after the component has been created
- See Also:
 
- 
getBorderWidthpublic int getBorderWidth()Pixel width for gauge sector borders.- Returns:
- Current borderWidth value. Default value is 1
- See Also:
 
- 
setDialRadiusDeprecated.Radius in pixels of the dial.
 If this method is called after the component has been drawn/initialized: All DrawItems currently associated with this Gauge are destroyed and new DrawItems are created instead.- Parameters:
- dialRadius- Radius in pixels of the dial. Default value is 150
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getDialRadiuspublic float getDialRadius()Deprecated.Radius in pixels of the dial.- Returns:
- Current dialRadius value. Default value is 150
 
- 
setDialRadiusRadius in pixels of the dial.
 If this method is called after the component has been drawn/initialized: All DrawItems currently associated with this Gauge are destroyed and new DrawItems are created instead.- Parameters:
- dialRadius- Radius in pixels of the dial. Default value is 150
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getDialRadiusAsDoublepublic double getDialRadiusAsDouble()Radius in pixels of the dial.- Returns:
- Current dialRadius value. Default value is 150
 
- 
setDrawnClockwiseWhether the sectors are drawn clockwise, and increasing the value causes the needle to move clockwise.
 If this method is called after the component has been drawn/initialized: Sets thedrawnClockwiseproperty and redraws the gauge.- Parameters:
- drawnClockwise- whether the sectors are drawn clockwise. Default value is true
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getDrawnClockwisepublic boolean getDrawnClockwise()Whether the sectors are drawn clockwise, and increasing the value causes the needle to move clockwise.- Returns:
- Current drawnClockwise value. Default value is true
 
- 
setFontSizeFont size of sector labels. Must be at least 3.- Parameters:
- fontSize- New fontSize value. Default value is 11
- Returns:
- Gaugeinstance, for chaining setter calls
- Throws:
- IllegalStateException- this property cannot be changed after the component has been created
- See Also:
 
- 
getFontSizepublic int getFontSize()Font size of sector labels. Must be at least 3.- Returns:
- Current fontSize value. Default value is 11
- See Also:
 
- 
setLabelPrefixThe label prefix.
 If this method is called after the component has been drawn/initialized: Sets thelabelPrefixproperty and re-creates all sector labels.- Parameters:
- labelPrefix- the new label prefix. Default value is ""
- Returns:
- Gaugeinstance, for chaining setter calls
- See Also:
 
- 
getLabelPrefixThe label prefix.- Returns:
- Current labelPrefix value. Default value is ""
- See Also:
 
- 
setLabelSuffixThe label suffix.
 If this method is called after the component has been drawn/initialized: Sets thelabelSuffixproperty and re-creates all sector labels.- Parameters:
- labelSuffix- the new label suffix. Default value is "%"
- Returns:
- Gaugeinstance, for chaining setter calls
- See Also:
 
- 
getLabelSuffixThe label suffix.- Returns:
- Current labelSuffix value. Default value is "%"
- See Also:
 
- 
setMaxValueDeprecated.The maximum dial value.
 If this method is called after the component has been drawn/initialized: Sets the maximum dial value, rescaling all sectors and the dial value.See setValueRangeto set both minValue and maxValue together.- Parameters:
- maxValue- the new maximum dial value. Must be at least 1 greater than the minimum dial value. If- maxValueis not at least 1 greater than the minimum value, then it is set to- 1 + minValue. Default value is 100
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getMaxValuepublic float getMaxValue()Deprecated.The maximum dial value.- Returns:
- Current maxValue value. Default value is 100
 
- 
setMaxValueThe maximum dial value.
 If this method is called after the component has been drawn/initialized: Sets the maximum dial value, rescaling all sectors and the dial value.See setValueRangeto set both minValue and maxValue together.- Parameters:
- maxValue- the new maximum dial value. Must be at least 1 greater than the minimum dial value. If- maxValueis not at least 1 greater than the minimum value, then it is set to- 1 + minValue. Default value is 100
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getMaxValueAsDoublepublic double getMaxValueAsDouble()The maximum dial value.- Returns:
- Current maxValue value. Default value is 100
 
- 
setMinValueDeprecated.The minimum dial value.
 If this method is called after the component has been drawn/initialized: Sets the minimum dial value, rescaling all sectors and the dial value.See setValueRangeto set both minValue and maxValue together.- Parameters:
- minValue- the new minimum dial value. Must be at least 1 less than the maximum dial value. If- minValueis not at least 1 less than the maximum value, then it is set to- maxValue - 1. Default value is 0
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getMinValuepublic float getMinValue()Deprecated.The minimum dial value.- Returns:
- Current minValue value. Default value is 0
 
- 
setMinValueThe minimum dial value.
 If this method is called after the component has been drawn/initialized: Sets the minimum dial value, rescaling all sectors and the dial value.See setValueRangeto set both minValue and maxValue together.- Parameters:
- minValue- the new minimum dial value. Must be at least 1 less than the maximum dial value. If- minValueis not at least 1 less than the maximum value, then it is set to- maxValue - 1. Default value is 0
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getMinValueAsDoublepublic double getMinValueAsDouble()The minimum dial value.- Returns:
- Current minValue value. Default value is 0
 
- 
getNeedleAutoChild representing the needle shape that points to the gauge's current value. Default is to use a DrawTriangle.This component is an AutoChild named "needle". For an overview of how to use and configure AutoChildren, see Using AutoChildren.- Returns:
- Current needle value. Default value is null
- Throws:
- IllegalStateException- if this widget has not yet been rendered.
 
- 
setNumMajorTicksThe number of major tick lines.
 If this method is called after the component has been drawn/initialized: Sets the number of major tick lines.NOTE: To divide the dial into n regions, you will need n + 1 ticks. For example, if the minimum value is 0 and the maximum value is 100, then to place major tick lines at 0, 10, 20, 30, ..., 90, 100, you need 11 (10 + 1) major ticks. - Parameters:
- numMajorTicks- the number of major tick lines to draw. Must be either 0 or an integer greater than or equal to 2. Default value is 0
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getNumMajorTickspublic int getNumMajorTicks()The number of major tick lines.- Returns:
- Current numMajorTicks value. Default value is 0
 
- 
setNumMinorTicksThe number of minor tick lines.
 If this method is called after the component has been drawn/initialized: Sets the number of minor tick lines.NOTE: To divide the dial into n regions, you will need n + 1 ticks. For example, if the minimum value is 0 and the maximum value is 100, then to place minor tick lines at 0, 1, 2, 3, 4, 5, ..., 99, 100, you need 101 (100 + 1) minor ticks. - Parameters:
- numMinorTicks- the number of minor tick lines to draw. Must be either 0 or an integer greater than or equal to 2. Default value is 0
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getNumMinorTickspublic int getNumMinorTicks()The number of minor tick lines.- Returns:
- Current numMinorTicks value. Default value is 0
 
- 
setPivotPointThe pivot point of the needle.
 If this method is called after the component has been drawn/initialized: All DrawItems currently associated with this Gauge are destroyed and new DrawItems are created instead.The pivot point is set by default by choosing 1/2 of width and 70% of height of the Gauge. See pivotPointHeight- Parameters:
- pivotPoint- The pivot point of the needle. Default value is null
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getPivotPointThe pivot point of the needle.- Returns:
- Current pivotPoint value. Default value is null
 
- 
setPivotPointHeightDefault height of thepivotPointif no specific pivotPoint is specified.Can be specified as a numeric pixel value, or a String percentage value. - Parameters:
- pivotPointHeight- New pivotPointHeight value. Default value is "70%"
- Returns:
- Gaugeinstance, for chaining setter calls
- Throws:
- IllegalStateException- this property cannot be changed after the component has been created
 
- 
getPivotPointHeightpublic int getPivotPointHeight()Default height of thepivotPointif no specific pivotPoint is specified.Can be specified as a numeric pixel value, or a String percentage value. - Returns:
- Current pivotPointHeight value. Default value is "70%"
 
- 
setPivotPointHeightDefault height of thepivotPointif no specific pivotPoint is specified.Can be specified as a numeric pixel value, or a String percentage value. - Parameters:
- pivotPointHeight- New pivotPointHeight value. Default value is "70%"
- Returns:
- Gaugeinstance, for chaining setter calls
- Throws:
- IllegalStateException- this property cannot be changed after the component has been created
 
- 
getPivotPointHeightAsStringDefault height of thepivotPointif no specific pivotPoint is specified.Can be specified as a numeric pixel value, or a String percentage value. - Returns:
- Current pivotPointHeight value. Default value is "70%"
 
- 
getPivotShapeAutoChild representing the shape drawn at thepivotPoint(where all sectors of the gauge meet).This component is an AutoChild named "pivotShape". For an overview of how to use and configure AutoChildren, see Using AutoChildren.- Returns:
- Current pivotShape value. Default value is null
- Throws:
- IllegalStateException- if this widget has not yet been rendered.
 
- 
setSectorColorsArray of preset fill colors used by the default implementation ofgetDefaultFillColor()to initialize the fill color of new sectors.The default array of colors is: #AFFFFF #008080 #AAAFFF #FF0000 #FFCC99 #800080 - Parameters:
- sectorColors- New sectorColors value. Default value is [ "#AFFFFF", "#008080", "#AAAFFF", "#FF0000", "#FFCC99", "#800080" ]
- Returns:
- Gaugeinstance, for chaining setter calls
- Throws:
- IllegalStateException- this property cannot be changed after the component has been created
- See Also:
 
- 
getSectorColorsArray of preset fill colors used by the default implementation ofgetDefaultFillColor()to initialize the fill color of new sectors.The default array of colors is: #AFFFFF #008080 #AAAFFF #FF0000 #FFCC99 #800080 - Returns:
- Current sectorColors value. Default value is [ "#AFFFFF", "#008080", "#AAAFFF", "#FF0000", "#FFCC99", "#800080" ]
- See Also:
 
- 
setSectorsThe GaugeSectors contained in this Gauge. If this this property is not specified, the gauge will be created with a default sector filling the gauge.
 If this method is called after the component has been drawn/initialized: Sets the sectors for this gauge.- Parameters:
- sectors- the sectors to show on the gauge. Default value is null
- Returns:
- Gaugeinstance, for chaining setter calls
 
- 
getSectorsThe GaugeSectors contained in this Gauge. If this this property is not specified, the gauge will be created with a default sector filling the gauge.- Returns:
- Current sectors value. Default value is null
 
- 
getSectorShapeNote : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildrenfor details.MultiAutoChild representing the sectors drawn to show different segments of the gauge. - Returns:
- null
 
- 
getTickLineNote : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildrenfor details.MultiAutoChild representing the tick marks drawn along the circumference of the gauge. Default is to use DrawLine. - Returns:
- null
 
- 
setValueDeprecated.The current value on the dial.
 If this method is called after the component has been drawn/initialized: Sets the value on the dial that the needle is displaying.
- 
getValuepublic float getValue()Deprecated.The current value on the dial.- Returns:
- Current value value. Default value is 0
 
- 
setValueThe current value on the dial.
 If this method is called after the component has been drawn/initialized: Sets the value on the dial that the needle is displaying.
- 
getValueAsDoublepublic double getValueAsDouble()The current value on the dial.- Returns:
- Current value value. Default value is 0
 
- 
getValueLabelNote : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildrenfor details.MultiAutoChild representing the labels used to different data points on the gauge. - Returns:
- null
 
- 
addSectorAdds a new sector.- Parameters:
- newSector- the new GaugeSector or the new sector's value. This is formatted with- formatLabelContents()to get its label.
- Returns:
- the index of the newly-added sector.
 
- 
addSectorpublic int addSector(double newSector) Adds a new sector.- Parameters:
- newSector- the new GaugeSector or the new sector's value. This is formatted with- formatLabelContents()to get its label.
- Returns:
- the index of the newly-added sector.
 
- 
getNumSectorspublic int getNumSectors()Gets the number of sectors.- Returns:
- the number of sectors on this gauge.
 
- 
getSectorFillColorGets the fill color of the sector at indexsectorIndex.- Parameters:
- sectorIndex- index of the target sector.
- Returns:
- the fill color of the sector at sectorIndex. SeeCSSColor
- See Also:
 
- 
getSectorLabelContentsGets the label contents of the label for the sector at sectorIndex.- Parameters:
- sectorIndex- index of the target sector.
- Returns:
- the label contents of the sector's label.
 
- 
getSectorValuepublic float getSectorValue(int sectorIndex) Deprecated.Gets the value of the sector atsectorIndex.- Parameters:
- sectorIndex- index of the target sector.
- Returns:
- the value of the sector at sectorIndex.
 
- 
getSectorValueAsDoublepublic double getSectorValueAsDouble(int sectorIndex) Gets the value of the sector atsectorIndex.- Parameters:
- sectorIndex- index of the target sector.
- Returns:
- the value of the sector at sectorIndex.
 
- 
reformatLabelContentspublic void reformatLabelContents()Resets the contents of all labels. This involves callingformatLabelContents()to get the label contents for each corresponding value and repositioning the label.
- 
removeSectorpublic void removeSector(int sectorIndex) Removes the sector at sectorIndex.NOTE: There must always be one sector and it is not possible to remove the sole remaining sector. Calling this method to attempt to remove the sole remaining sector is a no-op. - Parameters:
- sectorIndex- the index of the sector to remove.
 
- 
setSectorFillColorSets the fill color of the sector atsectorIndex.- Parameters:
- sectorIndex- index of the target sector.
- fillColor- the new fill color. See- CSSColor
- See Also:
 
- 
setValueRangepublic void setValueRange(double minValue, double maxValue) Sets the minimum and maximum dial values, rescaling all sectors and the dial value.- Parameters:
- minValue- the new minimum dial value
- maxValue- the new maximum dial value
 
- 
setDefaultPropertiesClass level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.Note: This method is intended for setting default attributes only and will affect 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. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route. - Parameters:
- gaugeProperties- properties that should be used as new defaults when instances of this class are created
- See Also:
 
- 
onInitprotected void onInit()
- 
formatLabelContentsFormats a value as a string to be used as the contents of aDrawLabel. The default implementation prependslabelPrefixand appendslabelSuffixtovalue.NOTE: This is an override point. If a subclass overrides this, then whenever it changes the way that values are formatted, it should call Gauge.reformatLabelContents.- Parameters:
- value- the value to format.
- Returns:
- label contents.
 
- 
getDefaultFillColorGets the default fill color for the sector at indexsectorIndex. The default implementation cycles throughsectorColorsusing modular arithmetic.Note: This is an override point. - Parameters:
- sectorIndex- index of the target sector.
- Returns:
- a fill color.
 
- 
setLogicalStructureSetter implementing theLogicalStructureinterface, which supports Eclipse's logical structure debugging facility.
- 
getLogicalStructureGetter implementing theLogicalStructureinterface, which supports Eclipse's logical structure debugging facility.- Specified by:
- getLogicalStructurein interface- LogicalStructure
- Overrides:
- getLogicalStructurein class- DrawPane
 
 
- 
GwtFloatVsDouble