peripherals
Class KeyPad

java.lang.Object
  extended by peripherals.Peripheral
      extended by peripherals.KeyPad

public class KeyPad
extends Peripheral

This class is created in order to keep the information of 16 Push Buttons. The class is inherited from the Peripheral class.

Author:
maho

Field Summary
 
Fields inherited from class peripherals.Peripheral
id, isEnabled, KEY_PAD, LED_ARRAY, pic, POTENTIOMETER, SEVEN_SEGMENT_DISPLAY_ARRAY
 
Constructor Summary
KeyPad(PIC pic)
          Main constructor which initializes 4*4 PushButton objects with default settings.
 
Method Summary
 KeyPadPanel getKeyPadPanel()
          This method returns the visual represantation of the key pad.
 void setButtonState(int buttonID, boolean state)
          This method sets the state of the button with the given id.
 void update()
          This abstract method communicates with the virtual card and makes necessary changes on it.
 
Methods inherited from class peripherals.Peripheral
getId, getPic, isEnabled, setEnabled, setId, setPic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyPad

public KeyPad(PIC pic)
Main constructor which initializes 4*4 PushButton objects with default settings.

Method Detail

setButtonState

public void setButtonState(int buttonID,
                           boolean state)
This method sets the state of the button with the given id.

Parameters:
buttonID -
state -

update

public void update()
Description copied from class: Peripheral
This abstract method communicates with the virtual card and makes necessary changes on it.

Specified by:
update in class Peripheral

getKeyPadPanel

public KeyPadPanel getKeyPadPanel()
This method returns the visual represantation of the key pad.

Returns:
KeyPadPanel