|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.GraphModel
public class GraphModel
The GraphModel class contains general chart appearance preferences.
It is a base to be sub-classed by the specific chart model classes (such as BarChartModel), and therefore, contains only the properties common to all chart types.
For example:
barChart.getBarChartModel().getBackgroundFillStyle().setFIllType(FillStyle.SOLID) barChart.getBarChartModel().getBackgroundFillStyle().setColor(Color.gray)would change the color of the cell frame (if visible) to green right away.
Only properties common to all charts are stored in the GraphModel. These include:
Graph
,
BarChartModel
,
PieChartModel
,
ScatterPlotModel
Constructor Summary | |
---|---|
GraphModel()
|
Method Summary | |
---|---|
void |
apply(GraphModel theOtherModel)
Utility method to convey properties contained in "theOtherModel" to this object. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this GraphModel . |
FillStyle |
getBackgroundFillStyle()
Returns the FillStyle that holds the attributes for the background of the graph. |
BrushModel |
getBrushModel()
Returns the Graph's brush model, a repository for brush appearance preferences. |
DataElementStyles |
getDataElementStyles()
Returns the Styles used for data elements. |
DataTipModel |
getDataTipModel()
Returns the visual properties applicable to the graph's frame line. |
LineStyle |
getFrameLineStyle()
Returns the visual properties applicable to the graph's frame line. |
javax.swing.ImageIcon |
getLogo()
Returns the logo. |
int |
getLogoJustification()
Returns the justification of the logo within the graph area. |
int |
hashCode()
Computes the hash code for this GraphModel . |
boolean |
isAntialiasedGraphics()
Returns a flag indicating if the chart graphics will be drawn using antialiasing. |
boolean |
isAntialiasedText()
Returns a flag indicating if the chart text will be drawn using antialiasing. |
void |
setAntialiasedGraphics(boolean newAntialiasedGraphics)
This method sets if the chart will use anti-aliasing when rendering all graphics. |
void |
setAntialiasedText(boolean newAntialiasedText)
This method sets if the chart will use anti-aliasing when rendering all text. |
void |
setBackgroundFillStyle(FillStyle newStyle)
Set the FillStyle that holds the attributes for the background of the graph. |
void |
setBrushModel(BrushModel newBrushModel)
Set the Graph's brush model, a repository for brush appearance preferences. |
void |
setDataElementStyles(DataElementStyles newStyles)
Set the Styles used for data elements. |
void |
setDataTipModel(DataTipModel newDataTipModel)
Sets the display properties applicable to the graph's interactive data tip. |
void |
setFrameLineStyle(LineStyle newFrameLineStyle)
Sets the visual properties applicable to the graph's frame line. |
void |
setLogo(javax.swing.ImageIcon newLogo)
Set an ImageIcon as a logo. |
void |
setLogoJustification(int newJustification)
Set the justification of the logo within the graph area. |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public GraphModel()
Method Detail |
---|
public void apply(GraphModel theOtherModel)
Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.
This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.
theOtherModel
- properties applied to this instancepublic void setAntialiasedText(boolean newAntialiasedText)
Anti-aliasing is a method of drawing where the edges are blended with the background, often producing smoother looking text.
The default is true.
newAntialiasedText
- whether or not to draw text smoothlyisAntialiasedText()
public boolean isAntialiasedText()
setAntialiasedText(boolean)
public void setAntialiasedGraphics(boolean newAntialiasedGraphics)
Anti-aliasing is a method of drawing where the edges are blended with the background, often producing smoother looking graphics.
The default is true.
newAntialiasedGraphics
- whether or not to draw smooth graphicsisAntialiasedGraphics()
public boolean isAntialiasedGraphics()
setAntialiasedGraphics(boolean)
public void setFrameLineStyle(LineStyle newFrameLineStyle) throws java.lang.IllegalArgumentException
Note: If the visibilityPolicy property is GraphConstatns.AUTOMATIC then the Graph will determine whether or not to display the frame based upon a combination of the data settings and the graph type. The frame emphasises the separation of each Graph Matrix cell (or group). A "cell" is that portion of the graph displaying data elements pertaining to a unique combination of row and column variable values.
newFrameLineStyle
- the display attributes of the frame's line.
java.lang.IllegalArgumentException
- if newFrameLineStyle is null.getFrameLineStyle()
public LineStyle getFrameLineStyle()
setFrameLineStyle(com.sas.graphics.components.LineStyle)
public void setDataTipModel(DataTipModel newDataTipModel) throws java.lang.IllegalArgumentException
newDataTipModel
- the display attributes applicable to the data tip.
java.lang.IllegalArgumentException
- if newDataTipModel is null.getDataTipModel()
public DataTipModel getDataTipModel()
setDataTipModel(com.sas.graphics.components.DataTipModel)
public void setDataElementStyles(DataElementStyles newStyles) throws java.lang.IllegalArgumentException
newStyles
- the data element attributes
java.lang.IllegalArgumentException
- if newStyles is null.getDataElementStyles()
,
DataElementStyles.apply(com.sas.graphics.components.DataElementStyles)
public DataElementStyles getDataElementStyles()
setDataElementStyles(com.sas.graphics.components.DataElementStyles)
public void setBackgroundFillStyle(FillStyle newStyle) throws java.lang.IllegalArgumentException
newStyle
- the background display attributes
java.lang.IllegalArgumentException
- if newStyle is null.getBackgroundFillStyle()
,
FillStyle.apply(com.sas.graphics.components.FillStyle)
public FillStyle getBackgroundFillStyle()
getBackgroundFillStyle()
public void setBrushModel(BrushModel newBrushModel) throws java.lang.IllegalArgumentException
newBrushModel
- - the new brush appearance properties
java.lang.IllegalArgumentException
- if newBrushModel is null.getBrushModel()
public BrushModel getBrushModel()
setBrushModel(com.sas.graphics.components.BrushModel)
public void setLogo(javax.swing.ImageIcon newLogo)
newLogo
- - the new logogetLogo()
public javax.swing.ImageIcon getLogo()
setLogo(javax.swing.ImageIcon)
public void setLogoJustification(int newJustification) throws java.lang.IllegalArgumentException
Valid values are: javax.swing.SwingConstants.SOUTH_EAST, javax.swing.SwingConstants.SOUTH_WEST, javax.swing.SwingConstants.NORTH_EAST, javax.swing.SwingConstants.NORTH_WEST
newJustification
- the location where the logo (if assigned) will appear
java.lang.IllegalArgumentException
- if an invalid value is passed in.getLogoJustification()
public int getLogoJustification()
setLogoJustification(int)
public boolean equals(java.lang.Object obj)
GraphModel
.
The result is true
if and only if the argument is not null
and
is a GraphModel
object that has the same property values as this object.
equals
in class ModelBase
obj
- the object to test for equality with this GraphModel
true
if the objects are the same ; false
otherwise.public int hashCode()
GraphModel
.
hashCode
in class ModelBase
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |