public final class LEDStrip
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
byte[] |
getBlueData()
Gets the internal array of all blue bytes.
|
byte |
getBrightness()
Gets the brightness of the strip in a range from 0 to 255 as a signed
byte.
|
javafx.scene.paint.Color |
getColor(int index)
Gets the color of the strip at the given index.
|
Controller |
getController()
Gets the controller of this strip.
|
StripFrequenty |
getFrequenty() |
byte[] |
getGreenData()
Gets the internal array of all green bytes.
|
byte |
getIBlue()
Gets the blue byte of the initial color of this strip.
|
javafx.scene.paint.Color |
getIColor()
Gets the initial color of this strip.
|
byte |
getIGreen()
Gets the green byte of the initial color of this strip.
|
byte |
getIRed()
Gets the red byte of the initial color of this strip.
|
int |
getLength()
Gets the amount of LED pixels of this LED strip.
|
byte |
getPin()
Gets the pin on the microcontroller this LED strip is connected to.
|
byte[] |
getRedData()
Gets the internal array of all red bytes.
|
StripType |
getType()
Gets the type of LEDs on this strip.
|
boolean |
isDirty()
Checks if the data on the LED strip has been updated since the last
output to the microcontroller ( or calling setDirty(false) ).
|
boolean |
isLoading()
Checks if this LED strip is currently loading data from the board.
|
boolean |
isMultiColor()
Checks if this strip is multicolor.
|
void |
setBrightness(byte brightness)
Sets the brightness of the strip in a range from 0 to 255 as a signed
byte.
|
void |
setColor(int index,
byte red,
byte green,
byte blue)
Sets the color of the LED at the given index to the given Color.
|
void |
setColor(int index,
javafx.scene.paint.Color color)
Sets the color of the LED at the given index to the given Color.
|
void |
setColors(byte red,
byte green,
byte blue)
Sets the color of the complete strip to the given Color.
|
void |
setColors(javafx.scene.paint.Color color)
Sets the color of the complete strip to the given Color.
|
void |
setController(Controller controller)
Sets the controller of this strip.
|
void |
setDirty(boolean dirty)
Sets the dirty flag of this LED strip.
|
void |
setFrequenty(StripFrequenty freq) |
void |
setIBlue(byte iblue)
Sets the blue byte of the initial color of this strip.
|
void |
setIColor(javafx.scene.paint.Color color)
Sets the initial color of this strip.
|
void |
setIGreen(byte igreen)
Sets the green byte of the initial color of this strip.
|
void |
setIRed(byte ired)
Sets the red byte of the initial color of this strip.
|
void |
setLength(int length)
Sets the amount of LED pixels of this LED strip.
|
void |
setLoading(boolean loading)
Sets the loading flag of this LED strip.
|
void |
setType(StripType type) |
public byte getBrightness()
public void setBrightness(byte brightness)
brightness
- The brightness of the LED strip.public javafx.scene.paint.Color getIColor()
public void setIColor(javafx.scene.paint.Color color)
color
- The initial color as a Color object.public javafx.scene.paint.Color getColor(int index)
index
- The index of the desired color. Every LED represents 1 index.public void setColors(javafx.scene.paint.Color color)
color
- The color for all LEDs as a Color object.public void setColors(byte red, byte green, byte blue)
red
- The red byte in a range from 0 to 255 as a signed byte.green
- The green byte in a range from 0 to 255 as a signed byte.blue
- The blue byte in a range from 0 to 255 as a signed byte.public void setColor(int index, javafx.scene.paint.Color color) throws java.lang.UnsupportedOperationException
index
- The index of the LED in the strip. Every LED represents 1
index.color
- The desired color as a Color object.java.lang.UnsupportedOperationException
- Throws an exception if the controller of this strip doesn't
support multicolor.public void setColor(int index, byte red, byte green, byte blue) throws java.lang.UnsupportedOperationException
index
- The index of the LED in the strip. Every LED represents 1
index.red
- The red byte in a range from 0 to 255 as a signed byte.green
- The green byte in a range from 0 to 255 as a signed byte.blue
- The blue byte in a range from 0 to 255 as a signed byte.java.lang.UnsupportedOperationException
- Throws an exception if the controller of this strip doesn't
support multicolor.public byte getPin()
public StripType getType()
public void setType(StripType type)
public StripFrequenty getFrequenty()
public void setFrequenty(StripFrequenty freq)
public int getLength()
public void setLength(int length)
length
- The new length.public byte getIRed()
public void setIRed(byte ired)
ired
- The new red value byte as a signed byte in range 0-255.public byte getIGreen()
public void setIGreen(byte igreen)
igreen
- The new green value byte as a signed byte in range 0-255.public byte getIBlue()
public void setIBlue(byte iblue)
iblue
- The new blue value byte as a signed byte in range 0-255.public byte[] getRedData()
public byte[] getGreenData()
public byte[] getBlueData()
public boolean isDirty()
public void setDirty(boolean dirty)
dirty
- The new dirty flag for this strip.public boolean isLoading()
public void setLoading(boolean loading)
loading
- The new loading flag for this strip.public Controller getController()
public void setController(Controller controller) throws java.lang.IllegalArgumentException
controller
- The controller of this strip, or null if this strip shouldn't
have a controller.java.lang.IllegalArgumentException
- Throws an exception when the strip reference of the given
controller isn't equal to this object.public boolean isMultiColor()