|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.tilechart.TileChartModel
public class TileChartModel
A TileChartModel encapsulates most of a TileChart's visual display properties. This contrasts with the TileChart's data model, which determines the number and organization of data elements (tiles) and the use of a legend.
A TileChartModel contains TileChart-specific properties, common graph properties, and a collection of models that control the appearance of the graph's peripheral elements, such as its legend.
A TileChartModel does not allow null values for properties in its contained models. Passing a null parameter to the set method for a contained model property results in an IllegalArgumentException. Guaranteeing non-null properties for a contained model simplifies access to the display properties and ensures that the TileChart's display state is unambiguous.
Graph
,
GraphStyle
,
TileChart
Field Summary | |
---|---|
static ConstantCollection |
LAYOUT
|
static int |
LAYOUT_FLOW
LAYOUT_FLOW will decide on tile placement based on the sort order of the tiles, placing in a row until full then moving to the next row. |
static int |
LAYOUT_GEOGRAPHIC
PLACEMENT_GEOGRAPHIC will decide on tile placement based on the X and Y roles set on the data model. |
static int |
LAYOUT_STANDARD
LAYOUT_STANDARD will decide on tile placement based on the aspect ratio of the available space. |
static int |
LAYOUT_TOGGLE
LAYOUT_TOGGLE will decide on tile placement based on the id level of the tile. |
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
TileChartModel()
default constructor |
Method Summary | |
---|---|
void |
addHighlightModel(TileChartHighlightModel mod)
Deprecated. use rulesContext property on DataModel |
void |
apply(TileChartModel theOtherObject)
Utility method to convey properties contained in "theOtherObject" to this object. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this TileChartModel . |
int |
getColorPaletteType()
Returns how the values of the color varaible are mapped to a corresponding color representation. |
int |
getDataLabelLevel()
Returns the visible level number to be labeled with tile values. |
AdvancedTextStyle |
getDataLabelTextStyle()
Returns the text properties used to label the tiles for the category level specified by setDataLabelLevel. |
TileChartHighlightModel |
getDataTipHighlightModel()
Deprecated. use rulesContext property on DataModel |
int |
getDetailLevel()
Returns the current number of category levels to be shown. |
TileChartHighlightModel[] |
getHighlightModelList()
Deprecated. use rulesContext property on DataModel |
int |
getLayoutType()
Returns the current tile layout of the tile chart. |
LegendModel |
getLegendModel()
Returns the TileChart's legend model which is a compilataion of legend appearance preferences. |
java.util.ArrayList |
getLevLabels()
Fetches the array of menu entries. |
double |
getMaximumColorValue()
|
double |
getMinimumColorValue()
|
java.lang.String |
getOtherLabel()
Fetches the string used to label any composited, other tiles. |
double |
getOtherThreshold()
Fetches the percentage used to calculate 'other' tiles. |
LineStyle |
getOutlineLineStyle(int level)
Returns the line style of the tile outline for the specified category level. |
TextStyle |
getStatusLineTextStyle()
Returns the base TextStyle used for the status line |
AdvancedTextStyle |
getTileLabelStyle(int level)
Deprecated. Use getDataLabelLevel and getDataLabelTextStyle |
java.lang.String[] |
getWebLabels()
Fetches the array of menu entries. |
java.lang.String[] |
getWebLinks()
Fetches the array of web "action" URLs. |
int |
hashCode()
Computes the hash code for this TileChartModel . |
boolean |
isColorByVisibleTiles()
Should the color palette be defined by the color range of the current data view? |
boolean |
isColorVariableNumeric()
|
boolean |
isDiscreteCategorization()
|
boolean |
isDiscreteColorVariable()
|
void |
putOutlineLineStyle(LineStyle style,
int level)
Sets the line properties of the tile outline for the specified category level. |
void |
removeHighlightModel(java.lang.String name)
Deprecated. use rulesContext property on DataModel |
void |
removeHighlightModel(TileChartHighlightModel mod)
Deprecated. use rulesContext property on DataModel |
void |
resetHighlightModel()
Deprecated. use rulesContext property on DataModel |
void |
setColorByVisibleTiles(boolean lcr)
If set to true, the color palette will range from the current view of the data's low color value to the current high color value. |
void |
setColorPaletteType(int newColorPaletteType)
Sets how the values of the color varaible are mapped to a corresponding color representation. |
void |
setColorVariableNumeric(boolean isNumeric)
|
void |
setDataLabelLevel(int level)
Sets the visible level number to label with tile values. |
void |
setDataLabelTextStyle(AdvancedTextStyle style)
Sets the text properties used to label the tiles for the category level specified by setDataLabelLevel. |
void |
setDataTipHighlightModel(TileChartHighlightModel dataTipHighlightModel)
Deprecated. use rulesContext property on DataModel |
void |
setDefaultEdges()
|
void |
setDefaultTileLabels()
|
void |
setDetailLevel(int level)
Sets the number of category levels to be shown. |
void |
setDiscreteCategorization(boolean b)
|
void |
setDiscreteColorVariable(boolean b)
|
void |
setLayoutType(int newPlacement)
Sets the placement method of the tile slices. |
void |
setLegendModel(LegendModel newModel)
Sets the TileChart's legend model, a compilataion of legend appearance preferences. |
void |
setLevLabels(java.util.ArrayList levLabels)
|
void |
setMaximumColorValue(double maxColorVal)
|
void |
setMinimumColorValue(double minColorVal)
|
void |
setOtherLabel(java.lang.String newOtherLabel)
Sets the label to be used to indicate composited, other tiles, if they are set to be displayed, and are needed. |
void |
setOtherThreshold(double newOtherThreshold)
Sets the value in percent where smaller tiles will be compositied to create an 'other' tile. |
void |
setStatusLineTextStyle(TextStyle newStyle)
Sets the TextStyle used for the status line. |
void |
setTileLabelStyle(AdvancedTextStyle style,
int level)
Deprecated. Use setDataLabelLevel and setDataLabelTextStyle |
void |
setWebLabels(java.lang.String[] webLabels)
Sets the set of items to be used as the menu entries. |
void |
setWebLinks(java.lang.String[] webLinks)
Sets the set of items to be used as the menu "action" URLs. |
Methods inherited from class com.sas.graphics.components.GraphModel |
---|
apply, getBackgroundFillStyle, getBrushModel, getDataElementStyles, getDataTipModel, getFrameLineStyle, getLogo, getLogoJustification, isAntialiasedGraphics, isAntialiasedText, setAntialiasedGraphics, setAntialiasedText, setBackgroundFillStyle, setBrushModel, setDataElementStyles, setDataTipModel, setFrameLineStyle, setLogo, setLogoJustification |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final int LAYOUT_STANDARD
setLayoutType(int)
,
getLayoutType()
,
Constant Field Valuespublic static final int LAYOUT_TOGGLE
setLayoutType(int)
,
getLayoutType()
,
Constant Field Valuespublic static final int LAYOUT_GEOGRAPHIC
setLayoutType(int)
,
getLayoutType()
,
Constant Field Valuespublic static final int LAYOUT_FLOW
setLayoutType(int)
,
getLayoutType()
,
Constant Field Valuespublic static final ConstantCollection LAYOUT
Constructor Detail |
---|
public TileChartModel()
Method Detail |
---|
public void apply(TileChartModel theOtherObject)
theOtherObject
- properties applied to this instancepublic void setDefaultTileLabels()
public void setDefaultEdges()
public void setLegendModel(LegendModel newModel) throws java.lang.IllegalArgumentException
newModel
- the new repository for the legend display attributes
java.lang.IllegalArgumentException
- if newModel is null.getLegendModel()
,
LegendModel.apply(com.sas.graphics.components.LegendModel)
public LegendModel getLegendModel()
setLegendModel(com.sas.graphics.components.LegendModel)
public void setColorPaletteType(int newColorPaletteType) throws java.lang.IllegalArgumentException
LegendModel has 4 properties {minimum
, maximum
, baseline
,
symmetricEnabled
} that can affect the graph's resulting min, max and baseline values.
Typically the LegendModel's minimum
and maximum
values (default of Double.NaN)
are not be specified and result in the graph computing the resulting min and max values from the
styleBy variable data. However if the LegendModel's minimum
and
maximum
values are specified then they override the graph's computed min and max values.
Specifying a maximum
or maximum
on the LegendModel
has the inherent risk of improperly defining the data range (i.e. this specified range
not encompassing the styleBy variables data range). If this happens the specified range is still honored by
the legend and any data values that extend beyond the specified range are colored by
that color value mapped to the boundary which was breeched. For example if a
user defined max value of 100 was specified then any data values greater than 100
would be mapped to the the same color as 100.
Note: a warning message is when rendering if on the LegendModel :
- the
minimum
is specified and baseline
is less than minimum
- the
maximum
is specified and baseline
is greater than maximum
- the
maximum
is specified less than minimum
The LegendModel's baseline
value (default of 0.0) is treated
somewhat differently from maximum
and minimum
in determing
the graph's resulting min/max range. The LegendModel's baseline
value is treated as if it were a data value when the graph is computing
its resulting min and max values. If the LegendModel's baseline
value
is set to Double.NaN then the graph's resulting baseline value is computed to be the
midpoint of the resulting min/max range.
Note: The LegendModel's baseline
value may only affect the graphs resulting
maximum if LegendModel's maximum
has not been specified.
Likewise baseline
may affect the graphs resulting minimum if
minimum
has not been specified.
The LegendModel's symetricEnabled
value (default of false) is only applicable
when maximum
and minimum
have not been specified and baseline
has been specified.
If symmetricEnabled
is true then the graph's computed min/max range will encompass
the data range and be symetric about the baseline.
Applying colors to the resulting range:
A value of GraphConstants.COLOR_PALETTE_TWO_COLOR_CONTINUOUS
indicates
that the DataElementStyles
' continuousFillTwoColor
values are
applied gradating the colors from min to max.
A value of GraphConstants.COLOR_PALETTE_THREE_COLOR_CONTINUOUS
indicates
that the DataElementStyles
' continuousFillThreeColor
values are
applied gradating between the start and neutral colors from min to baseline
and then gradate between the neutral and end colors from baseline to max.
A value of GraphConstants.COLOR_PALETTE_COLOR_SPECTRUM
indicates
that the DataElementStyles
' continuousColorSpectrum
values
should be mapped to the corresponding data value. The color spectrum
defines the mapping in percentages along a normalized range or 0.0 to 1.0.
Note: Although the LegendModel
's baseline
value is still considered
when deterining the resulting min/max range, the baseline value is not mapped to any specific
color when using the DataElementStyles
' continuousColorSpectrum
.
- Parameters:
newColorPaletteType
- defines which set of colors to apply when the color variable has been assigned.
- Throws:
java.lang.IllegalArgumentException
- if newColorPaletteType is invalid.- See Also:
getColorPaletteType()
public int getColorPaletteType()
setColorPaletteType(int)
public void setDetailLevel(int level)
level
- The desired level of detail
java.lang.IllegalArgumentException
- if detailLevel is < 1getDetailLevel()
public int getDetailLevel()
setDetailLevel(int)
public void setTileLabelStyle(AdvancedTextStyle style, int level)
style
- The text properties of the tile labelsgetTileLabelStyle(int)
public AdvancedTextStyle getTileLabelStyle(int level)
setTileLabelStyle(com.sas.graphics.components.AdvancedTextStyle, int)
public void setDataLabelLevel(int level)
level
- data level to label (default of 1 is most general)getDataLabelLevel()
public int getDataLabelLevel()
setDataLabelLevel(int)
public void setDataLabelTextStyle(AdvancedTextStyle style)
style
- The text properties of the tile labelsgetDataLabelTextStyle()
public AdvancedTextStyle getDataLabelTextStyle()
setDataLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)
public void putOutlineLineStyle(LineStyle style, int level)
style
- The line properties of the outlinegetOutlineLineStyle(int)
public LineStyle getOutlineLineStyle(int level)
putOutlineLineStyle(com.sas.graphics.components.LineStyle, int)
public void setColorVariableNumeric(boolean isNumeric)
public boolean isColorVariableNumeric()
public void setStatusLineTextStyle(TextStyle newStyle)
newStyle
- The base TextStyle of the status linegetStatusLineTextStyle()
public TextStyle getStatusLineTextStyle()
setStatusLineTextStyle(com.sas.graphics.components.TextStyle)
public void setLayoutType(int newPlacement)
newPlacement
- The desired placement method of the tiles.
Valid values are:
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetLayoutType()
,
LAYOUT_STANDARD
,
LAYOUT_TOGGLE
,
LAYOUT_GEOGRAPHIC
,
LAYOUT_FLOW
public int getLayoutType()
setLayoutType(int)
public void addHighlightModel(TileChartHighlightModel mod)
public void removeHighlightModel(TileChartHighlightModel mod)
public void removeHighlightModel(java.lang.String name)
public void resetHighlightModel()
public TileChartHighlightModel[] getHighlightModelList()
public TileChartHighlightModel getDataTipHighlightModel()
public void setDataTipHighlightModel(TileChartHighlightModel dataTipHighlightModel)
dataTipHighlightModel
- The dataTipHighlightModel to setpublic void setColorByVisibleTiles(boolean lcr)
lcr
- boolean value indicating if local color range should be usedisColorByVisibleTiles()
public boolean isColorByVisibleTiles()
setColorByVisibleTiles(boolean)
public void setOtherLabel(java.lang.String newOtherLabel)
newOtherLabel
- String to use as label for other tilesgetOtherLabel()
public java.lang.String getOtherLabel()
setOtherLabel(java.lang.String)
public void setOtherThreshold(double newOtherThreshold) throws java.lang.IllegalArgumentException
newOtherThreshold
- percenage to set as other threshold
java.lang.IllegalArgumentException
- If other threshold is outside valid percentage range (0-100)getOtherThreshold()
public double getOtherThreshold()
setOtherThreshold(double)
public void setWebLinks(java.lang.String[] webLinks)
webLinks
- Array of strings for use as menu "action" URLsgetWebLinks()
,
setWebLabels(java.lang.String[])
public java.lang.String[] getWebLinks()
setWebLinks(java.lang.String[])
,
getWebLabels()
public void setWebLabels(java.lang.String[] webLabels)
webLabels
- Array of strings for use as menu entriesgetWebLabels()
,
setWebLinks(java.lang.String[])
public void setLevLabels(java.util.ArrayList levLabels)
public java.util.ArrayList getLevLabels()
setWebLabels(java.lang.String[])
,
getWebLinks()
public java.lang.String[] getWebLabels()
setWebLabels(java.lang.String[])
,
getWebLinks()
public boolean equals(java.lang.Object obj)
TileChartModel
.
The result is true
if and only if the argument is not
null
and is a TileChartModel
object that has the same
properties as this object.
equals
in class GraphModel
obj
- the object to test for equality with this
TileChartModel
true
if the objects are the same;
false
otherwise.public int hashCode()
TileChartModel
.
hashCode
in class GraphModel
public void setMinimumColorValue(double minColorVal)
public double getMinimumColorValue()
public void setMaximumColorValue(double maxColorVal)
public double getMaximumColorValue()
public void setDiscreteColorVariable(boolean b)
public boolean isDiscreteColorVariable()
public void setDiscreteCategorization(boolean b)
public boolean isDiscreteCategorization()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |