Class Layer1ApiUserMessageNotification

java.lang.Object
velox.api.layer1.messages.Layer1ApiUserMessageNotification

public class Layer1ApiUserMessageNotification
extends java.lang.Object
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)
  • Field Summary

    Fields 
    Modifier and Type Field Description
    java.lang.String alias  
    long id  
    boolean isAdd  
    int minWidthPx  
    java.lang.Runnable onMessageClosedCallback  
    static long RESERVED_ID_HISTORICAL_DATA  
    java.lang.String text  
  • Constructor Summary

    Constructors 
    Constructor Description
    Layer1ApiUserMessageNotification​(java.lang.String alias, long id, java.lang.String text, boolean isAdd, int minWidthPx, java.lang.Runnable onMessageClosedCallback)  
  • Method Summary

    Modifier and Type Method Description
    static long getNextId()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Layer1ApiUserMessageNotification

      public Layer1ApiUserMessageNotification​(java.lang.String alias, long id, java.lang.String text, boolean isAdd, int minWidthPx, java.lang.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
  • Method Details

    • getNextId

      public static long getNextId()
      Returns:
      unique id
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object