Package jmri.jmrit.vsdecoder
Class SoundEvent
- java.lang.Object
-
- jmri.jmrit.vsdecoder.SoundEvent
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
- Direct Known Subclasses:
EngineSoundEvent
,MomentarySoundEvent
,ToggleSoundEvent
public class SoundEvent extends java.lang.Object implements java.beans.PropertyChangeListener
Process Sound Events.
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 for more details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoundEvent.ButtonType
-
Field Summary
Fields Modifier and Type Field Description (package private) ButtonTrigger
bt
(package private) javax.swing.AbstractButton
button
(package private) java.lang.String
button_label
protected java.util.HashMap<java.lang.String,ButtonTrigger>
button_trigger_list
(package private) SoundEvent.ButtonType
buttontype
(package private) EnginePane
engine_pane
(package private) java.lang.String
event_name
(package private) VSDSound
my_sound
(package private) java.lang.String
name
(package private) VSDecoder
parent
(package private) Trigger
t
protected java.util.HashMap<java.lang.String,Trigger>
trigger_list
-
Constructor Summary
Constructors Constructor Description SoundEvent()
SoundEvent(java.lang.String n)
SoundEvent(java.lang.String n, java.lang.String bl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTrigger(java.lang.String s, Trigger t)
protected void
addXmlTrigger(org.jdom2.Element te, VSDFile vf)
javax.swing.JComponent
getButton()
java.lang.String
getButtonLabel()
SoundEvent.ButtonType
getButtonType()
EnginePane
getEnginePane()
java.lang.String
getEventName()
java.lang.String
getName()
VSDecoder
getParent()
VSDSound
getSound()
Trigger
getTrigger(java.lang.String s)
org.jdom2.Element
getXml()
boolean
hasButton()
boolean
hasEnginePane()
void
propertyChange(java.beans.PropertyChangeEvent event)
void
setButton(javax.swing.AbstractButton b)
void
setButtonLabel(java.lang.String bl)
void
setEnginePane(EnginePane e)
void
setEventName(java.lang.String n)
void
setName(java.lang.String n)
void
setParent(VSDecoder v)
void
setSound(VSDSound v)
protected ButtonTrigger
setupButtonAction(org.jdom2.Element te)
void
setXml(org.jdom2.Element el)
void
setXml(org.jdom2.Element el, VSDFile vf)
-
-
-
Field Detail
-
name
java.lang.String name
-
button_label
java.lang.String button_label
-
event_name
java.lang.String event_name
-
buttontype
SoundEvent.ButtonType buttontype
-
button
javax.swing.AbstractButton button
-
engine_pane
EnginePane engine_pane
-
bt
ButtonTrigger bt
-
button_trigger_list
protected java.util.HashMap<java.lang.String,ButtonTrigger> button_trigger_list
-
trigger_list
protected java.util.HashMap<java.lang.String,Trigger> trigger_list
-
-
Constructor Detail
-
SoundEvent
public SoundEvent()
-
SoundEvent
public SoundEvent(java.lang.String n)
-
SoundEvent
public SoundEvent(java.lang.String n, java.lang.String bl)
-
-
Method Detail
-
setName
public void setName(java.lang.String n)
-
getName
public java.lang.String getName()
-
setEventName
public void setEventName(java.lang.String n)
-
getEventName
public java.lang.String getEventName()
-
getButtonType
public SoundEvent.ButtonType getButtonType()
-
hasButton
public boolean hasButton()
-
hasEnginePane
public boolean hasEnginePane()
-
setButton
public void setButton(javax.swing.AbstractButton b)
-
getButton
public javax.swing.JComponent getButton()
-
getEnginePane
public EnginePane getEnginePane()
-
setEnginePane
public void setEnginePane(EnginePane e)
-
setButtonLabel
public void setButtonLabel(java.lang.String bl)
-
getButtonLabel
public java.lang.String getButtonLabel()
-
addTrigger
public void addTrigger(java.lang.String s, Trigger t)
-
getTrigger
public Trigger getTrigger(java.lang.String s)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
setupButtonAction
protected ButtonTrigger setupButtonAction(org.jdom2.Element te)
-
getXml
public org.jdom2.Element getXml()
-
setXml
public void setXml(org.jdom2.Element el)
-
addXmlTrigger
protected void addXmlTrigger(org.jdom2.Element te, VSDFile vf)
-
-