public abstract class GofHostAreaIdentifierAdapter extends Object implements GofHostAreaIdentifier
Extending from this class, instead of directly implementing the interface, makes it possible to extend the interface with new methods in the future, without forcing a re-compilation of user written GofHostAreaIdentifier classes. Default versions of these new methods can instead be implemented in this adapter class.
Modifier and Type | Field and Description |
---|---|
protected Vector<GofHostField> |
areaGofHostFields
All the GofHostFields that belongs to this area.
|
protected Vector<PhantomControl> |
phantomControls
All the controls that have been added to this area.
|
FLOW_LAYOUT
Constructor and Description |
---|
GofHostAreaIdentifierAdapter()
The constructor is a default constructor without any parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addControl(PhantomControl phantomControl)
Adds a new PhantomControl to the area.
|
void |
getAreaSettings(IniFile confFile,
String subsection)
This method should get all the settings from the configuration file needed for this class.
|
Vector<GofHostField> |
getAreasGofHostFields()
This method gets all the GofHostFields belonging to this area.
|
Vector<GofHostField> |
identifyArea(Vector<GofHostField> gofHostFields,
int x,
int y,
int w,
int h)
This method must implement the code for identifying the area the class is supposed to identify.
|
void |
layout()
This method should layout the controls belonging to this area according to the layout rule
specified by the parameter.
|
protected Vector<GofHostField> areaGofHostFields
protected Vector<PhantomControl> phantomControls
public GofHostAreaIdentifierAdapter()
public void getAreaSettings(IniFile confFile, String subsection)
Classes extending from this class that needs to read in their own settings from the configuration file, must implement this method, since this default implementation don't do anything.
getAreaSettings
in interface GofHostAreaIdentifier
confFile
- A reference to the IniFile instance that holds the current server configuration file's settings.subsection
- The name of the subsection used for the current Gui-on-the-Fly settings.public Vector<GofHostField> identifyArea(Vector<GofHostField> gofHostFields, int x, int y, int w, int h)
This adapter class only implements an empty method. Classes extending this class must extend this method.
identifyArea
in interface GofHostAreaIdentifier
gofHostFields
- A Vector
containing all the GofHostFields in the part of the
screen area to be analyzed.x
- The start column of the area to be analyzed.y
- The start line of the area to be analyzed.w
- The width of the area to be analyzed.h
- The height of the area to be analyzed.null
.areaGofHostFields
public Vector<GofHostField> getAreasGofHostFields()
getAreasGofHostFields
in interface GofHostAreaIdentifier
public void addControl(PhantomControl phantomControl)
Vector
in the class. This makes it possible for class extending
this class to implement the laying out of the components.addControl
in interface GofHostAreaIdentifier
phantomControl
- The control to add to this area.public void layout()
This adapter class only implements an empty method. Classes extending this class must extend this method.
layout
in interface GofHostAreaIdentifier
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.