|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd._2009.xml.types.XLptsDBWorkspaceType
com.lapetus_ltd.api.db.xml.types.TLptsDBWorkspaceType
public class TLptsDBWorkspaceType
Class Description : This type holds the data for a workspace screen dimensions and recent project lists.
Field Summary |
---|
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsDBWorkspaceType |
---|
buttons, dateFormat, hourFormat, id, language, lastOpenedFolder, lookAndFeel, mainScreenDimensions, popupDebug, popupError, popupMessage, popupWarning, recentProjectListItem, recentProjectTempListItem, split1Location, split2Location, split3Location, split4Location, version, visibleDebug, visibleError, visibleMessage, visibleWarning |
Constructor Summary | |
---|---|
TLptsDBWorkspaceType()
This constructor initiates the Workspace dimensions, project and temp project lists. |
|
TLptsDBWorkspaceType(XLptsDBWorkspaceType workspace)
This constructor copies the workspace information from another XLptsDBWorkspaceType. |
Method Summary | |
---|---|
void |
addRecentProjectListItem(java.lang.String file)
Adds the project name to the recent project list. |
void |
addRecentProjectTempListItem(java.lang.String file)
Adds the project name to the temp recent project list. |
void |
clearRecentProjectListItem()
Clears the Recent Project list. |
void |
clearRecentProjectTempListItem()
Clears the Temp Recent Project list. |
boolean |
equals(java.lang.Object obj)
Check for equal TLptsDBWorkspaceType objects. |
java.util.List<java.lang.String> |
getRecentProjectListItem()
Returns a copy of the recent project list. |
int |
getRecentProjectListItemSize()
Returns the size of the recent project list. |
java.util.List<java.lang.String> |
getRecentProjectTempListItem()
Returns a copy of the temp list. |
int |
getRecentProjectTempListItemSize()
Returns the size of the temp list. |
void |
removeRecentProjectListItem(java.lang.String file)
Removes the project name from the recent project list. |
void |
removeRecentProjectTempListItem(java.lang.String file)
Removes the project from the temp recent project list. |
void |
setLastOpenedFolder(java.lang.String value)
This is an override of XLptsDBWorkspaceType.setLastOpenedFolder(java.lang.String) . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsDBWorkspaceType()
This constructor initiates the Workspace dimensions, project and temp project lists.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Notes : Everything in the way of dimensions is set to 0. Lists are created but empty.TLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType();
public TLptsDBWorkspaceType(XLptsDBWorkspaceType workspace)
This constructor copies the workspace information from another XLptsDBWorkspaceType.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Notes : Use this function every time you need to copy an existing XLptsDBWorkspaceType class.public void example(XLptsDBWorkspaceType workspace) { TLptsDBWorkspaceType workspaceType = new TLptsDBWorkspaceType(workspace); }
workspace
- the class object to copy.Method Detail |
---|
public void addRecentProjectListItem(java.lang.String file)
Adds the project name to the recent project list.
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 getRecentProjectListItem andTLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); String projectTitle = "C:/projects/project_title.db.prj.xml"; workspace.addRecentProjectListItem(projectTitle );
file
- the project to add in the list.public void addRecentProjectTempListItem(java.lang.String file)
Adds the project name to the temp recent project list.
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 getRecentProjectTempListItem andTLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); String tempProjectTitle = "C:/projects/temp.project_title.db.prj.xml"; workspace.addRecentProjectTempListItem(tempProjectTitle );
file
- the project to add in the list.public void clearRecentProjectListItem()
Clears the Recent Project list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to clear the list. Getting the list with getRecentProjectListItem andTLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); if(workspace.getRecentProjectListItemSize() > 0) workspace.clearRecentProjectListItem();
public void clearRecentProjectTempListItem()
Clears the Temp Recent Project list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to clear the list. Getting the list with getRecentProjectTempListItem andTLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); if(workspace.getRecentProjectTempListItemSize() > 0) workspace.clearRecentProjectTempListItem();
public boolean equals(java.lang.Object obj)
Check for equal TLptsDBWorkspaceType objects.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to compare two TLptsDBWorkspaceType objects by there id's. Example :TLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); TLptsDBWorkspaceType workspace2 = new TLptsDBWorkspaceType(); return workspace.equals(workspace2);
equals
in class java.lang.Object
obj
- the DB workspace type
public java.util.List<java.lang.String> getRecentProjectListItem()
Returns a copy of the recent project list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. The result may be an empty list. Notes : Do not add to this list as there is no result. Use the addRecentProjectListItem function. Example :TLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); String projectTitle = "C:/projects/project_title.db.prj.xml"; for(String project : workspace.getRecentProjectListItem()) if(project.equals(projectTitle)) loadProjectFromFile(project);
getRecentProjectListItem
in class XLptsDBWorkspaceType
public int getRecentProjectListItemSize()
Returns the size of the recent project list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. The result may be an empty list. Notes : Do not use getRecentProjectListItem().size() because it is less efficient. Example :TLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); if(workspace.getRecentProjectListItemSize() > 0) return true; else return false;
public java.util.List<java.lang.String> getRecentProjectTempListItem()
Returns a copy of the temp list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. The result may be an empty list. Notes : Do not add to this list as there is no result. Use the addRecentProjectTempListItem function.TLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); String tempProjectTitle = "C:/projects/temp.project_title.db.prj.xml"; for(String tempProject : workspace.getRecentProjectTempListItem()) if(tempProject.equals(tempProjectTitle)) loadProjectFromFile(tempProject);
getRecentProjectTempListItem
in class XLptsDBWorkspaceType
public int getRecentProjectTempListItemSize()
Returns the size of the temp list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. The result may be an empty list. Notes : Do not use getRecentProjectTempListItem().size() as it is not efficient. Example :TLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); if(workspace.getRecentProjectTempListItemSize() > 0) return true; else return false;
public void removeRecentProjectListItem(java.lang.String file)
Removes the project name from the recent project list.
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 getRecentProjectListItem andTLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); String projectTitle = "C:/projects/project_title.db.prj.xml"; for(String project : workspace.getRecentProjectListItem()) if(project.equals(projectTitle)) { workspace.removeRecentProjectListItem(project); break; }
file
- the project to remove from list.public void removeRecentProjectTempListItem(java.lang.String file)
Removes the project from the temp recent project list.
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 getRecentProjectTempListItem andTLptsDBWorkspaceType workspace = new TLptsDBWorkspaceType(); String tempProjectTitle = "C:/projects/temp.project_title.db.prj.xml"; for(String project : workspace.getRecentProjectTempListItem()) if(project.equals(tempProjectTitle)) { workspace.removeRecentProjectTempListItem(project); break; }
file
- the project to remove from list.public void setLastOpenedFolder(java.lang.String value)
XLptsDBWorkspaceType.setLastOpenedFolder(java.lang.String)
.
setLastOpenedFolder
in class XLptsDBWorkspaceType
value
- The last opened folder path so that we can go back to it in another session.
The string supplied here is scanned and all '\' characters are replaced by '/'.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |