Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.4.0)

E12063-05

oracle.dss.graph
Class LegendArea

java.lang.Object
  extended by oracle.dss.dataView.BaseComponentXML
      extended by oracle.dss.graph.BaseGraphComponent
          extended by oracle.dss.graph.LegendArea
All Implemented Interfaces:
Rect

public class LegendArea
extends BaseGraphComponent
implements Rect

Represents the legend of the graph. The legend provides a key to the information that is shown in the graph.

By default, the graph automatically lays out the legend, based on the number of data series that the graph displays and on the size of the labels in the legend text. Automatic graph layout respects some properties in this class. It ignores other properties.

See Also:
Graph.setAutoLayout(int), Graph.doAutoLayout(int)

Field Summary
static java.lang.String a_alongGraphEdge
           
static java.lang.String a_automaticPlacement
           
protected  SFX m_sfx
           
protected static int rect_Height
           
protected static int rect_Width
           
protected static int rect_X
           
protected static int rect_Y
           
 
Fields inherited from class oracle.dss.graph.BaseGraphComponent
a_assignedToY2, a_association, a_automaticRotation, a_axisAutoScaledFromZero, a_axisMaxAutoScaled, a_axisMaxValue, a_axisMinAutoScaled, a_axisMinValue, a_axisZoomMaxValue, a_axisZoomMinValue, a_backGround, a_borderStyle, a_borderTransparent, a_borderUsingDefaults, a_borderWidth, a_color, a_defaultAssignedToY2, a_defaultBorderColor, a_defaultBorderTransparent, a_defaultColor, a_defaultFirstMarkerColor, a_defaultFitlineType, a_defaultHighMarkerColor, a_defaultLastMarkerColor, a_defaultLineWidth, a_defaultLowMarkerColor, a_defaultMarkerColor, a_defaultMarkers, a_defaultMarkerShape, a_defaultMarkerType, a_displayedInLegend, a_explicitEnd, a_explicitStart, a_fitlineType, a_focusFactor, a_group, a_height, a_high_value, a_horizontalAlignment, a_imageSource, a_isometricProjection, a_labelPosition, a_legendMarkersPerRow, a_legendOrientation, a_legendTextPosition, a_lightSourceX, a_lightSourceY, a_lightSourceZ, a_line_value, a_lineColor, a_lineIndex, a_lineStyle, a_lineWidth, a_location, a_logarithmicBase, a_low_value, a_majorIncrement, a_majorTickStep, a_majorTickStepAutomatic, a_markerColor, a_markerShape, a_markerSize, a_markersPerRowAutomatic, a_markerTextAngleDefault, a_markerTextPlace, a_markerTextRadiusDefault, a_markerType, a_minorIncrement, a_minorTickStep, a_minorTickStepType, a_mode, a_panX, a_panY, a_pieSliceExplode, a_quadrantLineCountX, a_quadrantLineCountY, a_quadrantLineValueX, a_quadrantLineValueY, a_rendered, a_rollover_behavior, a_scaledLogarithmic, a_series, a_sharePanelProperties, a_shortDesc, a_sizeX, a_sizeY, a_sizeZ, a_skippedWithLabels, a_squareRisers, a_text, a_textFittingAutomatic, a_textRotation, a_textType, a_thresholdMaxValue, a_thresholdMinValue, a_tickLabelSkipCount, a_tickLabelSkipFirst, a_tickLabelSkipMode, a_tickLabelStaggered, a_tickLabelWrapped, a_tickStyle, a_translationX, a_translationY, a_translationZ, a_transparent, a_type, a_verticalAlignment, a_viewerX, a_viewerY, a_viewerZ, a_visibility, a_visible, a_wallThickX, a_wallThickY, a_wallThickZ, a_width, a_wordWrapEnabled, a_x, a_xValue, a_y, a_yValue, a_yValueAssignment, a_zoomFactor, al_both, AL_BOTH, al_left, AL_LEFT, al_right, AL_RIGHT, ap_always, AP_ALWAYS, ap_never, AP_NEVER, ar_horiz_rotate_270, AR_HORIZ_ROTATE_270, ar_horiz_rotate_90, AR_HORIZ_ROTATE_90, ar_no_rotate, AR_NO_ROTATE, dy2_auto_assign, DY2_AUTO_ASSIGN, dy2_false, DY2_FALSE, dy2_true, DY2_TRUE, FP_LG_CHECK, FP_LG_CROSSHATCH, FP_LG_DIAG_UP_LT, FP_LG_DIAG_UP_RT, FP_LG_DIAMOND_CHECK, FP_LG_TRIANGLE_CHECK, FP_MAX, FP_SM_CHECK, FP_SM_CROSSHATCH, FP_SM_DIAG_UP_LT, FP_SM_DIAG_UP_RT, FP_SM_DIAMOND_CHECK, FP_SM_TRIANGLE_CHECK, fs_bold, FS_BOLD, fs_bold_italic_underline, FS_BOLD_ITALIC_UNDERLINE, fs_bold_underline, FS_BOLD_UNDERLINE, fs_italic, FS_ITALIC, fs_italic_bold, FS_ITALIC_BOLD, fs_italic_underline, FS_ITALIC_UNDERLINE, fs_plain, FS_PLAIN, fs_underline, FS_UNDERLINE, ft_color, FT_COLOR, ft_exponential, FT_EXPONENTIAL, ft_gradient, FT_GRADIENT, ft_linear, FT_LINEAR, ft_logarithmic, FT_LOGARITHMIC, ft_none, FT_NONE, FT_PATTERN, ft_texture, FT_TEXTURE, gd_diagonal_135, GD_DIAGONAL_135, gd_diagonal_45, GD_DIAGONAL_45, gd_down, GD_DOWN, gd_down_left, GD_DOWN_LEFT, gd_down_right, GD_DOWN_RIGHT, gd_left, GD_LEFT, gd_radial, GD_RADIAL, gd_radial_bottom_left, GD_RADIAL_BOTTOM_LEFT, gd_radial_bottom_right, GD_RADIAL_BOTTOM_RIGHT, gd_radial_top_left, GD_RADIAL_TOP_LEFT, gd_radial_top_right, GD_RADIAL_TOP_RIGHT, gd_right, GD_RIGHT, gd_up, GD_UP, gd_up_left, GD_UP_LEFT, gd_up_right, GD_UP_RIGHT, gs_automatic, GS_AUTOMATIC, gs_extended, GS_EXTENDED, gs_grid, GS_GRID, gs_in, GS_IN, gs_none, GS_NONE, gs_out, GS_OUT, gs_span, GS_SPAN, lap_bottom, LAP_BOTTOM, lap_left, LAP_LEFT, lap_right, LAP_RIGHT, lap_top, LAP_TOP, ld_percent, LD_PERCENT, ld_text, LD_TEXT, ld_text_percent, LD_TEXT_PERCENT, ld_text_value, LD_TEXT_VALUE, ld_value, LD_VALUE, LEGENDMARKERSLIMIT, lo_automatic, LO_AUTOMATIC, lo_horizontal, LO_HORIZONTAL, lo_vertical, LO_VERTICAL, lp_inside, LP_INSIDE, lp_no_labels, LP_NO_LABELS, lp_outside_feeler_if_needed, LP_OUTSIDE_FEELER_IF_NEEDED, lp_outside_with_feeler, LP_OUTSIDE_WITH_FEELER, lp_outside_without_feeler, LP_OUTSIDE_WITHOUT_FEELER, ls_dash, LS_DASH, ls_dash_dot, LS_DASH_DOT, ls_dotted, LS_DOTTED, ls_solid, LS_SOLID, ltp_above, LTP_ABOVE, ltp_below, LTP_BELOW, ltp_on_left, LTP_ON_LEFT, ltp_on_marker, LTP_ON_MARKER, ltp_on_right, LTP_ON_RIGHT, m_commonGraph, m_identObj, m_pfj, ms_automatic, MS_AUTOMATIC, ms_circle, MS_CIRCLE, ms_diamond, MS_DIAMOND, ms_human, MS_HUMAN, ms_none, MS_NONE, ms_plus, MS_PLUS, ms_square, MS_SQUARE, ms_triangle_down, MS_TRIANGLE_DOWN, ms_triangle_up, MS_TRIANGLE_UP, mt_area, MT_AREA, mt_bar, MT_BAR, mt_centered_stepped_line, MT_CENTERED_STEPPED_LINE, MT_CURVE_AREA, mt_curve_line, MT_CURVE_LINE, mt_default, MT_DEFAULT, mt_marker, MT_MARKER, mt_stepped_line, MT_STEPPED_LINE, mtp_center, MTP_CENTER, mtp_custom, MTP_CUSTOM, mtp_inside_max, MTP_INSIDE_MAX, mtp_inside_min, MTP_INSIDE_MIN, mtp_on_maxedge, MTP_ON_MAXEDGE, mtp_outside_max, MTP_OUTSIDE_MAX, mtp_under_marker, MTP_UNDER_MARKER, QUADRANTLINEVALUELIMIT, ro_area, RO_AREA, ro_back, RO_BACK, ro_front, RO_FRONT, ro_line, RO_LINE, sv_hidden, SV_HIDDEN, sv_visible, SV_VISIBLE, tdm_stretched, TDM_STRETCHED, tdm_tiled, TDM_TILED, tls_automatic, TLS_AUTOMATIC, tls_manual, TLS_MANUAL, tls_noskip, TLS_NOSKIP, tr_horiz, TR_HORIZ, tr_horiz_rotate_270, TR_HORIZ_ROTATE_270, tr_horiz_rotate_90, TR_HORIZ_ROTATE_90, tsm_explicit, TSM_EXPLICIT, tsm_off, TSM_OFF, va_bottom, va_center, va_top, VF_PIE_SLICE_LABEL, VF_STOCK_VOLUME, VF_X1, VF_Y1, VF_Y2, VF_Z
 
