Package org.jCharts.properties
Class LegendAreaProperties
java.lang.Object
org.jCharts.properties.Properties
org.jCharts.properties.AreaProperties
org.jCharts.properties.LegendAreaProperties
- All Implemented Interfaces:
Serializable,HTMLTestable
- Direct Known Subclasses:
LegendProperties
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate intprivate intstatic final intstatic final intprivate intstatic final intprivate intprivate intstatic final intprivate intstatic final intFields inherited from class org.jCharts.properties.Properties
DEFAULT_BACKGROUND_PAINT -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for those desiring auto-calculation of the Legend width based on the number of columns. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the padding between chart plot and the Legend.intReturns the padding between label columns.intReturns the padding between the icon and the LabelintGets the number of text columns the legend should display.intReturns where the Legend should be drawn in relation to the Chart.intReturns the padding between labels in each row.voidsetChartPadding(int chartPadding) Sets the padding between chart plot and the Legend.voidsetColumnPadding(int columnPadding) Sets the padding between label columns, in pixels.voidsetIconPadding(int iconPadding) Sets the padding between the icon and the Label, in pixels.voidsetNumColumns(int numColumns) Sets the number of text columns the legend should display.voidsetPlacement(int placementConstant) Sets where the Legend should be drawn in relation to the Chart.voidsetRowPadding(int rowPadding) Sets the padding between labels in each row, in pixels.voidtoHTML(HTMLGenerator htmlGenerator) Enables the testing routines to display the contents of this Object.Methods inherited from class org.jCharts.properties.AreaProperties
getBorderStroke, getEdgePadding, setBorderStroke, setEdgePaddingMethods inherited from class org.jCharts.properties.Properties
getBackgroundPaint, setBackgroundPaint
-
Field Details
-
COLUMNS_AS_MANY_AS_NEEDED
public static final int COLUMNS_AS_MANY_AS_NEEDED- See Also:
-
COLUMNS_FIT_TO_IMAGE
public static final int COLUMNS_FIT_TO_IMAGE- See Also:
-
BOTTOM
public static final int BOTTOM- See Also:
-
RIGHT
public static final int RIGHT- See Also:
-
LEFT
public static final int LEFT- See Also:
-
TOP
public static final int TOP- See Also:
-
numColumns
private int numColumns -
rowPadding
private int rowPadding -
columnPadding
private int columnPadding -
iconPadding
private int iconPadding -
chartPadding
private int chartPadding -
placement
private int placement
-
-
Constructor Details
-
LegendAreaProperties
public LegendAreaProperties()Constructor for those desiring auto-calculation of the Legend width based on the number of columns. All Labels are on a single row as default number of rows is: COLUMNS_AS_MANY_AS_NEEDED
-
-
Method Details
-
getPlacement
public int getPlacement()Returns where the Legend should be drawn in relation to the Chart.- Returns:
- int
-
setPlacement
public void setPlacement(int placementConstant) Sets where the Legend should be drawn in relation to the Chart.- Parameters:
placementConstant-
-
getChartPadding
public int getChartPadding()Returns the padding between chart plot and the Legend.- Returns:
- int
-
setChartPadding
public void setChartPadding(int chartPadding) Sets the padding between chart plot and the Legend.- Parameters:
chartPadding-
-
getColumnPadding
public int getColumnPadding()Returns the padding between label columns.- Returns:
- int
-
getRowPadding
public int getRowPadding()Returns the padding between labels in each row.- Returns:
- int
-
setNumColumns
public void setNumColumns(int numColumns) Sets the number of text columns the legend should display.- Parameters:
numColumns-
-
getNumColumns
public int getNumColumns()Gets the number of text columns the legend should display.- Returns:
- int
-
getIconPadding
public int getIconPadding()Returns the padding between the icon and the Label- Returns:
- int
-
setRowPadding
public void setRowPadding(int rowPadding) Sets the padding between labels in each row, in pixels.- Parameters:
rowPadding-
-
setColumnPadding
public void setColumnPadding(int columnPadding) Sets the padding between label columns, in pixels.- Parameters:
columnPadding-
-
setIconPadding
public void setIconPadding(int iconPadding) Sets the padding between the icon and the Label, in pixels.- Parameters:
iconPadding-
-
toHTML
Enables the testing routines to display the contents of this Object.- Specified by:
toHTMLin interfaceHTMLTestable- Overrides:
toHTMLin classAreaProperties- Parameters:
htmlGenerator-
-