|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.ShadowStyle
public class ShadowStyle
Encapsulates attributes that affect the appearance of shadows. Attributes of shadow softness, offset, color and visibility pertaining to a shadow are stored here. Any object that would like to utilise a shadow may use this class. Currently only TextStyle and FillStyle use a shadow.
BarChart barChart = getMyBarChart(); TextStyle axisLabel = ((barChart.getBarChartModel()).getCategoryAxisModel()).getLabelTextStyle(); ShadowStyle style = axisLabel.getShadowStyle(); style.setVisible(true); style.setColor(Color.lightGray);
GraphStyle
,
ModelBase
Constructor Summary | |
---|---|
ShadowStyle()
|
|
ShadowStyle(java.awt.Color colorIn)
|
|
ShadowStyle(java.awt.Color color,
com.sas.measures.BaseLength offsetX,
com.sas.measures.BaseLength offsetY,
double softness)
|
Method Summary | |
---|---|
void |
apply(ShadowStyle 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 ShadowStyle . |
java.awt.Color |
getColor()
Returns the color of the shadow. |
com.sas.measures.BaseLength |
getOffsetX()
Returns the x offset used for the drop shadow. |
com.sas.measures.BaseLength |
getOffsetY()
Returns the y offset used for placing drop shadows. |
double |
getSoftness()
Returns the value of the 'fuzziness' used on drop shadows in the graph. |
int |
hashCode()
Computes the hash code for this ShadowStyle . |
boolean |
isVisible()
Return whether or not the drop shadows are drawn. |
void |
setColor(java.awt.Color newColor)
Assigns the color used for the shadow The default value is Color.black. |
void |
setOffsetX(com.sas.measures.BaseLength newOffsetX)
Set the x offset for the shadow. |
void |
setOffsetY(com.sas.measures.BaseLength newOffsetY)
Set the y offset for the shadow. |
void |
setSoftness(double newSoftness)
Sets the 'fuzziness' used on the drop shadows. |
void |
setVisible(boolean newVisible)
Controls whether or not the shadow is drawn. |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public ShadowStyle()
public ShadowStyle(java.awt.Color colorIn)
public ShadowStyle(java.awt.Color color, com.sas.measures.BaseLength offsetX, com.sas.measures.BaseLength offsetY, double softness)
Method Detail |
---|
public void apply(ShadowStyle theOtherObject)
Note: 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.
Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.
theOtherObject
- properties applied to this instancepublic boolean isVisible()
setVisible(boolean)
public void setVisible(boolean newVisible)
newVisible
- true means shadow is displayedisVisible()
public void setColor(java.awt.Color newColor) throws java.lang.IllegalArgumentException
newColor
- color for the shadow
java.lang.IllegalArgumentException
- if newColor is null.getColor()
public java.awt.Color getColor()
setColor(java.awt.Color)
public void setSoftness(double newSoftness)
Ex. If 1.2 was specified the softness would be set to 1.0. If -.75 was specified the softness would be set to 0.0. If 0.5 was specified the softness would be set to 0.5.
newSoftness
- range of 0.0-1.0 with 1.0 being the same as NO fuzziness.getSoftness()
public double getSoftness()
setSoftness(double)
public void setOffsetX(com.sas.measures.BaseLength newOffsetX) throws java.lang.IllegalArgumentException
newOffsetX
- BaseLength containing value for x shadow offset
java.lang.IllegalArgumentException
- if newOffsetX is null.getOffsetX()
public com.sas.measures.BaseLength getOffsetX()
setOffsetX(com.sas.measures.BaseLength)
public void setOffsetY(com.sas.measures.BaseLength newOffsetY) throws java.lang.IllegalArgumentException
newOffsetY
- BaseLength containing the y offset for the shadow
java.lang.IllegalArgumentException
- if newOffsetY is null.getOffsetY()
public com.sas.measures.BaseLength getOffsetY()
setOffsetY(com.sas.measures.BaseLength)
public boolean equals(java.lang.Object obj)
ShadowStyle
.
The result is true
if and only if the argument is not
null
and is a ShadowStyle
object that has the same
property values as this object.
equals
in class ModelBase
obj
- the object to test for equality with this
ShadowStyle
true
if the objects are the same;
false
otherwise.public int hashCode()
ShadowStyle
.
hashCode
in class ModelBase
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |