Interface Layer1ExternalAction

All Superinterfaces:
Action

public interface Layer1ExternalAction extends Action
Represents an action that will be register in Bookmap action system. This class should be annotated with Layer1ActionMetadata annotation(s), otherwise it will be ignored. External actions will be located in the Keyboard Shortcuts window in Addons/strategy_name group. If Layer1ExternalAction instance throws an exception when it's called, strategy will be unloaded.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Strategy window (JComponent or JFrame) must be tagged with this property, if the strategy wants to execute built-in actions in the external strategy window.
    static final String
    Strategy window (JComponent or JFrame) must be tagged with this property, if the strategy wants to execute custom actions in the external strategy window.
  • Method Summary

    Methods inherited from interface velox.api.layer1.actions.Action

    onShortcutChanged, performAction
  • Field Details

    • EXTERNAL_WINDOW_ALIAS_PROPERTY

      static final String EXTERNAL_WINDOW_ALIAS_PROPERTY
      Strategy window (JComponent or JFrame) must be tagged with this property, if the strategy wants to execute custom actions in the external strategy window. Property value is an alias to which window belongs.
      
         frame.getRootPane().putClientProperty(Layer1ExternalAction.EXTERNAL_WINDOW_ALIAS_PROPERTY, alias);
       
      If your strategy doesn't have any external windows, ignore this field.
      See Also:
    • ALLOW_EXECUTING_BUILTIN_ACTIONS

      static final String ALLOW_EXECUTING_BUILTIN_ACTIONS
      Strategy window (JComponent or JFrame) must be tagged with this property, if the strategy wants to execute built-in actions in the external strategy window. This property works only in conjunction with EXTERNAL_WINDOW_ALIAS_PROPERTY and should be set to Boolean.TRUE. Trading actions will work even if an instrument is hidden.
      
         frame.getRootPane().putClientProperty(Layer1ExternalAction.EXTERNAL_WINDOW_ALIAS_PROPERTY, alias);
         frame.getRootPane().putClientProperty(Layer1ExternalAction.ALLOW_EXECUTING_BUILTIN_ACTIONS, true);
       
      If your strategy doesn't have any external windows, ignore this field.
      See Also: