-
- All Superinterfaces:
org.refcodes.mixin.Clearable
,VisibleAccessor
,VisibleAccessor.VisibleMutator
,VisibleAccessor.VisibleProperty
- All Known Subinterfaces:
PixGridBannerPanel
public interface PixGridPanel extends VisibleAccessor.VisibleProperty, org.refcodes.mixin.Clearable
ThePixGridPanel
projects aRgbPixmap
on a grid panel (such as an LED matrix) , the underlyingRgbPixmap
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
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
clearBlankAreas()
Removes all blank areas now to be painted with grid pixels again.int
getBottomBorder()
Gets the bottom border.int
getHorizontalSpace()
Gets the horizontal space.RgbColor
getInactivePixelColor()
Gets the inactive pixel color.int
getLeftBorder()
Gets the left border.default int
getMatrixDrawingHeight()
Gets the matrix drawing height.int
getMatrixDrawingHeight(boolean isWithBorder, boolean isWithPixelSpace, boolean isWithPixelHeight)
Gets the matrix drawing height.default int
getMatrixDrawingWidth()
Gets the matrix drawing width.int
getMatrixDrawingWidth(boolean isWithBorder, boolean isWithPixelSpace, boolean isWithPixelWidth)
Gets the matrix drawing width.int
getMatrixHeight()
Gets the matrix height.Dimension
getMatrixSize()
Gets the matrix size.int
getMatrixWidth()
Gets the matrix width.RgbPixel
getPixelAt(int aPosX, int aPosY)
Gets theRgbPixel
at the given position.int
getPixelHeight()
Gets the pixel height.PixelShape
getPixelShape()
Gets the pixel shape.int
getPixelWidth()
Gets the pixel width.int
getPixmapOffsetX()
Gets the pixmap offset X.int
getPixmapOffsetY()
Gets the pixmap offset Y.RgbPixmap.RgbPixmapBuilder
getPixmapSnapshot()
Gets the pixmap snapshot.RgbPixmap.RgbPixmapBuilder
getRgbPixmap()
Gets the underlyingRgbPixmap.RgbPixmapBuilder
.int
getRightBorder()
Gets the right border.int
getTopBorder()
Gets the top border.int
getVerticalSpace()
Gets the vertical space.boolean
isHorizontalWrapEnabled()
Checks if is horizontal wrap enabled.boolean
isVerticalWrapEnabled()
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.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 Detail
-
getPixelAt
RgbPixel getPixelAt(int aPosX, int aPosY) throws IndexOutOfBoundsException
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
void setPixelAtAt(RgbPixel aPixel, int aPosX, int aPosY)
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
boolean addBlankArea(Rectangle aArea)
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
boolean removeBlankArea(Rectangle aArea)
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.
-
-