Listing of Source ../source/GOF/GofControlIdentifierAdapter.javapackage se.entra.phantom.server;
/**
* This is an adapter class that must be used as a base class for classes implementing
* the GofControlIdentifier interface.
* <p>
* 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 recompilation of user written GofControlIdentifier classes. Default versions of
* these new methods can instead be implemented in this adapter class.
* @author J. Bergström
*/
public abstract class GofControlIdentifierAdapter implements GofControlIdentifier
{
// ------------------
// INSTANCE VARIABLES
// ------------------
/**
* The template panel.
*/
protected PhantomPanelData templPanel;
// -----------
// CONSTRUCTOR
// -----------
/**
* The constructor is a default constructor without any parameters. This makes it
* possible to load this class dynamically. The constructor doesn't do anything
* more than create the instance.
*/
public GofControlIdentifierAdapter( )
{
}
// ----------------
// INSTANCE METHODS
// ----------------
/**
* This method should get all the settings from the configuration file needed for this class.
* <p>
* Classes extending from this class that needs to read in their own settings from the configuration
* file, <b>must</b> implement this method, since this default implementation don't do anything.
* @param confFile A reference to the IniFile instance that holds the current server configuration file's settings.
* @param subsection The name of the subsection used for the current Gui-on-the-Fly settings.
*/
@Override
public void getControlSettings( IniFile confFile, String subsection )
{
}
/**
* This method is where the class implementing this interface does all its work. The algorithm
* for identifying the control must be implemented here.
* <p>
* The classes extending from this class should implement the following steps:
* <ul>
* <li>Create PhantomControlBase</li>
* <li>Create PhantomHostField</li>
* <li>Create PhantomControl</li>
* <li>Add the control to PhantomPanelData</li>
* <li>Add the control to the GofHostAreaIdentifier it belongs to</li>
* <li>Mark the GofHostField connected to the new control as processed</li>
* </ul>
* <p>
* This adapter class only implements an empty method. Classes extending this class <b>must</b>
* extend this method.
* @param gofRuntime The GuiOnTheFlyRuntime instance.
* @param areaIdentifier The areaIdentifier in which the controls should be identified.
* @param phantomHostScreen The Phantom host screen corresponding to the host screen.
* @param hostScreen The host screen that we are trying to build a GOF panel for.
* @param newPanel The newly created Gui-on-the-fly runtime panel.
* @param offsetX The offset in columns for popup window.
* @param offsetY The offset in lines for popup window.
*/
public void identifyCtrls( GuiOnTheFlyRuntime gofRuntime,
GofHostAreaIdentifier areaIdentifier,
PhantomHostScreen phantomHostScreen,
HostScreen hostScreen,
PhantomPanelData newPanel,
int offsetX,
int offsetY )
{
}
/**
* Gets a reference to the <code>VirtualSessionManager</code>.
* @return The VirtualSessionManager.
*/
public VirtualSessionManager getVirtualSessionManager( GuiOnTheFlyRuntime gofRuntime )
{
return gofRuntime.getVirtualSessionManager( );
}
}