public class Gauge extends DrawPane
NOTE: you must load the
Drawing Optional Module
before you can use Gauge.
config, configOnly, id, isElementSet, nativeObject, scClassName
Constructor and Description |
---|
Gauge() |
Gauge(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
int |
addSector(double value)
Adds a new sector.
|
int |
addSector(float value)
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()
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() |
float |
getMaxValue()
The maximum dial value.
|
float |
getMinValue()
The minimum dial 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.
|
java.lang.String[] |
getSectorColors()
Array of preset fill colors used by the default implementation of
Gauge.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.
|
float |
getSectorValue(int sectorIndex)
Gets the value of the sector at
sectorIndex . |
double |
getSectorValueAsDouble(int sectorIndex)
Gets the value of the sector at
sectorIndex . |
float |
getValue()
The current value on the dial.
|
protected void |
onInit() |
void |
reformatLabelContents()
Resets the contents of all labels.
|
void |
removeSector(int sectorIndex)
Removes the sector at sectorIndex.
|
void |
setBorderColor(java.lang.String borderColor)
Color for gauge sector borders.
|
void |
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.
|
void |
setDialRadius(float dialRadius)
Radius in pixels of the dial.
|
void |
setDrawnClockwise(boolean drawnClockwise)
Whether the sectors are drawn clockwise, and increasing the value causes the needle to move clockwise.
|
void |
setFontSize(int fontSize)
Font size of sector labels.
|
void |
setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj) |
void |
setLabelPrefix(java.lang.String labelPrefix)
The label prefix.
|
void |
setLabelSuffix(java.lang.String labelSuffix)
The label suffix.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.drawing.GaugeLogicalStructure s) |
void |
setMaxValue(float maxValue)
The maximum dial value.
|
void |
setMinValue(float minValue)
The minimum dial value.
|
void |
setNumMajorTicks(int numMajorTicks)
The number of major tick lines.
|
void |
setNumMinorTicks(int numMinorTicks)
The number of minor tick lines.
|
void |
setSectorColors(java.lang.String... sectorColors)
Array of preset fill colors used by the default implementation of
Gauge.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 . |
void |
setSectors(GaugeSector... sectors)
The GaugeSectors contained in this Gauge.
|
void |
setValue(float value)
The current value on the dial.
|
addDrawItem, createLinearGradient, createRadialGradient, createSimpleGradient, destroyItems, erase, getCanDrag, getDataURL, getDataURL, getDrawItems, getPrintHTML, getRotation, getSvgString, getTranslate, getZoomLevel, rotate, setCanDrag, setDefaultProperties, setDrawItems, setLogicalStructure, setRotation, setTranslate, setZoomLevel, zoom, zoom
addChild, addChild, addChild, addChild, addChild, 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, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setCanvasItem, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
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 Gauge()
public Gauge(com.google.gwt.core.client.JavaScriptObject jsObj)
public static Gauge getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
setJavaScriptObject
in class DrawPane
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()
public void setBorderColor(java.lang.String borderColor) throws java.lang.IllegalStateException
borderColor
- . See CSSColor
. Default value is "#333333"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawItem.setLineColor(java.lang.String)
public java.lang.String getBorderColor()
CSSColor
DrawItem.getLineColor()
public void setBorderWidth(int borderWidth) throws java.lang.IllegalStateException
borderWidth
- borderWidth Default value is 1java.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawItem.setLineWidth(int)
public int getBorderWidth()
DrawItem.getLineWidth()
public void setDialRadius(float dialRadius) throws java.lang.IllegalStateException
dialRadius
- dialRadius Default value is 150java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic float getDialRadius()
public void setDrawnClockwise(boolean drawnClockwise)
drawnClockwise
property and redraws the gauge.drawnClockwise
- whether the sectors are drawn clockwise.. Default value is truepublic boolean getDrawnClockwise()
public void setFontSize(int fontSize) throws java.lang.IllegalStateException
fontSize
- fontSize Default value is 11java.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawLabel.setFontSize(int)
public int getFontSize()
DrawLabel.getFontSize()
public void setLabelPrefix(java.lang.String labelPrefix)
labelPrefix
property and re-creates all sector labels.labelPrefix
- the new label prefix.. See String
. Default value is ""formatLabelContents(float)
public java.lang.String getLabelPrefix()
String
formatLabelContents(float)
public void setLabelSuffix(java.lang.String labelSuffix)
labelSuffix
property and re-creates all sector labels.labelSuffix
- the new label suffix.. See String
. Default value is "%"formatLabelContents(float)
public java.lang.String getLabelSuffix()
String
formatLabelContents(float)
public void setMaxValue(float maxValue)
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 100public float getMaxValue()
public void setMinValue(float minValue)
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 0public float getMinValue()
public void 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 0public int getNumMajorTicks()
public void 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 0public int getNumMinorTicks()
public Point getPivotPoint() 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.public void setSectorColors(java.lang.String... sectorColors) throws java.lang.IllegalStateException
Gauge.getDefaultFillColor
to initialize the fill color of
new sectors. The default array of colors is:
#AFFFFF | #008080 | #AAAFFF | #FF0000 | #FFCC99 | #800080 |
sectorColors
- . See CSSColor
. Default value is [ "#AFFFFF", "#008080", "#AAAFFF", "#FF0000", "#FFCC99", "#800080" ]java.lang.IllegalStateException
- this property cannot be changed after the component has been createdDrawItem.setFillColor(java.lang.String)
public java.lang.String[] getSectorColors()
Gauge.getDefaultFillColor
to initialize the fill color of
new sectors. The default array of colors is:
#AFFFFF | #008080 | #AAAFFF | #FF0000 | #FFCC99 | #800080 |
CSSColor
DrawItem.getFillColor()
public void setSectors(GaugeSector... sectors)
sectors
- the sectors to show on the gauge.. Default value is nullpublic GaugeSector[] getSectors()
public void setValue(float value)
public float getValue()
public int addSector(float value)
value
- the new sector's value. This is formatted with Gauge.formatLabelContents
to get its label.public int addSector(double value)
value
- the new sector's value. This is formatted with Gauge.formatLabelContents
to get its label.public int getNumSectors()
public java.lang.String getSectorFillColor(int sectorIndex)
sectorIndex
.sectorIndex
- index of the target sector.sectorIndex
.DrawItem.getFillColor()
public java.lang.String getSectorLabelContents(int sectorIndex)
sectorIndex
- index of the target sector.public float getSectorValue(int sectorIndex)
sectorIndex
.sectorIndex
- index of the target sector.sectorIndex
.public double getSectorValueAsDouble(int sectorIndex)
sectorIndex
.sectorIndex
- index of the target sector.sectorIndex
.public void reformatLabelContents()
Gauge.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 static void setDefaultProperties(Gauge gaugeProperties)
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.
gaugeProperties
- properties that should be used as new defaults when instances of this class are createdprotected 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)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class DrawPane