Fields inherited from class oracle.dss.dataView.BaseComponentXML
m_jsfHashMap
 
Constructor Summary
LegendArea(CommonGraph graph)
           
 
Method Summary
static int convertAutomaticPlacementToInt(java.lang.String placement)
           
static int convertLegendAreaPositionToInt(java.lang.String string)
           
protected  java.lang.String convertLegendAreaPositionToString(int value)
           
 int getAutomaticPlacement()
          Indicates when the legend position is automatically determined when automatic layout is enabled (when the AutoLayout property of the graph is set to AL_ALWAYS or AL_AS_NEEDED).
 int getAutomaticPosition()
           
 java.awt.Color getBorderColor()
          Retrieves the color of the border for this legend area.
protected  java.lang.String getComponentName()
           
 java.awt.Color getFillColor()
          Retrieves the fill color of this legend area.
 int getLegendMarkersPerRow()
          Retrieves the number of legend markers that are displayed in each row of markers in this legend area.
 int getLegendOrientation()
          Retrieves the orientation of the items in this legend area.
 int getLegendTextPosition()
          Retrieves the position of the legend text in this legend area.
 boolean getNonstyleXML(boolean allProperties, oracle.dss.util.xml.ObjectNode node)
          Retrieves Non style properties of this component to XML returns whether if the node exists
 int getPosition()
          Retrieves the position that was set for this legend area on the graph.
 java.awt.Rectangle getRect()
          Retrieves the location for the rectangle of this legend area.
 SFX getSFX()
          Retrieves the SFX object for this legend area.
