From 358c35a970bf8b1ed2833851bebefebcbbf1d039 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 27 Mar 2016 18:51:35 +0200 Subject: Change name --- src/drivers/BasicDriver.java | 110 ------------------------------------ src/drivers/Device_1770_ff00.java | 2 +- src/drivers/DriverTypeA.java | 115 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 111 deletions(-) delete mode 100644 src/drivers/BasicDriver.java create mode 100644 src/drivers/DriverTypeA.java (limited to 'src/drivers') diff --git a/src/drivers/BasicDriver.java b/src/drivers/BasicDriver.java deleted file mode 100644 index 9ec7c13..0000000 --- a/src/drivers/BasicDriver.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.manzerbredes.open_klm.drivers; - - -public interface BasicDriver{ - - - /** - * Defined Region Helper - * - * @author Manzerbredes - * - */ - public enum Region{ - LEFT(1), MIDDLE(2), RIGHT(3); - - private int current; - - Region(int current){ - this.current=current; - } - - public int intValue(){ - return this.current; - } - } - - /** - * Defined Color Helper - * - * @author Manzerbredes - * - */ - public enum Color{ - OFF(0),RED(1),ORANGE(2),YELLOW(3),GREEN(4),SKY(5), BLUE(6),PURPLE(7),WHITE(8); - - private int current; - - Color(int current){ - this.current=current; - } - - public int intValue(){ - return this.current; - } - } - - /** - * Defined Level Helper - * - * @author Manzerbredes - * - */ - public enum Intensity{ - HIGH(0), MEDIUM(1), LOW(2), LIGHT(3); - - private int current; - - Intensity(int current){ - this.current=current; - } - - public int intValue(){ - return this.current; - } - } - - /** - * Defined Mode Helper - * - * @author Manzerbredes - * - */ - public enum Mode{ - NORMAL(1), GAMING(2), BREATHE(3), DEMO(4), WAVE(5); - - private int current; - - Mode(int current){ - this.current=current; - } - - public int intValue(){ - return this.current; - } - } - - - - /** - * Set color of the region - * @param region - * @param color - * @param intensity - */ - public void setRegionColor(Region region, Color color, Intensity intensity); - - /** - * Set global keyboard color - * @param color - * @param intensity - */ - public void setColor(Color color, Intensity intensity); - - /** - * Set keyboard mode - * @param mode - */ - public void setMode(Mode mode); - -} \ No newline at end of file diff --git a/src/drivers/Device_1770_ff00.java b/src/drivers/Device_1770_ff00.java index ec942d5..77ee461 100644 --- a/src/drivers/Device_1770_ff00.java +++ b/src/drivers/Device_1770_ff00.java @@ -14,7 +14,7 @@ import com.codeminders.hidapi.*; * @author Manzerbredes * */ -public class Device_1770_ff00 implements BasicDriver{ +public class Device_1770_ff00 implements DriverTypeA{ diff --git a/src/drivers/DriverTypeA.java b/src/drivers/DriverTypeA.java new file mode 100644 index 0000000..37e8d4c --- /dev/null +++ b/src/drivers/DriverTypeA.java @@ -0,0 +1,115 @@ +package org.manzerbredes.open_klm.drivers; + +/** + * Basic driver with basic functionalities. + * + * @author Manzerbredes + * + */ +public interface DriverTypeA{ + + + /** + * Defined Region Helper + * + * @author Manzerbredes + * + */ + public enum Region{ + LEFT(1), MIDDLE(2), RIGHT(3); + + private int current; + + Region(int current){ + this.current=current; + } + + public int intValue(){ + return this.current; + } + } + + /** + * Defined Color Helper + * + * @author Manzerbredes + * + */ + public enum Color{ + OFF(0),RED(1),ORANGE(2),YELLOW(3),GREEN(4),SKY(5), BLUE(6),PURPLE(7),WHITE(8); + + private int current; + + Color(int current){ + this.current=current; + } + + public int intValue(){ + return this.current; + } + } + + /** + * Defined Level Helper + * + * @author Manzerbredes + * + */ + public enum Intensity{ + HIGH(0), MEDIUM(1), LOW(2), LIGHT(3); + + private int current; + + Intensity(int current){ + this.current=current; + } + + public int intValue(){ + return this.current; + } + } + + /** + * Defined Mode Helper + * + * @author Manzerbredes + * + */ + public enum Mode{ + NORMAL(1), GAMING(2), BREATHE(3), DEMO(4), WAVE(5); + + private int current; + + Mode(int current){ + this.current=current; + } + + public int intValue(){ + return this.current; + } + } + + + + /** + * Set color of the region + * @param region + * @param color + * @param intensity + */ + public void setRegionColor(Region region, Color color, Intensity intensity); + + /** + * Set global keyboard color + * @param color + * @param intensity + */ + public void setColor(Color color, Intensity intensity); + + /** + * Set keyboard mode + * @param mode + */ + public void setMode(Mode mode); + +} \ No newline at end of file -- cgit v1.2.3