Listing of Source terminal/TerminalAbout.javapackage se.entra.phantom.server;
/**
* This class handles the Terminal About panel ABOUT.
*/
public class TerminalAbout extends VirtualComponentAdapter
{
/**
* Push buttons and menu items generates this event when selected.
*/
@Override
public void onAction(VirtualPanel vp,String controlID)
{
if ( controlID.equals("CANCEL" ) ) close(vp);
else System.out.println("#TerminalAbout, Command ID "+controlID+" not handled");
}
/**
* Closes this panel.
*/
private void close(VirtualPanel vp)
{
vp.dismissPanel(-1);
}
/**
* Called when the close button of a panel is pressed,
* but before any other processing has been done. If this
* function returns false, the application close object
* will be called (if defined), otherwise a faked keypress
* of the Escape key is performed. If these two actions
* failed (because there is no close object or no button or
* menu item is connected to the Escape key), then the
* function <code>onPanelClose</code> is called.
*
* @return true to cancel all default processing.
*/
@Override
public boolean onPanelClosing(VirtualPanel vp)
{
close(vp);
return true;
}
}