protected  oracle.dss.util.xml.ObjectNode getStyleXML(boolean allProperties, boolean allOverriddenProperties)
           
protected  oracle.dss.util.xml.ObjectNode getXML(boolean allProperties, boolean allOverriddenProperties)
           
protected  void graphTypeChanged(int oldType, int newType)
           
 boolean isAlongGraphEdge()
          Indicates whether the legend is along the entire edge of the graph, or if there is space between the legend and the graph edge.
 boolean isBorderTransparent()
          Indicates whether the border of this legend area is transparent.
 boolean isFillTransparent()
          Indicates whether the fill color of this legend area is transparent.
 boolean isMarkersPerRowAutomatic()
          Indicates whether the graph automatically determines the number of legend markers in each row of markers in this legend area.
 boolean isVisible()
          Indicates whether this legend area is visible.
protected  void resetStyle()
           
protected  void resetToDefault()
           
 boolean selectObject(int series, int group)
          Selects this legend area in the graph.
 void setAlongGraphEdge(boolean alongEdge)
          Specifies whether to place the legend along the edge of the graph or away from the edge.
 void setAutomaticPlacement(int placement)
          Specifies whether or not the legend should be automatically positioned as a part of automatic graph layout.
 void setBorderColor(java.awt.Color newColor)
          Specifies the color of the border for this legend area.
 void setBorderTransparent(boolean yesNo)
          Specifies whether the border of this legend area is transparent.
 void setFillColor(java.awt.Color newColor)
          Specifies the fill color of this legend area.
 void setFillTransparent(boolean yesNo)
          Specifies whether the fill color of this legend area is transparent.
 void setLegendMarkersPerRow(int count)
          Specifies the number of legend markers for the graph to display in each row of markers in this legend area.
 void setLegendOrientation(int orient)
          Specifies the orientation of the items in this legend area.
 void setLegendTextPosition(int mode)
          Specifies the position of the legend text in this legend area.
 void setMarkersPerRowAutomatic(boolean yesNo)
          Specifies whether the graph automatically determines the number of legend markers in each row of markers in this legend area.
