RoboJDETM v2.0

com.ridgesoft.robotics
Class BasicPushButton

java.lang.Object
  extended by com.ridgesoft.robotics.BasicPushButton
All Implemented Interfaces:
PushButton

public class BasicPushButton
extends Object
implements PushButton

Implements the PushButton interface using a DigitalInput to read the button’s status.


Constructor Summary
BasicPushButton(DigitalInput input)
          Construct a BasicPushButton for a button which pulls the input low when pressed.
 
Method Summary
 boolean isPressed()
          Returns true if the button is currently pressed.
 void waitPressed()
          Waits for the button to be pressed.
 void waitReleased()
          Waits for the button to be released.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

BasicPushButton

public BasicPushButton(DigitalInput input)
Construct a BasicPushButton for a button which pulls the input low when pressed.

Parameters:
input - the DigitalInput used by the push button
Method Detail

isPressed

public boolean isPressed()
Returns true if the button is currently pressed.

Specified by:
isPressed in interface PushButton
Returns:
true if pressed

waitPressed

public void waitPressed()
Waits for the button to be pressed.

Specified by:
waitPressed in interface PushButton

waitReleased

public void waitReleased()
Waits for the button to be released.

Specified by:
waitReleased in interface PushButton

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com