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 classButtonTrigger.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) booleanmatch_value-
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 voidactionPerformed(java.awt.event.ActionEvent e)voidclick(boolean v)booleangetMatchValue()org.jdom2.ElementgetXml()voidmouseClicked(JmriMouseEvent e)Invoked when the mouse button has been clicked (pressed and released) on a component.voidmouseDown()voidmouseEntered(JmriMouseEvent e)Invoked when the mouse enters a component.voidmouseExited(JmriMouseEvent e)Invoked when the mouse exits a component.voidmousePressed(JmriMouseEvent e)Invoked when a mouse button has been pressed on a component.voidmouseReleased(JmriMouseEvent e)Invoked when a mouse button has been released on a component.voidmouseUp()voidpropertyChange(java.beans.PropertyChangeEvent event)voidsetMatchValue(boolean bv)voidsetXml(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
-
-
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:
propertyChangein interfacejava.beans.PropertyChangeListener- Specified by:
propertyChangein classTrigger
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
mousePressed
public void mousePressed(JmriMouseEvent e)
Description copied from interface:JmriMouseListenerInvoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfaceJmriMouseListener- Parameters:
e- the event to be processed
-
mouseReleased
public void mouseReleased(JmriMouseEvent e)
Description copied from interface:JmriMouseListenerInvoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfaceJmriMouseListener- Parameters:
e- the event to be processed
-
mouseEntered
public void mouseEntered(JmriMouseEvent e)
Description copied from interface:JmriMouseListenerInvoked when the mouse enters a component.- Specified by:
mouseEnteredin interfaceJmriMouseListener- Parameters:
e- the event to be processed
-
mouseExited
public void mouseExited(JmriMouseEvent e)
Description copied from interface:JmriMouseListenerInvoked when the mouse exits a component.- Specified by:
mouseExitedin interfaceJmriMouseListener- Parameters:
e- the event to be processed
-
mouseClicked
public void mouseClicked(JmriMouseEvent e)
Description copied from interface:JmriMouseListenerInvoked when the mouse button has been clicked (pressed and released) on a component.- Specified by:
mouseClickedin interfaceJmriMouseListener- Parameters:
e- the event to be processed
-
-