- All Superinterfaces:
org.refcodes.mixin.Clearable
,VisibleAccessor
,VisibleAccessor.VisibleMutator
,VisibleAccessor.VisibleProperty
- All Known Subinterfaces:
PixGridBannerPanel
The
PixGridPane
projects a RgbPixmap
on a grid panel (such as
an LED matrix) , the underlying RgbPixmap
is painted onto that grid
pane as implemented by any implementing classes.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.graphical.VisibleAccessor
VisibleAccessor.VisibleBuilder<B extends VisibleAccessor.VisibleBuilder<B>>, VisibleAccessor.VisibleMutator, VisibleAccessor.VisibleProperty
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addBlankArea
(int aPosX, int aPosY, int aWidth, int aHeight) Adds the blank area not to be painted with grid pixels.boolean
addBlankArea
(Rectangle aArea) Adds the blank area not to be painted with grid pixels.void
Removes all blank areas now to be painted with grid pixels again.int
Gets the bottom border.int
Gets the horizontal space.Gets the inactive pixel color.int
Gets the left border.default int
Gets the matrix drawing height.int
getMatrixDrawingHeight
(boolean isWithBorder, boolean isWithPixelSpace, boolean isWithPixelHeight) Gets the matrix drawing height.default int
Gets the matrix drawing width.int
getMatrixDrawingWidth
(boolean isWithBorder, boolean isWithPixelSpace, boolean isWithPixelWidth) Gets the matrix drawing width.int
Gets the matrix height.Gets the matrix size.int
Gets the matrix width.getPixelAt
(int aPosX, int aPosY) Gets theRgbPixel
at the given position.int
Gets the pixel height.Gets the pixel shape.int
Gets the pixel width.int
Gets the pixmap offset X.int
Gets the pixmap offset Y.Gets the pixmap snapshot.Gets the underlyingRgbPixmap.RgbPixmapBuilder
.int
Gets the right border.int
Gets the top border.int
Gets the vertical space.boolean
Checks if is horizontal wrap enabled.boolean
Checks if is vertical wrap enabled.boolean
removeBlankArea
(Rectangle aArea) Removes the blank area now to be painted with grid pixels again.void
repaint()
Repaint the pane with the underlying metrics and pixmap.void
setPixelAtAt
(RgbPixel aPixel, int aPosX, int aPosY) Paints theRgbPixel
at the given position.void
setPixmapOffset
(int aPosX, int aPosY) Sets the pixmap offset.Methods inherited from interface org.refcodes.mixin.Clearable
clear
Methods inherited from interface org.refcodes.graphical.VisibleAccessor
isVisible
Methods inherited from interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
hide, setVisible, show
Methods inherited from interface org.refcodes.graphical.VisibleAccessor.VisibleProperty
letVisible
-
Method Details
-
getPixelAt
Gets theRgbPixel
at the given position.- Parameters:
aPosX
- the x positionaPosY
- the y position- Returns:
- the
RgbPixel
at the given position - Throws:
IndexOutOfBoundsException
- the index out of bounds exception
-
setPixelAtAt
Paints theRgbPixel
at the given position.- Parameters:
aPixel
- theRgbPixel
for the pixel at the given position.aPosX
- the x positionaPosY
- the y position
-
getTopBorder
int getTopBorder()Gets the top border.- Returns:
- the top border
-
getBottomBorder
int getBottomBorder()Gets the bottom border.- Returns:
- the bottom border
-
getLeftBorder
int getLeftBorder()Gets the left border.- Returns:
- the left border
-
getRightBorder
int getRightBorder()Gets the right border.- Returns:
- the right border
-
getHorizontalSpace
int getHorizontalSpace()Gets the horizontal space.- Returns:
- the horizontal space
-
getVerticalSpace
int getVerticalSpace()Gets the vertical space.- Returns:
- the vertical space
-
getPixelWidth
int getPixelWidth()Gets the pixel width.- Returns:
- the pixel width
-
getPixelHeight
int getPixelHeight()Gets the pixel height.- Returns:
- the pixel height
-
getPixelShape
PixelShape getPixelShape()Gets the pixel shape.- Returns:
- the pixel shape
-
getMatrixWidth
int getMatrixWidth()Gets the matrix width.- Returns:
- the matrix width
-
getMatrixHeight
int getMatrixHeight()Gets the matrix height.- Returns:
- the matrix height
-
getMatrixSize
Dimension getMatrixSize()Gets the matrix size.- Returns:
- the matrix size
-
getRgbPixmap
RgbPixmap.RgbPixmapBuilder getRgbPixmap()Gets the underlyingRgbPixmap.RgbPixmapBuilder
.- Returns:
- the according
RgbPixmap.RgbPixmapBuilder
.
-
getPixmapOffsetX
int getPixmapOffsetX()Gets the pixmap offset X.- Returns:
- the pixmap offset X
-
getPixmapOffsetY
int getPixmapOffsetY()Gets the pixmap offset Y.- Returns:
- the pixmap offset Y
-
isHorizontalWrapEnabled
boolean isHorizontalWrapEnabled()Checks if is horizontal wrap enabled.- Returns:
- true, if is horizontal wrap enabled
-
isVerticalWrapEnabled
boolean isVerticalWrapEnabled()Checks if is vertical wrap enabled.- Returns:
- true, if is vertical wrap enabled
-
getPixmapSnapshot
RgbPixmap.RgbPixmapBuilder getPixmapSnapshot()Gets the pixmap snapshot.- Returns:
- the pixmap snapshot
-
addBlankArea
boolean addBlankArea(int aPosX, int aPosY, int aWidth, int aHeight) Adds the blank area not to be painted with grid pixels.- Parameters:
aPosX
- the x positionaPosY
- the y positionaWidth
- the according area's widthaHeight
- the according area's height- Returns:
- true, if successfully added, false if such an area has already been added.
-
addBlankArea
Adds the blank area not to be painted with grid pixels.- Parameters:
aArea
- theRectangle
representing the blank area.- Returns:
- true, if successfully added, false if such an area has already been added.
-
removeBlankArea
Removes the blank area now to be painted with grid pixels again.- Parameters:
aArea
- theRectangle
representing the blank area.- Returns:
- true, if successfully removed, false if such an area has not been added before.
-
clearBlankAreas
void clearBlankAreas()Removes all blank areas now to be painted with grid pixels again. -
getInactivePixelColor
RgbColor getInactivePixelColor()Gets the inactive pixel color.- Returns:
- the inactive pixel color
-
getMatrixDrawingWidth
default int getMatrixDrawingWidth()Gets the matrix drawing width.- Returns:
- the matrix drawing width
-
getMatrixDrawingHeight
default int getMatrixDrawingHeight()Gets the matrix drawing height.- Returns:
- the matrix drawing height
-
getMatrixDrawingWidth
int getMatrixDrawingWidth(boolean isWithBorder, boolean isWithPixelSpace, boolean isWithPixelWidth) Gets the matrix drawing width.- Parameters:
isWithBorder
- the is with borderisWithPixelSpace
- the is with pixel spaceisWithPixelWidth
- the is with pixel width- Returns:
- the matrix drawing width
-
getMatrixDrawingHeight
int getMatrixDrawingHeight(boolean isWithBorder, boolean isWithPixelSpace, boolean isWithPixelHeight) Gets the matrix drawing height.- Parameters:
isWithBorder
- the is with borderisWithPixelSpace
- the is with pixel spaceisWithPixelHeight
- the is with pixel height- Returns:
- the matrix drawing height
-
setPixmapOffset
void setPixmapOffset(int aPosX, int aPosY) Sets the pixmap offset.- Parameters:
aPosX
- the a X posaPosY
- the a Y pos
-
repaint
void repaint()Repaint the pane with the underlying metrics and pixmap.
-