public class VirtualCListBox extends VirtualControl
| Modifier and Type | Class and Description |
|---|---|
class |
VirtualCListBox.CellData
A subclass that implements a record in the listboxs update que.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
CHANGE_HEADER_TXT
The constant for change header text.
|
static int |
CHANGE_LINE
The constant for existing line changed.
|
static int |
DELETE_LINE
The constant for single line deleted.
|
static int |
HOST_CELL_HIDDEN
The constant for a hidden cell flag.
|
static int |
HOST_CELL_ISUNCREATED
The constant for a uncreated cell in an expandable list.
|
static int |
HOST_CELL_PROTECTED
The constant for a protected cell flag.
|
static int |
INSERT_LINE
The constant for single line inserted.
|
static int |
RESET_SELECTION
The constant for reset selection.
|
static int |
SET_SELECTION
The constant for set selection.
|
static int |
UPDATE_ALL
The constant for whole list box updated.
|
static int |
UPDATE_ALL_WITH_FOCUS |
static int |
UPDATE_ALL_WITH_RESET
The constant for a reseted list.
|
static int |
UPDATE_CELLS
Constant for updated cells.
|
static int |
UPDATE_FOCUS_CELL
Constant for update of cell focus.
|
CTRLTYPE_BUTTON, CTRLTYPE_CHECK, CTRLTYPE_COMBO, CTRLTYPE_FRAME, CTRLTYPE_GRAPH, CTRLTYPE_GROUP, CTRLTYPE_INOUT, CTRLTYPE_LIST, CTRLTYPE_MLE, CTRLTYPE_NOTE, CTRLTYPE_OUT, CTRLTYPE_RADIO, CTRLTYPE_RECT, CTRLTYPE_SPIN, CTRLTYPE_SUB, CTRLTYPE_TEXT, CTRLTYPE_TREE, CTRLTYPE_UNKNOWN, CTRLTYPE_USER, CTRLTYPES_COUNT, namesTOOLTIP_TEXTACTION_CLOSEWINDOW, ACTION_CONTROL, ACTION_HOSTKEY, ACTION_MENU, ACTION_NONE, ACTION_NOTEBOOKPAGE, ACTION_POPUPMENU, CC_BACKGROUND, CC_BOTH, CC_FOREGROUND, CC_NONE, CLIPBOARD_GET, CLIPBOARD_SET, DATEF_DMY, DATEF_MDY, DATEF_SYSTEM, DATEF_YMD, DDE_ADVISE, DDE_EXECUTE, DDE_INITIATE, DDE_POKE, DDE_REQUEST, DDE_TERMINATE, DDE_UNADVISE, DDE_UPDATE, DDEVAR_DISABLE, DDEVAR_ENABLE, DDEVAR_REQUEST, DDEVAR_SET, DDEVAR_VALIDATE, EFT_AMOUNT, EFT_DATE, EFT_DATEAMOUNT, EFT_NORMAL, EFT_PASSWORD, EVENT_CHAR, EVENT_CHECK, EVENT_CLICK, EVENT_COMMAND, EVENT_DBLCLICK, EVENT_DDECONNECTION, EVENT_DDEDATA, EVENT_DDEERROR, EVENT_DDEEXECUTE, EVENT_DDEINVALIDATE, EVENT_DDEPOKE, EVENT_DDEREQUEST, EVENT_DEFOCUS, EVENT_FOCUS, EVENT_PAGEDOWN, EVENT_PAGEUP, EVENT_SELECT, EVENT_UNKNOWN, EVENT_USERCHANGE, EXTENDEDINFO_IDS_TO_CLIENT, FOCUSTYPE_CLIENTTARGET, FOCUSTYPE_CONTROL, FOCUSTYPE_NONE, ICON_CRITICAL, ICON_INFORMATION, ICON_NOICON, ICON_QUERY, ICON_WARNING, J_AUTO, J_BOTTOM, J_BOTTOMLEFT, J_BOTTOMRIGHT, J_CENTER, J_LEFT, J_RIGHT, J_TOP, J_TOPLEFT, J_TOPRIGHT, MAX_PANELS_PER_SESSION, MAX_SESSIONS, MB_ABORTRETRYIGNORE, MB_CANCEL, MB_ENTER, MB_ENTERCANCEL, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL, MBID_CANCEL, MBID_DEFAULT, MBID_ENTER, MBID_IGNORE, MBID_NO, MBID_OK, MBID_RETRY, MBID_YES, MS_MOVE, MS_NONE, MS_SIZE, NETPHANTOM_COPYRIGHT, NETPHANTOM_COPYRIGHT2, NETPHANTOM_VERSION, OBJEVENT_CHECK, OBJEVENT_CLICK, OBJEVENT_DBLCLICK, OBJEVENT_DEFOCUS, OBJEVENT_FOCUS, OBJEVENT_SELECT, OBJEVENT_USERCHANGE, PANELCREATE_APPPANEL, PANELCREATE_DANGLINGPANEL, PANELCREATE_DLGFRAME, PANELCREATE_EXTENDEDINFO, PANELCREATE_ICON, PANELCREATE_INDIVIDUALSIZE, PANELCREATE_POPUP, REPLYTYPE_CLIENTEXECUTE, REPLYTYPE_CLIPBOARD, REPLYTYPE_DDE, REPLYTYPE_FFONTLIST, REPLYTYPE_MESSAGEBOX, REPLYTYPE_REPORT, REPLYTYPE_SAVEPROPS, REPLYTYPE_TERMMARK, RPRT_CANCELPRINTJOB, RPRT_CLOSEPRINTJOB, RPRT_CONTPRINTJOB, RPRT_OPENPRINTJOB, RPRT_PRINTJOBCANCLD, RPRT_PRINTJOBCLOSED, RPRT_PRINTJOBCONT, RPRT_PRINTJOBOPENED, RPRT_PRINTJOBSTARTED, RPRT_STARTPRINTJOB, SELMODE_NORMAL, SELMODE_NOTALLOWED, SELMODE_REQUIRED, SELTYPE_MULTIPLE, SELTYPE_SINGLE, SEPARATOR, SEPARATORCHAR, TRANS_APPLICATIONCHANGE, TRANS_CALLOBJECT, TRANS_CANCELEXIT, TRANS_CLEARLOCK, TRANS_CLIENTEXECUTE, TRANS_CLIENTJARS, TRANS_CLIENTTEXTTABLE, TRANS_CLIENTUPDATED, TRANS_CLIENTUPDATEDNOLOCK, TRANS_CLIPBOARD, TRANS_CLIPBOARDCOMPONENT, TRANS_CLOSETERMINALWINDOW, TRANS_CONNECTIONREFUSED, TRANS_COUNTRYINFO, TRANS_CREATEPANEL, TRANS_CREATESESSION, TRANS_DDE, TRANS_DDEEVENT, TRANS_DDEEVENTREPLY, TRANS_DDEVAREVENT, TRANS_DISPLAYHELP, TRANS_DISPLAYTERMINAL, TRANS_DISPLAYTOOLTIPS, TRANS_ENDCONVERSATION, TRANS_EXIT, TRANS_FONTSUBSTITUTION, TRANS_HOSTCOLORTABLE, TRANS_HOSTPRINT, TRANS_HWND, TRANS_INACTIVESESSION, TRANS_INITIATE, TRANS_KEEPALIVE, TRANS_LOCALE, TRANS_LOGEVENT, TRANS_MESSAGEBOX, TRANS_MESSAGEBOXWITHREPLY, TRANS_MODALREPLY, TRANS_MULTTERM, TRANS_PING, TRANS_PRINTCOMPONENT, TRANS_PRINTPANEL, TRANS_PRINTREPORT, TRANS_PRTWINKEY, TRANS_RECONNECT, TRANS_REDIRECTION, TRANS_REMOVEPANELATLEVEL, TRANS_REMOVETERMINAL, TRANS_RENEGOTIATESSL, TRANS_REQUESTHELP, TRANS_RESOURCEURL, TRANS_SELECTSESSION, TRANS_SESSIONACTIVE, TRANS_SESSIONSELECTED, TRANS_SETCOLORS, TRANS_SETFOCUS, TRANS_SETLOCK, TRANS_SETPANELNESTLEVEL, TRANS_SETUPPARAMS, TRANS_SHOWDOCUMENT, TRANS_SOCKET, TRANS_SOUNDALARM, TRANS_STARTUPINFO, TRANS_STOPSESSION, TRANS_TERMINALDATA, TRANS_TERMINALUPDATE, TRANS_TERMINALWINDOW, TRANS_TERMWINTEXT, TRANS_UPDATEAPPLICATION, TRANS_UPDATEPANEL, TRANS_USEREXITPRTKEY, TRANSACTION_VERSION, TS_CLOSE, TS_DATA, TS_ERROR, TS_OPEN, VSIGN_MINUS, VSIGN_NONE, VSIGN_PLUSMINUS, YEARF_6DIG, YEARF_8DIG, YEARF_EXP8| Constructor and Description |
|---|
VirtualCListBox(VirtualPanel panel,
PhantomCListBox data)
Creates a new virtual listbox.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areTextPromptsAlwaysRefreshed()
Determines if the listbox has a need to refresh the text prompt at all host
changed.
|
void |
clientUpdated(Transaction trans)
The client has sent an update transaction to the server.
|
boolean |
deleteAll()
Deletes the whole listbox.
|
boolean |
deleteLine(int line)
Deletes a single line.
|
void |
fireCreate(Transaction trans)
Appends the fire create data for the listbox to the fire create transaction
to the client.
|
void |
fireUpdate(Transaction trans)
Fires the update transaction to the client.
|
String |
getCell(int col,
int line)
Gets a single cell from the list.
|
VirtualCListBox.CellData |
getCellData(int col,
int line,
VirtualCListBox.CellData cd)
Gets a single cell data from the list.
|
String |
getCellText(int col,
int line)
Gets the text from a single cell in the list.
|
VirtualControl |
getControlConnectedToHost(PhantomHostScreen screen,
PhantomHostField hostField,
int flags)
Check if control is connected to host field.
|
PhantomCListBox |
getData() |
int |
getFirstLine()
Gets the line number for the first line.
|
int |
getLastLine()
Gets the line number for the last line.
|
String |
getLine(int line)
Get a single row from listbox.
|
String[] |
getLineCells(int line)
Gets the line data into an array of strings rather than a tab delimited
format.
|
int |
getLineCount()
Gets the number of lines in the listbox.
|
PhantomCListBox |
getListBoxData()
Gets the data object for the list box.
|
int |
getNewTotLines()
Gets the new total number of lines in the list.
|
int |
getNextSelection(int line)
Gets the next selected line after the specified line.
|
int |
getPageDownIndex()
Get page down control index.
|
int |
getPageUpIndex()
Get page up control index.
|
VirtualControl |
getSelectableControl(int flags)
Check if this control can receive focus (is selectable).
|
int |
getTotLines()
Gets the total number of lines in the list.
|
void |
hostScreenChanged(PhantomHostScreen screen)
The connected host screen has changed.
|
boolean |
insertLine(String text,
int line)
Inserts a line in the listbox.
|
boolean |
isListEmpty()
Is list empty.
|
boolean |
isSelectionFieldEnable(int line)
Check if listbox selection host field is enable for a certain row.
|
void |
issueAction(int actionEvent,
Transaction trans)
Processes client or internal events.
|
void |
issueAction(Transaction trans)
Processes action events from the client to the listbox.
|
void |
refresh()
This method is used to refresh the contents of the virtual classes.
|
void |
refreshTextPrompts(boolean alwaysRefresh)
Text prompts has to be refreshed because of a host change.
|
boolean |
setCell(int col,
int line,
String data)
Sets a single cell in a list.
|
boolean |
setCellFocus(int col,
int line)
Sets the cell focus or cursor position to col/line.
|
boolean |
setFileFromList(PhantomOutputFile pFile)
Writes the list to a file.
|
boolean |
setFocus()
Sets focus in the panel to this item.
|
boolean |
setFocus(PhantomHostFieldLocation hostFieldLocation)
Sets focus in the panel to this item according to a host field location.
|
void |
setInitialFocus()
Sets the initial focus in a single select list with at least one row.
|
boolean |
setLine(String text,
int line)
Sets the data in a existing line in the listbox.
|
boolean |
setLineSelectionString(String text)
Sets the selection field on a selected line.
|
void |
setListCursor(int row,
int col)
Set host cursor to listbox cell (if move-cursor option is set).
|
boolean |
setListFromFile(String fileName)
Sets the contents of a list capable control from a file.
|
boolean |
setSelection(int line,
boolean isSelect)
Changes the selection state on a line.
|
boolean |
setSelectionFlags(int lines,
boolean isHostUpdate)
Sets the flags for selected lines.
|
void |
textFileChanged()
Text file is changed.
|
boolean |
updateHostCell(int col,
int line,
String newText)
Update cell data in editable cell.
|
void |
updateHostSelectionField()
Update host selection string from listbox selection.
|
appendCreateTransaction, appendFieldCheckTransaction, appendFontTransaction, appendUpdateTransaction, callControl, callObject, callObject, dispose, getBackgroundColor, getBasicData, getClientSession, getColor, getComponentLockObject, getControlID, getControlIDHostFieldID, getControlType, getCurrentHostSession, getExtraUpdateFlags, getFont, getForegroundColor, getHostField, getID, getIndex, getLength, getObject, getPanel, getPreviousConnectedControl, getProperty, getText, getTextData, getTooltipText, getVirtualSessionManager, hasChanged, isChecked, isConnectToNextControlPropertySet, isDirectChecked, isEnabled, isNewGroup, issueControlAction, isTabSkipped, isVisible, parseRuntimeFont, refreshTextPrompts, requestFocus, selectField, setBackgroundColor, setChanged, setChecked, setColor, setEnabled, setFont, setForegroundColor, setLength, setProperty, setText, setTooltipText, setupControlIDObject, setVirtualText, setVisiblepublic static final int UPDATE_ALL
public static final int CHANGE_LINE
public static final int INSERT_LINE
public static final int DELETE_LINE
public static final int SET_SELECTION
public static final int RESET_SELECTION
public static final int CHANGE_HEADER_TXT
public static final int UPDATE_ALL_WITH_RESET
public static final int UPDATE_ALL_WITH_FOCUS
public static final int UPDATE_CELLS
public static final int UPDATE_FOCUS_CELL
public static final int HOST_CELL_HIDDEN
public static final int HOST_CELL_PROTECTED
public static final int HOST_CELL_ISUNCREATED
public VirtualCListBox(VirtualPanel panel, PhantomCListBox data)
panel - The virtual panel to which this control belong.data - The data for the listbox.public PhantomCListBox getData()
public void hostScreenChanged(PhantomHostScreen screen)
hostScreenChanged in class VirtualControlpublic VirtualControl getControlConnectedToHost(PhantomHostScreen screen, PhantomHostField hostField, int flags)
getControlConnectedToHost in class VirtualControlscreen - The Phantom host screen.hostField - The Phantom host field.flags - true if connected, otherwise false if not
connected.public VirtualControl getSelectableControl(int flags)
getSelectableControl in class VirtualControlpublic boolean areTextPromptsAlwaysRefreshed()
areTextPromptsAlwaysRefreshed in interface VirtualClientMessagesareTextPromptsAlwaysRefreshed in class VirtualControltrue if the listbox needs to refresh text prompts,
false otherwise.public void refreshTextPrompts(boolean alwaysRefresh)
refreshTextPrompts in class VirtualControlalwaysRefresh - Tells if the text prompts should always be refreshed.public void textFileChanged()
textFileChanged in interface VirtualClientMessagestextFileChanged in class VirtualControlpublic void refresh()
refresh in interface VirtualClientMessagesrefresh in class VirtualControlpublic boolean setSelectionFlags(int lines,
boolean isHostUpdate)
lines - The number of data lines in the list.public int getFirstLine()
public int getLastLine()
public int getTotLines()
public int getNewTotLines()
public boolean isListEmpty()
public int getPageUpIndex()
public int getPageDownIndex()
public void setInitialFocus()
public void fireCreate(Transaction trans)
fireCreate in interface VirtualClientMessagesfireCreate in class VirtualControltrans - The create transaction to which we want to append listbox data.
It appends the following data to he create transaction:
+ STRING id
+ SHORT double-click field index
+ SHORT page up field index
+ SHORT page down field index
+ BYTE number of columns
+ SHORT the header height
+ BYTE the headers background color (for all headers)
+ BYTE the lists background color (for all columns)
+ USHORT the listbox font
+ USHORT the header font
+ USHORT the serial number for the listboxs data
+ USHORT listbox flags
nnnn nnnn nnnn nnn1 = no selection allowed
nnnn nnnn nnnn nn1n = multiselection allowed
nnnn nnnn nnnn n1nn = has vertical scrollbar
nnnn nnnn nnnn 1nnn = has horizontal scrollbar
nnnn nnnn nnn1 nnnn = has individual scrollbars on each column
nnnn nnnn nn1n nnnn = has line between rows
nnnn nnnn n1nn nnnn = has page up/down buttons
nnnn nnnn 1nnn nnnn = vertical scrollbar as heigh as list
nnnn nnn1 nnnn nnnn = right to left
nnnn nn1n nnnn nnnn = border around listbox
nnnn n1nn nnnn nnnn = divider between headers are single line
nnnn 1nnn nnnn nnnn = divider between headers are double line
nn01 nnnn nnnn nnnn = divider between header and column is single line
nn10 nnnn nnnn nnnn = divider between header and culumn is double line
01nn nnnn nnnn nnnn = divider between columns are single lines
10nn nnnn nnnn nnnn = divider between columns are double lines
+ BYTE common column and extra listboxs flags
nnnn nnn1 = columns are moveable
nnnn nn1n = columns are sortable
nnnn n1nn = expand last column to the right
nnnn 1nnn = send page up/down directly to host
nnn1 nnnn = enter performs new line
nn1n nnnn = list is expandable
+ USHORT number of lines in the listbox
+ ... the individual columns data (as defined in fireCreateColumn)
Finally it sets the flag hasBeenCreated to true.public void fireUpdate(Transaction trans)
The update transaction can be of several different types. The update types are:
UPDATE_ALL Updates the whole list. CHANGE_LINE Changes a single existing line. INSERT_LINE Inserts a new line. DELETE_LINE Deletes a existing line. SET_SELECTION Selects a line. RESET_SELECTION Deselects a line. CHANGE_HEADER_TXT Changes the header texts.
fireUpdate in interface VirtualClientMessagesfireUpdate in class VirtualControltrans - The update transaction.UPDATE_ALL,
CHANGE_LINE,
INSERT_LINE,
DELETE_LINE,
SET_SELECTION,
RESET_SELECTION,
CHANGE_HEADER_TXTpublic void clientUpdated(Transaction trans)
clientUpdated in class VirtualControltrans - The update transaction.public void updateHostSelectionField()
public boolean updateHostCell(int col,
int line,
String newText)
public boolean setListFromFile(String fileName) throws IOException
setListFromFile in interface VirtualInterfacesetListFromFile in class VirtualControlfileName - the file name.IOException - for file failures.public boolean insertLine(String text, int line)
insertLine in interface VirtualInterfaceinsertLine in class VirtualControltext - The lines data.line - The line number for the new line. If -1 then append to end of
list.true for successful operation, false for
failure.public boolean setLine(String text, int line)
setLine in interface VirtualInterfacesetLine in class VirtualControltext - The lines data in a tab separated string.line - The line to update.public boolean setFileFromList(PhantomOutputFile pFile)
setFileFromList in interface VirtualInterfacesetFileFromList in class VirtualControlpFile - The Phantom-file to write to.true for successful operation, false for
failure.public String getLine(int line)
getLine in interface VirtualInterfacegetLine in class VirtualControlline - The line to retrieve.public String[] getLineCells(int line)
line - The line to retrieve.public int getLineCount()
getLineCount in interface VirtualInterfacegetLineCount in class VirtualControlpublic PhantomCListBox getListBoxData()
public boolean deleteAll()
deleteAll in interface VirtualInterfacedeleteAll in class VirtualControltrue for successful operation, false for
failure.public boolean deleteLine(int line)
deleteLine in interface VirtualInterfacedeleteLine in class VirtualControlline - The line to delete.true for successful operation, false for
failure.public boolean setFocus()
setFocus in interface VirtualInterfacesetFocus in class VirtualControlpublic boolean setFocus(PhantomHostFieldLocation hostFieldLocation)
Set the selection to the appropriate lineOffset in
hostFieldLocation and the column according to the
hostFieldLocation.hostField.getName(). This does *not* mean
that a multiple selection list gets this line selection changed in any way.
setFocus in interface VirtualInterfacesetFocus in class VirtualControlVirtualControl.setFocus()public boolean setSelection(int line,
boolean isSelect)
setSelection in interface VirtualInterfacesetSelection in class VirtualControlline - The line on which to change the selection state.isSelect - The new selection state.true for successful operation, false for
failure.public boolean setCellFocus(int col,
int line)
public int getNextSelection(int line)
getNextSelection in interface VirtualInterfacegetNextSelection in class VirtualControlline - The line from which to start the search.public boolean setCell(int col,
int line,
String data)
setCell in interface VirtualInterfacesetCell in class VirtualControlcol - The column for the cell.line - The line for the cell.data - The data for the cell.true for successful operation, false for
failure.public String getCell(int col, int line)
getCell in interface VirtualInterfacegetCell in class VirtualControlcol - The column for the cell.line - The line for the cell.public String getCellText(int col, int line)
col - The column for the cell.line - The line for the cell.public VirtualCListBox.CellData getCellData(int col, int line, VirtualCListBox.CellData cd)
col - The column for the cell.line - The line for the cell.cd - If preallocated.public void issueAction(Transaction trans)
issueAction in class VirtualControltrans - The transaction from which the action event is extracted from.public void issueAction(int actionEvent,
Transaction trans)
actionEvent - The action event.trans - The transaction.public void setListCursor(int row,
int col)
public boolean isSelectionFieldEnable(int line)
public boolean setLineSelectionString(String text)
text - The text to write in the selection field.false.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.