|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.client.event.GUIContextImpl
Title: $FileName: GUIContextImpl.java$
Field Summary | |
private static GUIContext |
instance
|
Constructor Summary | |
private |
GUIContextImpl()
|
Method Summary | |
void |
displayErrorMessage(java.lang.String message)
Defaults eventThread to false . |
void |
displayErrorMessage(java.lang.String[] message)
Defaults eventThread to false . |
void |
displayErrorMessage(java.lang.String[] message,
boolean eventThread)
Displays the message in an error dialog. |
void |
displayErrorMessage(java.lang.String message,
boolean eventThread)
Displays the message in an error dialog. |
SourceVersionChecker |
getChecker(java.io.File flDirectory)
Returns a SourceVersionChecker for the specified directory. |
int |
getClientDefaultEOLType()
Gets the default EOL type for the client from AppConfig. |
ProjectTreeNode |
getCurrentTreeNode()
Returns the currently selected project tree node. |
java.lang.String |
getCurrentUserName()
Returns the currently logged in user's user name as a String. |
static GUIContext |
getInstance()
|
SJPrimaryWindow |
getMainWindow()
Returns a reference to the main GUI window. |
java.io.PrintStream |
getMessageStream()
Returns the PrintStream that prints out to the message area on the GUI. |
javax.swing.JTable |
getPrimaryTable()
Returns a reference to the file table. |
javax.swing.table.TableColumnModel |
getPrimaryTableColumnModel()
Returns the TableColumnModel of the file table. |
javax.swing.JTree |
getProjectTree()
Returns a reference to the project tree. |
java.lang.String[] |
getSelectedFileNames()
Returns names of all files selected in the file table. |
org.sourcejammer.project.view.NodeInfo |
getSelectedFileNodeInfo()
Convenience method. |
org.sourcejammer.project.view.NodeInfo[] |
getSelectedFilesNodeInfo()
Returns a NodeInfo object for each file selected in the file table. Note that NodeInfo can be case to FileNodeInfo if you need to figure out local/remote sync state. |
boolean |
hasLocalFileChanged(java.lang.String fileName,
java.io.File flTargetDir)
Returns true if the file with the name fileName in flTargetDir
has changed in the archive since that file was last downloaded to the client. |
boolean |
isConnected()
Returns true if the GUI is currently connected to an archive. |
void |
rebuildFileView()
Rebuilds the cached file tables starting at the currently selected project tree node. |
void |
rebuildFileView(boolean fromRoot)
Rebuilds the cached file tables. |
void |
selectProject(ProjectTreeNode nd)
Select the specified project in the project tree. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static GUIContext instance
Constructor Detail |
private GUIContextImpl()
Method Detail |
public static GUIContext getInstance()
public SJPrimaryWindow getMainWindow()
GUIContext
getMainWindow
in interface GUIContext
GUIContext.getMainWindow()
public javax.swing.JTree getProjectTree()
GUIContext
getProjectTree
in interface GUIContext
GUIContext.getProjectTree()
public javax.swing.JTable getPrimaryTable()
GUIContext
getPrimaryTable
in interface GUIContext
GUIContext.getPrimaryTable()
public void displayErrorMessage(java.lang.String message, boolean eventThread)
GUIContext
displayErrorMessage
in interface GUIContext
message
- -- the error message.eventThread
- -- must be true
if invoked from the eventThread,
and false otherwise. This is tricky. BEFORE_EVENT and AFTER_EVENT timing are
in the event thread. BEFORE_REQUEST_SENT and AFTER_RESPONSE_RECEIVED are
generally outside of the event thread, but not always.GUIContext.displayErrorMessage(String, boolean)
public void displayErrorMessage(java.lang.String[] message, boolean eventThread)
GUIContext
displayErrorMessage
in interface GUIContext
message
- -- the error message.eventThread
- -- must be true
if invoked from the eventThread,
and false otherwise. This is tricky. BEFORE_EVENT and AFTER_EVENT timing are
in the event thread. BEFORE_REQUEST_SENT and AFTER_RESPONSE_RECEIVED are
generally outside of the event thread, but not always.GUIContext.displayErrorMessage(String[], boolean)
public void displayErrorMessage(java.lang.String[] message)
GUIContext
false
.
displayErrorMessage
in interface GUIContext
GUIContext.displayErrorMessage(String[])
public void displayErrorMessage(java.lang.String message)
GUIContext
false
.
displayErrorMessage
in interface GUIContext
GUIContext.displayErrorMessage(String)
public void selectProject(ProjectTreeNode nd)
GUIContext
selectProject
in interface GUIContext
GUIContext.selectProject(ProjectTreeNode)
public boolean isConnected()
GUIContext
true
if the GUI is currently connected to an archive.
isConnected
in interface GUIContext
GUIContext.isConnected()
public SourceVersionChecker getChecker(java.io.File flDirectory) throws java.io.IOException
GUIContext
getChecker
in interface GUIContext
java.io.IOException
GUIContext.getChecker(File)
public int getClientDefaultEOLType()
GUIContext
getClientDefaultEOLType
in interface GUIContext
GUIContext.getClientDefaultEOLType()
public java.io.PrintStream getMessageStream()
GUIContext
getMessageStream
in interface GUIContext
GUIContext.getMessageStream()
public ProjectTreeNode getCurrentTreeNode()
GUIContext
getCurrentTreeNode
in interface GUIContext
GUIContext.getCurrentTreeNode()
public java.lang.String getCurrentUserName()
GUIContext
getCurrentUserName
in interface GUIContext
GUIContext.getCurrentUserName()
public javax.swing.table.TableColumnModel getPrimaryTableColumnModel()
GUIContext
getPrimaryTableColumnModel
in interface GUIContext
GUIContext.getPrimaryTableColumnModel()
public java.lang.String[] getSelectedFileNames()
GUIContext
getSelectedFileNames
in interface GUIContext
GUIContext.getSelectedFileNames()
public org.sourcejammer.project.view.NodeInfo getSelectedFileNodeInfo()
GUIContext
getSelectedFileNodeInfo
in interface GUIContext
GUIContext.getSelectedFileNodeInfo()
public org.sourcejammer.project.view.NodeInfo[] getSelectedFilesNodeInfo()
GUIContext
getSelectedFilesNodeInfo
in interface GUIContext
GUIContext.getSelectedFilesNodeInfo()
public boolean hasLocalFileChanged(java.lang.String fileName, java.io.File flTargetDir) throws java.io.IOException
GUIContext
true
if the file with the name fileName in flTargetDir
has changed in the archive since that file was last downloaded to the client.
hasLocalFileChanged
in interface GUIContext
java.io.IOException
GUIContext.hasLocalFileChanged(String, File)
public void rebuildFileView() throws org.sourcejammer.project.NodeExistsException, java.io.IOException
GUIContext
rebuildFileView
in interface GUIContext
org.sourcejammer.project.NodeExistsException
java.io.IOException
GUIContext.rebuildFileView()
public void rebuildFileView(boolean fromRoot) throws org.sourcejammer.project.NodeExistsException, java.io.IOException
GUIContext
rebuildFileView
in interface GUIContext
fromRoot
- -- if true
starts rebuilding from archive root
project.
org.sourcejammer.project.NodeExistsException
java.io.IOException
GUIContext.rebuildFileView(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |