Package overit.geocall.basic.ui.control
Class JFCStyle
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.basic.ui.control.JFCStyle
- All Implemented Interfaces:
Serializable,org.jfree.chart.plot.DrawingSupplier,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Identified,Tool
- Direct Known Subclasses:
ChartStyle
@Component
public class JFCStyle
extends Component
implements Identified, org.jfree.chart.plot.DrawingSupplier
This class implements the object that manages the style (paints, shapes, strokes) of the elements that
compose the charts, like the
JFCPie and the JFCSerie. The JFCStyle must be inserted
as a child in the XML definition of the chart.
The possible formats for the definition of the colors are:
- RGB:
#rrggbb, for example#ff0000 - RGB with Alpha channel:
#aarrggbb, for example5000ff00 - Random color:
@{a-z}, for example@{qwerty}(random color extracted with the "qwerty" seed)
The possible values for the definition of the shapes are: square, circle, diamond, triangleup, triangledown, triangleleft, triangleright, rectanglehorizontal, rectanglevertical
The possible values for the definition of the end lines decorations are:
The possible values for the definition of the join lines decorations are:- See Also:
- GCApi:
- component
-
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
FieldsModifier and TypeFieldDescriptionprotected Identityprotected intprotected intprotected ListAttributeprotected RandomSequenceprotected doubleprotected intprotected ListAttributeprotected intprotected ListAttributeprotected intprotected ArrayListprotected static ShapeEmptyPolygonFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.ecs.ElementReturnsnullReturns theIdentityassociated to the componentReturns the next fillPaintin the sequenceReturns the next outlinePaintin the sequenceReturns the next outlineStrokeobject in the sequenceReturns the nextPaintin the sequenceReturns the nextShapeobject in the sequenceReturns the nextStrokeobject in the sequenceprotected static floatparseFloat(String s, float def) protected ShapeparseShape(String def) protected static StrokeparseStroke(String definition) voidreStart()Resets the stylevoidsetIdentity(Identity identity) Sets theIdentityto the componentprotected voidsetItemSize(int size) Sets the size of the items of theJFCSerielines chartvoidSets the string that defines the colors of the elements of the chart.voidSets the shapes of the elements of theJFCSerielines chart.voidsetSTROKES(String s) Sets the strokes for the elements of theJFCSerielines chart.Methods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, buildDisplayScript, buildSetupScript, 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, getint, getKEYLABEL, getLABEL, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isImportant, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setup, setValuesContainer, stringForJs, tabIndexer
-
Field Details
-
_identity
-
SHAPE_EMPTY
EmptyPolygon -
_paints
-
_paintIndex
protected int _paintIndex -
_symbolPaints
-
_symbolPaintIndex
protected int _symbolPaintIndex -
_shapes
-
_shapeIndex
protected int _shapeIndex -
_itemSize
protected int _itemSize -
_strokes
-
_strokeIndex
protected int _strokeIndex -
_seed
protected double _seed -
_rs
-
-
Constructor Details
-
JFCStyle
public JFCStyle()Main constructor, creates a new JFCStyle instance.
-
-
Method Details
-
getIdentity
Description copied from class:ComponentReturns theIdentityassociated to the component- Specified by:
getIdentityin interfaceIdentified- Overrides:
getIdentityin classComponent- Returns:
- The Identity of the user currently logged in the application
-
setIdentity
Description copied from class:ComponentSets theIdentityto the component- Specified by:
setIdentityin interfaceIdentified- Overrides:
setIdentityin classComponent- Parameters:
identity- The Identity that must be associated to the component
-
setPAINTS
Sets the string that defines the colors of the elements of the chart.- Parameters:
s- AListAttribute, in which the colors must be written using the format:color1 | color2 | color3 | .... In this way we set the colors of the elements of a serie for theJFCPieor the colors of different series for theJFCSerie. It is possible to obtain a gradient (shaded colors), using the format:color1a - color2a | color2a - color2b | color3a - color3b
For the color format seeJFCStyle
-
setSTROKES
Sets the strokes for the elements of theJFCSerielines chart.- Parameters:
s- AListAttribute, in whick the strokes must be written using the format:thickness,end line decoration,join lines decoration | thickness,end line decoration,join lines decoration | ....
For the possible values of the decorations seeJFCStyle(the default stroke format is1,1,1)
-
setSHAPES
Sets the shapes of the elements of theJFCSerielines chart.- Parameters:
s- AListAttribute, in which the shapes must be written using the format:shape,size,color | shape,size,color | ....
It is possible to omit some of the values defining a format; in that case it will be used the default value. The default value for the size is 6. If the color is omitted it will be used the one defined for the line which the shape belongs, that is set with thesetPAINTS(java.lang.String)method
For the possible values of the shape, and the color format, seeJFCStyle
-
setItemSize
protected void setItemSize(int size) Sets the size of the items of theJFCSerielines chart- Parameters:
size- An integer that defines the size. The default value for is 6.
-
parseStroke
-
parseShape
-
parseFloat
-
reStart
public void reStart()Resets the style -
getNextPaint
Returns the nextPaintin the sequence- Specified by:
getNextPaintin interfaceorg.jfree.chart.plot.DrawingSupplier- Returns:
- The next paint that will be used to draw the element of the chart
-
getNextStroke
Returns the nextStrokeobject in the sequence- Specified by:
getNextStrokein interfaceorg.jfree.chart.plot.DrawingSupplier- Returns:
- The next stroke that will be used to draw the element of the chart
-
getNextShape
Returns the nextShapeobject in the sequence- Specified by:
getNextShapein interfaceorg.jfree.chart.plot.DrawingSupplier- Returns:
- The next shape that will be used to draw the element of the chart
-
getNextFillPaint
Returns the next fillPaintin the sequence- Specified by:
getNextFillPaintin interfaceorg.jfree.chart.plot.DrawingSupplier- Returns:
- The next paint that will be used to fill the element of the chart
-
getNextOutlinePaint
Returns the next outlinePaintin the sequence- Specified by:
getNextOutlinePaintin interfaceorg.jfree.chart.plot.DrawingSupplier- Returns:
null
-
getNextOutlineStroke
Returns the next outlineStrokeobject in the sequence- Specified by:
getNextOutlineStrokein interfaceorg.jfree.chart.plot.DrawingSupplier- Returns:
null
-
getHtml
Returnsnull
-