Package com.iizigo.term.internal
Class HotSpot
java.lang.Object
com.iizigo.term.internal.HotSpot
- Direct Known Subclasses:
- Hyperlink,- KeyHotSpot
Abstract class that is used to parse data of a line on the screen to create hot spots such as function keys (or other send keys) and links. Extending classes provides a way to parse a line on the screen and if a hot spot is found, call "addHotSpot" to create a new hot spot. This will create a new instance of the same class as the extending class.
This abstract class handles both parsing and identifying hot spots of a certain type as well as the actual drawing of them on screen and when they are activated (performing a function).
- Author:
- Christopher Mindus
- Field SummaryFields
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- abstract voidCalled when the hot spot is activated.- protected char[]- addHotSpot- (HotSpot hs, char[] line, List<HotSpot> hotSpots, int x, int width) Adds a new hot spot of this same class (but a new instance) to the list.- abstract intChecks if a hot spot is found.- abstract boolean- continueChecking- (char[] line, char ch, int begin, int end) Checks if it is OK to keep on checking.- booleanChecks if one hot spot is equal to another.- 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.- int- hashCode()Gets the hash code.- abstract void- initialize- (String setup, boolean active) Performs initialization from the setup data.- final boolean- isInside- (int xPos) Checks if a position is inside the hot spot.- voidCalled when a new hot spot has been instantiated.Performs parsing of the line just updated on the host screen.- voidPost-painting the character of the hot spot.- 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).
- Field Details- xpublic int xThe X position of the line where this hot spot is located in character count.
- widthpublic int widthThe width of the hot spot in characters.
- textThe text of the hot spot, null if not yet set.
- activeprotected boolean activeIs this hot spot active?
 
- Constructor Details- HotSpotpublic HotSpot()
 
- Method Details- equalsChecks if one hot spot is equal to another.
- hashCodepublic int hashCode()Gets the hash code.
- initializePerforms initialization from the setup data.
- parsePerforms parsing of the line just updated on the host screen. If this hot spot is successful, it should clear the data with the zero character. This method returns the same "hostSpots" list if there is no change, otherwise a new list.
- continueCheckingpublic abstract boolean continueChecking- (char[] line, char ch, int begin, int end) Checks if it is OK to keep on checking.
- checkChecks if a hot spot is found. If it is, the position returned should be directly after the new hot spot.
- onCreateCalled when a new hot spot has been instantiated.
- addHotSpotAdds a new hot spot of this same class (but a new instance) to the list.
- isInsidepublic final boolean isInside- (int xPos) Checks if a position is inside the hot spot.
- fillCharBackgroundGets the background for drawing on the screen of the hot spot.
- setTextColorSets the color to use for the text (character) using g.setColor(nnn).
- postPaintPost-painting the character of the hot spot.
- activateCalled when the hot spot is activated.