Constructor and Description |
---|
ContentBuilder() |
Modifier and Type | Method and Description |
---|---|
ContentBuilder |
align(Content.Align TXT_ALIGN)
Set the align of the text
see type(Content.Type Content.Type.TEXT)
|
ContentBuilder |
area(int ORIGIN_X,
int ORIGIN_Y,
int END_X,
int END_Y)
Set the area where the content is displayed
|
ContentBuilder |
area(javafx.scene.shape.Rectangle AREA)
Set the area where the content is displayed
|
ContentBuilder |
bmpName(java.lang.String BMP_NAME)
Set the name of the bmp image
see type(Content.Type Content.Type.IMAGE)
|
Content |
build() |
ContentBuilder |
clear(java.lang.Boolean CLEAR)
Set the option to clean the screen after the effect
|
ContentBuilder |
color(Content.MatrixColor MATRIX_COLOR)
Set the matrix LED’s color
|
static ContentBuilder |
create()
To define a matrixPanel content, please indicate:
<ul><li><i>type</i>: IMAGE, <i>bmpName</i>: file name (and path)</li>
<li><i>type</i>: TEXT, <i>txtContent</i>: Text string, <i>font</i>, font <i>fontGap</i></li></ul>
<p>and:
<i>area</i>, <i>origin</i>, <i>color</i>, <i>effect</i> (and <i>lapse</i>), <i>postEffect</i> (and <i>pause</i>)
<p>To alternate contents in the same area use <i>order</i>
|
ContentBuilder |
effect(Content.Effect EFFECT)
Set the effect to display animated content
|
ContentBuilder |
font(Content.MatrixFont FONT)
Set the font for the text
see type(Content.Type Content.Type.TEXT)
|
ContentBuilder |
fontGap(Content.Gap FONT_GAP)
Set the gap between characters
see type(Content.Type Content.Type.TEXT)
|
ContentBuilder |
lapse(java.lang.Integer TIME_LAPSE)
Set the time lapse of the animation
|
ContentBuilder |
order(Content.RotationOrder ORDER)
Set the order in which the contents are alternatated
|
ContentBuilder |
origin(int ORIGIN_X,
int ORIGIN_Y)
Set the point of origin of the content
|
ContentBuilder |
origin(javafx.geometry.Point2D ORIGIN)
Set the point of origin of the content
|
ContentBuilder |
pause(java.lang.Integer PAUSE)
Set the pause time after the effect
see #postEffect(Content.PostEffect Content.PostEffect.PAUSE)
|
ContentBuilder |
postEffect(Content.PostEffect POST_EFFECT)
Set the action after the animation effect
|
ContentBuilder |
txtContent(java.lang.String TXT_CONTENT)
Set the text string
see type(Content.Type Content.Type.TEXT)
|
ContentBuilder |
type(Content.Type TYPE)
Set the content type
|
public static final ContentBuilder create()
To define a matrixPanel content, please indicate: <ul><li><i>type</i>: IMAGE, <i>bmpName</i>: file name (and path)</li> <li><i>type</i>: TEXT, <i>txtContent</i>: Text string, <i>font</i>, font <i>fontGap</i></li></ul> <p>and: <i>area</i>, <i>origin</i>, <i>color</i>, <i>effect</i> (and <i>lapse</i>), <i>postEffect</i> (and <i>pause</i>) <p>To alternate contents in the same area use <i>order</i>
public final ContentBuilder color(Content.MatrixColor MATRIX_COLOR)
Set the matrix LED’s color
MATRIX_COLOR
- Choose the matrix LED’s color:
<ul><li><i>MatrixColor.RED</i>: there are three tones of RED: 85,170,255; BLUE and GREEN are filtered to 0.</li>
<li><i>MatrixColor.GREEN</i>: there are three tones of GREEN: 85,170,255; RED and BLUE are filtered to 0.</li>
<li><i>MatrixColor.BLUE</i>: there are three tones of BLUE: 85,170,255; RED and GREEN are filtered to 0.</li>
<li><i>MatrixColor.RGB</i>: there are three tones of RED, BLUE AND GREEN: 85,170,255 for each one of them.</li></ul>public final ContentBuilder type(Content.Type TYPE)
Set the content type
TYPE
- Choose the type of the content:
<ul><li><i>Type.IMAGE</i>: The content is a BMP Image</li>
<li><i>Type.TEXT</i>: The content is a line of Text</li></ul>public final ContentBuilder origin(javafx.geometry.Point2D ORIGIN)
Set the point of origin of the content
ORIGIN
- Insert a Point2D with the (int) X and Y coordinates, relative to the <i>area</i>
in which the content is displayed, measured from the left-top of it, to the right-bottom.area(int, int, int, int)
,
origin(int, int)
public final ContentBuilder origin(int ORIGIN_X, int ORIGIN_Y)
Set the point of origin of the content
ORIGIN_X
- Insert the X coordinate, relative to the <i>area</i>
in which the content is displayed, measured from the left of it, to the right.ORIGIN_Y
- Insert the Y coordinate, relative to the <i>area</i>
in which the content is displayed, measured from the top of it, to the bottom.area(int, int, int, int)
,
origin(Point2D)
public final ContentBuilder area(javafx.scene.shape.Rectangle AREA)
Set the area where the content is displayed
AREA
- Insert a Rectangle with X,Y as the left-top coordinates, and W,H as the width and height
of the window in which the content will be displayed.
<p>This area should be inside the bounds of the matrixPanel and should not overlap with other areas.
<p>The very same area could be used to display two different contents, check <i>order(RotationOrder)</i>.area(int, int, int, int)
public final ContentBuilder area(int ORIGIN_X, int ORIGIN_Y, int END_X, int END_Y)
Set the area where the content is displayed
ORIGIN_X
- Insert the X left coordinate of the window in which the content is displayed.ORIGIN_Y
- Insert the Y top coordinate of the window in which the content is displayed.END_X
- Insert the X rigth coordinate of the window in which the content is displayed.END_Y
- Insert the Y bottom coordinate of the window in which the content is displayed.
<p>This window should be inside the bounds of the matrixPanel and should not overlap with other areas.
<p>The very same area could be used to display two different contents, check <i>order(RotationOrder)</i>.area(Rectangle)
public final ContentBuilder bmpName(java.lang.String BMP_NAME)
Set the name of the bmp image see type(Content.Type Content.Type.IMAGE)
BMP_NAME
- Options for a valid name of a BMP image, with or without ".bmp" extension:
<ul><li>It should be already in the source (relative to matrixPanel package)</li>
<li>It should be in any of the project’s jars, so /package/path/to/file must be provided</li>
<li>or a full valid path should be added to the name in case it has be loaded from an external resource</li></ul>public final ContentBuilder txtContent(java.lang.String TXT_CONTENT)
Set the text string see type(Content.Type Content.Type.TEXT)
TXT_CONTENT
- Insert the string of text to be displayed, it will be showed in one line. In case
it is too long, a SCROLL effect is recommended.public final ContentBuilder font(Content.MatrixFont FONT)
Set the font for the text see type(Content.Type Content.Type.TEXT)
FONT
- Select the font for the text to be displayed. Several proportional dotted fonts are available,
all of them named with the <i>Width</i> and <i>Height</i> used for each character.
Check MatrixPanel to insert missing characters to the list.public final ContentBuilder fontGap(Content.Gap FONT_GAP)
Set the gap between characters see type(Content.Type Content.Type.TEXT)
FONT_GAP
- Select the gap between the characters:
<ul>
<li><i>Gap.NULL</i>: No space will be used between consecutive characters</li>
<li><i>Gap.SIMPLE</i>: One LED will be used as gap between consecutive characters</li>
<li><i>Gap.DOUBLE</i>: Two LEDs will be used as gap between consecutive characters</li>
</ul>public final ContentBuilder align(Content.Align TXT_ALIGN)
Set the align of the text see type(Content.Type Content.Type.TEXT)
TXT_ALIGN
- Select how to align the string of text
<ul>
<li>Align.LEFT: Align the text to the left of the area</li>
<li>Align.CENTER: Align the text to the center of the area</li>
<li>Align.LEFT: Align the text to the right of the area</li>
</ul>
<p>In case of long string of text, to display the whole string select a Scroll effect
opposite to the selected align.effect(Content.Effect)
public final ContentBuilder effect(Content.Effect EFFECT)
Set the effect to display animated content
EFFECT
- Select the Effect to display animated content
<ul><li><i>Effect.NONE</i>: The content will be displayed in its area without animation effect</li>
<li><i>Effect.SCROLL_RIGHT</i>, <i>Effect.SCROLL_LEFT</i>, <i>Effect.SCROLL_UP</i>, <i>Effect.SCROLL_DOWN</i>:
The content will be scrolled from the outside to its final position in its area, from the right to the left,
the left to the right, the bottom to the top, or the top to the bottom, respectively. They must be coordinated
with the propor align of the content</li>
<li><i>Effect.BLINK</i>, <i>Effect.BLINK_10</i>, <i>Effect.BLINK_4</i>: The content is displayed in its area
and start blinking, indefinetly, ten times and stop, four times and stop, respectively</li></ul>
<p>The animation effect is repeted every <i>lapse</i> milliseconds.
<p>To repeat the effect, choose a <i>postEffect</i> action.align(Content.Align)
,
lapse(Integer)
,
postEffect(Content.PostEffect)
public final ContentBuilder postEffect(Content.PostEffect POST_EFFECT)
Set the action after the animation effect
POST_EFFECT
- Select the action after the animation effect has finished:
<ul><li><i>PostEffect.STOP</i>: the content will remain in its position.</li>
<li><i>PostEffect.REPEAT</i>: the content will be animated again.</li>
<li><i>PostEffect.PAUSE</i>: the content will remain in its position for a specificied time (see <i>pause</i>,
then will be animated again.</li></ul>effect(Content.Effect)
,
pause(Integer)
public final ContentBuilder pause(java.lang.Integer PAUSE)
Set the pause time after the effect see #postEffect(Content.PostEffect Content.PostEffect.PAUSE)
PAUSE
- Insert the time in milliseconds that the content will be showed in its final position, before
the selected effect starts again, or the content is replaced by other in the same area (see <i>order</i>).order(Content.RotationOrder)
public final ContentBuilder lapse(java.lang.Integer TIME_LAPSE)
Set the time lapse of the animation
TIME_LAPSE
- in terms of milliseconds, is the time lapse to perform the animation effect,
movement or blink of the whole content.effect(Content.Effect)
public final ContentBuilder order(Content.RotationOrder ORDER)
Set the order in which the contents are alternatated
ORDER
- Select <i>RotationOrder.Single</i> for a unique content in its area.
<p>In case two different contents should be displayed alternately in the very same area, select:</p>
<ul><li><i>RotationOrder.FIRST</i>: for the first content to be displayed, with its own effect and postEffect
(other than PostEffect.STOP)</li>
<li><i>RotationOrder.SECOND</i>: for the second content to be displayed, with its own effect and postEffect
(other than PostEffect.STOP)</li>
</ul>
<p>
To erase the area before displaying the next content, select clear<i>(true)</i> to prevent mixing contents.
</p>clear(Boolean)
public final ContentBuilder clear(java.lang.Boolean CLEAR)
Set the option to clean the screen after the effect
CLEAR
- In case two different contents should be displayed alternately in the very same area, select
if the area should be erased before displaying the next content.order(Content.RotationOrder)