Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.graph
Class BaseLegendText

oracle.dss.graph.BaseGraphComponent
  |
  +--oracle.dss.graph.BaseText
        |
        +--oracle.dss.graph.BaseLegendText
All Implemented Interfaces:
DataviewFontAttribute, FontAttribute, WordWrapEnabled
Direct Known Subclasses:
LegendText, ReferenceLineText

public class BaseLegendText
extends BaseText
implements WordWrapEnabled

Text in the legend of a graph.

See Also:
LegendArea

Fields inherited from class oracle.dss.graph.BaseGraphComponent
AL_BOTH, AL_LEFT, AL_RIGHT, AP_ALWAYS, AP_NEVER, AR_HORIZ_ROTATE_270, AR_HORIZ_ROTATE_90, AR_NO_ROTATE, DY2_AUTO_ASSIGN, DY2_FALSE, DY2_TRUE, FS_BOLD, FS_BOLD_ITALIC_UNDERLINE, FS_BOLD_UNDERLINE, FS_ITALIC, FS_ITALIC_BOLD, FS_ITALIC_UNDERLINE, FS_PLAIN, FS_UNDERLINE, FT_COLOR, FT_EXPONENTIAL, FT_GRADIENT, FT_LINEAR, FT_LOGARITHMIC, FT_NONE, FT_TEXTURE, GD_DIAGONAL_135, GD_DIAGONAL_45, GD_DOWN, GD_DOWN_LEFT, GD_DOWN_RIGHT, GD_LEFT, GD_RADIAL, GD_RADIAL_BOTTOM_LEFT, GD_RADIAL_BOTTOM_RIGHT, GD_RADIAL_TOP_LEFT, GD_RADIAL_TOP_RIGHT, GD_RIGHT, GD_UP, GD_UP_LEFT, GD_UP_RIGHT, GS_EXTENDED, GS_GRID, GS_IN, GS_OUT, GS_SPAN, LAP_BOTTOM, LAP_LEFT, LAP_RIGHT, LAP_TOP, LD_PERCENT, LD_TEXT, LD_TEXT_PERCENT, LD_VALUE, LEGENDMARKERSLIMIT, LO_AUTOMATIC, LO_HORIZONTAL, LO_VERTICAL, LP_INSIDE, LP_NO_LABELS, LP_OUTSIDE_WITH_FEELER, LP_OUTSIDE_WITHOUT_FEELER, LTP_ABOVE, LTP_BELOW, LTP_ON_LEFT, LTP_ON_MARKER, LTP_ON_RIGHT, MS_AUTOMATIC, MS_CIRCLE, MS_DIAMOND, MS_NONE, MS_PLUS, MS_SQUARE, MS_TRIANGLE_DOWN, MS_TRIANGLE_UP, MT_AREA, MT_BAR, MT_DEFAULT, MT_MARKER, MTP_CENTER, MTP_CUSTOM, MTP_INSIDE_MAX, MTP_INSIDE_MIN, MTP_ON_MAXEDGE, MTP_OUTSIDE_MAX, QUADRANTLINEVALUELIMIT, TDM_STRETCHED, TDM_TILED, TLS_AUTOMATIC, TLS_MANUAL, TLS_NOSKIP, TR_HORIZ, TR_HORIZ_ROTATE_270, TR_HORIZ_ROTATE_90, VF_STOCK_VOLUME, VF_X1, VF_Y1, VF_Y2, VF_Z

 

Method Summary
 int getHorizontalAlignment()
          Retrieves the horizontal alignment for the text within the rectangle of the legend text.
 int getMaxAutoFontSize()
          Retrieves the maximum font size for legend text that is automatically sized to fit in the legend.
 int getMinAutoFontSize()
          Retrieves the minimum font size for legend text that is automatically sized to fit in the legend.
 boolean isTextFittingAutomatic()
          Indicates whether the legend text is automatically moved and resized to fit in the legend area.
 boolean isWordWrapEnabled()
          Indicates whether word wrap is enabled for all of the legend text.
 void setHorizontalAlignment(int a)
          Specifies the horizontal alignment of the text within the rectangle of the legend text.
 void setMaxAutoFontSize(int size)
          Specifies the maximum font size for legend text that is automatically sized to fit in the legend.
 void setMinAutoFontSize(int size)
          Specifies the minimum font size for legend text that is automatically sized to fit in the legend.
 void setTextFittingAutomatic(boolean yesNo)
          Specifies whether the legend text is automatically moved and resized to fit in the legend area.
 void setWordWrapEnabled(boolean yesNo)
          Specifies whether word wrap is enabled for all of the legend text.

 

Methods inherited from class oracle.dss.graph.BaseText
getDataviewFont, getFont, getGraphFont, isFontSizeAbsolute, setFont, setFontSizeAbsolute

 

Methods inherited from class oracle.dss.graph.BaseGraphComponent
selectObject

 

Method Detail

isTextFittingAutomatic

public boolean isTextFittingAutomatic()
Indicates whether the legend text is automatically moved and resized to fit in the legend area. The return value of this method takes effect only when the FontSizeAbsolute attribute is set to false and when automatic graph layout is disabled (when the AutoLayout property of the graph is AL_NEVER).
Returns:
true if it is automatically moved and resized, false if it is not.
See Also:
BaseText.isFontSizeAbsolute(), Graph.setAutoLayout(int)

setTextFittingAutomatic

