|
Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components 11g Release 1 (11.1.1.6.0) E12063-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AlertListener
Methods for listening for display problems at runtime. You should implement this interface if you want to respond to any alerts at runtime.
Method Summary | |
---|---|
void |
alert(AlertEvent event)
Notifies listeners about abnormal conditions in a Dataview . |
Method Detail |
---|
void alert(AlertEvent event)
Dataview
.
This method is called as soon as any abnormal condition is noticed.
For example,
if you call Graph.exportToGIF
and any legend text
has been truncated, the exportToGIF
method calls
this method.
Multiple notifications can occur as a graph reads data, so you
should save the information that you get from the AlertEvent
and wait to respond to the information until the graph completes
its data read.
One way to do this is to call the invokeLater
method of
the javax.swing.SwingUtilities
class, as shown in the
following example:
class AlertMe implements AlertListener{ public void alert(AlertEvent event){ String message; switch (event.getID()){ case AlertEvent.DATA_ALL_DATA_NULL_NEG_ZERO: message = "DATA_ALL_DATA_NULL_NEG_ZERO"; break; case AlertEvent.DATA_ALL_AXIS_DATA_NULL_NEG_ZERO: message = "DATA_ALL_AXIS_DATA_NULL_NEG_ZERO"; break; default: message = "Some other constant"; } // switch final String finalMessage = message; // Runnable is defined in java.lang Runnable showMessage = new Runnable(){ public void run(){ JOptionPane.showMessageDialog(null, finalMessage); } // run }; // showMessage // the message dialog will appear after the graph is painted SwingUtilities.invokeLater(showMessage); } // alert } // AlertMe
event
- Information about the alert.
|
Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components 11g Release 1 (11.1.1.6.0) E12063-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |