|
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.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
oracle.dss.dataView.Dataview
oracle.dss.gauge.Gauge
public class Gauge
The gauge bean class.
To display data in these gauges, call its setDataSource
method, or
use the constructor that takes a data source as an argument.
You can use the BI Beans DataSource
bean, or you can supply
your own data source.
The DataAccess
and DataAccess
interfaces, in the
oracle.dss.util
package, define the methods and constants that a data source
must provide.
Alternately, you can call setTabularData
to set data that you
get from a comma-separated or tab-delimited file, or from a JDBC
ResultSet
.
Note that, when you use setTabularData
, the data is not
dynamic.
You can set properties on these gauges to customize their appearance and behavior.
The BI Beans also provide Java-client user interface classes for setting the
gauge type, configuring layout of the gauge set, and so on.
The Java-client user-interface classes are in the
oracle.dss.gauge.gui
package.
* @version $Header: Gauge.java 18-may-2007.15:18:49 bglazer Exp $
setTabularData(java.lang.Object[], java.util.List)
,
DataAccess
,
DataDirector
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Nested classes/interfaces inherited from interface oracle.dss.gauge.GaugeConstants |
---|
GaugeConstants.HorizontalAlignment |
Field Summary | |
---|---|
protected GaugeController |
_gaugeController
|
protected GaugeModel |
_gaugeModel
|
protected GaugePanel |
_gaugePanel
|
protected java.awt.Image |
_offscreenImage
|
protected boolean |
_printOrPreviewMode
|
protected boolean |
_stopRepaints
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Gauge()
Constructor that does not specify a DataSource . |
|
Gauge(DataSource dataSource)
Constructor that specifies a DataSource . |
|
Gauge(ErrorHandler errorHandler)
Constructor that specifies a ErrorHandler . |
Method Summary | |
---|---|
protected void |
_createPagingControl()
|
protected void |
_initGauge(DataSource ds,
ErrorHandler eh)
|
static int |
convertGaugeTypeToInt(java.lang.String type)
|
static java.lang.String |
convertGaugeTypeToString(int type)
Generates a String representation of a
gauge type constant. |
void |
endExport()
|
void |
exportToFlash(java.io.OutputStream os,
boolean renderDynamic,
boolean showDrawing)
Delegates the work to CommonGauge by passing the outputstream associated with the flash file to be written and a flag indicating if it will be a static or a dynamic rendering |
void |
exportToPNG(java.io.OutputStream os)
Exports a snapshot of the gauge set to the PNG file. |
void |
exportToPNGWithException(java.io.OutputStream os)
Exports a snapshot of the gauge set to the PNG file. |
void |
exportToSVG(java.io.OutputStream os,
int mode,
java.lang.String charEnc)
Exports a snapshot of the gauge set that is currently displayed to the given output stream. |
void |
exportToSVG(java.io.Writer writer,
int mode,
java.lang.String charEnc)
Exports a snapshot of the gauge set that is currently displayed to the given writer. |
void |
exportToSVGWithException(java.io.OutputStream os,
int mode,
java.lang.String charEnc)
Exports a snapshot of the gauge set that is currently displayed to the SVG file, throwing any exceptions that occur during the process. |
void |
exportToSVGWithException(java.io.Writer writer,
int mode,
java.lang.String charEnc)
Exports a snapshot of the gauge set that is currently displayed to the given writer, throwing any exceptions that occur during the process. |
protected void |
firePropertyChange(java.lang.Object obj,
java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
BottomLabel |
getBottomLabel()
Returns the BottomLabel component. |
CommonGauge |
getCommonGauge()
|
DataSpecification |
getDataSpecification()
Retrieves the DataSpecification for this bean. |
GaugeBackground |
getGaugeBackground()
Returns the GaugeBackground component. |
GaugeController |
getGaugeController()
Retrieves the controller for this gauge. |
GaugeFrame |
getGaugeFrame()
Returns the GaugeFrame component. |
GaugeModel |
getGaugeModel()
Retrieves the model that this gauge uses. |
int |
getGaugeSetAlignment()
This method gets the alignment of gauges in the gauge set. |
GaugeSetBackground |
getGaugeSetBackground()
Returns the GaugeSetBackground component. |
int |
getGaugeSetColumnCount()
This method gets the number of columns used to layout the gauges in a gauge set. |
int |
getGaugeSetDirection()
This method gets the layout direction of gauges in the gauge set. |
int |
getGaugeType()
Returns the type of gauges to be generated by this instance of the Gauge bean. |
java.util.Enumeration |
getImagemapEnumeration(int filter)
Retrieves the enumeration of specific kinds of components that are currently in use and visible on the gauge. |
java.awt.Dimension |
getImageSize()
Retrieves the size of this gauge. |
Indicator |
getIndicator()
Returns the Indicator component. |
int |
getLEDStyle()
Returns the style of LED gauge to be generated by this instance of the Gauge bean. |
LEDStyleCallback |
getLEDStyleCallback()
Gets the callback to use when rendering custom LEDs. |
LegendArea |
getLegendArea()
Returns the LegendArea component. |
LegendText |
getLegendText()
Returns the LegendText component. |
LegendTitle |
getLegendTitle()
Returns the LegendTitle component. |
java.util.Locale |
getLocale()
Retrieves the Locale that this Gauge uses. |
LowerLabelFrame |
getLowerLabelFrame()
Returns the LowerLabelFrame component. |
MetricLabel |
getMetricLabel()
Returns the MetricLabel component. |
protected oracle.dss.util.xml.ObjectNode |
getObjectNode(boolean allProperties)
|
java.awt.Dimension |
getOptimalGaugeSize(java.awt.Dimension maxSize)
This method uses the current attributes set on this gauge bean to determine the minimal size a gauge should be in this gauge set. |
oracle.dss.util.xml.ObjectNode |
getPagingControlXML(boolean allProperties)
|
oracle.dss.util.persistence.PersistableAttributes |
getPersistableAttributes(oracle.dss.util.persistence.PersistableAttributes oldAttrs)
Retrieves the attributes of this Dataview , for searching. |
PlotArea |
getPlotArea()
Returns the PlotArea component. |
int |
getPresentationHeight()
Retrieveis the height of this view, in pixels. |
int |
getPresentationWidth()
Retrieves the width of this view, in pixels. |
ComponentHandle |
getSelectedObject()
Retrieves the selected component. |
java.awt.Dimension |
getSize()
|
int |
getStartColumn()
|
int |
getStartRow()
Deprecated. As of 2.6.0.27, replaced by #getStartSeries or by
#getStartGroup . |
Threshold |
getThreshold()
Returns the Threshold component. |
int |
getThresholdDialStyle()
Returns the style of Threshold Dial gauge to be generated by this instance of the Gauge bean. |
TickLabel |
getTickLabel()
Returns the TickLabel component. |
TickMark |
getTickMark()
Returns the TickMark component. |
TopLabel |
getTopLabel()
Returns the TopLabel component. |
UpperLabelFrame |
getUpperLabelFrame()
Returns the UpperLabelFrame component. |
java.lang.String |
getVersion()
|
int |
getViewType()
Retrieves the specific type of subclass of this Dataview . |
DataviewXML |
getViewXML()
|
boolean |
isExporting()
|
protected boolean |
isMetadataDateSpanSupported()
|
protected boolean |
isMetadataDrillParentDateSpanSupported()
|
protected boolean |
isMetadataDrillParentDateSupported()
|
protected boolean |
isMetadataDrillSupported()
|
boolean |
isPrintOrPreviewMode()
|
boolean |
isSwapAllowed()
Indicates whether swapping is allowed in this view. |
protected void |
metadataLabelTypeChanged()
|
void |
modelDataAvailable(DataAvailableEvent e)
Inform view of changes to the data availability. |
void |
modelDataChanged(DataChangedEvent e)
Inform view of changes to the actual data or metadata. |
void |
paint(java.awt.Graphics g)
|
protected void |
processAlertEvent(int eventID)
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
boolean |
readXML(java.io.InputStream stream,
boolean reset)
Deprecated. As of 1.7.0.12, replaced by readXML(InputStream, int) |
boolean |
readXML(java.io.InputStream stream,
int reset)
Applies XML to this Gauge , from a String . |
protected void |
refreshData()
|
boolean |
renderGauges(java.awt.Graphics2D g)
This method renders the gauges in this gauge set onto the given instance of Graphics . |
void |
resetEverything(int reset)
|
void |
resetSuper(int reset,
java.lang.String version)
|
void |
resetToDefault(int reset)
Resets properties of this Gauge to their
default values. |
void |
resetXMLProps()
|
boolean |
selectObject(ComponentHandle id)
Select a component. |
boolean |
selectObjectFromEvent(java.awt.event.MouseEvent e)
|
void |
setBackgroundTransparent(boolean transparent)
|
void |
setContext()
|
void |
setDataSource(DataSource ds)
Specifies the data source for this Gauge . |
void |
setDataSource(DataSource ds,
DataSpecification specs)
Specifies the data source for this Gauge . |
void |
setDataSpecification(DataSpecification dataSpec)
Sets the DataSpecification for this bean,
assuming it is relevant to the current
DataSource . |
protected void |
setDataUnformattedSupported(boolean supported)
|
void |
setGaugeController(GaugeController gaugeController)
|
void |
setGaugeModel(GaugeModel gaugeModel)
|
void |
setGaugeSetAlignment(int alignment)
This method sets the alignment of gauges in the gauge set. |
void |
setGaugeSetColumnCount(int columns)
This method sets the number of columns used to layout the gauges in a gauge set. |
void |
setGaugeSetDirection(int direction)
This method sets the layout direction of gauges in the gauge set. |
void |
setGaugeType(int type)
Sets the type of gauges to be generated by this instance of the Common Gauge. |
boolean |
setGridData(java.lang.Object[] specs,
java.lang.Object[] columnLabels,
java.lang.Object[] rowLabels,
java.lang.Object[][] data)
|
void |
setImageSize(java.awt.Dimension d)
Specifies the size of the image that is created from this gauge when you export the gauge to a PNG or GIF file. |
protected void |
setLayerMetaLongLabelSupported(boolean supported)
|
protected void |
setLayerMetaMediumLabelSupported(boolean supported)
|
protected void |
setLayerMetaNameSupported(boolean supported)
|
protected void |
setLayerMetaShortLabelSupported(boolean supported)
|
void |
setLEDStyle(int style)
Sets the style of LED gauges to be generated by this instance of the Common Gauge. |
void |
setLEDStyleCallback(LEDStyleCallback callback)
Sets the callback to use when rendering custom LEDs. |
protected void |
setMetadataDateSpanSupported(boolean supported)
|
protected void |
setMetadataDateSupported(boolean supported)
|
protected void |
setMetadataDrillParentDateSpanSupported(boolean supported)
|
protected void |
setMetadataDrillParentDateSupported(boolean supported)
|
protected void |
setMetadataDrillSupported(boolean supported)
|
protected void |
setMetadataLongLabelSupported(boolean supported)
|
protected void |
setMetadataMediumLabelSupported(boolean supported)
|
protected void |
setMetadataShortLabelSupported(boolean supported)
|
protected void |
setMetadataValueSupported(boolean supported)
|
void |
setPagingControlXML(oracle.dss.util.xml.ObjectNode pagingControl,
java.lang.String version,
int reset)
|
void |
setPersistableComponents(oracle.dss.util.persistence.AggregateInfo[] persistables)
|
void |
setPrintOrPreviewMode(boolean bool)
|
void |
setStartColumn(int c)
|
void |
setStartRow(int r)
Specifies the first row of data to display in this gauge. |
void |
setSwapAllowed(boolean swap)
Specifies whether users can swap page items in this view. |
boolean |
setTabularData(java.lang.Object[] specs,
java.util.List tableRows)
Specifies data for the GaugeBean ,
from a list of arrays. |
void |
setThresholdDialStyle(int style)
Sets the style of Threshold Dial gauge to be generated by this instance of the Gauge bean. |
boolean |
setXML(java.lang.String xmlString,
int reset)
Applies XML to this Gauge , from a String . |
boolean |
setXMLAsString(java.lang.String xml)
Specifies the XML representation of this Gauge . |
boolean |
startExport()
|
void |
updatePageItems()
|
void |
writeImagemapXML(java.io.OutputStream os,
int filter)
Writes an XML representation of information about specific kinds of components that are currently in use and visible on the gauge. |
void |
writeImagemapXML(java.io.PrintWriter out,
int filter)
Writes an XML representation of information about specific kinds of components that are currently in use and visible on the gauge. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.dss.dataView.ThickDataview |
---|
getDataviewFootnote, getDataviewSubtitle, getDataviewTitle, isEnabled, isShowing, repaint, setEnabled, setPagingControlVisible |
Methods inherited from interface oracle.dss.presutil.CommonViewAttributes |
---|
getDescription, getLocalName, getName, setDescription, setLocalName, setName |
Methods inherited from interface oracle.dss.dataView.DataviewCommon |
---|
repaint |
Field Detail |
---|
protected GaugeModel _gaugeModel
protected GaugeController _gaugeController
protected GaugePanel _gaugePanel
protected java.awt.Image _offscreenImage
protected boolean _printOrPreviewMode
protected boolean _stopRepaints
Constructor Detail |
---|
public Gauge()
DataSource
.
If you use this constructor, call the setDataSource
method
to specify the data that this gauge displays.
public Gauge(DataSource dataSource)
DataSource
.
dataSource
- The DataSource
from which this gauge
will request data.public Gauge(ErrorHandler errorHandler)
ErrorHandler
.
errorHandler
- The ErrorHandler
to use.Method Detail |
---|
public CommonGauge getCommonGauge()
protected void _initGauge(DataSource ds, ErrorHandler eh)
protected void _createPagingControl()
public java.awt.Dimension getSize()
getSize
in interface ThickGauge
getSize
in class java.awt.Component
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void setPrintOrPreviewMode(boolean bool)
public void exportToPNG(java.io.OutputStream os)
os
- The OutputStream
that specifies the
location and name of the PNG file.exportToPNGWithException(java.io.OutputStream)
public void exportToPNGWithException(java.io.OutputStream os) throws oracle.dss.graph.pfj.png.PNGInvalidParameterException, oracle.dss.graph.pfj.png.PNGException
os
- The OutputStream
that specifies the
location and name of the PNG file.
oracle.dss.graph.pfj.png.PNGInvalidParameterException
oracle.dss.graph.pfj.png.PNGException
exportToPNG(java.io.OutputStream)
public void exportToSVG(java.io.OutputStream os, int mode, java.lang.String charEnc)
os
- The OutputStream
to write SVG to.mode
- specifies what to include in SVG; constants are defined in
this class and begin with SVG_MODE_charEnc
- character encoding to use for SVGpublic void exportToFlash(java.io.OutputStream os, boolean renderDynamic, boolean showDrawing)
os
- the outputstream associated with the flash filerenderDynamic
- Flag indicating if the rendering is dynamic or static.
For static charts, the value is false.showDrawing
- Only applicable for static charts and indicates if
the drawing of the chart should be shown.public void exportToSVGWithException(java.io.OutputStream os, int mode, java.lang.String charEnc) throws java.io.IOException, java.lang.Exception
os
- The OutputStream
to write SVG to.mode
- specifies what to include in SVG; constants are defined in
this class and begin with SVG_MODE_charEnc
- character encoding to use for SVG
java.io.IOException
- if there was a problem writing to the stream
java.lang.Exception
- if another problem occurredpublic void exportToSVG(java.io.Writer writer, int mode, java.lang.String charEnc)
writer
- The Writer
to write SVG to.mode
- specifies what to include in SVG; constants are defined in
this class and begin with SVG_MODE_charEnc
- character encoding to use for SVGpublic void exportToSVGWithException(java.io.Writer writer, int mode, java.lang.String charEnc) throws java.io.IOException, java.lang.Exception
writer
- The Writer
to write SVG to.mode
- specifies what to include in SVG; constants are defined in
this class and begin with SVG_MODE_charEnc
- character encoding to use for SVG
java.io.IOException
- if there was a problem writing to the writer
java.lang.Exception
- if another problem occurredpublic DataSpecification getDataSpecification()
DataSpecification
for this bean.
DataSpecification
for this bean.
If a beans data specification has not been set for this
view, this method returns null
.public void setDataSpecification(DataSpecification dataSpec)
DataSpecification
for this bean,
assuming it is relevant to the current
DataSource
.
dataSpec
- The DataSpecification
for this bean.public GaugeController getGaugeController()
GaugeController
for this gauge.public void setGaugeController(GaugeController gaugeController)
gaugeController
- The controller for this gauge to use.
Application developers normally do not need to call this method.
Call it only if you are providing your own implementation of the
GaugeController
interface, rather than using the default
BI Beans GaugeController
.
public GaugeModel getGaugeModel()
DataSource
is the "big" model.
The model that this method returns interacts with the
DataSource
, retrieving data
and having the data formatted so that the view can display it.
GaugeModel
that this gauge uses.public void setGaugeModel(GaugeModel gaugeModel)
gaugeModel
- The GaugeModel for this gauge to use.DataSource
is the "big" model.
The model that this method returns interacts with the
DataSource
, retrieving data
and having the data formatted so that the view can display it.
Application developers normally do not need to call this method.
Call it only if you are providing your own implementation of the
GaugeModel
interface, rather than using the default
BI Beans GaugeModel
.
public java.util.Enumeration getImagemapEnumeration(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.
filter
- One or more bitwise values specifying the kinds of
gauge components to enumerate. Valid values are
constants in this class and begin with MAP_.
ImagemapComponent
public java.awt.Dimension getImageSize()
Dimension
object.public void setImageSize(java.awt.Dimension d)
d
- The size to make the gauge.exportToPNG(java.io.OutputStream)
,
exportToPNGWithException(java.io.OutputStream)
,
exportToSVG(java.io.OutputStream, int, java.lang.String)
,
exportToSVGWithException(java.io.OutputStream, int, java.lang.String)
public java.util.Locale getLocale()
Locale
that this Gauge
uses.
getLocale
in interface DataviewCommon
getLocale
in interface UIView
getLocale
in class Dataview
Locale
for this Gauge
.public java.awt.Dimension getOptimalGaugeSize(java.awt.Dimension maxSize)
Graphics
object supplied to the
render
method.
The size returned from this method is used when exporting the
gauge set to a PNG image with the exportToPNG
method.
maxSize
- Dimensions to use in determining
optimal gauge size.
Dimension
containing the
size of the largest gauge in this gauge set.setImageSize(java.awt.Dimension)
public oracle.dss.util.xml.ObjectNode getPagingControlXML(boolean allProperties)
getPagingControlXML
in interface ThickDataview
public void setPagingControlXML(oracle.dss.util.xml.ObjectNode pagingControl, java.lang.String version, int reset)
setPagingControlXML
in interface ThickDataview
public int getPresentationHeight()
getPresentationHeight
in class Dataview
public int getPresentationWidth()
getPresentationWidth
in class Dataview
public boolean selectObject(ComponentHandle id)
selectObject
in class Dataview
id
- A ComponentHandle
that represents the component to
select.
true
if the component is successfully selected,
false
if not.public boolean selectObjectFromEvent(java.awt.event.MouseEvent e)
e
- Instance of MouseEvent
True
if the component under the point
was selected, False
otherwisepublic ComponentHandle getSelectedObject()
ComponentHandle
class.
The subclass that is returned depends on the component that is selected.
For example, an AreaMarker
represents a series of data,
so if an AreaMarker
is selected, this method returns a
SeriesComponentHandle
.
If a TwoDMarker
(a bar in a bar graph) is selected,
then this method returns a DataComponentHandle
, because
a TwoDMarker
represents a data value that belongs in both
a series (such as May 1999) and a group (such as Shoes).
getSelectedObject
in interface UIView
getSelectedObject
in class Dataview
public java.lang.String getVersion()
getVersion
in interface ThickDataview
getVersion
in class Dataview
public int getViewType()
Dataview
.
This method returns Dataview.VIEW_TYPE_GAUGE
.
getViewType
in interface DataviewCommon
getViewType
in interface UIView
getViewType
in class Dataview
Dataview.VIEW_TYPE_GAUGE
DataviewConstants.VIEW_TYPE_GAUGE
public boolean isPrintOrPreviewMode()
isPrintOrPreviewMode
in class Dataview
public boolean isSwapAllowed()
true
, then users can swap items
by clicking the two items.
When this method returns false
, then users must move each
item separately.
isSwapAllowed
in interface ThickDataview
isSwapAllowed
in class Dataview
true
if swapping is enabled,
false
if it is not.setSwapAllowed(boolean)
public void setSwapAllowed(boolean swap)
SwapAllowed
is true
, then users can
click the two page items that they want to swap, in order to swap the items.
The view
will then ask the data source to perform a pivot of type
DataDirector.PIVOT_SWAP
.
When SwapAllowed
is false
, then users must
move the two page items separately, and the view will ask for two separate
pivot actions of type DataDirector.PIVOT_MOVE_BEFORE
or
DataDirector.PIVOT_MOVE_AFTER
.
By default, swapping is disabled.
setSwapAllowed
in interface ThickDataview
setSwapAllowed
in class Dataview
swap
- true
to enable swapping,
false
to disable it.isSwapAllowed()
,
DataDirector
public boolean readXML(java.io.InputStream stream, boolean reset) throws oracle.dss.util.xml.BIIOException, oracle.dss.util.xml.BISAXException, oracle.dss.util.xml.BIParseException
readXML(InputStream, int)
readXML
method that takes an int
for the
reset
parameter allows you to specify how much and how
far to reset the view before you apply XML.
BIIOException
- If an error occurs in reading xmlString
.
BISAXException
- If a general SAX exception occurs in parsing the
XML.
BIParseException
- If the XML syntax is not correct, or if the
XML is not valid according to the DTD that is
specified in the XML.
oracle.dss.util.xml.BIIOException
oracle.dss.util.xml.BISAXException
oracle.dss.util.xml.BIParseException
public boolean readXML(java.io.InputStream stream, int reset) throws oracle.dss.util.xml.BIIOException, oracle.dss.util.xml.BISAXException, oracle.dss.util.xml.BIParseException
Gauge
, from a String
.
This method reads the XML from xmlString
and applies
its attribute settings to this Gauge
.
The reset
parameter determines how much of the
Gauge
to reset before applying XML.
In general, you can:
Gauge
without
resetting anything to default values
Gauge
Resetting returns property values in the Gauge
to the
default values for the version that is specified in the XML.
readXML
in class Dataview
stream
- The XML to apply to this Gauge
.reset
- A constant that indicates how much and how far to reset
the view before applying XML. Valid constants appear in the
See Also section.
If you pass an invalid constant, then this method logs
a message with the error handler and does not reset any
property values.
true
if the XML is successfully applied to
this Gauge
,
false
if an IO exception occurs.
BIIOException
- If an error occurs in reading xmlString
.
BISAXException
- If a general SAX exception occurs in parsing the
XML.
BIParseException
- If the XML syntax is not correct, or if the
XML is not valid according to the DTD that is
specified in the XML.
oracle.dss.util.xml.BIIOException
- If an error occurs in reading xmlString
.
oracle.dss.util.xml.BISAXException
- If a general SAX exception occurs in parsing the
XML.
oracle.dss.util.xml.BIParseException
- If the XML syntax is not correct, or if the
XML is not valid according to the DTD that is
specified in the XML.DataviewConstants.RESET_NONE
,
DataviewConstants.RESET_XML_PROPERTIES
,
DataviewConstants.RESET_EVERYTHING
public boolean renderGauges(java.awt.Graphics2D g)
Graphics
.
g
- Instance of Graphics
to use
True
if the gauge components rendered
successfully, False
if they
could not be rendered.public void resetEverything(int reset)
resetEverything
in interface ThickDataview
reset
- A constant that indicates how much to reset.
Valid constants are listed in the See Also section.
If you pass an invalid value or RESET_NONE, then this method
logs a message with the error handler and does not change
any properties.public void resetSuper(int reset, java.lang.String version)
resetSuper
in interface ThickDataview
version
- the gauge XML version number, as stored in XMLpublic void resetToDefault(int reset)
Gauge
to their
default values. The reset
parameter determines
whether to reset only the properties or to reset the properties
and remove registered listeners.
This method is helpful when you want to reuse a
Gauge
rather than instantiate a new one.
resetToDefault
in class Dataview
reset
- A constant that indicates how much to reset.
Valid constants are listed in the See Also section.
If you pass an invalid value or RESET_NONE, then
this method logs a message with the error handler
and does not change any properties.DataviewConstants.RESET_XML_PROPERTIES
,
DataviewConstants.RESET_EVERYTHING
public void resetXMLProps()
resetXMLProps
in interface ThickDataview
version
- the gauge XML version number, as stored in XMLpublic void setContext()
setContext
in class Dataview
public void setDataSource(DataSource ds)
Gauge
.
This method specifies the DataSource
that will feed
data to this Gauge
. If you do not use the
Gauge(DataSource)
method to create the gauge,
then you must call this method to specify the data that appears
in the gauges, or specify XML or tabular data via the
setXML
and setTabularData
methods,
respectively.
This version of setDataSource
doesn't accept an
instance of DataSpecification
, and will
therefore result in a gauge for every cell in the
DataSource
. Use the setDataSource(DataSource,
DataSpecification)
version to map the data in the
DataSource
to the various data-related components
in the gauges.
setDataSource
in interface DataviewCommon
setDataSource
in interface ThickDataview
setDataSource
in class Dataview
ds
- The DataSource
for this gauge to use.public void setDataSource(DataSource ds, DataSpecification specs)
Gauge
.
This method specifies the DataSource
that will feed
data to this Gauge
. If you do not use the
Gauge(DataSource, DataSpecification)
method to create the gauge, then you must call this method to
specify the data that appears in the gauges, or specify XML or
tabular data via the setXML
and
setTabularData
methods, respectively.
ds
- The DataSource
for this gauge to use.specs
- Instance of DataSpecification
class.public boolean setGridData(java.lang.Object[] specs, java.lang.Object[] columnLabels, java.lang.Object[] rowLabels, java.lang.Object[][] data)
specs
- Array of Objects
indicating the order
in which the data appears in the columnLabels
parameter. Valid values are in the
DataSpecification
class and begin
with DST_.columnLabels
- labels for the columns of data;
typically String
srowLabels
- labels for the rows of data;
typically String
sdata
- values to be plotted in the gauge, indexed
first by column, then by row; typically Double
s
and Date in case of TimeSeries gauges
true
if data is successfully set on the gauge,
false
otherwiseGauge
.
Data is provided in grid form, where the number of rows and
columns are known ahead of time.public int getStartColumn()
public void setStartColumn(int c)
c
- The first column of data to display.public int getStartRow()
#getStartSeries
or by
#getStartGroup
.
public void setStartRow(int r)
r
- The first row of data to display.public boolean setTabularData(java.lang.Object[] specs, java.util.List tableRows)
GaugeBean
,
from a list of arrays. Use this method to provide data
row-by-row, from a file of tab-delimited or comma-separated
values, or from a JDBC ResultSet
.
The data specification parameter should be an array of Objects,
mapping how the data values are organized in the data list.
Valid values are constants in this class and begin with MAP_.
Column labels, displayed at the top of a gauge, and
row labels, displayed at the bottom of a gauge, are always
positioned as the first and second elements of each row
but are not included in the tableRows
argument.
The list of arrays containing data must conform to the specification outlined in the specs parameter. The number of entries in the list should equal the number of gauges to display.
The following table shows a set of data to pass to the gauge bean through this method:
All Channels | |||
Sales | Quota | Target | |
Boston | 12 | 11 | 13 |
Chicago | 14 | 14 | 17 |
Phoenix | 8 | 10 | 12 |
New York | 21 | 16 | 20 |
The specification array would look like this if you wanted the column labels to appear at the top of each gauge and the row labels to appear at the bottom of each gauge, and you didn't specify min or max values:
Object[] specs = {DataSpecification.DST_METRIC, DataSpecification.DST_THRESHOLD, DataSpecification.DST_THRESHOLD};This would tell the Gauge bean to expect the metric and 2 threshold values in the first three elements of each row array element. Given this specification, the data list for the data above would look something like this:
Object[] row1 = {"All Channels, Sales", "Boston", new Double(12), new Double(11), new Double(13)}; Object[] row2 = {"All Channels, Sales", "Chicago", new Double(14), new Double(14), new Double(17)}; Object[] row3 = {"All Channels, Sales", "Phoenix", new Double(8), new Double(10), new Double(12)}; Object[] row4 = {"All Channels, Sales", "New York", new Double(21), new Double(16), new Double(20)}; // add the arrays to aList
ArrayList dataRows = new ArrayList(); dataRows.add(row1); dataRows.add(row2); dataRows.add(row3); dataRows.add(row4); // pass theList
to this method gaugeBean.setTabularData(specs, dataRows);
The tabular data provided above would result in a gauge set with four gauges running vertically to best match the layout of the original grid.
specs
- Array of Objects
indicating the order
in which the data appears in the tableRows
parameter. Valid values are constants in the
DataSpecification
class and begin
with DST_.tableRows
- List
of data to plot in the gauge
bean.
true
if data is successfully set on the
gauge bean, false
if there is a data
problem.public boolean setXML(java.lang.String xmlString, int reset) throws oracle.dss.util.xml.BIIOException, oracle.dss.util.xml.BISAXException, oracle.dss.util.xml.BIParseException
Gauge
, from a String
.
This method reads the XML from xmlString
and applies
its attribute settings to this Gauge
.
The reset
parameter determines how much of the
Gauge
to reset before applying XML.
In general, you can:
Gauge
without
resetting anything to default values
Gauge
Resetting returns property values in the Gauge
to the
default values for the version that is specified in the XML.
setXML
in class Dataview
xmlString
- The XML to apply to this Gauge
.reset
- A constant that indicates how much and how far to reset
the view before applying XML. Valid constants appear in the
See Also section.
If you pass an invalid constant, then this method logs
a message with the error handler and does not reset any
property values.
true
if the XML is successfully applied to
this Gauge
,
false
if an IO exception occurs.
BIIOException
- If an error occurs in reading xmlString
.
BISAXException
- If a general SAX exception occurs in parsing the
XML.
BIParseException
- If the XML syntax is not correct, or if the
XML is not valid according to the DTD that is
specified in the XML.
oracle.dss.util.xml.BIIOException
- If an error occurs in reading xmlString
.
oracle.dss.util.xml.BISAXException
- If a general SAX exception occurs in parsing the
XML.
oracle.dss.util.xml.BIParseException
- If the XML syntax is not correct, or if the
XML is not valid according to the DTD that is
specified in the XML.DataviewConstants.RESET_NONE
,
DataviewConstants.RESET_XML_PROPERTIES
,
DataviewConstants.RESET_EVERYTHING
public void writeImagemapXML(java.io.OutputStream os, int filter)
filter
are defined in this class and
begin with MAP_.
os
- The output stream where XML will be written.filter
- The kinds of gauge components whose information you
want to write in XML.getImagemapEnumeration(int)
,
DataviewConstants.MAP_ALL
,
DataviewConstants.MAP_DATA
,
DataviewConstants.MAP_LABELS
,
DataviewConstants.MAP_TITLES
public void writeImagemapXML(java.io.PrintWriter out, int filter)
filter
are defined in this class and
begin with MAP_.
out
- The print writer where XML will be written.filter
- The kinds of gauge components whose information you
want to write in XML.getImagemapEnumeration(int)
,
DataviewConstants.MAP_ALL
,
DataviewConstants.MAP_DATA
,
DataviewConstants.MAP_LABELS
,
DataviewConstants.MAP_TITLES
public void updatePageItems()
updatePageItems
in interface ThickDataview
public GaugeSetBackground getGaugeSetBackground()
GaugeSetBackground
instancepublic GaugeBackground getGaugeBackground()
GaugeBackground
instancepublic GaugeFrame getGaugeFrame()
GaugeFrame
instancepublic PlotArea getPlotArea()
PlotArea
instancepublic TickLabel getTickLabel()
TickLabel
instancepublic TickMark getTickMark()
TickMark
instancepublic Indicator getIndicator()
Indicator
instancepublic Threshold getThreshold()
Threshold
instancepublic TopLabel getTopLabel()
TopLabel
instancepublic BottomLabel getBottomLabel()
BottomLabel
instancepublic MetricLabel getMetricLabel()
MetricLabel
instancepublic UpperLabelFrame getUpperLabelFrame()
UpperLabelFrame
instancepublic LowerLabelFrame getLowerLabelFrame()
LowerLabelFrame
instancepublic LegendArea getLegendArea()
LegendArea
instancepublic LegendText getLegendText()
LegendText
instancepublic LegendTitle getLegendTitle()
LegendTitle
instancepublic int getGaugeSetAlignment()
public void setGaugeSetAlignment(int alignment)
alignment
- Integer representing the alignment followed
when laying out the gauges in the gauge set.
Valid values are constants in this class
starting with GAUGESET_ALIGNMENT_.public int getGaugeSetColumnCount()
public void setGaugeSetColumnCount(int columns)
columns
- Integer representing the means by which gauges
are laid out in a gauge set. Valid values are
numbers greater than or equal to 1 and constants
in this class starting with GAUGESET_COLUMNS_.public int getGaugeSetDirection()
Integer
- representing the direction used
when laying out the gauges in the gauge set.
Valid values are constants in this class
starting with GAUGESET_DIRECTION_.public void setGaugeSetDirection(int direction)
direction
- Integer representing the direction used
when laying out the gauges in the gauge set.
Valid values are constants in this class
starting with GAUGESET_DIRECTION_.public int getGaugeType()
type
- Integer representing the type of gauges
to be generated by this common gauge.
Valid values are constants in the
GaugeType
class beginning
with TYPE_.public void setGaugeType(int type)
type
- Integer representing the type of gauges
to be generated by this common gauge.
Valid values are constants in the
GaugeType
class beginning
with TYPE_.public int getLEDStyle()
style
- Integer representing the style of gauges
to be generated by this common gauge.
Valid values are constants in this class
beginning with LS_.public void setLEDStyle(int style)
type
- Integer representing the style of gauges
to be generated by this common gauge.
Valid values are constants in this class
beginning with LS_.public int getThresholdDialStyle()
Gauge
class beginning
with TDS_.public void setThresholdDialStyle(int style)
style
- Integer representing the style of gauges
to be generated by this common gauge.
Valid values are constants in the
Gauge
class beginning
with TDS_.public LEDStyleCallback getLEDStyleCallback()
LEDStyleCallback
public void setLEDStyleCallback(LEDStyleCallback callback)
callback
- Instance of LEDStyleCallback
public void setBackgroundTransparent(boolean transparent)
setBackgroundTransparent
in interface ThickDataview
transparent
- true
to make the graph background
transparent, otherwise false
public static int convertGaugeTypeToInt(java.lang.String type)
type
- Integer representation of a gauge typepublic static java.lang.String convertGaugeTypeToString(int type)
String
representation of a
gauge type constant. This method takes a gauge type
constant and produces a String
that is
appropriate to use as an attribute value when you use
the BI Beans persistence service and search for gauges
that have a particular gauge type.
For example:
//pmMyFolder is the PersistenceManager for MyFolder BasicAttributes _attrs = new BasicAttributes(); _attrs.put(PSRConstants.Attributes.OBJECT_TYPE, PSRConstants.GAUGE); _attrs.put(Gauge.GAUGE_TYPE, Gauge.convertGaugeTypeToString(Gauge.DIAL));
type
- The gauge type constant that you want to convert.
String
representation of current gauge typeprotected void firePropertyChange(java.lang.Object obj, java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
firePropertyChange
in class Dataview
obj
- the Object which has the getter/setter for this propertypropName
- String: the name of the property (minus get/set)oldValue
- Object: the previous value of the propertynewValue
- Object: the new value of the propertyprotected void refreshData()
refreshData
in class Dataview
protected void setLayerMetaLongLabelSupported(boolean supported)
setLayerMetaLongLabelSupported
in class Dataview
protected void setMetadataDrillSupported(boolean supported)
protected boolean isMetadataDrillSupported()
protected void setDataUnformattedSupported(boolean supported)
setDataUnformattedSupported
in class Dataview
protected void setMetadataLongLabelSupported(boolean supported)
setMetadataLongLabelSupported
in class Dataview
protected void setMetadataMediumLabelSupported(boolean supported)
setMetadataMediumLabelSupported
in class Dataview
protected void setMetadataShortLabelSupported(boolean supported)
setMetadataShortLabelSupported
in class Dataview
protected void setMetadataValueSupported(boolean supported)
setMetadataValueSupported
in class Dataview
protected void setMetadataDrillParentDateSupported(boolean supported)
protected boolean isMetadataDrillParentDateSupported()
protected void setMetadataDrillParentDateSpanSupported(boolean supported)
protected boolean isMetadataDrillParentDateSpanSupported()
protected void setMetadataDateSupported(boolean supported)
protected void setMetadataDateSpanSupported(boolean supported)
protected boolean isMetadataDateSpanSupported()
protected void setLayerMetaMediumLabelSupported(boolean supported)
setLayerMetaMediumLabelSupported
in class Dataview
protected void setLayerMetaShortLabelSupported(boolean supported)
setLayerMetaShortLabelSupported
in class Dataview
protected void setLayerMetaNameSupported(boolean supported)
setLayerMetaNameSupported
in class Dataview
protected void metadataLabelTypeChanged()
metadataLabelTypeChanged
in class Dataview
public DataviewXML getViewXML()
getViewXML
in class Dataview
protected oracle.dss.util.xml.ObjectNode getObjectNode(boolean allProperties)
getObjectNode
in class Dataview
protected void processAlertEvent(int eventID)
public void modelDataChanged(DataChangedEvent e)
ModelListener
modelDataChanged
in interface ModelListener
modelDataChanged
in class Dataview
e
- information about the data change.ModelAdapter
public void modelDataAvailable(DataAvailableEvent e)
ModelListener
modelDataAvailable
in interface ModelListener
modelDataAvailable
in class Dataview
e
- information about the data availabilityModelAdapter
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public boolean setXMLAsString(java.lang.String xml) throws oracle.dss.util.persistence.BIPersistenceException
Gauge
.
The persistence service calls this method when the view is restored
from the BI Beans Catalog.
This method does not reset any properties before applying the XML to
this Graph
.
Application developers should not call this method.
To load XML from a file, call setXML
or readXML
.
setXMLAsString
in interface oracle.dss.util.persistence.StringXMLizable
setXMLAsString
in class Dataview
xml
- The XML representation of the view.
true
if the XML was successfully set,
false
if not.
BIPersistenceException
- If a problem occurs in setting the XML.
oracle.dss.util.persistence.BIPersistenceException
- If a problem occurs in setting the XML.readXML(java.io.InputStream, boolean)
,
setXML(java.lang.String, int)
public void setPersistableComponents(oracle.dss.util.persistence.AggregateInfo[] persistables)
setPersistableComponents
in interface oracle.dss.util.persistence.contract.AggregableContract
setPersistableComponents
in class Dataview
aggregates
- a AggregateInfo[]
value that represents the
components to assign to the gauge.public oracle.dss.util.persistence.PersistableAttributes getPersistableAttributes(oracle.dss.util.persistence.PersistableAttributes oldAttrs)
Dataview
Dataview
, for searching.
This method adds the attributes that this Dataview
defines
to the attributes that the application has specified.
The attributes are used by the persistence service, when users
search the repository for components that have particular attribute
values.
getPersistableAttributes
in interface oracle.dss.util.persistence.SimplePersistable
getPersistableAttributes
in class Dataview
attrs
- a PersistableAttributes
value that represents the
searchable attributes set by the user application.
PersistableAttributes
which represent the searchable
properties of the gauge (the ones passed into the method augmented
by gauge-specific properties).PeristableAttibutes
(i.e.
search attributes associated with this gauge) which are used for searching
for this gauge in the database.public boolean startExport()
public void endExport()
public boolean isExporting()
|
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 |