Package warnings
Class PamWarning
java.lang.Object
warnings.PamWarning
A warning message to put into the warning system displayed in the title area
- Author:
- dg50
-
Constructor Summary
ConstructorDescriptionPamWarning
(String warningSource, String warningMessage, int warnignLevel) Construct a Pamguard Warning -
Method Summary
Modifier and TypeMethodDescriptionlong
int
Get a tip which some displays may show as a tooltip text when the mouse moves over the display.boolean
void
setEndOfLife
(long endOfLife) Set an end of life for a warning.void
setRequestRestart
(boolean requestRestart) Set a flag to say that the warning message is requesting that PAMGuard be restarted.void
setWarnignLevel
(int warnignLevel) void
setWarningMessage
(String warningMessage) void
setWarningSource
(String warningSource) void
setWarningTip
(String warningTip) Set a tip which some displays may show as a tooltip text when the mouse moves over the display.
-
Constructor Details
-
PamWarning
Construct a Pamguard Warning- Parameters:
warningSource
- source of the warning (generally a module name)warningMessage
- Warning message textwarnignLevel
- warning level (1 or 2)
-
-
Method Details
-
getEndOfLife
public long getEndOfLife()- Returns:
- the endOfLife
-
setEndOfLife
public void setEndOfLife(long endOfLife) Set an end of life for a warning. By default warnings have no end of life. If you want a warning to only appear for a few seconds, set this to PamCalender.getTimeMillis() + nSecs*1000 where nSecs is the number of seconds you want the warning to apear for.- Parameters:
endOfLife
- the endOfLife to set
-
getWarningSource
- Returns:
- the warningSource
-
setWarningSource
- Parameters:
warningSource
- the warningSource to set
-
getWarningMessage
- Returns:
- the warningMessage
-
setWarningMessage
- Parameters:
warningMessage
- the warningMessage to set
-
getWarnignLevel
public int getWarnignLevel()- Returns:
- the warnignLevel
-
setWarnignLevel
public void setWarnignLevel(int warnignLevel) - Parameters:
warnignLevel
- the warnignLevel to set
-
getWarningTip
Get a tip which some displays may show as a tooltip text when the mouse moves over the display.- Returns:
- tip text.
-
setWarningTip
Set a tip which some displays may show as a tooltip text when the mouse moves over the display.- Parameters:
warningTip
- tip text.
-
setRequestRestart
public void setRequestRestart(boolean requestRestart) Set a flag to say that the warning message is requesting that PAMGuard be restarted. By restart, this means stopping and starting the modules NOT exiting the entire program !- Parameters:
requestRestart
-
-
isRequestRestart
public boolean isRequestRestart()- Returns:
- the requestRestart
-