protected  void setNonStyleXML(oracle.dss.util.xml.ObjectNode node)
           
 void setPosition(int position)
          Specifies the position of the rectangle for this legend area on the graph.
 void setRect(java.awt.Rectangle loc)
          Specifies the location for the rectangle of this legend area.
protected  void setRectDefault(boolean bDefault)
           
protected  void setStyleXML(oracle.dss.util.xml.ObjectNode node, boolean allProperties)
           
 void setVisible(boolean yesNo)
          Specifies whether this legend area is visible.
protected  void setXML(oracle.dss.util.xml.ObjectNode node, boolean allProperties)
           
protected  void setXML(oracle.dss.util.xml.ObjectNode node, boolean allProperties, java.util.HashMap map)
           
 
Methods inherited from class oracle.dss.graph.BaseGraphComponent
convertAssociationToInt, convertFillPatternToString, convertGradientDirectionToString, convertHorizontalAlignmentToInt, convertHorizontalAlignmentToString, convertLineStyleToInt, convertLineStyleToString, convertLocationToInt, convertTextRotationtToInt, convertTickStyleToInt, convertTypeToInt, convertVerticalAlignmentToInt, convertVerticalAlignmentToString, hexStringToInt, toHexString
 
Methods inherited from class oracle.dss.dataView.BaseComponentXML
getStyleXML, getStyleXML, getXML, setNonstyleXML, setNonstyleXML, setStyleXML, setXML, setXML, setXML, setXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_sfx

protected SFX m_sfx
For internal use only. Application developers should not use this

a_alongGraphEdge

public static final java.lang.String a_alongGraphEdge
See Also:
Constant Field Values
For internal use only. Application developers should not use this

a_automaticPlacement

public static final java.lang.String a_automaticPlacement
See Also:
Constant Field Values
For internal use only. Application developers should not use this

rect_Height

protected static final int rect_Height
See Also:
Constant Field Values
For internal use only. Application developers should not use this

rect_Width

protected static final int rect_Width
See Also:
Constant Field Values
For internal use only. Application developers should not use this

rect_X

protected static final int rect_X
See Also:
Constant Field Values
For internal use only. Application developers should not use this

rect_Y

protected static final int rect_Y
See Also:
Constant Field Values
For internal use only. Application developers should not use this
Constructor Detail

LegendArea

public LegendArea(CommonGraph graph)
Parameters:
graph - The graph that this object belongs to.
For internal use only. Application developers should not use this
Constructor. Application developers should not have to construct this object, because the graph does it automatically.
Method Detail

getSFX

public SFX getSFX()
Retrieves the SFX object for this legend area. This allows you to retrieve and specify attributes for special effects.

Automatic graph layout respects this property.

Returns:
The SFX object for the legend area.

selectObject

public boolean selectObject(int series,
                            int group)
Selects this legend area in the graph. Because the legend area does not represent data, the parameter values are irrelevant.

Overrides:
selectObject in class BaseGraphComponent
Parameters:
series - Any integer.
group - Any integer.
Returns:
true if successful, false if not.

getBorderColor

public java.awt.Color getBorderColor()
Retrieves the color of the border for this legend area.

Automatic graph layout respects this property.

Returns:
The color of the border for this legend area.

setBorderColor

public void setBorderColor(java.awt.Color newColor)
Specifies the color of the border for this legend area.

Automatic graph layout respects this property.

Parameters:
newColor - The color of the border for this legend area.

isBorderTransparent

public boolean isBorderTransparent()
Indicates whether the border of this legend area is transparent. To make the legend area transparent, set both the setBorderTransparent and setFillTransparent methods to false. When an attribute or an object is transparent, it is not visible, but you can select it.

Automatic graph layout respects this property.

Returns:
true if it is transparent, false if it is visible.

setBorderTransparent

