Class FakeSTouchDisplay

java.lang.Object
de.freaklamarsch.systarest.FakeSTouchDisplay

public class FakeSTouchDisplay
extends java.lang.Object
A mock implementation of a S-Touch display used, for interaction with a S-Touch capable device.
  • Field Details

    • checksumByte

      byte[] checksumByte
    • checksum

      int checksum
    • config

      int config
    • FONTS_AVAILABLE

      int FONTS_AVAILABLE
    • FONTS_USED

      public int FONTS_USED
    • RESSOURCE_ID

      public int RESSOURCE_ID
    • SYMBOLS_AVAILABLE

      int SYMBOLS_AVAILABLE
    • SYMBOLS_USED

      public int SYMBOLS_USED
    • x

      private int x
    • y

      private int y
    • button

      private int button
    • texts

      private java.util.ArrayList<FakeSTouchDisplay.DisplayText> texts
    • rectangles

      private java.util.ArrayList<FakeSTouchDisplay.DisplayRectangle> rectangles
    • buttons

      private java.util.HashMap<java.lang.Integer,​FakeSTouchDisplay.DisplayButton> buttons
    • objectTree

      private RTree objectTree
    • foregroundColor

      private java.awt.Color foregroundColor
    • backgroundColor

      private java.awt.Color backgroundColor
    • style

      private int style
  • Constructor Details

    • FakeSTouchDisplay

      public FakeSTouchDisplay()
  • Method Details

    • check

      private boolean check()
    • delButton

      public boolean delButton​(int id)
    • clearScreen

      public void clearScreen()
    • clearButtons

      public void clearButtons()
    • clearTexts

      public void clearTexts()
    • clearRectangles

      public void clearRectangles()
    • setTouch

      public void setTouch​(int id, int x, int y)
    • setTouch

      public void setTouch​(int x, int y)
    • getX

      public int getX()
    • getY

      public int getY()
    • getButton

      public int getButton()
      Returns:
      the button
    • findButtonPressed

      public int findButtonPressed​(int x, int y)
      Returns:
      the button
    • selectButton

      public void selectButton​(int btn)
      Parameters:
      btn - the button to set
    • addButton

      public boolean addButton​(int id, int xMin, int yMin, int xMax, int yMax)
    • addButton

      public boolean addButton​(STouchProtocol.Button b)
    • setClick

      public boolean setClick​(int id)
    • pushButton

      public boolean pushButton​(int id)
    • touchText

      public boolean touchText​(java.lang.String searchText)
    • setChecksum

      public boolean setChecksum​(int checksum)
    • setChecksum

      public boolean setChecksum​(byte[] bArr)
    • getChecksum

      public int getChecksum()
    • setConfig

      public boolean setConfig​(int config)
    • setConfig

      public boolean setConfig​(byte[] bArr, int i2)
    • addText

      public boolean addText​(STouchProtocol.TextXY textXY)
    • findTextInObjectTree

      public FakeSTouchDisplay.DisplayText findTextInObjectTree​(java.lang.String searchText)
    • findButtonInObjectTree

      public FakeSTouchDisplay.DisplayButton findButtonInObjectTree​(int id)
    • getFreeCommandSpace

      public int getFreeCommandSpace()
    • setStyle

      public boolean setStyle​(int style)
    • setForeColor

      public boolean setForeColor​(int colorCode16bit)
    • setBackColor

      public boolean setBackColor​(int colorCode16bit)
    • setForeColor

      public boolean setForeColor​(java.awt.Color foreColor)
    • setBackColor

      public boolean setBackColor​(java.awt.Color backColor)
    • getColorFrom16BitValue

      private java.awt.Color getColorFrom16BitValue​(int colorCode16bit)
      Parameters:
      colorCode16bit -
    • drawRect

      public boolean drawRect​(int xMin, int yMin, int xMax, int yMax)
    • drawRect

      public boolean drawRect​(STouchProtocol.Rectangle rectangle)
    • getFontsAvailable

      public int getFontsAvailable()
    • getSymbolsAvailable

      public int getSymbolsAvailable()
    • printContent

      public void printContent()
    • getObjectTree

      public RTree getObjectTree()
      Returns:
      the objectTree
    • getContentAsExcalidrawJSON

      public java.lang.String getContentAsExcalidrawJSON()
    • getContentAsImage

      public java.awt.image.BufferedImage getContentAsImage()