Network buttons

This commit is contained in:
jancoow
2015-06-11 19:11:38 +02:00
parent 22853812f3
commit 44f4444ad0
4 changed files with 51 additions and 34 deletions
+8 -6
View File
@@ -3,21 +3,23 @@ package control.button;
import java.awt.Color;
import main.Window;
import control.LedHandler;
import control.NetworkHandler;
public class Button {
Color color;
int ledID;
int buttonID;
LedHandler led;
NetworkHandler ntw;
public int pressed;
public Button(int buttonID, int ledID, LedHandler led)
public Button(int buttonID, int ledID, NetworkHandler ntw)
{
color = new Color(255,255,255);
this.ledID = ledID;
this.buttonID = buttonID;
this.led = led;
this.ntw = ntw;
pressed = 1;
setLed();
}
@@ -25,8 +27,8 @@ public class Button {
{
if(Window.ON_RASP)
{
led.setLed(ledID, color.getGreen(), color.getRed(), color.getBlue());
led.show();
ntw.setLed(ledID, color.getGreen(), color.getRed(), color.getBlue());
ntw.show();
}
}