Layer1ApiUserMessageNotification
Package: velox.api.layer1.messages
Type: Class
Inheritance: java.lang.Object → Layer1ApiUserMessageNotification
All Implemented Interfaces: velox.api.layer1.messages.EchoMessage
Description​
Can be used to print some text over chart with optional close icon.
If message with id was already present, displayed message will be updated.
Messages need to be removed with this message (note that you need to do this in response for close icon pressed as well).
Fields​
RESERVED_ID_HISTORICAL_DATA​
public static final long RESERVED_ID_HISTORICAL_DATA
alias​
public final String alias
text​
public final String text
id​
public final long id
isAdd​
public final boolean isAdd
minWidthPx​
public final int minWidthPx
onMessageClosedCallback​
public final Runnable onMessageClosedCallback
Constructors​
Layer1ApiUserMessageNotification​
public Layer1ApiUserMessageNotification(String alias, long id, String text, boolean isAdd, int minWidthPx, Runnable onMessageClosedCallback)
Parameters:
alias- Target alias of message, or null if notification is for all aliasesid- Unique id of message (usegetNextId()to generate it first time)text-isAdd- If true, message is displayed (if message with this id is already displayed - it will be updated). Otherwise message with this id will be removedminWidthPx- Minimum width required to paint this stringonMessageClosedCallback- If not null, message will have cross icon, and callback will be called when it's pressed
Methods​
getNextId​
public static long getNextId()
Returns: Unique id
toString​
public String toString()
Overrides: toString in class Object