public void setBorderTransparent(boolean yesNo)
Specifies whether the border of this legend area is transparent. To make the legend area transparent, set both the setBorderTransparent and setFillTransparent methods to false. When an attribute or an object is transparent, it is not visible, but you can select it.

Automatic graph layout respects this property.

Parameters:
yesNo - true to make it transparent, false to make it visible.

getFillColor

public java.awt.Color getFillColor()
Retrieves the fill color of this legend area.

Automatic graph layout respects this property.

Returns:
The fill color of this legend area.

setFillColor

public void setFillColor(java.awt.Color newColor)
Specifies the fill color of this legend area.

Automatic graph layout respects this property.

Parameters:
newColor - The fill color of this legend area.

isFillTransparent

public boolean isFillTransparent()
Indicates whether the fill color of this legend area is transparent. To make the legend area transparent, set both the setBorderTransparent and setFillTransparent methods to false. When an attribute or an object is transparent, it is not visible, but you can select it.

Automatic graph layout respects this property.

Returns:
true if it is transparent, false if it is visible.

setFillTransparent

public void setFillTransparent(boolean yesNo)
Specifies whether the fill color of this legend area is transparent. To make the legend area transparent, set both the setBorderTransparent and setFillTransparent methods to false. When an attribute or an object is transparent, it is not visible, but you can select it.

Automatic graph layout respects this property.

Parameters:
yesNo - true to make it transparent, false to make it visible.

isMarkersPerRowAutomatic

public boolean isMarkersPerRowAutomatic()
Indicates whether the graph automatically determines the number of legend markers in each row of markers in this legend area. When this method returns false, the graph uses the value of the LegendMarkersPerRow attribute to arrange the markers in this legend area. The default value for the MarkersPerRowAutomatic attribute is false.

Automatic graph layout ignores this property. The doAutoLayout method sets this property to false.

Returns:
true if the graph automatically determines the number of markers in each row, false if the graph uses the value of the LegendMarkersPerRow attribute.
See Also:
getLegendMarkersPerRow(), Graph.doAutoLayout(int)

setMarkersPerRowAutomatic

public void setMarkersPerRowAutomatic(boolean yesNo)
Specifies whether the graph automatically determines the number of legend markers in each row of markers in this legend area. When you pass false, the graph uses the value of the LegendMarkersPerRow attribute to arrange the markers in this legend area. The default value for the MarkersPerRowAutomatic attribute is false.

Automatic graph layout ignore this property. The doAutoLayout method sets this property to false.

Parameters:
yesNo - true to make the graph automatically calculate the number of markers in each row, false to have the graph use the value of the LegendMarkersPerRow property.
See Also:
getLegendMarkersPerRow(), Graph.doAutoLayout(int)

getLegendMarkersPerRow

public int getLegendMarkersPerRow()
Retrieves the number of legend markers that are displayed in each row of markers in this legend area. The value that this method returns takes effect only when the isMarkersPerRowAutomatic method returns false.

When this method returns zero and the isMarkersPerRowAutomatic method returns false, then the legend area displays all the markers either in one row or in one column, depending on the value of the LegendOrientation attribute. That is, if the legend is vertically oriented, then the graph displays one column (so, one marker per row). If the legend is horizontally oriented, then the graph displays one row of markers (so, all the markers in the one row). Zero is the default value of the LegendMarkersPerRow attribute.

Automatic graph layout ignores this this property. The doAutoLayout method sets this property, based on the data in the graph.

Returns:
The number of markers that the graph displays in each row of markers in this legend area.
See Also:
isMarkersPerRowAutomatic(), setMarkersPerRowAutomatic(boolean), getLegendOrientation(), setLegendOrientation(int), Graph.doAutoLayout(int)

setLegendMarkersPerRow

public void setLegendMarkersPerRow(int count)
Specifies the number of legend markers for the graph to display in each row of markers in this legend area. To make the value that you set in this method take effect, you must also set the setMarkersPerRowAutomatic method to false.

When you pass zero in this method and pass false in the setMarkersPerRowAutomatic, then the legend area displays all the markers either in one row or in one column, depending on the value of the LegendOrientation attribute. That is, if the legend is vertically oriented, then the graph displays one column (so, one marker per row). If the legend is horizontally oriented, then the graph displays one row of markers (so, all the markers in the one row). Zero is the default value of the LegendMarkersPerRow attribute.

