Package com.microstrategy.web.app.gui
Class ScrollerImpl
- java.lang.Object
-
- com.microstrategy.web.app.gui.AbstractGuiElement
-
- com.microstrategy.web.app.gui.ScrollerImpl
-
- All Implemented Interfaces:
GuiElement,Scroller
public class ScrollerImpl extends AbstractGuiElement implements Scroller
ScrollerImpl abstraction it renders an HMTL output for a Scroller Gui Element.- Since:
- MicroStrategy Web 8.1.0
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.gui.AbstractGuiElement
_appContext, _name, _webComponent
-
Fields inherited from interface com.microstrategy.web.app.gui.Scroller
HORIZONTAL_SCROLLER, SCROLLER_BACKGROUND, SCROLLER_CONTAINER, SCROLLER_CONTAINER_BAR, SCROLLER_CONTAINER_BAR_GHOST, SCROLLER_END, SCROLLER_SELECTION, SCROLLER_SINGLE_TICKER, SCROLLER_START, SCROLLER_STYLE_DATA, SCROLLER_STYLE_DATA_RANGE, SCROLLER_STYLE_INDEX, SCROLLER_STYLE_PERCENT, VERTICAL_SCROLLER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(java.lang.String key, java.lang.String value)Adds a new property set to the scroller bone associated to the scroller Gui Element intance.JsonGeneratorgetBonePropertiesGenerator()returns the bone properties generator.protected ClientSideHelpergetClientSideHelper()Returns the ClientSideHelper instance associated with the scroller.java.lang.StringgetCmdid()Set client-side property 'cmdid'java.lang.StringgetCSSName(int section)java.util.ListgetDataLabels()Returns a read/write List that can be used to specify the tooltip text for each of the scroller's data points.java.util.ListgetDataValues()Returns a read/write List that can be used to specify the data values for each of the scroller's data points.intgetEndUnit()Returns the end value of the scrollbar within the scroller, in relation to the maxUnits property.intgetIncrement()Gets the increment factor to be used for the scroll.intgetMaxUnits()Returns the max absolute units the scroller represents.java.lang.StringgetScriptClass()Returns the script class that serves as the bone for the scroller.intgetSize()intgetStartBase()Return the first unit on the scroller when the style isScroller.SCROLLER_STYLE_INDEX; If the scroller is 0-based scroller, set this to 0; if the scroller is 1-based scroller, set this to 1.intgetStartUnit()Returns the start value of the scrollbar within the scroller, in relation to the maxUnits property.intgetStyle()Returns the current style.intgetType()booleanisSupportIncludeState()Set flag to indicate if this scroller support toggleing its selection area between center and sides.MarkupOutputrenderElement()render the gui element in a MarkupOutput objectvoidrenderScroller(MarkupOutput out, int type)voidsetCmdid(java.lang.String cmdid)voidsetDataLabels(java.util.List dataLabels)voidsetEndUnit(int endUnit)Sets the end value of the scrollbar within the scroller, in relation to the maxUnits property.voidsetIncrement(int increment)Sets the increment factor to be used for the scroll.voidsetIsResizable(boolean isResizable)voidsetMaxUnits(int maxUnits)Sets the max absolute units the scroller represents.voidsetMaxWindowSize(int windowSize)voidsetScriptClass(java.lang.String _scriptClass)Sets the script class that serves as the bone for the scroller.voidsetSize(int size)Sets the size of the scroller in pixelsvoidsetStartBase(int startPoint)Set the first unit on teh scroller when the style isScroller.SCROLLER_STYLE_INDEXIf the scroller is 0-based scroller, set this to 0; if the scroller is 1-based scroller, set this to 1.voidsetStartUnit(int startUnit)Sets the start value of the scrollbar within the scroller, in relation to the maxUnits property.voidsetStyle(int style)Sets the new style.voidsetSupportIncludeState(boolean supportIncludeState)voidsetType(int type)Sets the type of scroller to display.-
Methods inherited from class com.microstrategy.web.app.gui.AbstractGuiElement
getAppContext, getDescriptor, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getFeatures, getMessages, getName, getTagsFactory, getUseIFrame, getWebComponent, isDhtml, isIFrameEnabled, newHiddenInputBuilder, newNamespaceEncoder, newURIBuilder, renderElement, setAppContext, setExtraInput, setExtraUrl, setName, setUseIFrame, setWebComponent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.app.gui.GuiElement
getAppContext, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getFeatures, getMessages, getName, getUseIFrame, getWebComponent, renderElement, setAppContext, setExtraInput, setExtraUrl, setName, setUseIFrame, setWebComponent
-
-
-
-
Method Detail
-
isSupportIncludeState
public boolean isSupportIncludeState()
Description copied from interface:ScrollerSet flag to indicate if this scroller support toggleing its selection area between center and sides. This is to support Metric Condition selector's include/exclude selection mode.- Specified by:
isSupportIncludeStatein interfaceScroller- Returns:
-
setSupportIncludeState
public void setSupportIncludeState(boolean supportIncludeState)
- Specified by:
setSupportIncludeStatein interfaceScroller
-
getCmdid
public java.lang.String getCmdid()
Description copied from interface:ScrollerSet client-side property 'cmdid'
-
renderElement
public MarkupOutput renderElement()
Description copied from class:AbstractGuiElementrender the gui element in a MarkupOutput object- Specified by:
renderElementin interfaceGuiElement- Specified by:
renderElementin classAbstractGuiElement- Returns:
- the
MarkupOutputobject
-
setType
public void setType(int type)
Description copied from interface:ScrollerSets the type of scroller to display.- Specified by:
setTypein interfaceScroller- Parameters:
type- int value asScroller.HORIZONTAL_SCROLLERto represent a horizontal scroller, orScroller.VERTICAL_SCROLLERto represent a vertical scroller
-
getType
public int getType()
- Specified by:
getTypein interfaceScroller- Returns:
- int value with the type of scroller to display.
Possible return values:
Scroller.HORIZONTAL_SCROLLERto represent a horizontal scroller
Scroller.VERTICAL_SCROLLERto represent a vertical scroller.
-
renderScroller
public void renderScroller(MarkupOutput out, int type)
-
getCSSName
public java.lang.String getCSSName(int section)
- Parameters:
section- int Scroller's section. Possible values:- Returns:
- String value with the css class to use for the different sections of the scroller.
Sample values include
Scroller.SCROLLER_START,Scroller.SCROLLER_END,Scroller.SCROLLER_SELECTION,Scroller.SCROLLER_CONTAINER
-
setIncrement
public void setIncrement(int increment)
Description copied from interface:ScrollerSets the increment factor to be used for the scroll. If 20 max units were specified for the scroller and the increment factor defined is 5, then the values will range from 0 to 100, every 5 units.- Specified by:
setIncrementin interfaceScroller- Parameters:
increment- int
-
getIncrement
public int getIncrement()
Description copied from interface:ScrollerGets the increment factor to be used for the scroll. If 20 max units were specified for the scroller and the increment factor defined is 5, then the values will range from 0 to 100, every 5 units.- Specified by:
getIncrementin interfaceScroller- Returns:
- int
-
setMaxUnits
public void setMaxUnits(int maxUnits)
Description copied from interface:ScrollerSets the max absolute units the scroller represents.- Specified by:
setMaxUnitsin interfaceScroller- Parameters:
maxUnits- int
-
getMaxUnits
public int getMaxUnits()
Description copied from interface:ScrollerReturns the max absolute units the scroller represents.- Specified by:
getMaxUnitsin interfaceScroller- Returns:
- int
-
setStartUnit
public void setStartUnit(int startUnit)
Description copied from interface:ScrollerSets the start value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
setStartUnitin interfaceScroller- Parameters:
startUnit- int
-
getStartUnit
public int getStartUnit()
Description copied from interface:ScrollerReturns the start value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
getStartUnitin interfaceScroller- Returns:
- int
-
setEndUnit
public void setEndUnit(int endUnit)
Description copied from interface:ScrollerSets the end value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
setEndUnitin interfaceScroller- Parameters:
endUnit- int
-
getEndUnit
public int getEndUnit()
Description copied from interface:ScrollerReturns the end value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
getEndUnitin interfaceScroller- Returns:
- int
-
addProperty
public void addProperty(java.lang.String key, java.lang.String value)Description copied from interface:ScrollerAdds a new property set to the scroller bone associated to the scroller Gui Element intance.- Specified by:
addPropertyin interfaceScroller- Parameters:
key- Stringvalue- String
-
setSize
public void setSize(int size)
Description copied from interface:ScrollerSets the size of the scroller in pixels
-
getDataLabels
public java.util.List getDataLabels()
Description copied from interface:ScrollerReturns a read/write List that can be used to specify the tooltip text for each of the scroller's data points.- Specified by:
getDataLabelsin interfaceScroller- Returns:
- List
-
setDataLabels
public void setDataLabels(java.util.List dataLabels)
- Specified by:
setDataLabelsin interfaceScroller
-
getDataValues
public java.util.List getDataValues()
Description copied from interface:ScrollerReturns a read/write List that can be used to specify the data values for each of the scroller's data points. One possible usage of this list could be to generate event arguments corresponding to the selections.- Specified by:
getDataValuesin interfaceScroller- Returns:
- List
-
getClientSideHelper
protected ClientSideHelper getClientSideHelper()
Returns the ClientSideHelper instance associated with the scroller. This ClientSideHelper is used by the scroller to register the scroller bone.- Returns:
- ClientSideHelper
-
getBonePropertiesGenerator
public JsonGenerator getBonePropertiesGenerator()
Description copied from interface:Scrollerreturns the bone properties generator.- Specified by:
getBonePropertiesGeneratorin interfaceScroller- Returns:
JsonGenerator
-
setScriptClass
public void setScriptClass(java.lang.String _scriptClass)
Description copied from interface:ScrollerSets the script class that serves as the bone for the scroller.- Specified by:
setScriptClassin interfaceScroller- Parameters:
_scriptClass- script class.
-
getScriptClass
public java.lang.String getScriptClass()
Description copied from interface:ScrollerReturns the script class that serves as the bone for the scroller.- Specified by:
getScriptClassin interfaceScroller- Returns:
- String.
-
setMaxWindowSize
public void setMaxWindowSize(int windowSize)
- Specified by:
setMaxWindowSizein interfaceScroller
-
setIsResizable
public void setIsResizable(boolean isResizable)
- Specified by:
setIsResizablein interfaceScroller
-
getStyle
public int getStyle()
Description copied from interface:ScrollerReturns the current style. Value styles areScroller.SCROLLER_STYLE_DATA,Scroller.SCROLLER_STYLE_DATA_RANGE,Scroller.SCROLLER_STYLE_INDEXandScroller.SCROLLER_STYLE_PERCENT
-
setStyle
public void setStyle(int style)
Description copied from interface:ScrollerSets the new style. Value styles areScroller.SCROLLER_STYLE_DATA,Scroller.SCROLLER_STYLE_DATA_RANGE,Scroller.SCROLLER_STYLE_INDEXandScroller.SCROLLER_STYLE_PERCENT
-
getStartBase
public int getStartBase()
Description copied from interface:ScrollerReturn the first unit on the scroller when the style isScroller.SCROLLER_STYLE_INDEX; If the scroller is 0-based scroller, set this to 0; if the scroller is 1-based scroller, set this to 1. If other cases, just set the first number which would appear at the left/lower end of the scroller. Default will be 1-based index.- Specified by:
getStartBasein interfaceScroller- Returns:
- The first unit.
-
setStartBase
public void setStartBase(int startPoint) throws java.lang.IllegalArgumentExceptionDescription copied from interface:ScrollerSet the first unit on teh scroller when the style isScroller.SCROLLER_STYLE_INDEXIf the scroller is 0-based scroller, set this to 0; if the scroller is 1-based scroller, set this to 1. If other cases, just set the first number which would appear at the left/lower end of the scroller. Default will be 1-based index.- Specified by:
setStartBasein interfaceScroller- Parameters:
startPoint- The new number for the start base of the scroller- Throws:
java.lang.IllegalArgumentException- Thrown when the scroller is not in styleScroller.SCROLLER_STYLE_INDEX.
-
-