|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.aplu.nxt.Part
ch.aplu.nxt.Sensor
ch.aplu.nxt.TouchSensor
public class TouchSensor
Class that represents a touch sensor.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
TouchSensor()
Creates a sensor instance connected to port S1. |
|
TouchSensor(SensorPort port)
Creates a sensor instance connected to the given port. |
|
| Method Summary | |
|---|---|
void |
addTouchListener(TouchListener touchListener)
Registers the given touch listener. |
lejos.nxt.SensorPort |
getLejosPort()
Returns the reference of the the underlying lejos.nxt.SensorPort. |
lejos.nxt.TouchSensor |
getLejosSensor()
Returns the reference of the the underlying lejos.nxt.TouchSensor. |
boolean |
isPressed()
Polls the sensor. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TouchSensor(SensorPort port)
port - the port where the sensor is plugged-inpublic TouchSensor()
| Method Detail |
|---|
public void addTouchListener(TouchListener touchListener)
touchListener - the TouchListener to become registered.public boolean isPressed()
public lejos.nxt.TouchSensor getLejosSensor()
public lejos.nxt.SensorPort getLejosPort()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||