|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.radarchart.RadarChartModel
public class RadarChartModel
A RadarChartModel encapsulates most of a RadarChart's visual display properties. This contrasts with the RadarChart's data model, which determines the number and organization of data elements (stars) and the use of axes and a legend.
A RadarChartModel contains RadarChart-specific properties, common graph properties, and a collection of models that control the appearance of the graph's peripheral elements, such as its axes and legends.
A RadarChartModel 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 RadarChart's display state is unambiguous.
Graph
,
GraphConstants
,
RadarChart
Field Summary | |
---|---|
static ConstantCollection |
RADAR_TYPE
RADAR_TYPE enables a set of static actions associated with the public RADAR_TYPE_ constants. |
static int |
RADAR_TYPE_CALENDAR
Sectors have equal radii, and the color is determined by the response |
static int |
RADAR_TYPE_CHORD
Similar to sector, but the end is not an arc |
static int |
RADAR_TYPE_CORONA
Similar to wedge, but a bisecting vertex is added between axes and the minimum value to give more of a star appearance |
static int |
RADAR_TYPE_POLYGON
Similar to RADAR_TYPE_WEDGE, but without axes. |
static int |
RADAR_TYPE_RADIAL
Axis lengths determined by response values. |
static int |
RADAR_TYPE_SECTOR
Wedges are drawn for each category value |
static int |
RADAR_TYPE_SPOKE
A circle at the minimum value, with radiating axis lengths determined by response value. |
static int |
RADAR_TYPE_WEDGE
Axes are displayed and points from each axis are connected. |
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
RadarChartModel()
Constructs a new RadarChartModel. |
Method Summary | |
---|---|
void |
apply(RadarChartModel theOtherModel)
Utility method to convey properties contained in "theOtherModel" to this object. |
void |
applyFlorenceSettings()
Sets the appropriate settings such to match a server side florence/sector radar chart. |
void |
applyWindroseSettings()
Sets the appropriate settings such to match a server side WindoseRose radar chart. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this RadarChartModel . |
AxisModel |
getAxisModel()
Returns the RadarChart's axis model, a repository for axis appearance preferences. |
LegendModel |
getColorLegendModel()
Get the RadarChart's color legend model, a compilataion of legend appearance preferences. |
GraphMatrixAxisModel |
getColumnAxisModel()
Returns the Graph's column axis model, which contains axis' appearance preferences. |
int |
getMissingPolicy()
Returns the graph behavior for displaying missing values. |
int |
getRadarType()
Get the display presentation for the radar elements. |
GraphMatrixAxisModel |
getRowAxisModel()
Returns the Graph's row axis model, which contains axis' appearance preferences. |
double |
getSectorWidth()
Returns the sector width |
double |
getStartAngle()
Return the current starting angle of the radar chart in degrees. |
int |
hashCode()
Computes the hash code for this RadarChartModel . |
boolean |
isDrawSectorOnAxis()
Return whether the sector elements are drawn on top of their axis. |
boolean |
isFillEnabled()
Return whether the radar elements are filled. |
boolean |
isLineEnabled()
Return whether or not the radar polygon outline styles will be controlled by the LineStyles set in DataElementStyles. |
boolean |
isUniformAxes()
Returns a boolean that says whether or not the axes will be uniform. |
void |
setAxisModel(AxisModel newAxisModel)
Sets the RadarChart's axis model, which encapsulates the axis appearance preferences. |
void |
setColorLegendModel(LegendModel newModel)
Set the RadarChart's color legend model, a compilataion of legend appearance preferences. |
void |
setColumnAxisModel(GraphMatrixAxisModel newAxis)
Set the Graph's column axis model, which contains axis' appearance preferences. |
void |
setDrawSectorOnAxis(boolean newDrawSectorOnAxis)
Set whether sector elements should be drawn on top of their axis as opposed to beside it. |
void |
setFillEnabled(boolean fill)
Set whether radar elements should be filled polygons. |
void |
setLineEnabled(boolean line)
If true, then the radar polygon outline styles will be controlled by the LineStyles set in DataElementStyles. |
void |
setMissingPolicy(int newMissingPolicy)
Sets the graph behavior for displaying missing values. |
void |
setRadarType(int newRadarType)
Set the display presentation for the radar elements. |
void |
setRowAxisModel(GraphMatrixAxisModel newAxis)
Set the Graph's row axis model, which contains axis' appearance preferences. |
void |
setSectorWidth(double newSectorWidth)
Sets the sector width when type is set to RADAR_TYPE_SECTOR The width is expressed as a percentage of the available space to draw the sector Should be in the range 0<=sectorWidth<=1 |
void |
setStartAngle(double newAngle)
Set the angle where the radar should place the first axis. |
void |
setUniformAxes(boolean uniform)
Sets whether or not the Axes will all have the same range represented. |
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 RADAR_TYPE_RADIAL
public static final int RADAR_TYPE_SPOKE
public static final int RADAR_TYPE_POLYGON
public static final int RADAR_TYPE_WEDGE
public static final int RADAR_TYPE_SECTOR
public static final int RADAR_TYPE_CHORD
public static final int RADAR_TYPE_CALENDAR
public static final int RADAR_TYPE_CORONA
public static final ConstantCollection RADAR_TYPE
Constructor Detail |
---|
public RadarChartModel()
Method Detail |
---|
public void apply(RadarChartModel theOtherModel)
theOtherModel
- properties applied to this instance
java.lang.IllegalArgumentException
- if theOtherModel is null.public void setRowAxisModel(GraphMatrixAxisModel newAxis) throws java.lang.IllegalArgumentException
newAxis
- row axis display attributes
java.lang.IllegalArgumentException
- if newAxis is null.getRowAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getRowAxisModel()
setRowAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getColumnAxisModel()
public void setColumnAxisModel(GraphMatrixAxisModel newAxis) throws java.lang.IllegalArgumentException
newAxis
- the column axis display attributes
java.lang.IllegalArgumentException
- if newAxis is null.getColumnAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getColumnAxisModel()
setColumnAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getRowAxisModel()
public void setRadarType(int newRadarType) throws java.lang.IllegalArgumentException
Valid values are :
RadarChartModel.RADAR_TYPE_WEDGE (the default)
RadarChartModel.RADAR_TYPE_POLYGON
RadarChartModel.RADAR_TYPE_RADIAL
RadarChartModel.RADAR_TYPE_SPOKE
RadarChartModel.RADAR_TYPE_SECTOR
RadarChartModel.RADAR_TYPE_CHORD
RadarChartModel.RADAR_TYPE_CALENDAR
RadarChartModel.RADAR_TYPE_CORONA
newRadarType
- the new type of radar display
java.lang.IllegalArgumentException
- if newRadarType is invalid.getRadarType()
public int getRadarType()
setRadarType(int)
public void setColorLegendModel(LegendModel newModel) throws java.lang.IllegalArgumentException
newModel
- the new repository for the legend display attributes
java.lang.IllegalArgumentException
- if newModel is null.getColorLegendModel()
,
LegendModel.apply(com.sas.graphics.components.LegendModel)
public LegendModel getColorLegendModel()
setColorLegendModel(com.sas.graphics.components.LegendModel)
public void setAxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
This axis model is also used to determine the positioning of reference lines. Reference lines appear as circles on the radar chart. Their position is expressed as a fraction of the total diameter of the radar. Therefore, the value for the reference lines must be between 0 and 1. For example, a value of .5 would draw a reference circle half the diameter of the radar chart. Values less than zero or greater than one are ignored.
newAxisModel
- the new repository for the axis display attributes
java.lang.IllegalArgumentException
- if newAxisModel is null.getAxisModel()
,
AxisModel.apply(com.sas.graphics.components.AxisModel)
public AxisModel getAxisModel()
setAxisModel(com.sas.graphics.components.AxisModel)
public void setStartAngle(double newAngle)
newAngle
- The desired start angle in degrees.getStartAngle()
public double getStartAngle()
setStartAngle(double)
public void setFillEnabled(boolean fill)
fill
- The desired value.isFillEnabled()
public boolean isFillEnabled()
setFillEnabled(boolean)
public void setLineEnabled(boolean line)
line
- The desired value.isLineEnabled()
public boolean isLineEnabled()
setLineEnabled(boolean)
public void setUniformAxes(boolean uniform)
uniform
- the boolean that determines if the range will be uniformisUniformAxes()
public boolean isUniformAxes()
setUniformAxes(boolean)
public void setSectorWidth(double newSectorWidth) throws java.lang.IllegalArgumentException
newSectorWidth
- the double that represents the sector width
java.lang.IllegalArgumentException
- if newSectorWidth is not in the correct range.getSectorWidth()
public double getSectorWidth()
setSectorWidth(double)
public void setMissingPolicy(int newMissingPolicy)
Special note:
The following String values are interpreted as missingPolicy values:
The following Number values are interpreted as missing values:
java.lang.IllegalArgumentException
- if newMissing is invalid.getMissingPolicy()
public int getMissingPolicy()
setMissingPolicy(int)
public int hashCode()
RadarChartModel
.
hashCode
in class GraphModel
public void applyWindroseSettings()
public void applyFlorenceSettings()
public boolean equals(java.lang.Object obj)
RadarChartModel
.
The result is true
if and only if the argument is not
null
and is a RadarChartModel
object that has the same
properties as this object.
equals
in class GraphModel
obj
- the object to test for equality with this
RadarChartModel
true
if the objects are the same;
false
otherwise.public void setDrawSectorOnAxis(boolean newDrawSectorOnAxis)
newDrawSectorOnAxis
- The desired value.isDrawSectorOnAxis()
public boolean isDrawSectorOnAxis()
setDrawSectorOnAxis(boolean)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |