Package jmri.jmrit.vsdecoder
Class Trigger
- java.lang.Object
-
- jmri.jmrit.vsdecoder.Trigger
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
- Direct Known Subclasses:
BoolTrigger
,ButtonTrigger
,FloatTrigger
,IntTrigger
,NotchTrigger
,ThrottleTrigger
public abstract class Trigger extends java.lang.Object implements java.beans.PropertyChangeListener
Superclass for all VSD trigger types.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Trigger.CompareType
static class
Trigger.CompareValueType
static class
Trigger.TargetAction
static class
Trigger.TriggerType
-
Field Summary
Fields Modifier and Type Field Description (package private) TriggerListener
callback
(package private) java.lang.String
event_name
(package private) VSDSound
target
(package private) java.lang.String
target_name
(package private) java.lang.String
trigger_name
-
Constructor Summary
Constructors Constructor Description Trigger(java.lang.String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TriggerListener
getCallback()
java.lang.String
getEventName()
java.lang.String
getName()
VSDSound
getTarget()
Trigger.TargetAction
getTargetAction()
java.lang.String
getTargetName()
Trigger.TriggerType
getTriggerType()
org.jdom2.Element
getXml()
abstract void
propertyChange(java.beans.PropertyChangeEvent event)
void
setCallback(TriggerListener cb)
void
setEventName(java.lang.String en)
void
setName(java.lang.String tn)
void
setTarget(VSDSound tgt)
void
setTargetAction(Trigger.TargetAction ta)
void
setTargetName(java.lang.String tn)
void
setTriggerType(Trigger.TriggerType ta)
void
setXml(org.jdom2.Element e)
-
-
-
Field Detail
-
trigger_name
java.lang.String trigger_name
-
event_name
java.lang.String event_name
-
target_name
java.lang.String target_name
-
callback
TriggerListener callback
-
-
Constructor Detail
-
Trigger
public Trigger(java.lang.String name)
-
-
Method Detail
-
propertyChange
public abstract void propertyChange(java.beans.PropertyChangeEvent event)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
setName
public void setName(java.lang.String tn)
-
getName
public java.lang.String getName()
-
setEventName
public void setEventName(java.lang.String en)
-
getEventName
public java.lang.String getEventName()
-
setTargetName
public void setTargetName(java.lang.String tn)
-
getTargetName
public java.lang.String getTargetName()
-
setTargetAction
public void setTargetAction(Trigger.TargetAction ta)
-
getTargetAction
public Trigger.TargetAction getTargetAction()
-
setTriggerType
public void setTriggerType(Trigger.TriggerType ta)
-
getTriggerType
public Trigger.TriggerType getTriggerType()
-
setCallback
public void setCallback(TriggerListener cb)
-
getCallback
public TriggerListener getCallback()
-
getXml
public org.jdom2.Element getXml()
-
setXml
public void setXml(org.jdom2.Element e)
-
-