Automatic graph layout ignores this property. The doAutoLayout method sets this property, based on the data in the graph.

Parameters:
count - The number of legend markers to display in each row of markers in this legend area; zero to display either one row or one column of markers. The number of legend should be ranged from zero to 9999.
See Also:
isMarkersPerRowAutomatic(), setMarkersPerRowAutomatic(boolean), getLegendOrientation(), setLegendOrientation(int)

getLegendTextPosition

public int getLegendTextPosition()
Retrieves the position of the legend text in this legend area.

Automatic graph layout ignores this property. The doAutoLayout method sets this property to LTP_ON_RIGHT or LTP_ON_LEFT, depending on the Locale.

Returns:
A constant that represents the position of the legend text in this legend area. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.LTP_ABOVE, BaseGraphComponent.LTP_BELOW, BaseGraphComponent.LTP_ON_LEFT, BaseGraphComponent.LTP_ON_RIGHT, BaseGraphComponent.LTP_ON_MARKER

setLegendTextPosition

public void setLegendTextPosition(int mode)
Specifies the position of the legend text in this legend area. Automatic graph layout ignores this property. The doAutoLayout method sets this property to LTP_ON_RIGHT or LTP_ON_LEFT, depending on the Locale.

Parameters:
mode - A constant that represents the position of the legend text in this legend area. Valid constants appear in the See Also section.
See Also:
BaseGraphComponent.LTP_ABOVE, BaseGraphComponent.LTP_BELOW, BaseGraphComponent.LTP_ON_LEFT, BaseGraphComponent.LTP_ON_RIGHT, BaseGraphComponent.LTP_ON_MARKER

getLegendOrientation

public int getLegendOrientation()
Retrieves the orientation of the items in this legend area. Automatic graph layout ignores this property. The doAutoLayout method sets this property, based on the location of the legend in the graph.

Returns:
A constant that represents the orientation of the items in this legend area. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.LO_HORIZONTAL, BaseGraphComponent.LO_VERTICAL

setLegendOrientation

public void setLegendOrientation(int orient)
Specifies the orientation of the items in this legend area. Automatic graph layout ignores this property. The doAutoLayout method sets this property, based on the location of the legend in the graph.

Parameters:
orient - A constant that represents the orientation of the items in this legend area. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.LO_HORIZONTAL, BaseGraphComponent.LO_VERTICAL

getPosition

public int getPosition()
Retrieves the position that was set for this legend area on the graph. This method returns the setting that was specified through the user interface panel or through the API. This method does not account for changes that the user might make through direct manipulation of the Java-client graph, when graph automatic layout is disabled. For example, if you call setPosition to LAP_TOP, and a user later drags the legend to the right of the graph, this method still returns LAP_TOP, even though the legend appears at the right of the graph.

Automatic graph layout respects this property if the AutomaticPlacement property is set to AP_NEVER. If AutomaticPlacement is set to AP_ALWAYS, then automatic graph layout ignores this property, and doAutoLayout sets this property either to LAP_BOTTOM or to LAP_RIGHT.

Returns:
A constant that represents the position of this legend area on the graph. The constants are listed in the See Also section.
See Also:
setAutomaticPlacement(int), BaseGraphComponent.LAP_BOTTOM, BaseGraphComponent.LAP_LEFT, BaseGraphComponent.LAP_RIGHT, BaseGraphComponent.LAP_TOP, Graph.setAutoLayout(int), Graph.doAutoLayout(int)

setPosition

public void setPosition(int position)
Specifies the position of the rectangle for this legend area on the graph.

Automatic graph layout respects this property if the AutomaticPlacement property is set to AP_NEVER. If AutomaticPlacement is set to AP_ALWAYS, then automatic graph layout ignores this property, and doAutoLayout sets this property either to LAP_BOTTOM or to LAP_RIGHT.

Parameters:
position - A constant that represents the position of the rectangle for this legend area on the graph. Valid constants are listed in the See Also section.
See Also:
setAutomaticPlacement(int), BaseGraphComponent.LAP_BOTTOM, BaseGraphComponent.LAP_LEFT, BaseGraphComponent.LAP_RIGHT, BaseGraphComponent.LAP_TOP, Graph.setAutoLayout(int), Graph.doAutoLayout(int)

setAlongGraphEdge

