public abstract class HotSpot extends Object
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).
Modifier and Type | Field and Description |
---|---|
protected boolean |
active
Is this hot spot active?
|
String |
text
The text of the hot spot, null if not yet set.
|
int |
width
The width of the hot spot in characters.
|
int |
x
The X position of the line where this hot spot is located in character count.
|
Constructor and Description |
---|
HotSpot() |
Modifier and Type | Method and Description |
---|---|
abstract void |
activate(TerminalWindow tw)
Called 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 int |
check(char[] line,
List<HotSpot> hotSpots,
int begin,
int end)
Checks 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.
|
boolean |
equals(Object o)
Checks if one hot spot is equal to another.
|
void |
fillCharBackground(Graphics g,
int xPos,
int yPos,
int x,
int y,
int cx,
int cy,
Color[] colors)
Gets the background for drawing on the screen of the hot spot.
|
abstract void |
initialize(String setup,
boolean active)
Performs initialization from the setup data.
|
boolean |
isInside(int xPos)
Checks if a position is inside the hot spot.
|
void |
onCreate(HotSpot parent)
Called when a new hot spot has been instantiated.
|
List<HotSpot> |
parse(char[] line,
List<HotSpot> hotSpots)
Performs parsing of the line just updated on the host screen.
|
void |
postPaint(Graphics g,
int xPos,
int yPos,
int x,
int y,
int cx,
int cy)
Post-painting the character of the hot spot.
|
void |
setTextColor(Graphics g,
int xPos,
int yPos,
int x,
int y,
int cx,
int cy,
Color[] colors)
Sets the color to use for the text (character) using g.setColor(nnn).
|
public int x
public int width
public String text
protected boolean active
public boolean equals(Object o)
public abstract void initialize(String setup, boolean active)
public final List<HotSpot> parse(char[] line, List<HotSpot> hotSpots)
public abstract boolean continueChecking(char[] line, char ch, int begin, int end)
public abstract int check(char[] line, List<HotSpot> hotSpots, int begin, int end)
public void onCreate(HotSpot parent)
protected char[] addHotSpot(HotSpot hs, char[] line, List<HotSpot> hotSpots, int x, int width)
public final boolean isInside(int xPos)
public void fillCharBackground(Graphics g, int xPos, int yPos, int x, int y, int cx, int cy, Color[] colors)
public void setTextColor(Graphics g, int xPos, int yPos, int x, int y, int cx, int cy, Color[] colors)
public void postPaint(Graphics g, int xPos, int yPos, int x, int y, int cx, int cy)
public abstract void activate(TerminalWindow tw)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.