Package com.iizigo.term.internal
Class KeyHotSpot
- java.lang.Object
- com.iizigo.term.internal.HotSpot
- com.iizigo.term.internal.KeyHotSpot
public class KeyHotSpot extends HotSpot
Handles hot spots for function keys and other special keys.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description KeyHotSpot()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(TerminalWindow tw)Called when the hot spot is activated.intcheck(char[] line, java.util.List<HotSpot> hotSpots, int begin, int end)Checks if a hot spot is found.booleancontinueChecking(char[] line, char ch, int begin, int end)Checks if it is OK to keep on checking.voidfillCharBackground(java.awt.Graphics g, int xPos, int yPos, int x, int y, int cx, int cy)Gets the background for drawing on the screen of the hot spot.voidinitialize(java.lang.String setup, boolean active)Performs initialization from the setup data.voidonCreate(HotSpot parent)Called when a new hot spot has been instantiated.voidsetTextColor(java.awt.Graphics g, int xPos, int yPos, int x, int y, int cx, int cy)Sets the color to use for the text (character) using g.setColor(nnn).
Method Detail
initialize
public void initialize(java.lang.String setup, boolean active)Performs initialization from the setup data. Each hyperlink entry in the setup string (that is comma separated) contains the initial string.- Specified by:
initializein classHotSpot
onCreate
public void onCreate(HotSpot parent)
Called when a new hot spot has been instantiated.
continueChecking
public boolean continueChecking(char[] line, char ch, int begin, int end)Checks if it is OK to keep on checking.- Specified by:
continueCheckingin classHotSpot
check
public int check(char[] line, java.util.List<HotSpot> hotSpots, int begin, int end)Checks if a hot spot is found. If it is, the position returned should be directly after the new hot spot.
fillCharBackground
public void fillCharBackground(java.awt.Graphics g, int xPos, int yPos, int x, int y, int cx, int cy)Gets the background for drawing on the screen of the hot spot.- Overrides:
fillCharBackgroundin classHotSpot
setTextColor
public void setTextColor(java.awt.Graphics g, int xPos, int yPos, int x, int y, int cx, int cy)Sets the color to use for the text (character) using g.setColor(nnn).- Overrides:
setTextColorin classHotSpot
activate
public void activate(TerminalWindow tw)
Called when the hot spot is activated.