|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.ka2ddo.yaac.gui.AttentionAlert
public class AttentionAlert
This class displays a flashing set of pointers on the map, indicating some location deserves special attention. It can be used for emergency messages, identifying the position of a station on the map, or other purposes.
The flashing is on a 75% duty cycle (75% on, 25% off) until the alert times out. Then the flasher is dequeued.
Field Summary | |
---|---|
static int |
DEFAULT_FLASH_INTERVAL
This constant specifies the flash interval in milliseconds. |
static java.awt.Color |
EMERGENCY_COLOR
This constant specifies the color used to identify stations sending emergency traffic. |
static java.awt.Color |
LOCATE_COLOR
This constant specifies the color used for locate pointer arrows. |
static java.awt.Color |
PRIORITY_COLOR
This constant specifies the color used to identify stations sending priority traffic. |
static java.awt.Color |
SPECIAL_COLOR
This constant specifies the color used to identify stations sending priority traffic. |
Constructor Summary | |
---|---|
AttentionAlert(double lat,
double lon,
java.awt.Color fillColor)
Establish an AttentionAlert flasher at the specified map coordinates using the specified paint pattern to render the arrows with a lifespan of 10 flashes. |
|
AttentionAlert(double lat,
double lon,
java.awt.Color fillColor,
int numFlashes)
Establish an AttentionAlert flasher at the specified map coordinates using the specified paint pattern to render the arrows. |
|
AttentionAlert(double lat,
double lon,
java.awt.Color fillColor,
int numFlashes,
int flashIntervalMsec)
Establish an AttentionAlert flasher at the specified map coordinates using the specified paint pattern to render the arrows. |
|
AttentionAlert(StationState ss,
java.awt.Color fillColor)
Establish an AttentionAlert flasher at the specified map coordinates using the specified paint pattern to render the arrows with a lifespan of 10 flashes. |
|
AttentionAlert(StationState ss,
java.awt.Color fillColor,
int numFlashes)
Establish an AttentionAlert flasher at the specified map coordinates using the specified paint pattern to render the arrows. |
|
AttentionAlert(StationState ss,
java.awt.Color fillColor,
int numFlashes,
int flashIntervalMsec)
Establish an AttentionAlert flasher at the specified map coordinates using the specified paint pattern to render the arrows. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
DO NOT CALL: callback for timer events on AttentionAlert. |
void |
cancelAlert()
Stop displaying an AttentionAlert on the map. |
boolean |
equals(java.lang.Object obj)
Test if this AttentionAlert is the same as some other object. |
static AttentionAlert |
get(double lat,
double lon,
AX25Message.Precedence precedence)
If the precedence level reports location flashers, create an AttentionAlert flasher at the specified map coordinates using the default color for the specified precedence to render the arrows with a lifespan of 30 flashes at double speed. |
static java.awt.Color |
getPrecedenceColor(AX25Message.Precedence precedence)
Get the color that should be used to identify messages or stations of the specified precedence. |
int |
hashCode()
Returns a hash code value for the object. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_FLASH_INTERVAL
public static final java.awt.Color LOCATE_COLOR
public static final java.awt.Color SPECIAL_COLOR
public static final java.awt.Color PRIORITY_COLOR
public static final java.awt.Color EMERGENCY_COLOR
Constructor Detail |
---|
public AttentionAlert(double lat, double lon, java.awt.Color fillColor)
lat
- latitude in degrees Northlon
- longitude in degrees EastfillColor
- java.awt.Color used to fill the flashing arrow symbolspublic AttentionAlert(double lat, double lon, java.awt.Color fillColor, int numFlashes)
lat
- latitude in degrees Northlon
- longitude in degrees EastfillColor
- java.awt.Paint used to fill the flashing arrow symbolsnumFlashes
- the number of times the arrows should flash before the alert is taken downpublic AttentionAlert(double lat, double lon, java.awt.Color fillColor, int numFlashes, int flashIntervalMsec)
lat
- latitude in degrees Northlon
- longitude in degrees EastfillColor
- java.awt.Color used to fill the flashing arrow symbolsnumFlashes
- the number of times the arrows should flash before the alert is taken downflashIntervalMsec
- the time period between flashes in millisecondspublic AttentionAlert(StationState ss, java.awt.Color fillColor)
ss
- the StationState providing the rendering positionfillColor
- java.awt.Color used to fill the flashing arrow symbolspublic AttentionAlert(StationState ss, java.awt.Color fillColor, int numFlashes)
ss
- the StationState providing the rendering positionfillColor
- java.awt.Color used to fill the flashing arrow symbolsnumFlashes
- the number of times the arrows should flash before the alert is taken downpublic AttentionAlert(StationState ss, java.awt.Color fillColor, int numFlashes, int flashIntervalMsec)
ss
- the StationState providing the rendering positionfillColor
- java.awt.Color used to fill the flashing arrow symbolsnumFlashes
- the number of times the arrows should flash before the alert is taken downflashIntervalMsec
- the time period between flashes in millisecondsMethod Detail |
---|
public static AttentionAlert get(double lat, double lon, AX25Message.Precedence precedence)
lat
- latitude in degrees Northlon
- longitude in degrees Eastprecedence
- AX25Message.Precedence to specify coloring
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- ActionEvent identifying the callerpublic void cancelAlert()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to compare
public int hashCode()
hashCode
in class java.lang.Object
equals(Object)
public static java.awt.Color getPrecedenceColor(AX25Message.Precedence precedence)
precedence
- Precedence
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |