|
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.gauge.GaugeEngine
public class GaugeEngine
Field Summary | |
---|---|
protected java.awt.Shape |
_gaugeSetClip
|
protected static double |
ASCENT_TEXT_HEIGHT
|
static int |
BORDER_ONLY
|
protected static int |
DEFAULT_OBJECTLIST_SIZE
|
static int |
FILL_AND_BORDER
|
static int |
FILL_ONLY
|
Constructor Summary | |
---|---|
GaugeEngine(java.util.Map propMap)
|
|
GaugeEngine(java.util.Map propMap,
int gaugeType)
Constructor with a property map. |
Method Summary | |
---|---|
protected java.lang.String[] |
_getFlashToolTipText(int filter)
Generates tooltips based on the given filter for Flash. |
protected java.lang.String[] |
_getPNGToolTipText(int filter)
Generates tooltips based on the given filter for PNG. |
protected int |
_getPowerOfTen(double dValue)
|
protected static java.awt.Polygon |
_processImagemapPolygon(DrawableObject obj)
Handles the various types of shapes that need to be added to the imageMap vector. |
protected java.awt.Dimension |
autoLayout(java.awt.Graphics2D g,
java.awt.Rectangle rect)
Figures out the size of the gauge based on the size of each component. |
java.awt.Dimension |
calcGaugeSize(java.awt.Graphics2D g,
java.awt.Dimension maxSize)
Calculates the actual size required by this gauge taking into account all the current attribute settings and given the maximum size available for the gauge. |
protected void |
determineFormat(boolean metricLabel)
Based on the min and max values, determine the best scale for the view format of the given component |
protected java.lang.String |
formatValue(java.lang.Double data,
java.lang.String viewFormatKey)
Formats the given value base on the current locale and the current setting of the number type property. |
java.lang.Object |
getAttribute(java.lang.String name)
This method provides a single means of retrieving attribute values of gauge components. |
protected static java.lang.String |
getCompNameForImagemapEnumeration(int compType)
Get the name for the given component type. |
ErrorHandler |
getErrorHandler()
|
java.lang.String |
getErrorIntlString(java.lang.String key)
|
java.awt.Graphics2D |
getGraphics()
|
protected java.lang.String |
getId()
|
java.util.Enumeration |
getImagemapEnumeration(java.awt.Graphics2D g,
int filter)
Retrieves the enumeration of specific kinds of components that are currently in use and visible on the gauge. |
protected double |
getIncrement()
|
protected static java.lang.Object |
getIndicatorAttr(java.util.Map map,
java.lang.String attr,
int index)
This function is used when you need to get the attribute for indicators But don't use this function for indicator base |
protected java.lang.Object |
getIndicatorAttr(java.lang.String attr,
int index)
This function is used when you need to get the attribute for indicators But don't use this function for indicator base. |
java.lang.String |
getIntlString(java.lang.String key,
java.util.ResourceBundle bundle)
|
java.lang.String |
getIntlStringFromUtilBundle(java.lang.String key)
|
java.util.Locale |
getLocale()
returns the Locale for this GaugeEngine . |
double |
getMax()
|
protected int |
getMaxNumberOfSteps()
|
protected java.lang.Double |
getMetric()
Gets the first metric value |
protected java.lang.Double |
getMetric(int i)
Gets a specific metric value, it takes care of array out of bound |
protected double |
getMetricMax()
Gets the maximum metric among the metrics |
protected double |
getMetricMin()
Gets the minimum metric among the metrics |
protected java.lang.Double[] |
getMetrics()
Gets the array of metric values |
protected int |
getMetricSize()
Gets the number of metric values |
double |
getMin()
|
protected int |
getNumberOfSteps()
|
protected java.awt.Rectangle |
getOuterBounds()
|
java.lang.String |
getToolTipText(java.awt.Point pt)
Retrieves the tooltip text for the component under the given point. |
protected boolean |
isNullMetric()
|
protected boolean |
prepareObjects(java.awt.Graphics2D g)
Prepares the objects in this gauge by following the render process without actually rendering the objects. |
protected void |
prepareViewFormats()
|
protected static void |
putIndicatorAttr(java.util.Map map,
java.lang.String attr,
java.lang.Object value,
int index)
This function is used when you need to put the attribute for indicators But don't use this function for indicator base |
boolean |
render(java.awt.Graphics2D g)
Renders this gauge using the given instance of Graphics2D . |
boolean |
render(java.awt.Graphics2D g,
GaugeExportXMLWriter writer,
int mode)
|
boolean |
render(java.awt.Graphics2D g,
GaugeSVGWriter writer,
int mode)
This method renders this gauge onto the given instance of OutputStream . |
int |
selectObject(java.awt.Point pt)
Selects the object under the given point, as well as all objects in this engine of equal component type |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
This method provides a single means of setting attribute values of gauge components. |
protected void |
setBackgroundClip(java.awt.Shape clipShape)
|
protected void |
setCustomShapesParser(CustomShapesParser parser)
Sets the engine's customShapesParser. |
void |
setDVTResources(DVTResources res)
|
void |
setErrorHandler(ErrorHandler eh)
|
protected void |
setId(java.lang.String id)
|
protected void |
setInnerBounds(java.awt.Rectangle innerBounds)
|
void |
setLocale(java.util.Locale loc)
Specifies the Locale for this GaugeEngine . |
boolean |
setSelectedObject(int type)
Toggles the selection state for all objects of the given type. |
static java.awt.Rectangle |
trimRectToText(java.awt.Graphics2D g,
java.awt.Font font,
int x,
int y,
int width,
int height)
|
protected void |
updateResourceBundle()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int DEFAULT_OBJECTLIST_SIZE
public static int BORDER_ONLY
public static int FILL_ONLY
public static int FILL_AND_BORDER
protected java.awt.Shape _gaugeSetClip
protected static double ASCENT_TEXT_HEIGHT
Constructor Detail |
---|
public GaugeEngine(java.util.Map propMap)
public GaugeEngine(java.util.Map propMap, int gaugeType)
Method Detail |
---|
public ErrorHandler getErrorHandler()
public void setErrorHandler(ErrorHandler eh)
protected java.lang.String getId()
protected void setId(java.lang.String id)
public java.lang.String getIntlString(java.lang.String key, java.util.ResourceBundle bundle)
public java.lang.String getIntlStringFromUtilBundle(java.lang.String key)
public java.lang.String getErrorIntlString(java.lang.String key)
public void setDVTResources(DVTResources res)
public java.util.Locale getLocale()
Locale
for this GaugeEngine
.
Locale
for this GaugeEngine
.public void setLocale(java.util.Locale loc)
Locale
for this GaugeEngine
.
loc
- The Locale
for this GaugeEngine
.protected void updateResourceBundle()
public java.lang.Object getAttribute(java.lang.String name)
GaugeAttributes
interface.
name
- String representation of the attribute name to
retrieve.
public void setAttribute(java.lang.String name, java.lang.Object value)
GaugeAttributes
interface.
name
- String representation of the attribute name to
set.value
- Object containing the value of the property.public java.awt.Dimension calcGaugeSize(java.awt.Graphics2D g, java.awt.Dimension maxSize)
g
- Instance of Graphics2D
maxSize
- The maximum size available for the gauge
public java.lang.String getToolTipText(java.awt.Point pt)
pt
- Instance of Point
String
instancepublic boolean render(java.awt.Graphics2D g)
Graphics2D
. If components of this gauge have not
been prepared in advance by calling this method or the
prepare method, prepareComponents will be called to
save the list of components for later render calls.
g
- Instance of Graphics2D
True
if the rendering was successful,
False
if there was a problem.public boolean render(java.awt.Graphics2D g, GaugeSVGWriter writer, int mode)
OutputStream
. SVG writers use this method.
mode
- specifies what to include in SVG; constants are defined in
GaugeConstants
and begin with SVG_MODE_writer
- Instance of GaugeSVGWriter
to useg
- Instance of Graphics2D
True
if the gauge components rendered
successfully, False
if they
could not.public boolean render(java.awt.Graphics2D g, GaugeExportXMLWriter writer, int mode)
mode
- specifies what to include in XML; not currently usedwriter
- Instance of GaugeExportXMLWriter
to useg
- Instance of Graphics2D
True
if the gauge components rendered
successfully, False
if they
could not.OutputStream
. ExportXML writers use this method.public java.awt.Graphics2D getGraphics()
protected java.awt.Rectangle getOuterBounds()
protected void setBackgroundClip(java.awt.Shape clipShape)
public int selectObject(java.awt.Point pt)
pt
- Instance of Point
GaugeConstants
class beginning with
ID_
public boolean setSelectedObject(int type)
type
- Integer representing the type of objects to select;
Valid values are constants in the
GaugeConstants
beginning with
ID_
True
if the objects were selected,
False
if the objects couldn't be selectedpublic static java.awt.Rectangle trimRectToText(java.awt.Graphics2D g, java.awt.Font font, int x, int y, int width, int height)
g
- Instance of Graphics2D
font
- Font to use in trimming the rectangle; if null, the current font in use
by the Gauge graphics object is usedx
- Left bound of the label to be drawny
- Top bound of the label to be drawnwidth
- Width of the label to be drawnheight
- Height of the label to be drawn
public java.util.Enumeration getImagemapEnumeration(java.awt.Graphics2D g, int filter)
ImagemapComponent
object for each gauge object. Each
ImagemapComponent
object contains the
ComponentHandle
and the Polygon
for
that gauge component.
The ComponentHandle
contains information about the
component, and the Polygon
contains information
about the component's position on the gauge.
g
- Instance of Graphics2D
filter
- One or more bitwise values specifying the kinds of
gauge components to enumerate. Valid values are
constants in the GaugeConstants
class beginning with MAP_.
DataviewConstants
,
ImagemapComponent
protected static java.lang.String getCompNameForImagemapEnumeration(int compType)
compType
- component type
protected java.awt.Dimension autoLayout(java.awt.Graphics2D g, java.awt.Rectangle rect)
rect
- Rectangle in which to base the layoutprotected boolean prepareObjects(java.awt.Graphics2D g)
getImageMapEnumeration
invocations.
g
- Instance of Graphics2D
True
if the preparation was successful,
False
if there was a problem.protected void prepareViewFormats()
protected void setCustomShapesParser(CustomShapesParser parser)
parser
- protected static java.awt.Polygon _processImagemapPolygon(DrawableObject obj)
Polygon
.
obj
-
protected java.lang.String[] _getFlashToolTipText(int filter)
filter
- Bitwise integer with valid bits
from the GaugeConstants
class
starting with MAP_.
protected java.lang.String[] _getPNGToolTipText(int filter)
filter
- Bitwise integer with valid bits
from the GaugeConstants
class
starting with MAP_.
public double getMin()
public double getMax()
protected boolean isNullMetric()
protected java.lang.Double getMetric()
protected java.lang.Double[] getMetrics()
protected java.lang.Double getMetric(int i)
i
- the index of the metric
protected int getMetricSize()
protected double getMetricMax()
protected double getMetricMin()
protected double getIncrement()
protected int getNumberOfSteps()
protected int getMaxNumberOfSteps()
protected static void putIndicatorAttr(java.util.Map map, java.lang.String attr, java.lang.Object value, int index)
map
- The attribute map of gaugeattr
- The indicator attribute to be setvalue
- The value for that attributeindex
- The index of the indicatorprotected static java.lang.Object getIndicatorAttr(java.util.Map map, java.lang.String attr, int index)
map
- The attribute map of gaugeattr
- The indicator attribute to be setindex
- The index of the indicator
protected java.lang.Object getIndicatorAttr(java.lang.String attr, int index)
attr
- The indicator attribute to be setindex
- The index of the indicator
protected int _getPowerOfTen(double dValue)
protected void determineFormat(boolean metricLabel)
metricLabel
- if true determines format for metric labelprotected java.lang.String formatValue(java.lang.Double data, java.lang.String viewFormatKey)
data
- Value to formatviewFormatKey
- ViewFormat
to use in formatting value
protected void setInnerBounds(java.awt.Rectangle innerBounds)
|
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 |