Package crackers.kobots.devices.display
Class GrayOled
-
- All Implemented Interfaces:
-
com.diozero.api.DeviceInterface
,java.lang.AutoCloseable
public abstract class GrayOled implements DeviceInterface
Abstract B/W display.
TODO Both C++ and Python use an in-memory buffer and only write to the display when that "region" is dirty TODO Because Java has a separate image construct, is this necessary?
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
GrayOled.DisplayType
-
Field Summary
Fields Modifier and Type Field Description public final static Integer
CMD_MODE
public final static Integer
BLACK
public final static Integer
WHITE
private Boolean
displayOn
private Boolean
autoShow
private final Integer
width
private final Integer
height
private final GrayOled.DisplayType
displayType
-
Method Summary
Modifier and Type Method Description abstract Boolean
getDisplayOn()
abstract Unit
setDisplayOn(Boolean displayOn)
final Boolean
getAutoShow()
final Unit
setAutoShow(Boolean autoShow)
final Integer
getWidth()
final Integer
getHeight()
final GrayOled.DisplayType
getDisplayType()
Unit
close()
abstract Unit
invertDisplay(Boolean invert)
Integer
getNativeImageType()
final Unit
clear()
Basically displays a black rectangle, with optional dimensions. BufferedImage
display(BufferedImage image)
Display an image: scales and converts the image into the internal buffer. final Unit
show()
Transfers the internal buffer to the display. -
-
Method Detail
-
getDisplayOn
abstract Boolean getDisplayOn()
-
setDisplayOn
abstract Unit setDisplayOn(Boolean displayOn)
-
getAutoShow
final Boolean getAutoShow()
-
setAutoShow
final Unit setAutoShow(Boolean autoShow)
-
getDisplayType
final GrayOled.DisplayType getDisplayType()
-
invertDisplay
abstract Unit invertDisplay(Boolean invert)
-
getNativeImageType
Integer getNativeImageType()
-
display
BufferedImage display(BufferedImage image)
Display an image: scales and converts the image into the internal buffer. If autoShow is true, the display will be updated.
-
-
-
-