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 void
addProperty(java.lang.String key, java.lang.String value)
Adds a new property set to the scroller bone associated to the scroller Gui Element intance.JsonGenerator
getBonePropertiesGenerator()
returns the bone properties generator.protected ClientSideHelper
getClientSideHelper()
Returns the ClientSideHelper instance associated with the scroller.java.lang.String
getCmdid()
Set client-side property 'cmdid'java.lang.String
getCSSName(int section)
java.util.List
getDataLabels()
Returns a read/write List that can be used to specify the tooltip text for each of the scroller's data points.java.util.List
getDataValues()
Returns a read/write List that can be used to specify the data values for each of the scroller's data points.int
getEndUnit()
Returns the end value of the scrollbar within the scroller, in relation to the maxUnits property.int
getIncrement()
Gets the increment factor to be used for the scroll.int
getMaxUnits()
Returns the max absolute units the scroller represents.java.lang.String
getScriptClass()
Returns the script class that serves as the bone for the scroller.int
getSize()
int
getStartBase()
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.int
getStartUnit()
Returns the start value of the scrollbar within the scroller, in relation to the maxUnits property.int
getStyle()
Returns the current style.int
getType()
boolean
isSupportIncludeState()
Set flag to indicate if this scroller support toggleing its selection area between center and sides.MarkupOutput
renderElement()
render the gui element in a MarkupOutput objectvoid
renderScroller(MarkupOutput out, int type)
void
setCmdid(java.lang.String cmdid)
void
setDataLabels(java.util.List dataLabels)
void
setEndUnit(int endUnit)
Sets the end value of the scrollbar within the scroller, in relation to the maxUnits property.void
setIncrement(int increment)
Sets the increment factor to be used for the scroll.void
setIsResizable(boolean isResizable)
void
setMaxUnits(int maxUnits)
Sets the max absolute units the scroller represents.void
setMaxWindowSize(int windowSize)
void
setScriptClass(java.lang.String _scriptClass)
Sets the script class that serves as the bone for the scroller.void
setSize(int size)
Sets the size of the scroller in pixelsvoid
setStartBase(int startPoint)
Set the first unit on teh 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.void
setStartUnit(int startUnit)
Sets the start value of the scrollbar within the scroller, in relation to the maxUnits property.void
setStyle(int style)
Sets the new style.void
setSupportIncludeState(boolean supportIncludeState)
void
setType(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:Scroller
Set 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:
isSupportIncludeState
in interfaceScroller
- Returns:
-
setSupportIncludeState
public void setSupportIncludeState(boolean supportIncludeState)
- Specified by:
setSupportIncludeState
in interfaceScroller
-
getCmdid
public java.lang.String getCmdid()
Description copied from interface:Scroller
Set client-side property 'cmdid'
-
renderElement
public MarkupOutput renderElement()
Description copied from class:AbstractGuiElement
render the gui element in a MarkupOutput object- Specified by:
renderElement
in interfaceGuiElement
- Specified by:
renderElement
in classAbstractGuiElement
- Returns:
- the
MarkupOutput
object
-
setType
public void setType(int type)
Description copied from interface:Scroller
Sets the type of scroller to display.- Specified by:
setType
in interfaceScroller
- Parameters:
type
- int value asScroller.HORIZONTAL_SCROLLER
to represent a horizontal scroller, orScroller.VERTICAL_SCROLLER
to represent a vertical scroller
-
getType
public int getType()
- Specified by:
getType
in interfaceScroller
- Returns:
- int value with the type of scroller to display.
Possible return values:
Scroller.HORIZONTAL_SCROLLER
to represent a horizontal scroller
Scroller.VERTICAL_SCROLLER
to 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:Scroller
Sets 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:
setIncrement
in interfaceScroller
- Parameters:
increment
- int
-
getIncrement
public int getIncrement()
Description copied from interface:Scroller
Gets 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:
getIncrement
in interfaceScroller
- Returns:
- int
-
setMaxUnits
public void setMaxUnits(int maxUnits)
Description copied from interface:Scroller
Sets the max absolute units the scroller represents.- Specified by:
setMaxUnits
in interfaceScroller
- Parameters:
maxUnits
- int
-
getMaxUnits
public int getMaxUnits()
Description copied from interface:Scroller
Returns the max absolute units the scroller represents.- Specified by:
getMaxUnits
in interfaceScroller
- Returns:
- int
-
setStartUnit
public void setStartUnit(int startUnit)
Description copied from interface:Scroller
Sets the start value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
setStartUnit
in interfaceScroller
- Parameters:
startUnit
- int
-
getStartUnit
public int getStartUnit()
Description copied from interface:Scroller
Returns the start value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
getStartUnit
in interfaceScroller
- Returns:
- int
-
setEndUnit
public void setEndUnit(int endUnit)
Description copied from interface:Scroller
Sets the end value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
setEndUnit
in interfaceScroller
- Parameters:
endUnit
- int
-
getEndUnit
public int getEndUnit()
Description copied from interface:Scroller
Returns the end value of the scrollbar within the scroller, in relation to the maxUnits property.- Specified by:
getEndUnit
in interfaceScroller
- Returns:
- int
-
addProperty
public void addProperty(java.lang.String key, java.lang.String value)
Description copied from interface:Scroller
Adds a new property set to the scroller bone associated to the scroller Gui Element intance.- Specified by:
addProperty
in interfaceScroller
- Parameters:
key
- Stringvalue
- String
-
setSize
public void setSize(int size)
Description copied from interface:Scroller
Sets the size of the scroller in pixels
-
getDataLabels
public java.util.List getDataLabels()
Description copied from interface:Scroller
Returns a read/write List that can be used to specify the tooltip text for each of the scroller's data points.- Specified by:
getDataLabels
in interfaceScroller
- Returns:
- List
-
setDataLabels
public void setDataLabels(java.util.List dataLabels)
- Specified by:
setDataLabels
in interfaceScroller
-
getDataValues
public java.util.List getDataValues()
Description copied from interface:Scroller
Returns 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:
getDataValues
in 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:Scroller
returns the bone properties generator.- Specified by:
getBonePropertiesGenerator
in interfaceScroller
- Returns:
JsonGenerator
-
setScriptClass
public void setScriptClass(java.lang.String _scriptClass)
Description copied from interface:Scroller
Sets the script class that serves as the bone for the scroller.- Specified by:
setScriptClass
in interfaceScroller
- Parameters:
_scriptClass
- script class.
-
getScriptClass
public java.lang.String getScriptClass()
Description copied from interface:Scroller
Returns the script class that serves as the bone for the scroller.- Specified by:
getScriptClass
in interfaceScroller
- Returns:
- String.
-
setMaxWindowSize
public void setMaxWindowSize(int windowSize)
- Specified by:
setMaxWindowSize
in interfaceScroller
-
setIsResizable
public void setIsResizable(boolean isResizable)
- Specified by:
setIsResizable
in interfaceScroller
-
getStyle
public int getStyle()
Description copied from interface:Scroller
Returns the current style. Value styles areScroller.SCROLLER_STYLE_DATA
,Scroller.SCROLLER_STYLE_DATA_RANGE
,Scroller.SCROLLER_STYLE_INDEX
andScroller.SCROLLER_STYLE_PERCENT
-
setStyle
public void setStyle(int style)
Description copied from interface:Scroller
Sets the new style. Value styles areScroller.SCROLLER_STYLE_DATA
,Scroller.SCROLLER_STYLE_DATA_RANGE
,Scroller.SCROLLER_STYLE_INDEX
andScroller.SCROLLER_STYLE_PERCENT
-
getStartBase
public int getStartBase()
Description copied from interface:Scroller
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. 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:
getStartBase
in interfaceScroller
- Returns:
- The first unit.
-
setStartBase
public void setStartBase(int startPoint) throws java.lang.IllegalArgumentException
Description copied from interface:Scroller
Set the first unit on teh 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:
setStartBase
in 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
.
-
-