public class Gauge extends DrawPane
NOTE: you must load the standard Drawing module before you can use Gauge.
DrawPane.InvalidDrawingTypeException
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Constructor and Description |
---|
Gauge() |
Gauge(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
int |
addSector(double newSector)
Adds a new sector.
|
int |
addSector(GaugeSector newSector)
Adds a new sector.
|
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 . |
protected com.google.gwt.core.client.JavaScriptObject |
create() |
protected java.lang.String |
formatLabelContents(float value)
Formats a value as a string to be used as the contents of a
DrawLabel . |
java.lang.String |
getBorderColor()
Color for gauge sector borders.
|
int |
getBorderWidth()
Pixel width for gauge sector borders.
|
protected java.lang.String |
getDefaultFillColor(int sectorIndex)
Gets the default fill color for the sector at index
sectorIndex . |
float |
getDialRadius()
Deprecated.
|
double |
getDialRadiusAsDouble()
Radius in pixels of the dial.
|
boolean |
getDrawnClockwise()
Whether the sectors are drawn clockwise, and increasing the value causes the needle to move clockwise.
|
int |
getFontSize()
Font size of sector labels.
|
java.lang.String |
getLabelPrefix()
The label prefix.
|
java.lang.String |
getLabelSuffix()
The label suffix.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
Getter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
float |
getMaxValue()
Deprecated.
|
double |
getMaxValueAsDouble()
The maximum dial value.
|
float |
getMinValue()
Deprecated.
|
double |
getMinValueAsDouble()
The minimum dial value.
|
DrawItem |
getNeedle()
AutoChild representing the needle shape that points to the gauge's current value.
|
int |
getNumMajorTicks()
The number of major tick lines.
|
int |
getNumMinorTicks()
The number of minor tick lines.
|
int |
getNumSectors()
Gets the number of sectors.
|
static Gauge |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
Point |
getPivotPoint()
The pivot point of the needle.
|
int |
getPivotPointHeight()
Default height of the
pivotPoint if no specific
pivotPoint is specified. |
java.lang.String |
getPivotPointHeightAsString()
Default height of the
pivotPoint if no specific
pivotPoint is specified. |
DrawItem |
getPivotShape()
AutoChild representing the shape drawn at the
pivotPoint
(where all sectors of the gauge meet). |
java.lang.String[] |
getSectorColors()
Array of preset fill colors used by the default implementation of
getDefaultFillColor() to initialize the fill color of new
sectors. |
java.lang.String |
getSectorFillColor(int sectorIndex)
Gets the fill color of the sector at index
sectorIndex . |
java.lang.String |
getSectorLabelContents(int sectorIndex)
Gets the label contents of the label for the sector at sectorIndex.
|
GaugeSector[] |
getSectors()
The GaugeSectors contained in this Gauge.
|
DrawSector |
getSectorShape()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
float |
getSectorValue(int sectorIndex)
Deprecated.
|
double |
getSectorValueAsDouble(int sectorIndex)
Gets the value of the sector at
sectorIndex . |
DrawItem |
getTickLine()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
float |
getValue()
Deprecated.
|
double |
getValueAsDouble()
The current value on the dial.
|
DrawLabel |
getValueLabel()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
protected void |
onInit() |
void |
reformatLabelContents()
Resets the contents of all labels.
|
void |
removeSector(int sectorIndex)
Removes the sector at sectorIndex.
|
Gauge |
setBorderColor(java.lang.String borderColor)
Color for gauge sector borders.
|
Gauge |
setBorderWidth(int borderWidth)
Pixel width for gauge sector borders.
|
static void |
setDefaultProperties(Gauge gaugeProperties)
Class level method to set the default properties of this class.
|
Gauge |
setDialRadius(double dialRadius)
Radius in pixels of the dial.
|
Gauge |
setDialRadius(float dialRadius)
Deprecated.
|
Gauge |
setDrawnClockwise(boolean drawnClockwise)
Whether the sectors are drawn clockwise, and increasing the value causes the needle to move clockwise.
|
Gauge |
setFontSize(int fontSize)
Font size of sector labels.
|
Gauge |
setLabelPrefix(java.lang.String labelPrefix)
The label prefix.
|
Gauge |
setLabelSuffix(java.lang.String labelSuffix)
The label suffix.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.drawing.GaugeLogicalStructure s)
Setter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
Gauge |
setMaxValue(double maxValue)
The maximum dial value.
|
Gauge |
setMaxValue(float maxValue)
Deprecated.
|
Gauge |
setMinValue(double minValue)
The minimum dial value.
|
Gauge |
setMinValue(float minValue)
Deprecated.
|
Gauge |
setNumMajorTicks(int numMajorTicks)
The number of major tick lines.
|
Gauge |
setNumMinorTicks(int numMinorTicks)
The number of minor tick lines.
|
Gauge |
setPivotPoint(Point pivotPoint)
The pivot point of the needle.
|
Gauge |
setPivotPointHeight(int pivotPointHeight)
Default height of the
pivotPoint if no specific
pivotPoint is specified. |
Gauge |
setPivotPointHeight(java.lang.String pivotPointHeight)
Default height of the
pivotPoint if no specific
pivotPoint is specified. |
Gauge |
setSectorColors(java.lang.String... sectorColors)
Array of preset fill colors used by the default implementation of
getDefaultFillColor() to initialize the fill color of new
sectors. |
void |
setSectorFillColor(int sectorIndex,
java.lang.String fillColor)
Sets the fill color of the sector at
sectorIndex . |
Gauge |
setSectors(GaugeSector... sectors)
The GaugeSectors contained in this Gauge.
|
Gauge |
setValue(double value)
The current value on the dial.
|
Gauge |
setValue(float value)
Deprecated.
|
void |
setValueRange(double minValue,
double maxValue)
Sets the minimum and maximum dial values, rescaling all sectors and the dial value.
|
addDrawEndHandler, 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, getZoomLevel, getZoomLevelAsDouble, refreshNow, removeGradient, rotate, scaleAndCenter, scaleAndCenterBezier, setAutoChildProperties, setCanDragScroll, setDefaultProperties, setDrawingHeight, setDrawingType, setDrawingWidth, setDrawItems, setEditProxyConstructor, setGradients, setLogicalStructure, setRotation, setRotation, setTranslate, setZoomLevel, setZoomLevel, zoom, zoom
addChild, 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, 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, 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, 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, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, 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, 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, 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, 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, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop
addDrawHandler, 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, toString
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
public Gauge()
public Gauge(com.google.gwt.core.client.JavaScriptObject jsObj)
public static Gauge getOrCreateRef(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. For usage tips on this
param, see SGWTProperties
.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. For usage tips on this
param, see SGWTProperties
.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
public Gauge setBorderColor(java.lang.String borderColor) throws java.lang.IllegalStateException
borderColor
- New borderColor value. Default value is "#333333"Gauge
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawItem.setLineColor(java.lang.String)
,
CSSColor
public java.lang.String getBorderColor()
DrawItem.getLineColor()
,
CSSColor
public Gauge setBorderWidth(int borderWidth) throws java.lang.IllegalStateException
borderWidth
- New borderWidth value. Default value is 1Gauge
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawItem.setLineWidth(int)
public int getBorderWidth()
DrawItem.getLineWidth()
public Gauge setDialRadius(float dialRadius)
GwtFloatVsDouble
dialRadius
- Radius in pixels of the dial. Default value is 150Gauge
instance, for chaining setter callspublic float getDialRadius()
GwtFloatVsDouble
public Gauge setDialRadius(double dialRadius)
dialRadius
- Radius in pixels of the dial. Default value is 150Gauge
instance, for chaining setter callspublic double getDialRadiusAsDouble()
public Gauge setDrawnClockwise(boolean drawnClockwise)
drawnClockwise
property and redraws the gauge.drawnClockwise
- whether the sectors are drawn clockwise. Default value is trueGauge
instance, for chaining setter callspublic boolean getDrawnClockwise()
public Gauge setFontSize(int fontSize) throws java.lang.IllegalStateException
fontSize
- New fontSize value. Default value is 11Gauge
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawLabel.setFontSize(int)
public int getFontSize()
DrawLabel.getFontSize()
public Gauge setLabelPrefix(java.lang.String labelPrefix)
labelPrefix
property and re-creates all sector labels.labelPrefix
- the new label prefix. Default value is ""Gauge
instance, for chaining setter callsformatLabelContents(float)
public java.lang.String getLabelPrefix()
formatLabelContents(float)
public Gauge setLabelSuffix(java.lang.String labelSuffix)
labelSuffix
property and re-creates all sector labels.labelSuffix
- the new label suffix. Default value is "%"Gauge
instance, for chaining setter callsformatLabelContents(float)
public java.lang.String getLabelSuffix()
formatLabelContents(float)
public Gauge setMaxValue(float maxValue)
GwtFloatVsDouble
See setValueRange
to set both minValue and maxValue together.
maxValue
- the new maximum dial value. Must be at least 1 greater than the minimum dial value. If maxValue
is not at
least 1 greater than the minimum value, then it is set to 1 + minValue
. Default value is 100Gauge
instance, for chaining setter callspublic float getMaxValue()
GwtFloatVsDouble
public Gauge setMaxValue(double maxValue)
See setValueRange
to set both minValue and maxValue together.
maxValue
- the new maximum dial value. Must be at least 1 greater than the minimum dial value. If maxValue
is not at
least 1 greater than the minimum value, then it is set to 1 + minValue
. Default value is 100Gauge
instance, for chaining setter callspublic double getMaxValueAsDouble()
public Gauge setMinValue(float minValue)
GwtFloatVsDouble
See setValueRange
to set both minValue and maxValue together.
minValue
- the new minimum dial value. Must be at least 1 less than the maximum dial value. If minValue
is not at
least 1 less than the maximum value, then it is set to maxValue - 1
. Default value is 0Gauge
instance, for chaining setter callspublic float getMinValue()
GwtFloatVsDouble
public Gauge setMinValue(double minValue)
See setValueRange
to set both minValue and maxValue together.
minValue
- the new minimum dial value. Must be at least 1 less than the maximum dial value. If minValue
is not at
least 1 less than the maximum value, then it is set to maxValue - 1
. Default value is 0Gauge
instance, for chaining setter callspublic double getMinValueAsDouble()
public DrawItem getNeedle() throws java.lang.IllegalStateException
This component is an AutoChild named "needle". For an overview of how to use and
configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public Gauge setNumMajorTicks(int numMajorTicks)
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.
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 0Gauge
instance, for chaining setter callspublic int getNumMajorTicks()
public Gauge setNumMinorTicks(int numMinorTicks)
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.
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 0Gauge
instance, for chaining setter callspublic int getNumMinorTicks()
public Gauge setPivotPoint(Point pivotPoint)
The pivot point is set by default by choosing 1/2 of width and 70% of height of the Gauge. See pivotPointHeight
pivotPoint
- The pivot point of the needle. Default value is nullGauge
instance, for chaining setter callspublic Point getPivotPoint()
public Gauge setPivotPointHeight(int pivotPointHeight) throws java.lang.IllegalStateException
pivotPoint
if no specific
pivotPoint is specified. Can be specified as a numeric pixel value, or a String percentage value.
pivotPointHeight
- New pivotPointHeight value. Default value is "70%"Gauge
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getPivotPointHeight()
pivotPoint
if no specific
pivotPoint is specified. Can be specified as a numeric pixel value, or a String percentage value.
public Gauge setPivotPointHeight(java.lang.String pivotPointHeight) throws java.lang.IllegalStateException
pivotPoint
if no specific
pivotPoint is specified. Can be specified as a numeric pixel value, or a String percentage value.
pivotPointHeight
- New pivotPointHeight value. Default value is "70%"Gauge
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getPivotPointHeightAsString()
pivotPoint
if no specific
pivotPoint is specified. Can be specified as a numeric pixel value, or a String percentage value.
public DrawItem getPivotShape() throws java.lang.IllegalStateException
pivotPoint
(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
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public Gauge setSectorColors(java.lang.String... sectorColors) throws java.lang.IllegalStateException
getDefaultFillColor()
to initialize the fill color of new
sectors. The default array of colors is:
#AFFFFF | #008080 | #AAAFFF | #FF0000 | #FFCC99 | #800080 |
sectorColors
- New sectorColors value. Default value is [ "#AFFFFF", "#008080", "#AAAFFF", "#FF0000", "#FFCC99", "#800080" ]Gauge
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawItem.setFillColor(java.lang.String)
,
CSSColor
public java.lang.String[] getSectorColors()
getDefaultFillColor()
to initialize the fill color of new
sectors. The default array of colors is:
#AFFFFF | #008080 | #AAAFFF | #FF0000 | #FFCC99 | #800080 |
DrawItem.getFillColor()
,
CSSColor
public Gauge setSectors(GaugeSector... sectors)
sectors
- the sectors to show on the gauge. Default value is nullGauge
instance, for chaining setter callspublic GaugeSector[] getSectors()
public DrawSector getSectorShape()
Using AutoChildren
for details.
MultiAutoChild representing the sectors drawn to show different segments of the gauge.
public DrawItem getTickLine()
Using AutoChildren
for details.
MultiAutoChild representing the tick marks drawn along the circumference of the gauge. Default is to use DrawLine.
public Gauge setValue(float value)
GwtFloatVsDouble
public float getValue()
GwtFloatVsDouble
public Gauge setValue(double value)
public double getValueAsDouble()
public DrawLabel getValueLabel()
Using AutoChildren
for details.
MultiAutoChild representing the labels used to different data points on the gauge.
public int addSector(GaugeSector newSector)
newSector
- the new GaugeSector or the new sector's value. This is formatted with formatLabelContents()
to get its label.public int addSector(double newSector)
newSector
- the new GaugeSector or the new sector's value. This is formatted with formatLabelContents()
to get its label.public int getNumSectors()
public java.lang.String getSectorFillColor(int sectorIndex)
sectorIndex
.sectorIndex
- index of the target sector.sectorIndex
.
See CSSColor
DrawItem.getFillColor()
public java.lang.String getSectorLabelContents(int sectorIndex)
sectorIndex
- index of the target sector.public float getSectorValue(int sectorIndex)
GwtFloatVsDouble
sectorIndex
.sectorIndex
- index of the target sector.sectorIndex
.public double getSectorValueAsDouble(int sectorIndex)
sectorIndex
.sectorIndex
- index of the target sector.sectorIndex
.public void reformatLabelContents()
formatLabelContents()
to get the label contents for each
corresponding value and repositioning the label.public void removeSector(int 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.
sectorIndex
- the index of the sector to remove.public void setSectorFillColor(int sectorIndex, java.lang.String fillColor)
sectorIndex
.sectorIndex
- index of the target sector.fillColor
- the new fill color.
See CSSColor
DrawItem.setFillColor(java.lang.String)
public void setValueRange(double minValue, double maxValue)
minValue
- the new minimum dial valuemaxValue
- the new maximum dial valuepublic static void setDefaultProperties(Gauge gaugeProperties)
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.
gaugeProperties
- properties that should be used as new defaults when instances of this class are createdSGWTProperties
protected java.lang.String formatLabelContents(float value)
DrawLabel
. The default implementation prepends
labelPrefix
and appends
labelSuffix
to
value
.
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
.
value
- the value to format.protected java.lang.String getDefaultFillColor(int sectorIndex)
sectorIndex
.
The default implementation cycles through sectorColors
using modular arithmetic.
Note: This is an override point.
sectorIndex
- index of the target sector.public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.drawing.GaugeLogicalStructure s)
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class DrawPane