Package overit.geocall.basic.ui.control
Class ChartBase
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.ChartBase
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Arrangeable,Badgeable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
- Direct Known Subclasses:
ChartPie,ChartSerie
The base UI component for Charts
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
Fields inherited from class overit.geocall.ui.Control
_blank, _cleaner, _dblink, _enabled, _ro, _title, altEventIconsList, altIcon, ariaDescription, ariaLabel, badge, badgeformat, FILTER_PREFIXES, LABEL_ATTRIBUTE, LABEL_IN_LINE_ATTRIBUTE, STATE_BLANK, STATE_NORMAL, STATE_RO, STATE_ROBLANKFields inherited from class overit.geocall.ui.Component
_basic, _childrenContainers, _currentId, _gridalign, _gridcols, _gridrows, _gridvalign, _iconElement, _id, _keylabel, _label, _layoutName, _name, _parentContainer, _registryName, _shortcut, _tabindex, _transformations, _valuesContainer, aliasField, BR, configHidden, configuredLabel, configuredLabelInLine, defaultHidden, ELEMENT_BR, ELEMENT_NULL, entityContainer, entityName, extendedField, fullHeight, important, labelInLine, layoutLabel, PIXEL_IMG, safeInlineService -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChartBase(Holder<ChartScriptBuilder> chartScriptBuilderHolder) Creates a new instance of ChartBase -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEventHandlers(ChartScriptBuilder scriptBuilder) protected abstract StringvoidEvery component can add a script to the StringBuilder, script executed when the component is created.protected voidprotected Holder<ChartScriptBuilder> protected ChartStyleorg.apache.ecs.ElementgetContentHtml(Object generationHandle, EntitySet es) Returns the html code that represents the active part of the component, i.e. the field and the validation scriptsorg.apache.ecs.ElementgetDescriptionHtml(Object generationHandle, EntitySet es) Returns the html code that represents the component description i.e. the formatted label of the fieldReturns the object to generate when the Arrangeable element is composed by more than one elementintGets the height of the chart.org.apache.ecs.ElementgetHiddenHtml(Object generationHandle, EntitySet es) Returns the hidden but active html part of an hidden componentorg.apache.ecs.ElementAbstract method that must be extended and returns the html code of the ComponentdoubleReturns the size of the legend items.overit.geocall.charts.ChartLegendBoxReturns the legend box.overit.geocall.charts.ChartFontReturns the font used for the legend.protected List<ChartMessage> protected org.apache.ecs.ElementgetMessages(List<ChartMessage> messages, EntitySet es) intgetWidth()Gets the width of the chart.booleanIndicates if the chart has a fixed size.booleanisLegend()Returns true if the legend is shown, false otherwise.voidSets theChartStyleused to draw the pie chart elementsvoidsetHeight(int height) Sets the height of the chart.voidSets the height of the chart.voidsetItemSize(double itemSize) Sets the size of the legend items.voidSets the size of the legend items.voidsetLegend(boolean legend) Sets if the legend is shown or not.voidSets if the legend is shown or not.voidsetLegendBox(overit.geocall.charts.ChartLegendBox legendBox) Sets the legend box.voidSets the legend box, it supports only the positionvoidsetLegendFont(overit.geocall.charts.ChartFont legendFont) Sets the font used for the legend.voidSets the font used for the legend.protected voidsetup()Setup the ComponentvoidsetWidth(int width) Sets the width of the chart.voidSets the width of the chart.Methods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getRO, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isImportant, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setConfiguredProperty, setDBLINK, setENABLED, setFUNCTION, setModelProperties, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, buildDisplayScript, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, getBASIC, getBoolean, getBoolean, getChildrenComponents, getChildrenContainers, getDefaultLabel, getDefaultLayoutLabel, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setValuesContainer, stringForJs, tabIndexerMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIcon
-
Constructor Details
-
ChartBase
Creates a new instance of ChartBase- Parameters:
chartScriptBuilderHolder- The holder for the chart script builder, it must create a new instance each time it is called.
-
-
Method Details
-
hasFixedSize
public boolean hasFixedSize()Indicates if the chart has a fixed size.- Returns:
- true if the chart has a fixed size, false otherwise
-
getWidth
public int getWidth()Gets the width of the chart.- Returns:
- The width of the chart.
-
setWidth
public void setWidth(int width) Sets the width of the chart.- Parameters:
width- The width of the chart.
-
setWIDTH
Sets the width of the chart.- Parameters:
s- The width of the chart.
-
getHeight
public int getHeight()Gets the height of the chart.- Returns:
- The height of the chart.
-
setHeight
public void setHeight(int height) Sets the height of the chart.- Parameters:
height- The height of the chart.
-
setHEIGHT
Sets the height of the chart.- Parameters:
s- The height of the chart.
-
getLegendFont
public overit.geocall.charts.ChartFont getLegendFont()Returns the font used for the legend.- Returns:
- The font used for the legend
-
setLegendFont
public void setLegendFont(overit.geocall.charts.ChartFont legendFont) Sets the font used for the legend.- Parameters:
legendFont- The font used for the legend
-
setLEGENDFONT
Sets the font used for the legend.- Parameters:
s- A string that defines the font, with the format:name,variant,dimension,color.
-
getLegendBox
public overit.geocall.charts.ChartLegendBox getLegendBox()Returns the legend box.- Returns:
- The legend box
-
setLegendBox
public void setLegendBox(overit.geocall.charts.ChartLegendBox legendBox) Sets the legend box.- Parameters:
legendBox- The legend box
-
setLEGENDBOX
Sets the legend box, it supports only the position- Parameters:
s- A string that defines the format.
It must be composed by a serie of strings, separated by the comma, with the following meaning:position,background color,border thickness,border color.
-
isLegend
public boolean isLegend()Returns true if the legend is shown, false otherwise.- Returns:
- True if the legend is shown, false otherwise
-
setLegend
public void setLegend(boolean legend) Sets if the legend is shown or not.- Parameters:
legend- True if the legend is shown, false otherwise
-
setLEGEND
Sets if the legend is shown or not.- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
If the string is not recognized as a boolean value, it will be used the default one, that istrue
-
getItemSize
public double getItemSize()Returns the size of the legend items.- Returns:
- The size of the legend items
-
setItemSize
public void setItemSize(double itemSize) Sets the size of the legend items.- Parameters:
itemSize- The size of the legend items
-
setITEMSIZE
Sets the size of the legend items.- Parameters:
s- The size of the legend items
-
getChartStyle
-
setChartStyle
Sets theChartStyleused to draw the pie chart elements- Parameters:
cs- The style used to draw the elements of the chart
-
setup
protected void setup()Description copied from class:ComponentSetup the Component -
getHtml
Description copied from class:ComponentAbstract method that must be extended and returns the html code of the Component -
getGenerationHandle
Description copied from interface:ArrangeableReturns the object to generate when the Arrangeable element is composed by more than one element- Specified by:
getGenerationHandlein interfaceArrangeable- Returns:
- The Object to generate
-
getDescriptionHtml
Description copied from interface:ArrangeableReturns the html code that represents the component description i.e. the formatted label of the field- Specified by:
getDescriptionHtmlin interfaceArrangeable- Parameters:
generationHandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the label of the field
-
getContentHtml
Description copied from interface:ArrangeableReturns the html code that represents the active part of the component, i.e. the field and the validation scripts- Specified by:
getContentHtmlin interfaceArrangeable- Parameters:
generationHandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the component
-
getMessages
-
getMessages
-
getHiddenHtml
Description copied from interface:ArrangeableReturns the hidden but active html part of an hidden component- Specified by:
getHiddenHtmlin interfaceArrangeable- Parameters:
generationHandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the hidden part of the component
-
getChartScriptBuilderHolder
-
buildSetupScript
Description copied from class:ComponentEvery component can add a script to the StringBuilder, script executed when the component is created.- Overrides:
buildSetupScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-
addEventHandlers
-
buildJsonChartConfig
-
chartChanged
protected void chartChanged()
-