Package crackers.kobots.devices.display
Class GrayOled
-
- All Implemented Interfaces:
-
com.diozero.api.DeviceInterface,java.lang.AutoCloseable
public abstract class GrayOled implements DeviceInterfaceAbstract 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 enumGrayOled.DisplayType
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerCMD_MODEpublic final static IntegerBLACKpublic final static IntegerWHITEprivate BooleandisplayOnprivate BooleanautoShowprivate final Integerwidthprivate final Integerheightprivate final GrayOled.DisplayTypedisplayType
-
Method Summary
Modifier and Type Method Description abstract BooleangetDisplayOn()abstract UnitsetDisplayOn(Boolean displayOn)final BooleangetAutoShow()final UnitsetAutoShow(Boolean autoShow)final IntegergetWidth()final IntegergetHeight()final GrayOled.DisplayTypegetDisplayType()Unitclose()abstract UnitinvertDisplay(Boolean invert)IntegergetNativeImageType()final Unitclear()Basically displays a black rectangle, with optional dimensions. BufferedImagedisplay(BufferedImage image)Display an image: scales and converts the image into the internal buffer. final Unitshow()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.
-
-
-
-