public class AttentionAlert
extends java.util.Observable
implements java.awt.event.ActionListener, java.io.Serializable
The flashing is on a 75% duty cycle (75% on, 25% off) until the alert times out. Then the flasher is dequeued.
Modifier and Type | Field and Description |
---|---|
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 special traffic.
|
static java.awt.Color |
WEATHER_COLOR
This constant specifies the color used for weather alert arrows.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
AX25Message.Precedence |
getPrecedence()
Get the precedence (if known) for this AttentionAlert.
|
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.
|
boolean |
isActive()
Indicate whether this AttentionAlert is still active (i.e., not timed out).
|
boolean |
isShown()
Indicate whether the AttentionAlert is in the "on" part of its flashing cycle.
|
void |
setWasAutoCenter(boolean wasAutoCenter)
Specify what the Auto-Center Map option setting was before this AttentionAlert
was activated.
|
public static final int DEFAULT_FLASH_INTERVAL
public static final java.awt.Color LOCATE_COLOR
public static final java.awt.Color WEATHER_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
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 millisecondspublic static AttentionAlert get(double lat, double lon, AX25Message.Precedence precedence)
lat
- latitude in degrees Northlon
- longitude in degrees Eastprecedence
- AX25Message.Precedence to specify coloringpublic void setWasAutoCenter(boolean wasAutoCenter)
wasAutoCenter
- boolean true if Auto-Center Map was setpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- ActionEvent identifying the callerpublic boolean isShown()
public boolean isActive()
public AX25Message.Precedence getPrecedence()
public void cancelAlert()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to comparepublic int hashCode()
hashCode
in class java.lang.Object
equals(Object)
public static java.awt.Color getPrecedenceColor(AX25Message.Precedence precedence)
precedence
- Precedence