Skip to main content

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 aliases
  • id - Unique id of message (use getNextId() 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 removed
  • minWidthPx - Minimum width required to paint this string
  • onMessageClosedCallback - 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