public class TerminalMouseHandler extends Object implements MouseInterface, EditorDirectInterface
| Modifier and Type | Field and Description |
|---|---|
static int |
MODE_EDITOR |
| Constructor and Description |
|---|
TerminalMouseHandler()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
closeProject()
Close the current application.
|
boolean |
closeProjectDirect()
Close the current application without asking for save etc.
|
void |
deleteAllMarks()
Delete all marks defined for the current screen.
|
void |
displayInputFields(boolean create)
Display all input fields in the current host screen.
|
Color |
getBackground(Color background,
int x,
int y)
Gets the background color when drawing a character.
|
HostPopupWindow.Rect |
getConstrainingPopup()
Get the constraining popup.
|
se.entra.phantom.server.phed.FieldDecoratedMark |
getLastField(se.entra.phantom.server.phed.FieldDecoratedMark current)
Get the last host field that is not equal to the indicated one.
|
se.entra.phantom.server.phed.FieldDecoratedMark |
getLastNormalField(se.entra.phantom.server.phed.FieldDecoratedMark current)
Get the last defined host field that is not a continued field and is
different from the indicated one.
|
Rectangle |
getMark()
Get the current mark's rectangle representation.
|
se.entra.phantom.server.phed.DecoratedMarks |
getMarks()
Get the marks container.
|
int |
getMode()
Get the current mode.
|
String |
getNewFieldName()
Get a new field name.
|
PhantomHostScreen |
getPhantomHostScreen()
Get the phantom host screen.
|
void |
handleMouseEvent(MouseEvent event)
Handle the current mouse event.
|
boolean |
inEditingMode()
Checks if the mode is in an editing mode, i.e.
|
void |
initialize()
Perform any necessary initialization.
|
boolean |
isCloseProjectAllowed()
Is close application allowed at this point?
|
boolean |
isEdited()
Is this phantom host screen edited.
|
boolean |
isSaveNeeded()
Is save needed at this point?
|
int |
messageBox(int type,
int icon,
String message,
String title)
Display a message box.
|
void |
paint(Graphics graphics,
TerminalWindow tw,
int leftMargin,
int topMargin,
int cxFont,
int cyFont)
Paint all defined marks.
|
boolean |
performAction()
Perform action.
|
void |
populateMarks(PhantomHostScreen screen)
Read the existing screen definition and populate the mark container.
|
void |
populateMarksDirect(PhantomHostScreen screen)
Read the screen definition and populate the mark container directly
(i.e.
|
void |
rematchScreen(boolean reset)
Performs a re-match of the current screen.
|
void |
removeExcludedPopup()
Perform remove excluded pop-up window action.
|
void |
removeMark()
Removes the current mark.
|
boolean |
saveHostData()
Save the PhantomHostData structure to file.
|
boolean |
saveScreenDefinitionDirect()
Save the screen definition in the PhantomHostData structure.
|
boolean |
setConstrainedDirect(HostPopupWindow.Rect constraint)
Set whether the window should be constrained (i.e.
|
void |
setCurrentMark(se.entra.phantom.server.phed.DecoratedMark newMark)
Sets the current mark.
|
boolean |
setCurrentScreenDirect(PhantomHostScreen newScreen)
Set the current screen programmatically.
|
void |
setDimensions(int cxFont,
int cyFont,
int xOffset,
int yOffset,
int cxScreen,
int cyScreen)
Set the dimensions of the component.
|
void |
setEdited(boolean edited)
Set the phantom host screen as edited.
|
void |
setHostConnected(boolean connected)
Indicate the host session is connected/disconnected.
|
void |
setMainPanel(Object main)
Set main panel reference.
|
void |
setMenuItemEnabled(String id,
boolean enabled)
Set menu item as enabled (or disabled).
|
void |
setMode(int newMode)
Set the mode the terminal is running in.
|
boolean |
setModeDirect(int newMode)
Set the current mode directly (i.e.
|
void |
setSessionManager(VirtualSessionManager vsm)
Set the virtual session manager reference.
|
void |
setTerminalWindow(TerminalWindow owner)
Set the owner of the handler.
|
boolean |
undoAction()
Perform undo action.
|
void |
update(HostScreen hs)
Set the host fields.
|
void |
updateMenus()
Set the mode indicator in the menus.
|
public static final int MODE_EDITOR
public void displayInputFields(boolean create)
displayInputFields in interface MouseInterfacecreate - Flag if the displayed fields should be created or not.public void deleteAllMarks()
deleteAllMarks in interface MouseInterfacepublic void rematchScreen(boolean reset)
rematchScreen in interface MouseInterfacereset - Flag to perform a re-match of the current screen or not.public Rectangle getMark()
getMark in interface MouseInterfacepublic se.entra.phantom.server.phed.DecoratedMarks getMarks()
getMarks in interface EditorDirectInterfacepublic void setCurrentMark(se.entra.phantom.server.phed.DecoratedMark newMark)
setCurrentMark in interface EditorDirectInterfacenewMark - The new DecoratedMark to set.public int getMode()
getMode in interface MouseInterfacepublic boolean closeProjectDirect()
closeProjectDirect in interface EditorDirectInterfacepublic boolean closeProject()
closeProject in interface MouseInterfacepublic int messageBox(int type,
int icon,
String message,
String title)
messageBox in interface EditorDirectInterfacetype - icon - message - title - public void removeMark()
removeMark in interface MouseInterfacepublic se.entra.phantom.server.phed.FieldDecoratedMark getLastNormalField(se.entra.phantom.server.phed.FieldDecoratedMark current)
getLastNormalField in interface EditorDirectInterfacecurrent - The current FieldDecoratedMark, null for none.public se.entra.phantom.server.phed.FieldDecoratedMark getLastField(se.entra.phantom.server.phed.FieldDecoratedMark current)
getLastField in interface EditorDirectInterfacecurrent - The current FieldDecoratedMark, null for none.public PhantomHostScreen getPhantomHostScreen()
getPhantomHostScreen in interface EditorDirectInterfacepublic void populateMarks(PhantomHostScreen screen)
populateMarks in interface EditorDirectInterfacescreen - The PhantomHostScreen.public void populateMarksDirect(PhantomHostScreen screen)
populateMarksDirect in interface EditorDirectInterfacescreen - The PhantomHostScreen.public void removeExcludedPopup()
removeExcludedPopup in interface MouseInterfacepublic boolean saveScreenDefinitionDirect()
saveScreenDefinitionDirect in interface EditorDirectInterfacepublic boolean saveHostData()
saveHostData in interface MouseInterfacepublic boolean isSaveNeeded()
isSaveNeeded in interface MouseInterfacepublic boolean inEditingMode()
public boolean isCloseProjectAllowed()
isCloseProjectAllowed in interface MouseInterfacepublic void handleMouseEvent(MouseEvent event)
MouseInterfacehandleMouseEvent in interface MouseInterfaceevent - The MouseEvent.public void setMainPanel(Object main)
MouseInterfacesetMainPanel in interface MouseInterfacemain - The main panel reference.public boolean setConstrainedDirect(HostPopupWindow.Rect constraint)
setConstrainedDirect in interface EditorDirectInterfaceconstraint - The pop-up window constrains rectangle, null for none.public Color getBackground(Color background, int x, int y)
getBackground in interface MouseInterfacebackground - The background color.x - The X position.y - The Y position.public HostPopupWindow.Rect getConstrainingPopup()
getConstrainingPopup in interface EditorDirectInterfacepublic boolean isEdited()
isEdited in interface EditorDirectInterfacepublic void setEdited(boolean edited)
setEdited in interface EditorDirectInterfaceedited - Flag for PhantomHostScreen edited or not.public void setDimensions(int cxFont,
int cyFont,
int xOffset,
int yOffset,
int cxScreen,
int cyScreen)
setDimensions in interface MouseInterfacecxFont - horizontal font sizecyFont - vertical font sizexOffset - horizontal offsetyOffset - vertical offsetcxScreen - horizontal screen sizecyScreen - vertical screen sizepublic void setSessionManager(VirtualSessionManager vsm)
vsm - The VirtualSessionManager.public void setTerminalWindow(TerminalWindow owner)
setTerminalWindow in interface MouseInterfaceowner - The owner TerminalWindow.public boolean setCurrentScreenDirect(PhantomHostScreen newScreen)
setCurrentScreenDirect in interface EditorDirectInterfacenewScreen - The new PhantomHostScreen.public String getNewFieldName()
getNewFieldName in interface EditorDirectInterfacepublic void setHostConnected(boolean connected)
setHostConnected in interface MouseInterfaceconnected - The connected-enabled state.public void paint(Graphics graphics, TerminalWindow tw, int leftMargin, int topMargin, int cxFont, int cyFont)
paint in interface MouseInterfacegraphics - The Graphics.tw - The TerminalWindow.leftMargin - Left margin.topMargin - Top margin.cxFont - Font width.cyFont - Font height.public void updateMenus()
updateMenus in interface MouseInterfacepublic void setMenuItemEnabled(String id, boolean enabled)
setMenuItemEnabled in interface MouseInterfaceid - The menu item ID.enabled - true = enabled, false = disabled.public void setMode(int newMode)
setMode in interface MouseInterfacenewMode - The new mode.public boolean setModeDirect(int newMode)
setModeDirect in interface EditorDirectInterfacenewMode - The new mode.public void initialize()
initialize in interface MouseInterfacepublic boolean performAction()
performAction in interface MouseInterfacepublic boolean undoAction()
undoAction in interface MouseInterfacepublic void update(HostScreen hs)
hs - The host screen.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.