public static class LarsonScanner.ScannerConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
HIGH
Set the rendering quality of the Larson Scanner to high settings.
|
static int |
LOW
Set the rendering quality of the Larson Scanner to low settings.
|
static int |
MEDIUM
Set the rendering quality of the Larson Scanner to medium settings.
|
| Constructor and Description |
|---|
ScannerConfig()
Create a Larson Scanner configuration with default values.
|
ScannerConfig(int qualitySetting,
short[] alphaValues,
short intervalInMillis,
short divider,
byte numberOfElements,
float[] fractions,
float gapPercent,
double partitionDivider,
boolean forceAspectRatio,
boolean ovalShaped,
boolean useGradients,
boolean useDivider,
boolean cylonAnimation,
@NotNull java.awt.Color[] eyeColours,
@NotNull java.awt.Color scannerBackgroundColour,
@NotNull java.awt.Color eyeBackgroundColour)
Create a Larson Scanner configuration with custom settings.
|
| Modifier and Type | Method and Description |
|---|---|
short[] |
getAlphas()
Get this configurations' alphas-array.
|
short |
getDivider()
Get this configurations' divider.
|
java.awt.Color |
getEyeBackgroundColour()
Set the background colour for the eye of the Larson Scanner of this configuration.
|
java.awt.Color[] |
getEyeColours()
Get this configurations' eye colours.
|
float[] |
getFractions()
Get this configurations' fractions.
|
float |
getGapPercent()
Get this configurations' gap percentage.
|
short |
getInterval()
Get this configurations' interval.
|
byte |
getNumberOfElements()
Get this configurations' number of elements in th eye.
|
double |
getPartitionDivider()
Get this configurations' partition divider.
|
int |
getQualitySetting()
Get this configurations' rendering quality setting.
|
java.awt.Color |
getScannerBackgroundColour()
Get this configurations' background colour for the Larson Scanner.
|
boolean |
isAspectRatioForced()
Whether the aspect ratio is enforced in this configuration.
|
boolean |
isCylonAnimation()
Whether this configuration animates the eye as a Cylon-eye, or Kitt-eye.
|
boolean |
isDividerActive()
Whether the position of this configuration in-/decrements using a divider.
|
boolean |
isGradientActive()
Whether the elements for this configuration are drawn using gradients.
|
boolean |
isShapeOval()
Whether the elements for this configuration are drawn as ovals or rectangles.
|
void |
setAlphas(short[] alphas)
Set this configurations' alpha-array.
|
void |
setCylonAnimation(boolean cylonAnimation)
Set whether this configuration should animate the eye as a Cylon-eye, or Kitt-eye.
|
void |
setDivider(short divider)
Set this configurations' divider.
|
void |
setEyeBackgroundColour(@NotNull java.awt.Color eyeBackgroundColour)
Set the background color for the eye of the Larson Scanner for this configuration.
|
void |
setEyeColours(java.awt.Color[] eyeColours)
Set the colours for each element in the eye for this configuration.
|
void |
setForceAspectRatio(boolean forceAspectRatio)
Set whether this configurations' aspect ratio enforcing should be enabled.
|
void |
setFractions(float fractionOne,
float fractionTwo)
Set this configurations' fractions.
|
void |
setGapPercent(float gapPercent)
Set this configurations' gap percentage.
|
void |
setInterval(short intervalInMillis)
Set this configurations' interval.
|
void |
setNumberOfElements(byte numberOfElements)
Set this configurations' number of elements in the eye.
|
void |
setOvalShaped(boolean ovalShaped)
Set whether the elements for this configuration should be drawn as ovals or rectangles.
|
void |
setPartitionDivider(double partitionDivider)
Set this configurations' partition divider.
|
void |
setQualitySetting(int qualitySetting)
Set this configurations' rendering quality setting.
|
void |
setScannerBackgroundColour(@NotNull java.awt.Color scannerBackgroundColour)
Set the background colour for the Larson Scanner for this configuration.
|
void |
setUseDivider(boolean useDivider)
Set whether the position for this configuration in-/decrements using a divider.
|
void |
setUseGradients(boolean useGradients)
Set whether the elements for this configuration should be drawn using gradients.
|
public static final int LOW
public static final int MEDIUM
public static final int HIGH
public ScannerConfig()
public ScannerConfig(int qualitySetting,
short[] alphaValues,
short intervalInMillis,
short divider,
byte numberOfElements,
float[] fractions,
float gapPercent,
double partitionDivider,
boolean forceAspectRatio,
boolean ovalShaped,
boolean useGradients,
boolean useDivider,
boolean cylonAnimation,
@NotNull
@NotNull java.awt.Color[] eyeColours,
@NotNull
@NotNull java.awt.Color scannerBackgroundColour,
@NotNull
@NotNull java.awt.Color eyeBackgroundColour)
throws java.lang.IllegalArgumentException
qualitySetting - Integer The quality preset to use. Either LOW, MEDIUM or HIGH. For more information, see LarsonScanner.setQualityLow(). LarsonScanner.setQualityMedium() and LarsonScanner.setQualityHigh().alphaValues - Short-array of alpha values for the elements in the eye. Length of
array must equal number of elements in the eye. For more information, see LarsonScanner.setAlphas(short[]).intervalInMillis - Short The interval in milliseconds at which to update and
redraw the eye. For more information, see LarsonScanner.setInterval(short).divider - Short The divider with which to in-/decrement the position of the eye.
For more information, see LarsonScanner.useGradient(boolean).numberOfElements - Byte The number of elements to draw in the eye. For more
information, see LarsonScanner.setNumberOfElements(byte).fractions - Float-array of fractions to use for radial gradient colour
distribution. For more information, see LarsonScanner.setFractions(float, float).gapPercent - Float The percentage of the width of the gap between two
rectangular elements. For more information, see LarsonScanner.setGapPercent(float).partitionDivider - Double The number with which to divide the width of the
Larson Scanner to set the width of the eye. For more information, see LarsonScanner.setPartitionDivider(double).forceAspectRatio - Boolean Whether to force an aspect ratio on the eye. For more
information, see LarsonScanner.forceAspectRatio(boolean).ovalShaped - Boolean Whether to draw the elements using oval or rectangular
shapes. For more information, see LarsonScanner.drawOval(boolean).useGradients - Boolean Whether to draw the eye using gradients. For more
information, see LarsonScanner.useGradient(boolean).useDivider - Boolean Whether to use a divider to in-/decrement across the width
of the Larson Scanner. For more information, see LarsonScanner.useDivider(boolean).cylonAnimation - Boolean Whether to animate the Larson Scanner as a Cylon-eye or
Kitt-eye. For more information, see LarsonScanner.useCylonAnimation(boolean).eyeColours - Color-array containing one colour for each element in the eye. For
more information, see LarsonScanner.setEyeColours(Color[]).scannerBackgroundColour - Color The background colour of the Larson Scanner.eyeBackgroundColour - Color The background colour of the eye in the Larson
Scanner.java.lang.IllegalArgumentExceptionpublic int getQualitySetting()
Integer Integer representation of the rendering quality setting.public void setQualitySetting(int qualitySetting)
throws java.lang.IllegalArgumentException
LOW, MEDIUM or
HIGH. For more information, see LarsonScanner.setQualityLow().public short[] getAlphas()
Short-array containing the alphas of this configuration.public void setAlphas(short[] alphas)
throws java.lang.IllegalArgumentException
LarsonScanner.setAlphas(short[]).alphas - Short-array containing the new alphas for this configuration.java.lang.IllegalArgumentExceptionpublic short getInterval()
Short The interval of this configuration.public void setInterval(short intervalInMillis)
throws java.lang.IllegalArgumentException
LarsonScanner.setInterval(short).intervalInMillis - Short Interval for this configuration.java.lang.IllegalArgumentExceptionpublic short getDivider()
Short This configurations' divider.public void setDivider(short divider)
throws java.lang.IllegalArgumentException
LarsonScanner.useDivider(boolean).divider - Short Divider for this configuration.java.lang.IllegalArgumentExceptionpublic byte getNumberOfElements()
Byte This configurations' number of elements in the eye.public void setNumberOfElements(byte numberOfElements)
throws java.lang.IllegalArgumentException
LarsonScanner.setNumberOfElements(byte).numberOfElements - Byte Number of elements for this configuration.java.lang.IllegalArgumentExceptionpublic float[] getFractions()
Float-array containing this configurations' fractions.public void setFractions(float fractionOne,
float fractionTwo)
throws java.lang.IllegalArgumentException
LarsonScanner.setFractions(float, float).fractionOne - Float First fraction for colour distribution for this
configuration.fractionTwo - Float Second fraction for colour distribution for this
configuration.java.lang.IllegalArgumentExceptionpublic float getGapPercent()
Float This configurations' gap percentage.public void setGapPercent(float gapPercent)
throws java.lang.IllegalArgumentException
LarsonScanner.setGapPercent(float).gapPercent - Float Gap percentage for this configuration.java.lang.IllegalArgumentExceptionpublic double getPartitionDivider()
Double This configurations' partition divider.public void setPartitionDivider(double partitionDivider)
throws java.lang.IllegalArgumentException
LarsonScanner.setPartitionDivider(double).partitionDivider - Double Partition divider for this configuration.java.lang.IllegalArgumentException - if the specified divider is smaller than or equal to 0.0D.public boolean isAspectRatioForced()
Boolean Whether the aspect ratio is enforced in this configuration.public void setForceAspectRatio(boolean forceAspectRatio)
LarsonScanner.forceAspectRatio(boolean).forceAspectRatio - Boolean Whether this configuration should enforce aspect
ratio.public boolean isShapeOval()
Boolean Whether elements are drawn as ovals or rectangles.public void setOvalShaped(boolean ovalShaped)
LarsonScanner.drawOval(boolean).ovalShaped - Whether the elements for this configuration should be drawn as ovals.public boolean isGradientActive()
Boolean Whether elements are drawn using gradients.public void setUseGradients(boolean useGradients)
LarsonScanner.useGradient(boolean).useGradients - Boolean Whether the elements for this configuration should be
drawn using gradients.public boolean isDividerActive()
Boolean Whether the position in-/decrements using a divider.public void setUseDivider(boolean useDivider)
LarsonScanner.useDivider(boolean).useDivider - Boolean Whether the position for this configuration should be
in-/decrement using a divider.public boolean isCylonAnimation()
Boolean Whether this configuration animates the eye as a Cylon-eye, or
Kitt-eye.public void setCylonAnimation(boolean cylonAnimation)
LarsonScanner.useCylonAnimation(boolean).cylonAnimation - Boolean Whether this configuration animates the eye as a
Cylon-eye, or Kitt-eye.public java.awt.Color[] getEyeColours()
Color-array containing the colours for each element in the eye of this
configuration.public void setEyeColours(java.awt.Color[] eyeColours)
throws java.lang.IllegalArgumentException
LarsonScanner.setEyeColours(Color[]).eyeColours - Color-array containing the colours for each element in this
configurations' eye.java.lang.IllegalArgumentExceptionpublic java.awt.Color getScannerBackgroundColour()
Color This configurations' background colour for the Larson Scanner.public void setScannerBackgroundColour(@NotNull
@NotNull java.awt.Color scannerBackgroundColour)
scannerBackgroundColour - Color The background color for the Larson Scanner.public java.awt.Color getEyeBackgroundColour()
Color This configurations' background colour for the eye.public void setEyeBackgroundColour(@NotNull
@NotNull java.awt.Color eyeBackgroundColour)
eyeBackgroundColour - Color The background colour for the eye of the Larson
Scanner of this configuration.