|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.LegendBoxBase SoftwareFX.ChartFX.UserLegendBox
public final class UserLegendBox
Provides access to the UserLegendBox object.
A legend box is a tool within a chart that contains relevant information to explain what is being depicted in a chart. The user legend box is a chart legend that a developer must configure all legend keys manually. Thus, the user legend box fills the void when a legend is needed, but the series legend and values legends cannot convey the desired information.
The supported members of the UserLegendBox Class allow you to configure and control a legend box any way you feel will benefit the end user of your chart.
Constructor Summary | |
---|---|
UserLegendBox()
|
Method Summary | |
---|---|
void |
clear()
Clears the user legend of all configured settings and values. |
UserLegendBoxItemCollection |
getItem()
Allows you to assign attributes directly to a selected user legend box key. |
UserLegendBoxItem |
getItem(int i)
Deprecated. You should use getItem() instead. |
TitleDockable |
getTitles(int n)
Deprecated. You should use getTitles(int) instead. |
boolean |
isAutoContourLabels()
Gets the AutoContourLabels. |
boolean |
isContinuous()
Gets the Continuous. |
boolean |
isEmpty()
IsEmptyTrue |
boolean |
isShowMarkers()
Gets the ShowMarkers. |
void |
setAutoContourLabels(boolean value)
Instruct Chart FX to automatically create contour labels for the chart user legend. |
void |
setContinuous(boolean value)
Sets the key markers of the user legend box as a single continuous bar with no borders. |
void |
setEmpty(boolean value)
A boolean value specifying whether the user legend has been assigned any attributes or not. |
void |
setShowMarkers(boolean value)
Allows you to show or hide the markers in the user legend box. |
void |
sizeToFit()
Calculates and sets the best-fit size for the UserLegendBox. |
Methods inherited from class SoftwareFX.ChartFX.LegendBoxBase |
---|
getAlignment, getBackColor, getBorderObject, getDocked, getFlags, getFont, getHeight, getHighlight, getTextColor, getTitle, getTitles, getToolBorder, getWidth, invalidate, isAutoSize, isDrawingArea, isVisible, setAlignment, setAutoSize, setBackColor, setBorderObject, setDocked, setDrawingArea, setFlags, setFont, setHeight, setTextColor, setToolBorder, setVisible, setWidth |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserLegendBox()
Method Detail |
---|
public void clear()
Clears the user legend of all configured settings and values.
Using this method will clear the user legend of any attributes set using the getItem(int)
property. The attributes include UserLegendBoxItem.setBorderEffect(int)
, UserLegendBoxItem.setColor(java.awt.Color)
, UserLegendBoxItem.setKeyLabel(java.lang.String)
, UserLegendBoxItem.setLabel(java.lang.String)
and/or UserLegendBoxItem.setMarkerShape(int)
.
To check to see if the user legend has any configured settings or values, you can use the setEmpty(boolean)
property.
UserLegendBoxItem.setBorderEffect(int)
,
UserLegendBoxItem.setColor(java.awt.Color)
,
UserLegendBoxItem.setKeyLabel(java.lang.String)
,
UserLegendBoxItem.setLabel(java.lang.String)
,
UserLegendBoxItem.setMarkerShape(int)
,
UserLegendBoxItem
public UserLegendBoxItem getItem(int i)
getItem()
instead.
UserLegendBoxItemCollection
public UserLegendBoxItemCollection getItem()
Allows you to assign attributes directly to a selected user legend box key.
The Item object is a zero based array which allows you to create and assign attributes to each key that will exist in the user legend box.
Every key in the user legend will have an Item index.
Please refer to UserLegendBoxItem
class for the supported properties.
UserLegendBoxItem.setColor(java.awt.Color)
,
UserLegendBoxItem.setBorderEffect(int)
,
UserLegendBoxItem.setColor(java.awt.Color)
,
UserLegendBoxItem.setKeyLabel(java.lang.String)
,
UserLegendBoxItem.setLabel(java.lang.String)
,
UserLegendBoxItem.setMarkerShape(int)
,
UserLegendBoxItem
public TitleDockable getTitles(int n)
getTitles(int)
instead.
public boolean isAutoContourLabels()
Gets the AutoContourLabels. For more detail see setAutoContourLabels(boolean)
.
public boolean isContinuous()
Gets the Continuous. For more detail see setContinuous(boolean)
.
public boolean isEmpty()
Returns a boolean value specifying whether the user legend has been assigned any attributes or not.
When the return value of this property is True, the user legend has not been assigned any attributes. If False, the user legend has been configured with supported attributes.
UserLegendBoxItem.setLabel(java.lang.String)
,
UserLegendBoxItem.setKeyLabel(java.lang.String)
,
clear()
,
UserLegendBoxItem
public boolean isShowMarkers()
Gets the ShowMarkers. For more detail see setShowMarkers(boolean)
.
public void setAutoContourLabels(boolean value)
Instruct Chart FX to automatically create contour labels for the chart user legend.
When set to True, Chart FX will automatically generate contour labels based the chart data when the ChartCore.closeData(int)
method is called.
You must make the ChartCore.setUserLegendBox(boolean)
visible in order to view the contour labels created.
Use the ChartCore.setGallery(int)
property to set the chart type to Contour.
ChartCore.setUserLegendBox(boolean)
,
ChartCore.closeData(int)
,
Chart
public void setContinuous(boolean value)
Sets the key markers of the user legend box as a single continuous bar with no borders.
This property is particularly useful when creating legends for Contour charts. A contour chart uses colors to show the intensity of a value and not the different series. The continuous property helps create a user legend that relays the color and order information clearly.ChartCore.setLegendBox(boolean)
ChartCore.setUserLegendBox(boolean)
The ShowMarkers property must be set to True in order to see the continuous attribute applied to a user legend.
ChartCore.setUserLegendBox(boolean)
,
ChartCore.getUserLegendBoxObj()
,
setShowMarkers(boolean)
,
UserLegendBoxItem
,
Chart
public void setEmpty(boolean value)
A boolean value specifying whether the user legend has been assigned any attributes or not.
When the return value of this property is True, the user legend has not been assigned any attributes. If False, the user legend has been configured with supported attributes.
UserLegendBoxItem.setLabel(java.lang.String)
,
UserLegendBoxItem.setKeyLabel(java.lang.String)
,
clear()
,
UserLegendBoxItem
public void setShowMarkers(boolean value)
Allows you to show or hide the markers in the user legend box.
This property can aid in chart readability by associating a legend key with a series color.
When you hide the markers by turning this property to False, the configured UserLegendBoxItem.setKeyLabel(java.lang.String)
string is displayed.
UserLegendBoxItem.setKeyLabel(java.lang.String)
,
setContinuous(boolean)
,
UserLegendBoxItem
public void sizeToFit()
Calculates and sets the best-fit size for the UserLegendBox.
This method is particularly useful when the AutoSize property is set to False, as it will allow you to recalculate the best-fit size for the UserLegendBox without setting the AutoSize property to True.
sizeToFit
in class LegendBoxBase
LegendBoxBase.setAutoSize(boolean)
,
LegendBox
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |