|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dss.dataView.BaseComponentXML
oracle.dss.graph.BaseGraphComponent
oracle.dss.graph.LegendArea
public class LegendArea
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.
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.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.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 |
---|
protected SFX m_sfx
public static final java.lang.String a_alongGraphEdge
public static final java.lang.String a_automaticPlacement
protected static final int rect_Height
protected static final int rect_Width
protected static final int rect_X
protected static final int rect_Y
Constructor Detail |
---|
public LegendArea(CommonGraph graph)
graph
- The graph that this object belongs to.Method Detail |
---|
public SFX getSFX()
SFX
object for this legend area.
This allows you to retrieve and specify attributes for special effects.
Automatic graph layout respects this property.
SFX
object for the legend area.public boolean selectObject(int series, int group)
selectObject
in class BaseGraphComponent
series
- Any integer.group
- Any integer.
true
if successful, false
if not.public java.awt.Color getBorderColor()
Automatic graph layout respects this property.
public void setBorderColor(java.awt.Color newColor)
Automatic graph layout respects this property.
newColor
- The color of the border for this legend area.public boolean isBorderTransparent()
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.
true
if it is transparent, false
if
it is visible.public void setBorderTransparent(boolean yesNo)
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.
yesNo
- true
to make it transparent,
false
to make it visible.public java.awt.Color getFillColor()
Automatic graph layout respects this property.
public void setFillColor(java.awt.Color newColor)
Automatic graph layout respects this property.
newColor
- The fill color of this legend area.public boolean isFillTransparent()
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.
true
if it is transparent, false
if
it is visible.public void setFillTransparent(boolean yesNo)
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.
yesNo
- true
to make it transparent,
false
to make it visible.public boolean isMarkersPerRowAutomatic()
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
.
true
if the graph automatically determines the number
of markers in each row,
false
if the graph uses the value of the
LegendMarkersPerRow
attribute.getLegendMarkersPerRow()
,
Graph.doAutoLayout(int)
public void setMarkersPerRowAutomatic(boolean yesNo)
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
.
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.getLegendMarkersPerRow()
,
Graph.doAutoLayout(int)
public int getLegendMarkersPerRow()
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.
isMarkersPerRowAutomatic()
,
setMarkersPerRowAutomatic(boolean)
,
getLegendOrientation()
,
setLegendOrientation(int)
,
Graph.doAutoLayout(int)
public void setLegendMarkersPerRow(int count)
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.
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.isMarkersPerRowAutomatic()
,
setMarkersPerRowAutomatic(boolean)
,
getLegendOrientation()
,
setLegendOrientation(int)
public int getLegendTextPosition()
Automatic graph layout ignores this property.
The doAutoLayout
method sets this property to
LTP_ON_RIGHT
or LTP_ON_LEFT
, depending on the
Locale
.
BaseGraphComponent.LTP_ABOVE
,
BaseGraphComponent.LTP_BELOW
,
BaseGraphComponent.LTP_ON_LEFT
,
BaseGraphComponent.LTP_ON_RIGHT
,
BaseGraphComponent.LTP_ON_MARKER
public void setLegendTextPosition(int mode)
doAutoLayout
method sets this property to
LTP_ON_RIGHT
or LTP_ON_LEFT
, depending on the
Locale
.
mode
- A constant that represents the position of the legend text
in this legend area. Valid constants appear in the See Also section.BaseGraphComponent.LTP_ABOVE
,
BaseGraphComponent.LTP_BELOW
,
BaseGraphComponent.LTP_ON_LEFT
,
BaseGraphComponent.LTP_ON_RIGHT
,
BaseGraphComponent.LTP_ON_MARKER
public int getLegendOrientation()
doAutoLayout
method sets this property, based on the
location of the legend in the graph.
BaseGraphComponent.LO_HORIZONTAL
,
BaseGraphComponent.LO_VERTICAL
public void setLegendOrientation(int orient)
doAutoLayout
method sets this property, based on the
location of the legend in the graph.
orient
- A constant that represents the orientation of the items
in this legend area. Valid constants are listed in the See Also section.BaseGraphComponent.LO_HORIZONTAL
,
BaseGraphComponent.LO_VERTICAL
public int getPosition()
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
.
setAutomaticPlacement(int)
,
BaseGraphComponent.LAP_BOTTOM
,
BaseGraphComponent.LAP_LEFT
,
BaseGraphComponent.LAP_RIGHT
,
BaseGraphComponent.LAP_TOP
,
Graph.setAutoLayout(int)
,
Graph.doAutoLayout(int)
public void setPosition(int position)
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
.
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.setAutomaticPlacement(int)
,
BaseGraphComponent.LAP_BOTTOM
,
BaseGraphComponent.LAP_LEFT
,
BaseGraphComponent.LAP_RIGHT
,
BaseGraphComponent.LAP_TOP
,
Graph.setAutoLayout(int)
,
Graph.doAutoLayout(int)
public void setAlongGraphEdge(boolean alongEdge)
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
.
alongEdge
- true
to place the legend along the entire
edge of the graph,
false
to leave space around the legend.setAutomaticPlacement(int)
,
setPosition(int)
,
Graph.setAutoLayout(int)
public boolean isAlongGraphEdge()
Automatic graph layout respects this property.
true
if the legend is along the entire edge of the
graph,
false
if there is some space around the edge.public void setAutomaticPlacement(int placement)
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
.
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.BaseGraphComponent.AP_ALWAYS
,
BaseGraphComponent.AP_NEVER
,
Graph.setAutoLayout(int)
,
Graph.doAutoLayout(int)
public int getAutomaticPlacement()
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
.
BaseGraphComponent.AP_ALWAYS
,
BaseGraphComponent.AP_NEVER
,
Graph.setAutoLayout(int)
,
Graph.doAutoLayout(int)
public java.awt.Rectangle getRect()
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.
getRect
in interface Rect
setAlongGraphEdge(boolean)
,
setAutomaticPlacement(int)
,
Graph.setAutoLayout(int)
,
Graph.doAutoLayout(int)
public void setRect(java.awt.Rectangle loc)
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.
setRect
in interface Rect
loc
- The rectangle for this legend area.setAlongGraphEdge(boolean)
,
setAutomaticPlacement(int)
,
Graph.setAutoLayout(int)
,
Graph.doAutoLayout(int)
public boolean isVisible()
true
if it is visible, false
if it is
invisible.public void setVisible(boolean yesNo)
yesNo
- true
to make it visible, false
to make it invisible.protected java.lang.String convertLegendAreaPositionToString(int value)
public static int convertLegendAreaPositionToInt(java.lang.String string)
public static int convertAutomaticPlacementToInt(java.lang.String placement)
placement
- string representation of AutomaticPlacement value
protected void resetToDefault()
protected void graphTypeChanged(int oldType, int newType)
oldType
- the old graph typenewType
- the new graph typeprotected void setRectDefault(boolean bDefault)
bDefault
- true if the legend for the current graph type (standard or
ThreeDSurface) is one of its 4 default positionspublic int getAutomaticPosition()
protected void resetStyle()
protected java.lang.String getComponentName()
getComponentName
in class BaseComponentXML
protected oracle.dss.util.xml.ObjectNode getXML(boolean allProperties, boolean allOverriddenProperties)
public boolean getNonstyleXML(boolean allProperties, oracle.dss.util.xml.ObjectNode node)
BaseComponentXML
getNonstyleXML
in class BaseComponentXML
protected oracle.dss.util.xml.ObjectNode getStyleXML(boolean allProperties, boolean allOverriddenProperties)
protected void setXML(oracle.dss.util.xml.ObjectNode node, boolean allProperties, java.util.HashMap map)
protected void setXML(oracle.dss.util.xml.ObjectNode node, boolean allProperties)
protected void setNonStyleXML(oracle.dss.util.xml.ObjectNode node)
protected void setStyleXML(oracle.dss.util.xml.ObjectNode node, boolean allProperties)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |