public class FileListContent extends Object
Constructor and Description |
---|
FileListContent(PhantomFile data,
boolean isHostConverted)
Creates the contents from a static list in a vector that is read from the PHW file
after the control (combobox and spin button) data.
|
Modifier and Type | Method and Description |
---|---|
static FileListContent |
createEmpty()
Gets an empty contents file when e.g.
|
static Vector<String> |
formatTextPrompt(Vector<String> v,
VirtualPanel panel)
Formats a vector of the original list text prompt content with
the NetPhantom text prompt standard.
|
static Vector<String> |
formatTextPrompt(Vector<String> v,
VirtualPanel panel,
Object[] isChanged)
Formats a vector of the original list text prompt content with
the NetPhantom text prompt standard.
|
static FileListContent |
getFileListContent(PhantomRuntime runtime,
String fileName)
Gets a file list content and saves it globally in a hash table.
|
String |
getFileName()
Gets the file name (or null if static inside the PHW file).
|
long |
getLastModified()
Gets the last modified time of the file.
|
Vector<String>[] |
getVectors()
Gets the two vectors for contents and host conversion.
|
boolean |
isLoaded()
Checks if the file is loaded OK.
|
void |
sortList()
Sorts the lists.
|
static Vector<String> |
sortList(Enumeration<String> e)
Sorts an enumeration of strings in alphabetical order.
|
static void |
sortList(Enumeration<String> e,
VirtualControl list)
Sorts an enumeration of strings in alphabetical order.
|
static Vector<String> |
sortList(StringTokenizer e)
Sorts an enumeration of strings in alphabetical order.
|
static void |
sortList(StringTokenizer e,
VirtualControl list)
Sorts an enumeration of strings in alphabetical order.
|
static Vector<String> |
sortList(Vector<String> vector)
Sorts the list in alphabetical order.
|
static void |
sortList(Vector<String>[] twoVectors)
Sorts the list.
|
static void |
sortList(Vector<String> vector,
VirtualControl list)
Sorts the list in alphabetical order.
|
static String |
stripEndingSpaces(String s)
Strips ending spaces from a string.
|
public FileListContent(PhantomFile data, boolean isHostConverted) throws IOException
IOException
- if an I/O error occurs.public static FileListContent createEmpty()
public String getFileName()
public long getLastModified()
public boolean isLoaded()
public static FileListContent getFileListContent(PhantomRuntime runtime, String fileName)
If the file has been modified since last call, the existing instance of FileListContent is reloaded.
If a file error occurs, an event is logged, the list will contain the string "Cannot load file: nnn" and no error is returned.
public Vector<String>[] getVectors()
public void sortList()
public static Vector<String> sortList(Vector<String> vector)
public static Vector<String> sortList(StringTokenizer e)
public static Vector<String> sortList(Enumeration<String> e)
public static void sortList(Vector<String> vector, VirtualControl list)
public static void sortList(StringTokenizer e, VirtualControl list)
public static void sortList(Enumeration<String> e, VirtualControl list)
public static void sortList(Vector<String>[] twoVectors)
public static Vector<String> formatTextPrompt(Vector<String> v, VirtualPanel panel)
public static Vector<String> formatTextPrompt(Vector<String> v, VirtualPanel panel, Object[] isChanged)
The parameter "isChanged" should be null or an Object[1] array initiated with null as Object[0]. Upon return, the Object[0] member is non-null if the text is formatted according to the panel causing the file not to be able to be cached on the client.
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.