public void setTextFittingAutomatic(boolean yesNo)
Specifies whether the legend text is automatically moved and resized to fit in the legend area. For example, if you have three series in the graph, the legend text probably fits fine. If you then add five more series to the graph, then the legend text might need to be smaller in order to keep it legible. The text size might also need to change when a user resizes the legend. Setting TextFittingAutomatic to true instructs the graph to resize the text when appropriate.

In order for this method to take effect, the FontSizeAbsolute attribute must be set to false, and the AutoLayout property of the graph must be set to AL_NEVER.

Parameters:
yesNo - true to make the legend text automatically move and resize, false prevent resizing.
See Also:
BaseText.isFontSizeAbsolute(), BaseText.setFontSizeAbsolute(boolean), Graph.setAutoLayout(int)

getHorizontalAlignment

public int getHorizontalAlignment()
Retrieves the horizontal alignment for the text within the rectangle of the legend text. The constants are LEFT, CENTER and RIGHT.
Returns:
A swing constant that represents the horizontal alignment for this legend text.

setHorizontalAlignment

public void setHorizontalAlignment(int a)
Specifies the horizontal alignment of the text within the rectangle of the legend text. The constants are LEFT, CENTER and RIGHT.
Parameters:
a - A swing constant that represents the horizontal alignment of this legend text.

getMaxAutoFontSize

public int getMaxAutoFontSize()
Retrieves the maximum font size for legend text that is automatically sized to fit in the legend. The setting that this method returns takes effect only when the FontSizeAbsolute property is set to false and TextFittingAutomatic is set to true. The AutoLayout property of the graph must also be set to AL_NEVER.
Returns:
The maximum font size for autofit legend text, in virtual coordinate units.
See Also:
BaseText.isFontSizeAbsolute(), isTextFittingAutomatic(), getMinAutoFontSize(), setMaxAutoFontSize(int), setMinAutoFontSize(int), Graph.getMaxTickLabelAutoFontSize(), Graph.getMinTickLabelAutoFontSize(), Graph.setMaxTickLabelAutoFontSize(int), Graph.setMinTickLabelAutoFontSize(int), Graph.setAutoLayout(int)

setMaxAutoFontSize

public void setMaxAutoFontSize(int size)
Specifies the maximum font size for legend text that is automatically sized to fit in the legend. The setting takes effect only when the FontSizeAbsolute property is set to false and TextFittingAutomatic is set to true. The AutoLayout property of the graph must also be set to AL_NEVER.
Parameters:
size - The maximum font size for autofit legend text, in virtual coordinate units. Values less than 1 are not valid. If you pass an invalid value, this method logs a message with the error handler and does not change the property value.
See Also:
BaseText.setFontSizeAbsolute(boolean), setTextFittingAutomatic(boolean), getMaxAutoFontSize(), getMinAutoFontSize(), setMinAutoFontSize(int), Graph.getMaxTickLabelAutoFontSize(), Graph.getMinTickLabelAutoFontSize(), Graph.setMaxTickLabelAutoFontSize(int), Graph.setMinTickLabelAutoFontSize(int), Graph.setAutoLayout(int)

getMinAutoFontSize

public int getMinAutoFontSize()
Retrieves the minimum font size for legend text that is automatically sized to fit in the legend. The setting that this method returns takes effect only when the FontSizeAbsolute property is set to false and the TextFittingAutomatic property is set to true. The AutoLayout property of the graph must also be set to AL_NEVER.
Returns:
The minimum font size for autofit legend text, in virtual coordinate units.
See Also:
BaseText.isFontSizeAbsolute(), isTextFittingAutomatic(), getMaxAutoFontSize(), setMaxAutoFontSize(int), setMinAutoFontSize(int), Graph.getMaxTickLabelAutoFontSize(), Graph.getMinTickLabelAutoFontSize(), Graph.setMaxTickLabelAutoFontSize(int), Graph.setMinTickLabelAutoFontSize(int), Graph.setAutoLayout(int)

setMinAutoFontSize

public void setMinAutoFontSize(int size)
Specifies the minimum font size for legend text that is automatically sized to fit in the legend. The setting takes effect only when the FontSizeAbsolute property is set to false and the TextFittingAutomatic property is set to true. The AutoLayout property of the graph must also be set to AL_NEVER.
Parameters:
size - The minimum font size for autofit legend text, in virtual coordinate units. Values less than 1 are not valid. If you pass an invalid value, this method logs a message with the error handler and does not change the property value.
See Also:
BaseText.setFontSizeAbsolute(boolean), setTextFittingAutomatic(boolean), getMaxAutoFontSize(), getMinAutoFontSize(), setMaxAutoFontSize(int), Graph.getMaxTickLabelAutoFontSize(), Graph.getMinTickLabelAutoFontSize(), Graph.setMaxTickLabelAutoFontSize(int), Graph.setMinTickLabelAutoFontSize(int), Graph.setAutoLayout(int)

isWordWrapEnabled

public boolean isWordWrapEnabled()
Indicates whether word wrap is enabled for all of the legend text. Automatic graph layout ignores this property, and doAutoLayout sets it as needed.
Specified by:
isWordWrapEnabled in interface WordWrapEnabled
Returns:
true if it is enabled, false if it is not.
See Also:
Graph.setAutoLayout(int), Graph.doAutoLayout(int)

setWordWrapEnabled

public void setWordWrapEnabled(boolean yesNo)
Specifies whether word wrap is enabled for all of the legend text. Automatic graph layout ignores this property, and doAutoLayout sets it as needed.
Specified by:
setWordWrapEnabled in interface WordWrapEnabled
Parameters:
yesNo - true to wrap words, false to prohibit wrapping.
See Also:
Graph.setAutoLayout(int), Graph.doAutoLayout(int)

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.