Package lejos.remote.ev3
Class RemoteTextLCD
- java.lang.Object
-
- lejos.remote.ev3.RemoteTextLCD
-
-
Field Summary
-
Fields inherited from interface lejos.hardware.lcd.CommonLCD
ROP_AND, ROP_ANDINVERTED, ROP_ANDREVERSE, ROP_CLEAR, ROP_COPY, ROP_COPYINVERTED, ROP_EQUIV, ROP_INVERT, ROP_NAND, ROP_NOOP, ROP_NOR, ROP_OR, ROP_ORINVERTED, ROP_ORREVERSE, ROP_SET, ROP_XOR
-
-
Constructor Summary
Constructors Constructor Description RemoteTextLCD(RMITextLCD lcd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbitBlt(byte[] src, int sw, int sh, int sx, int sy, byte[] dst, int dw, int dh, int dx, int dy, int w, int h, int rop)Standard two input BitBlt function.voidbitBlt(byte[] src, int sw, int sh, int sx, int sy, int dx, int dy, int w, int h, int rop)Standard two input BitBlt function with the LCD display as the destination.voidclear()Clear the display.voidclear(int y)Clear an LCD display rowvoidclear(int x, int y, int n)Clear a contiguous set of charactersvoiddrawChar(char c, int x, int y)Draw a single char on the LCD at specified x,y co-ordinate.voiddrawInt(int i, int x, int y)Display an int on the LCD at specified x,y co-ordinate.voiddrawInt(int i, int places, int x, int y)Display an in on the LCD at x,y with leading spaces to occupy at least the number of characters specified by the places parameter.voiddrawString(java.lang.String str, int x, int y)Display a string on the LCD at specified x,y co-ordinate.voiddrawString(java.lang.String str, int x, int y, boolean inverted)Display an optionally inverted string on the LCD at specified x,y co-ordinate.byte[]getDisplay()Provide access to the LCD display frame buffer.FontgetFont()Get the current fontintgetHeight()Return the height of the associated drawing surface.byte[]getHWDisplay()Get access to hardware LCD display.intgetTextHeight()Get the height of the screen in charactersintgetTextWidth()Get the width of the screen in charactersintgetWidth()Return the width of the associated drawing surface.voidrefresh()Refresh the display.voidscroll()Scrolls the screen up one text linevoidsetAutoRefresh(boolean on)Turn on/off the automatic refresh of the LCD display.intsetAutoRefreshPeriod(int period)Set the period used to perform automatic refreshing of the display.voidsetContrast(int contrast)Set the LCD contrast.
-
-
-
Constructor Detail
-
RemoteTextLCD
public RemoteTextLCD(RMITextLCD lcd)
-
-
Method Detail
-
refresh
public void refresh()
Description copied from interface:CommonLCDRefresh the display. If auto refresh is off, this method will wait until the display refresh has completed. If auto refresh is on it will return immediately.
-
clear
public void clear()
Description copied from interface:CommonLCDClear the display.
-
getWidth
public int getWidth()
Description copied from interface:CommonLCDReturn the width of the associated drawing surface.
Note: This is a non standard method.
-
getHeight
public int getHeight()
Description copied from interface:CommonLCDReturn the height of the associated drawing surface.
Note: This is a non standard method.
-
getDisplay
public byte[] getDisplay()
Description copied from interface:CommonLCDProvide access to the LCD display frame buffer.- Specified by:
getDisplayin interfaceCommonLCD- Returns:
- byte array that is the frame buffer.
-
getHWDisplay
public byte[] getHWDisplay()
Description copied from interface:CommonLCDGet access to hardware LCD display.- Specified by:
getHWDisplayin interfaceCommonLCD- Returns:
- byte array that is the frame buffer
-
setContrast
public void setContrast(int contrast)
Description copied from interface:CommonLCDSet the LCD contrast.- Specified by:
setContrastin interfaceCommonLCD- Parameters:
contrast- 0 blank 0x60 full on
-
bitBlt
public void bitBlt(byte[] src, int sw, int sh, int sx, int sy, int dx, int dy, int w, int h, int rop)Description copied from interface:CommonLCDStandard two input BitBlt function with the LCD display as the destination. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.- Specified by:
bitBltin interfaceCommonLCD- Parameters:
src- byte array containing the source imagesw- Width of the source imagesh- Height of the source imagesx- X position to start the copy fromsy- Y Position to start the copy fromdx- X destinationdy- Y destinationw- width of the area to copyh- height of the area to copyrop- raster operation.
-
bitBlt
public void bitBlt(byte[] src, int sw, int sh, int sx, int sy, byte[] dst, int dw, int dh, int dx, int dy, int w, int h, int rop)Description copied from interface:CommonLCDStandard two input BitBlt function. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.- Specified by:
bitBltin interfaceCommonLCD- Parameters:
src- byte array containing the source imagesw- Width of the source imagesh- Height of the source imagesx- X position to start the copy fromsy- Y Position to start the copy fromdst- byte array containing the destination imagedw- Width of the destination imagedh- Height of the destination imagedx- X destinationdy- Y destinationw- width of the area to copyh- height of the area to copyrop- raster operation.
-
setAutoRefresh
public void setAutoRefresh(boolean on)
Description copied from interface:CommonLCDTurn on/off the automatic refresh of the LCD display. At system startup auto refresh is on.- Specified by:
setAutoRefreshin interfaceCommonLCD- Parameters:
on- true to enable, false to disable
-
setAutoRefreshPeriod
public int setAutoRefreshPeriod(int period)
Description copied from interface:CommonLCDSet the period used to perform automatic refreshing of the display. A period of 0 disables the refresh.- Specified by:
setAutoRefreshPeriodin interfaceCommonLCD- Parameters:
period- time in ms- Returns:
- the previous refresh period.
-
drawChar
public void drawChar(char c, int x, int y)Description copied from interface:TextLCDDraw a single char on the LCD at specified x,y co-ordinate.
-
drawString
public void drawString(java.lang.String str, int x, int y, boolean inverted)Description copied from interface:TextLCDDisplay an optionally inverted string on the LCD at specified x,y co-ordinate.- Specified by:
drawStringin interfaceTextLCD- Parameters:
str- The string to be displayedx- The x character co-ordinate to display at.y- The y character co-ordinate to display at.inverted- if true the string is displayed inverted.
-
drawString
public void drawString(java.lang.String str, int x, int y)Description copied from interface:TextLCDDisplay a string on the LCD at specified x,y co-ordinate.- Specified by:
drawStringin interfaceTextLCD- Parameters:
str- The string to be displayedx- The x character co-ordinate to display at.y- The y character co-ordinate to display at.
-
drawInt
public void drawInt(int i, int x, int y)Description copied from interface:TextLCDDisplay an int on the LCD at specified x,y co-ordinate.
-
drawInt
public void drawInt(int i, int places, int x, int y)Description copied from interface:TextLCDDisplay an in on the LCD at x,y with leading spaces to occupy at least the number of characters specified by the places parameter.
-
clear
public void clear(int x, int y, int n)Description copied from interface:TextLCDClear a contiguous set of characters
-
clear
public void clear(int y)
Description copied from interface:TextLCDClear an LCD display row
-
scroll
public void scroll()
Description copied from interface:TextLCDScrolls the screen up one text line
-
getTextWidth
public int getTextWidth()
Description copied from interface:TextLCDGet the width of the screen in characters- Specified by:
getTextWidthin interfaceTextLCD
-
getTextHeight
public int getTextHeight()
Description copied from interface:TextLCDGet the height of the screen in characters- Specified by:
getTextHeightin interfaceTextLCD
-
-