public void setAlongGraphEdge(boolean alongEdge)
Specifies whether to place the legend along the edge of the graph or away from the edge. When this property is set to true, then the legend area covers the entire edge of the graph. When this property is false, then the legend has a variable size, and white space, and possibly graph titles, appear between the legend and the edge of the graph.

When you set AlongGraphEdge to true, then any visible graph titles are moved, so that they do not overlap the legend area:

When AlongGraphEdge to false, then the graph does not generally move the visible titles. If you set AlongGraphEdge to false after it has been set to true, then the titles move back to default positions. For example, if the legend is along the top edge of the graph and you set AlongGraphEdge to false, then the title and subtitle move back above the legend area.

The default value of AlongGraphEdge is false.

Note: If AlongGraphEdge and AutomaticPlacement are both set to true, then the title, subtitle and footnote cannot be moved by direct manipulation.

Automatic graph layout respects this property. You should enable automatic graph layout when you set this property to true.

Parameters:
alongEdge - true to place the legend along the entire edge of the graph, false to leave space around the legend.
See Also:
setAutomaticPlacement(int), setPosition(int), Graph.setAutoLayout(int)

isAlongGraphEdge

public boolean isAlongGraphEdge()
Indicates whether the legend is along the entire edge of the graph, or if there is space between the legend and the graph edge.

Automatic graph layout respects this property.

Returns:
true if the legend is along the entire edge of the graph, false if there is some space around the edge.

setAutomaticPlacement

public void setAutomaticPlacement(int placement)
Specifies whether or not the legend should be automatically positioned as a part of automatic graph layout.

When automatic graph layout is disabled, this property setting has effect only when you call the doAutoLayout method of the graph.

The doAutoLayout method sets this property to AP_NEVER so you can adjust the placement. doAutoLayout(Graph.HONOR_PROPERTIES) honors this property. doAutoLayout(Graph.RESET_PROPERTIES) treats this property as AP_ALWAYS.

Parameters:
placement - A constant that represents whether to include the legend position as part of automatic graph layout. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.AP_ALWAYS, BaseGraphComponent.AP_NEVER, Graph.setAutoLayout(int), Graph.doAutoLayout(int)

getAutomaticPlacement

public int getAutomaticPlacement()
Indicates when the legend position is automatically determined when automatic layout is enabled (when the AutoLayout property of the graph is set to AL_ALWAYS or AL_AS_NEEDED).

When AutomaticPlacement is set to AP_ALWAYS, automatic layout places the legend area at the bottom of the graph or to the right of the plot area.

The doAutoLayout method sets this property to AP_NEVER so you can adjust the placement. doAutoLayout(Graph.HONOR_PROPERTIES) honors this property. doAutoLayout(Graph.RESET_PROPERTIES) treats this property as AP_ALWAYS.

Returns:
A constant that represents when the legend position is automatic. Possible constants are listed in the See Also section.
See Also:
BaseGraphComponent.AP_ALWAYS, BaseGraphComponent.AP_NEVER, Graph.setAutoLayout(int), Graph.doAutoLayout(int)

getRect

public java.awt.Rectangle getRect()
Retrieves the location for the rectangle of this legend area. The rectangle defines the size and location of the legend area in virtual coordinates. The virtual-coordinate system keeps components in proportion to the graph when the graph changes size.

In the virtual-coordinate system, the center of the graph is 0,0. The upper left corner is -16000, +16000. The lower right corner is +16000, -16000. A component that is the full size of the graph has a width of 32000 and a height of 32000.

If AlongGraphEdge is true, or if AutomaticPlacement is true, then this property is ignored.

Automatic graph layout ignores this property. The doAutoLayout method sets this property.

Specified by:
getRect in interface Rect
Returns:
The location for the rectangle of this legend area.
See Also:
setAlongGraphEdge(boolean), setAutomaticPlacement(int), Graph.setAutoLayout(int), Graph.doAutoLayout(int)

setRect

public void setRect(java.awt.Rectangle loc)
Specifies the location for the rectangle of this legend area. The rectangle defines the size and location of the legend area in virtual coordinates. The virtual-coordinate system keeps components in proportion to the graph when the graph changes size.

In the virtual-coordinate system, the center of the graph is 0,0. The upper left corner is -16000, +16000. The lower right corner is +16000, -16000. A component that is the full size of the graph has a width of 32000 and a height of 32000.

If AlongGraphEdge is true, or if AutomaticPlacement is true, then this property is ignored.

