public class TerminalFieldPainter extends Object implements FieldPaintInterface
FieldPaintInterface.Field, FieldPaintInterface.Fields
Constructor and Description |
---|
TerminalFieldPainter() |
Modifier and Type | Method and Description |
---|---|
FieldPaintInterface.Fields |
getFields(boolean inputOnly)
Gets the fields defined in the current screen.
|
boolean |
getFieldsActive()
Get the state of host painting flag.
|
HostScreen |
getHostScreen()
Get the current hostScreen.
|
boolean |
isPopupsActive()
Get the popup painting active state.
|
void |
paint(Graphics graphics,
TerminalWindow tw,
int leftMargin,
int topMargin,
int cxFont,
int cyFont)
Paints the emulator window.
|
FieldPaintInterface.Field |
probe(int position)
Check if the position is part of a defined field.
|
void |
repaintWindow()
Mark the terminal window to be repainted.
|
void |
selectPopup(int index)
Set the pop-up to be shown.
|
void |
setComponent(Component component)
Set the component.
|
void |
setDimensions(int cxFont,
int cyFont,
int xOffset,
int yOffset)
Set the dimensions of the component.
|
void |
setFieldsActive(boolean active)
Set the field painting active (or inactive - depending on parameter).
|
void |
setPopupConstrained(boolean active)
Set the handling of popup's as constraining
(or inactive - depending on parameter).
|
void |
setPopupsActive(boolean active)
Set the popup painting active (or inactive - depending on parameter).
|
void |
setSelectedPopupDimensions(HostPopupWindow.Rect rect)
Set the selected pop-up dimensions.
|
void |
showPopup(int index)
Set the pop-up to be shown.
|
void |
update(HostScreen hs)
Set the host fields.
|
public void update(HostScreen hs)
public HostScreen getHostScreen()
getHostScreen
in interface FieldPaintInterface
public void repaintWindow()
repaintWindow
in interface FieldPaintInterface
public void setFieldsActive(boolean active)
setFieldsActive
in interface FieldPaintInterface
active
- public boolean getFieldsActive()
getFieldsActive
in interface FieldPaintInterface
public void setPopupsActive(boolean active)
setPopupsActive
in interface FieldPaintInterface
active
- public boolean isPopupsActive()
public void setPopupConstrained(boolean active)
setPopupConstrained
in interface FieldPaintInterface
active
- Flag indicating if the currently selected pop-up is
constraining or not.public void showPopup(int index)
showPopup
in interface FieldPaintInterface
index
- The pop-up to show, if not the currently shown
pop-up, nothing happens. This method is typically
used to update the screen for the pop-up.public void selectPopup(int index)
selectPopup
in interface FieldPaintInterface
index
- The pop-up to select and make active (shown).public void setSelectedPopupDimensions(HostPopupWindow.Rect rect)
rect
- The new rectangle size of the pop-up, not null!public void setComponent(Component component)
setComponent
in interface FieldPaintInterface
component
- The Component to paint on.public void setDimensions(int cxFont, int cyFont, int xOffset, int yOffset)
setDimensions
in interface FieldPaintInterface
cxFont
- horizontal font sizecyFont
- vertical font sizexOffset
- horizontal offsetyOffset
- vertical offsetpublic FieldPaintInterface.Fields getFields(boolean inputOnly)
getFields
in interface FieldPaintInterface
inputOnly
- true if only input fields should be returned.public void paint(Graphics graphics, TerminalWindow tw, int leftMargin, int topMargin, int cxFont, int cyFont)
PaintInterface
paint
in interface PaintInterface
public FieldPaintInterface.Field probe(int position)
FieldPaintInterface
probe
in interface FieldPaintInterface
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.