|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.chart.LegendAttributes
LegendAttributes represents legend attributes including
LegendRenderAttributes)
LegendRenderAttributes,
BoxModelAttributes,
Serialized Form| Field Summary | |
protected java.lang.Number |
M_gap
Gap around elements. |
protected java.lang.Number |
M_height
Explicitly given legend height. |
protected java.lang.Boolean |
M_hidden
Is legend hidden or not. |
protected java.lang.Number |
M_labelOffset
Offset between legend labels. |
protected java.lang.String |
M_legendType
Legend type. |
protected BoxModelAttributes |
M_margins
Margins. |
protected int |
M_orientation
Orientation. |
protected LegendRenderAttributes |
M_render
Rendering attributes. |
protected java.lang.Number |
M_width
Explicilty given legend width. |
| Constructor Summary | |
LegendAttributes()
Creates a new legend attributes with default null
values. |
|
LegendAttributes(LegendAttributes la)
Deep copy constructor. |
|
LegendAttributes(java.lang.String legendType,
LegendRenderAttributes render,
java.lang.Number gap,
BoxModelAttributes margins,
java.lang.Boolean hidden)
Creates a new legend attributes set. |
|
LegendAttributes(java.lang.String legendType,
LegendRenderAttributes render,
java.lang.Number gap,
BoxModelAttributes margins,
java.lang.Boolean hidden,
int orientation,
java.lang.Number labelOffset)
Creates a new legend attributes set. |
|
| Method Summary | |
com.davisor.core.Dupable |
dup()
Duplicates this object. |
boolean |
equals(java.lang.Object object)
Test if this legend attribtues equals to given attributes. |
java.lang.Number |
getGap()
Gets legend symbol gap. |
java.lang.Number |
getHeight()
Gets the user specified legend height. |
java.lang.Number |
getLabelOffset()
Gets legend label offset. |
float |
getLabelOffset(float defaultOffset)
Gets legend label offset, or if unset, a given default offset value. |
java.lang.String |
getLegendType()
Returns legend factory name. |
BoxModelAttributes |
getMargins()
Gets legend margins. |
int |
getOrientation()
Returns legend orientation as alignment code. |
LegendRenderAttributes |
getRender()
Returns reference to render attributes. |
java.lang.Number |
getWidth()
Gets the user specified legend width. |
java.lang.Boolean |
isHidden()
Tests if legend is hidden or not. |
boolean |
isHiddenDefault()
Tests if legend is hidden or not. |
void |
setGap(java.lang.Number gap)
Set gap for the legend symbols. |
void |
setHeight(java.lang.Number height)
Set legend height. |
void |
setHidden(java.lang.Boolean hidden)
Sets if the legend is hidden or not. |
void |
setLabelOffset(float labelOffset)
Sets legend label offset. |
void |
setLabelOffset(java.lang.Number labelOffset)
Sets legend label offset. |
void |
setMargins(BoxModelAttributes margins)
Set legend margins. |
void |
setOrientation(int orientation)
Sets legend orientation. |
void |
setWidth(java.lang.Number width)
Set legend width. |
java.lang.String |
toString()
Gets legend attributes XML representation. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected LegendRenderAttributes M_render
protected java.lang.Number M_gap
protected java.lang.Number M_labelOffset
protected BoxModelAttributes M_margins
protected int M_orientation
protected java.lang.Boolean M_hidden
protected java.lang.String M_legendType
protected java.lang.Number M_width
protected java.lang.Number M_height
| Constructor Detail |
public LegendAttributes()
null
values.
public LegendAttributes(LegendAttributes la)
la - legend attributes to copydup()
public LegendAttributes(java.lang.String legendType,
LegendRenderAttributes render,
java.lang.Number gap,
BoxModelAttributes margins,
java.lang.Boolean hidden)
legendType - legend factory name (may be null)render - render attributes (may be null)gap - gap around symbol (may be null)margins - margins around the legend (may be null)hidden - is legend hidden or not (may be null)LegendAttributes(String,LegendRenderAttributes,Number,
BoxModelAttributes,Boolean,int,Number)
public LegendAttributes(java.lang.String legendType,
LegendRenderAttributes render,
java.lang.Number gap,
BoxModelAttributes margins,
java.lang.Boolean hidden,
int orientation,
java.lang.Number labelOffset)
legendType - legend factory name (may be null)render - render attributes (may be null)gap - gap around symbol (may be null)margins - margins around the legend (may be null)hidden - is legend hidden or not (may be null)orientation - legend orientation as alignment codelabelOffset - label offset (may be null)| Method Detail |
public com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupablepublic boolean equals(java.lang.Object object)
public java.lang.String toString()
public java.lang.Number getGap()
setGap(Number)public java.lang.Number getLabelOffset()
getLabelOffset(float),
setLabelOffset(Number)public float getLabelOffset(float defaultOffset)
defaultOffset - default offset to be used if offset has not been setgetLabelOffset(),
setLabelOffset(float)public java.lang.Number getHeight()
null.
setHeight(java.lang.Number)public java.lang.String getLegendType()
public BoxModelAttributes getMargins()
setMargins(BoxModelAttributes)public int getOrientation()
setOrientation(int),
RenderAttributes.isHorizontal(int),
RenderAttributes.isVertical(int)public LegendRenderAttributes getRender()
public java.lang.Boolean isHidden()
isHiddenDefault(),
setHidden(java.lang.Boolean)public boolean isHiddenDefault()
false by default)isHidden()public java.lang.Number getWidth()
null.
setWidth(java.lang.Number)public void setGap(java.lang.Number gap)
gap - symbol gap in percents (0-100) (may be null)public void setHeight(java.lang.Number height)
height - legend height in pixels (may be null)public void setHidden(java.lang.Boolean hidden)
hidden - is legend hidden or not (may be null)isHidden()public void setLabelOffset(float labelOffset)
getLabelOffset(),
getLabelOffset(float),
setLabelOffset(Number)public void setLabelOffset(java.lang.Number labelOffset)
null, it defaults to some
appropriate value, like zero, font leading, or 50% of the font
size.
getLabelOffset(),
getLabelOffset(float),
setLabelOffset(float)public void setOrientation(int orientation)
RenderAttributes. Defines whether the
legend entries are laid horizontally or vertically.
orientation - Legend orientation.getOrientation()public void setMargins(BoxModelAttributes margins)
margins - legend margins (may be null)public void setWidth(java.lang.Number width)
width - legend width in pixels (may be null)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||