Automatic graph layout ignores this property. The doAutoLayout method sets this property.

Specified by:
setRect in interface Rect
Parameters:
loc - The rectangle for this legend area.
See Also:
setAlongGraphEdge(boolean), setAutomaticPlacement(int), Graph.setAutoLayout(int), Graph.doAutoLayout(int)

isVisible

public boolean isVisible()
Indicates whether this legend area is visible. Automatic graph layout respects this property.

Returns:
true if it is visible, false if it is invisible.

setVisible

public void setVisible(boolean yesNo)
Specifies whether this legend area is visible. Automatic graph layout respects this property.

Parameters:
yesNo - true to make it visible, false to make it invisible.

convertLegendAreaPositionToString

protected java.lang.String convertLegendAreaPositionToString(int value)
For internal use only. Application developers should not use this
Converts Legend Area Position Integer constants to String constants. This is used by get/setXML().

convertLegendAreaPositionToInt

public static int convertLegendAreaPositionToInt(java.lang.String string)
For internal use only. Application developers should not use this
Converts Legend Area Position String constants to Integer constants. This is used by get/setXML().

convertAutomaticPlacementToInt

public static int convertAutomaticPlacementToInt(java.lang.String placement)
Parameters:
placement - string representation of AutomaticPlacement value
Returns:
the int value of AutomaticPlacement represented by the string
For internal use only. Application developers should not use this
Convert the string saved in XML to one of the values of AutomaticPlacement.

resetToDefault

protected void resetToDefault()
For internal use only. Application developers should not use this
Reset this LegendArea to its default state. Called from Graph.resetToDefault()

graphTypeChanged

protected void graphTypeChanged(int oldType,
                                int newType)
Parameters:
oldType - the old graph type
newType - the new graph type
For internal use only. Application developers should not use this
Signal that the graph type has changed. Called from Graph.setGraphType()

setRectDefault

protected void setRectDefault(boolean bDefault)
Parameters:
bDefault - true if the legend for the current graph type (standard or ThreeDSurface) is one of its 4 default positions
For internal use only. Application developers should not use this
Set whether or not the legend rectangle for the current graph type is in a default position.

getAutomaticPosition

public int getAutomaticPosition()
Returns:
the position of the legend (one of the LAP_* constants defined in this class)
For internal use only. Application developers should not use this
Determine the internal position of the legend.

resetStyle

protected void resetStyle()
For internal use only. Application developers should not use this
reset style properties

getComponentName

protected java.lang.String getComponentName()
Overrides:
getComponentName in class BaseComponentXML
For internal use only. Application developers should not use this
Retrieves the name of the object.

getXML

protected oracle.dss.util.xml.ObjectNode getXML(boolean allProperties,
                                                boolean allOverriddenProperties)
For internal use only. Application developers should not use this
Retrieves XML from this component returns null if no property is overridden

getNonstyleXML

public boolean getNonstyleXML(boolean allProperties,
                              oracle.dss.util.xml.ObjectNode node)
Description copied from class: BaseComponentXML
Retrieves Non style properties of this component to XML returns whether if the node exists

Overrides:
getNonstyleXML in class BaseComponentXML
For internal use only. Application developers should not use this
Retrieves Non style properties of this component to XML returns whether if the node exists

getStyleXML

protected oracle.dss.util.xml.ObjectNode getStyleXML(boolean allProperties,
                                                     boolean allOverriddenProperties)
For internal use only. Application developers should not use this
Retrieves XML from this component returns null if no property is overridden

setXML

protected void setXML(oracle.dss.util.xml.ObjectNode node,
                      boolean allProperties,
                      java.util.HashMap map)
For internal use only. Application developers should not use this
Sets XML on this component

setXML

protected void setXML(oracle.dss.util.xml.ObjectNode node,
                      boolean allProperties)
For internal use only. Application developers should not use this
Sets properties of this component from XML

setNonStyleXML

protected void setNonStyleXML(oracle.dss.util.xml.ObjectNode node)
For internal use only. Application developers should not use this
Sets non-style properties of this component from XML

setStyleXML

protected void setStyleXML(oracle.dss.util.xml.ObjectNode node,
                           boolean allProperties)
For internal use only. Application developers should not use this
Sets style properties of this component from XML

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.4.0)

E12063-05

Copyright © 1997, 2011, Oracle. All rights reserved.