Package com.iizigo.term.internal
Class Hyperlink
java.lang.Object
com.iizigo.term.internal.HotSpot
com.iizigo.term.internal.Hyperlink
Handles hot spots of type "http://nnn" and "ftp://nnn".
- Author:
- Christopher Mindus
Field Summary
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when the hot spot is activated.int
Checks if a hot spot is found.boolean
continueChecking
(char[] line, char ch, int begin, int end) Checks if it is OK to keep on checking.void
fillCharBackground
(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.void
initialize
(String setup, boolean active) Performs initialization from the setup data.void
setTextColor
(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).
Constructor Details
Hyperlink
public Hyperlink()
Method Details
initialize
Performs initialization from the setup data. Each hyperlink entry in the setup string (that is comma separated) contains the initial string.- Specified by:
initialize
in classHotSpot
- Parameters:
setup
- encoded definitionsactive
- initial status of the function
continueChecking
public boolean continueChecking(char[] line, char ch, int begin, int end) Checks if it is OK to keep on checking.- Specified by:
continueChecking
in classHotSpot
check
Checks if a hot spot is found. If it is, the position returned should be directly after the new hot spot.fillCharBackground
Gets the background for drawing on the screen of the hot spot.- Overrides:
fillCharBackground
in classHotSpot
- Parameters:
g
- graphic resourcexPos
-yPos
-x
-y
-cx
-cy
-
setTextColor
Sets the color to use for the text (character) using g.setColor(nnn).- Overrides:
setTextColor
in classHotSpot
- Parameters:
g
- graphic resourcexPos
-yPos
-x
-y
-cx
-cy
-
activate
Called when the hot spot is activated.