public class MatrixPanelBuilder<B extends MatrixPanelBuilder<B>>
extends java.lang.Object
Constructor and Description |
---|
MatrixPanelBuilder() |
Modifier and Type | Method and Description |
---|---|
MatrixPanel |
build() |
MatrixPanelBuilder |
contents(Content[] CONTENT_ARRAY)
Set the Array of Contents
|
MatrixPanelBuilder |
contents(java.util.List<Content> CONTENTS)
Set the List of Contents
|
static MatrixPanelBuilder |
create() |
MatrixPanelBuilder |
frameBaseColor(javafx.scene.paint.Color FRAME_BASE_COLOR)
Set the frame base color
|
MatrixPanelBuilder |
frameCustomPath(java.lang.String FRAME_CUSTOM_PATH)
Set the path to an image for a custom frame
|
MatrixPanelBuilder |
frameDesign(MatrixPanel.FrameDesign FRAME_DESIGN)
Set the frame design
|
MatrixPanelBuilder |
frameVisible(boolean FRAME_VISIBLE)
Set if the frame is visible
|
MatrixPanelBuilder |
ledHeight(int LED_HEIGHT)
Set the number of LEDs rows
|
MatrixPanelBuilder |
ledWidth(int LED_WIDTH)
Set the number of LEDs columns
|
B |
prefHeight(double PREF_HEIGHT)
Set the preferred height of the control
|
B |
prefWidth(double PREF_WIDTH)
Set the preferred width of the control
|
public static final MatrixPanelBuilder create()
public final MatrixPanelBuilder ledWidth(int LED_WIDTH)
Set the number of LEDs columns
LED_WIDTH
- Insert the columns of LEDs in the maxtrixPanelledHeight(int)
public final MatrixPanelBuilder ledHeight(int LED_HEIGHT)
Set the number of LEDs rows
LED_HEIGHT
- Insert the rows of LEDs in the matrixPanelledWidth(int)
public final MatrixPanelBuilder contents(java.util.List<Content> CONTENTS)
Set the List of Contents
CONTENTS
- Insert a List of Contents to display in the matrixPanel. Each content can
be defined with a ContentBuilderContentBuilder.create()
public final MatrixPanelBuilder contents(Content[] CONTENT_ARRAY)
Set the Array of Contents
CONTENT_ARRAY
- Insert an Array of Contents to display in the matrixPanel. Each content can
be defined with a ContentBuilderContentBuilder.create()
public final MatrixPanelBuilder frameDesign(MatrixPanel.FrameDesign FRAME_DESIGN)
Set the frame design
FRAME_DESIGN
- Select between BLACK_METAL, SHINY_METAL (set a frameBaseColor
), CHROME,
DARK_GLOSSY, GLOSSY_METAL, or CUSTOM_DESIGN (set a frameCustomPath
), in case its visibleframeVisible(boolean)
,
frameBaseColor(Color)
,
frameCustomPath(String)
public final MatrixPanelBuilder frameBaseColor(javafx.scene.paint.Color FRAME_BASE_COLOR)
Set the frame base color
FRAME_BASE_COLOR
- frame base color for SHINY_METAL frame designframeDesign(MatrixPanel.FrameDesign)
public final MatrixPanelBuilder frameCustomPath(java.lang.String FRAME_CUSTOM_PATH)
Set the path to an image for a custom frame
FRAME_CUSTOM_PATH
- path to the image for the frame for CUSTOM_DESIGN frame design
Options for a valid name of an image, with its 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>A valid URL</li>
<li>A full valid path should be added to the name in case it has be loaded from an external resource</li></ul>#frameDesign(FrameDesign FrameDesign)
public final MatrixPanelBuilder frameVisible(boolean FRAME_VISIBLE)
Set if the frame is visible
FRAME_VISIBLE
- true to show the frame (select a design) or false, to hide the frame#frameDesign(FrameDesign)
public final B prefWidth(double PREF_WIDTH)
Set the preferred width of the control
PREF_WIDTH
- related to scene dimensions, to keep an aspectRatio of the matrixPanel control equals
as the one given by the ratio ledHeight/ledWidth, only prefWidth or prefHeight will be taken into acount
and the other value will be adjusted properly.public final B prefHeight(double PREF_HEIGHT)
Set the preferred height of the control
PREF_HEIGHT
- related to scene dimensions, to keep an aspectRatio of the matrixPanel control equals
as the one given by the ratio ledHeight/ledWidth, only prefWidth or prefHeight will be taken into acount
and the other value will be adjusted properly.public final MatrixPanel build()