Package jmri.jmrit.vsdecoder
Class ButtonTrigger
- java.lang.Object
-
- jmri.jmrit.vsdecoder.Trigger
-
- jmri.jmrit.vsdecoder.ButtonTrigger
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.beans.PropertyChangeListener
,java.util.EventListener
,JmriMouseListener
public class ButtonTrigger extends Trigger implements java.awt.event.ActionListener, JmriMouseListener
Button trigger.
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 (package private) static class
ButtonTrigger.ButtonAction
-
Nested classes/interfaces inherited from class jmri.jmrit.vsdecoder.Trigger
Trigger.CompareType, Trigger.CompareValueType, Trigger.TargetAction, Trigger.TriggerType
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
match_value
(package private) boolean
state
-
Fields inherited from class jmri.jmrit.vsdecoder.Trigger
callback, event_name, target, target_name, trigger_name
-
-
Constructor Summary
Constructors Constructor Description ButtonTrigger(java.lang.String name)
ButtonTrigger(java.lang.String name, boolean bv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
void
click(boolean v)
boolean
getMatchValue()
org.jdom2.Element
getXml()
void
mouseClicked(JmriMouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a component.void
mouseDown()
void
mouseEntered(JmriMouseEvent e)
Invoked when the mouse enters a component.void
mouseExited(JmriMouseEvent e)
Invoked when the mouse exits a component.void
mousePressed(JmriMouseEvent e)
Invoked when a mouse button has been pressed on a component.void
mouseReleased(JmriMouseEvent e)
Invoked when a mouse button has been released on a component.void
mouseUp()
void
propertyChange(java.beans.PropertyChangeEvent event)
void
setMatchValue(boolean bv)
void
setXml(org.jdom2.Element e)
-
Methods inherited from class jmri.jmrit.vsdecoder.Trigger
getCallback, getEventName, getName, getTarget, getTargetAction, getTargetName, getTriggerType, setCallback, setEventName, setName, setTarget, setTargetAction, setTargetName, setTriggerType
-
-
-
-
Field Detail
-
match_value
boolean match_value
-
state
boolean state
-
-
Constructor Detail
-
ButtonTrigger
public ButtonTrigger(java.lang.String name)
-
ButtonTrigger
public ButtonTrigger(java.lang.String name, boolean bv)
-
-
Method Detail
-
setMatchValue
public void setMatchValue(boolean bv)
-
getMatchValue
public boolean getMatchValue()
-
mouseDown
public void mouseDown()
-
mouseUp
public void mouseUp()
-
click
public void click(boolean v)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
- Specified by:
propertyChange
in classTrigger
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
mousePressed
public void mousePressed(JmriMouseEvent e)
Description copied from interface:JmriMouseListener
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressed
in interfaceJmriMouseListener
- Parameters:
e
- the event to be processed
-
mouseReleased
public void mouseReleased(JmriMouseEvent e)
Description copied from interface:JmriMouseListener
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleased
in interfaceJmriMouseListener
- Parameters:
e
- the event to be processed
-
mouseEntered
public void mouseEntered(JmriMouseEvent e)
Description copied from interface:JmriMouseListener
Invoked when the mouse enters a component.- Specified by:
mouseEntered
in interfaceJmriMouseListener
- Parameters:
e
- the event to be processed
-
mouseExited
public void mouseExited(JmriMouseEvent e)
Description copied from interface:JmriMouseListener
Invoked when the mouse exits a component.- Specified by:
mouseExited
in interfaceJmriMouseListener
- Parameters:
e
- the event to be processed
-
mouseClicked
public void mouseClicked(JmriMouseEvent e)
Description copied from interface:JmriMouseListener
Invoked when the mouse button has been clicked (pressed and released) on a component.- Specified by:
mouseClicked
in interfaceJmriMouseListener
- Parameters:
e
- the event to be processed
-
-