Package velox.api.layer1.messages
Class Layer1ApiAlertGuiMessage
java.lang.Object
velox.api.layer1.messages.Layer1ApiAlertGuiMessage
- All Implemented Interfaces:
Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer
public class Layer1ApiAlertGuiMessage extends java.lang.Object implements Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer
Use this message to send GUI panels for configuration of
Layer1ApiSoundAlertMessage's, created by
your addon (specified via source-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLayer1ApiAlertGuiMessage.Builder -
Field Summary
Fields Modifier and Type Field Description java.util.function.Function<Layer1ApiSoundAlertDeclarationMessage,StrategyPanel[]>guiPanelsProviderFunction that returns GUI panels based onLayer1ApiSoundAlertDeclarationMessage
If your GUI panels are opened with the intent to declare a new alert - the passed argument is null.java.lang.StringidId can be used to reference this messagebooleanisAddTrue if this message adds GUI panels.java.lang.Class<?>sourceClass that created this message.java.lang.StringstrategyNameName of the strategy that created this message, extracted fromLayer1StrategyName.value(), displayed on the UI -
Method Summary
Modifier and Type Method Description static Layer1ApiAlertGuiMessage.Builderbuilder()Creates builder to buildLayer1ApiAlertGuiMessage.java.lang.StringtoString()
-
Field Details
-
id
public final java.lang.String idId can be used to reference this message -
source
public final java.lang.Class<?> sourceClass that created this message. The class must be annotated withLayer1StrategyName -
strategyName
public final java.lang.String strategyNameName of the strategy that created this message, extracted fromLayer1StrategyName.value(), displayed on the UI -
guiPanelsProvider
public final java.util.function.Function<Layer1ApiSoundAlertDeclarationMessage,StrategyPanel[]> guiPanelsProviderFunction that returns GUI panels based onLayer1ApiSoundAlertDeclarationMessage
If your GUI panels are opened with the intent to declare a new alert - the passed argument is null. Otherwise a user wants to modify an existingLayer1ApiSoundAlertDeclarationMessage- in that case the function obtains this declaration as an argument. You can use this declaration to pre-populate fields in your GUI. -
isAdd
public final boolean isAddTrue if this message adds GUI panels. Otherwise, the panels from a message with the sameidwill be removed
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
builder
Creates builder to buildLayer1ApiAlertGuiMessage.- Returns:
- created builder
-