|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd._2009.xml.types.XLptsDriverInterfaceType
com.lapetus_ltd.api.db.xml.types.TLptsDriverInterfaceType
public class TLptsDriverInterfaceType
Class Description : Stores the functions and parameters of a configured driver interface.
This class is the wrapper for the XLptsDriverInterfaceType.
It is used by TLptsDriverLoaderType
to store the information for the functions and parameters that
make up the interface of the driver to the GUI and application.
This information is stored in the xml file called driver.loader.xml, which is loaded at startup.
The driver information is used by the connection class TLptsConnection to initiate a connection.
$LastChangedRevision: 1190 $
$LastChangedDate:: 2010-11-17 13:21:35#$
Field Summary |
---|
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsDriverInterfaceType |
---|
functionName, parameterListItem, title |
Constructor Summary | |
---|---|
TLptsDriverInterfaceType()
Constructs the interface type, XLptsDriverInterfaceType. |
|
TLptsDriverInterfaceType(XLptsDriverInterfaceType driverInterfaceType)
Copies the information from another XLptsDriverInterfaceType, including all functions and parameters. |
Method Summary | |
---|---|
void |
addParameterListItem(XLptsFunctionParameterType functionParameterType)
Adds the function and parameter information to the interface. |
boolean |
equals(java.lang.Object obj)
Check for equal TLptsDriverInterfaceType objects. |
java.util.List<XLptsFunctionParameterType> |
getParameterListItem()
Gets a copy of the function parameter list. |
int |
getParameterListItemSize()
Returns the size of the actual list. |
void |
removeParameterListItem(XLptsFunctionParameterType functionParameterType)
Removes the function and parameter information from the interface. |
Methods inherited from class com.lapetus_ltd._2009.xml.types.XLptsDriverInterfaceType |
---|
getFunctionName, getTitle, setFunctionName, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsDriverInterfaceType()
Constructs the interface type, XLptsDriverInterfaceType.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Notes : Default Constructor set title and functionName as empty string, and initialize the parameter list.TLptsDriverType driverItem = new TLptsDriverType(); TLptsDriverInterfaceType driverInterfaceType = new TLptsDriverInterfaceType(); driverInterfaceType.setTitle("ServerName"); driverInterfaceType.setFunctionName("setServerName"); TLptsFunctionParameterType functionParameterType = new TLptsFunctionParameterType(); functionParameterType.setName("Server Name"); functionParameterType.setType(XLptsProgramParameterType.STRING); functionParameterType.setValue("192.168.1.2"); driverInterfaceType.addParameterListItem(functionParameterType); driverItem.addInterfaceListItem(driverInterfaceType);
public TLptsDriverInterfaceType(XLptsDriverInterfaceType driverInterfaceType)
Copies the information from another XLptsDriverInterfaceType, including all functions and parameters.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Notes : Use this Constructor to set TLptsDriverInterfaceType from another XLptsDriverInterfaceType"TLptsDriverType driverItem = new TLptsDriverType(); TLptsDriverInterfaceType driverInterfaceType = new TLptsDriverInterfaceType(); driverInterfaceType.setTitle("ServerName"); driverInterfaceType.setFunctionName("setServerName"); TLptsFunctionParameterType functionParameterType = new TLptsFunctionParameterType(); functionParameterType.setName("Server Name"); functionParameterType.setType(XLptsProgramParameterType.STRING); functionParameterType.setValue("192.168.1.2"); driverInterfaceType.addParameterListItem(functionParameterType); driverItem.addInterfaceListItem(driverInterfaceType);
driverInterfaceType
- The driver interface type to copy.Method Detail |
---|
public void addParameterListItem(XLptsFunctionParameterType functionParameterType)
Adds the function and parameter information to the interface.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to add to the list. Getting the list with getParameterListItem andTLptsDriverType driverItem = new TLptsDriverType(); TLptsDriverInterfaceType driverInterfaceType = new TLptsDriverInterfaceType(); driverInterfaceType.setTitle("ServerName"); driverInterfaceType.setFunctionName("setServerName"); TLptsFunctionParameterType functionParameterType = new TLptsFunctionParameterType(); functionParameterType.setName("Server Name"); functionParameterType.setType(XLptsProgramParameterType.STRING); functionParameterType.setValue("192.168.1.2"); driverInterfaceType.addParameterListItem(functionParameterType); driverItem.addInterfaceListItem(driverInterfaceType);
functionParameterType
- the function parameter type to add in list.public boolean equals(java.lang.Object obj)
Check for equal TLptsDriverInterfaceType objects.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to compare two TLptsDriverInterfaceType objects by title and functionName. Example :
equals
in class java.lang.Object
obj
- the driver interface type
public java.util.List<XLptsFunctionParameterType> getParameterListItem()
Gets a copy of the function parameter list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Always returns a list, but it may be empty. Notes : Do not use the result to add to this list. ie. getParameterListItem().add(xxx);public void setCombos(TLptsDriverInterfaceType dit) { if(dit.getParameterListItemSize()>0) for (XLptsFunctionParameterType fpt : dit.getParameterListItem()) { comboName.addItem(fpt.getName()); comboType.addItem(fpt.getType()); comboValue.addItem(fpt.getValue()); } } public void deleteButtonActionPerformed() { if(dit.getParameterListItemSize()>0) for (XLptsFunctionParameterType fpt : dit.getParameterListItem()) { if(fpt.getName().equals(comboName.getSelecteditem().toString())) { dit.removeParameterListItem(fpt); break; } } }
getParameterListItem
in class XLptsDriverInterfaceType
public int getParameterListItemSize()
Returns the size of the actual list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. The result may be an empty list. Notes : Do not use getParameterListItem().size() as it is not efficient. Example :public void setCombos(TLptsDriverInterfaceType dit) { if(dit.getParameterListItemSize()>0) for (XLptsFunctionParameterType fpt : dit.getParameterListItem()) { comboName.addItem(fpt.getName()); comboType.addItem(fpt.getType()); comboValue.addItem(fpt.getValue()); } } public void deleteButtonActionPerformed() { if(dit.getParameterListItemSize()>0) for (XLptsFunctionParameterType fpt : dit.getParameterListItem()) { if(fpt.getName().equals(comboName.getSelecteditem().toString())) { dit.removeParameterListItem(fpt); break; } } }
public void removeParameterListItem(XLptsFunctionParameterType functionParameterType)
Removes the function and parameter information from the interface.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to remove from the list. Getting the list with getParameterListItem andpublic void setCombos(TLptsDriverInterfaceType dit) { if(dit.getParameterListItemSize()>0) for (XLptsFunctionParameterType fpt : dit.getParameterListItem()) { comboName.addItem(fpt.getName()); comboType.addItem(fpt.getType()); comboValue.addItem(fpt.getValue()); } } public void deleteButtonActionPerformed() { if(dit.getParameterListItemSize()>0) for (XLptsFunctionParameterType fpt : dit.getParameterListItem()) { if(fpt.getName().equals(comboName.getSelecteditem().toString())) { dit.removeParameterListItem(fpt); break; } } }
functionParameterType
- the function parameter type to remove from list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |