org.sourcejammer.client
Class SourceJammerClient

java.lang.Object
  |
  +--org.sourcejammer.client.SourceJammerClient

public class SourceJammerClient
extends java.lang.Object

Title: $FileName: SourceJammerClient.java$

Version:
$VerNum: 19$
Author:
$AuthorName: Rob MacGrogan$

$Description: $
$KeyWordsOff: $

Nested Class Summary
static class SourceJammerClient.ConfXMLNodes
           
 
Field Summary
private  java.awt.Color addedColor
           
static java.lang.String BOLD
           
static java.lang.String BOLDITALIC
           
private static java.lang.String CONF_FILE
           
private  java.io.File confFile
           
private  char[] defaultEndOfLine
           
private  int defaultEOLType
           
private  int defaultFileType
           
private  java.awt.Color deletedColor
           
private  java.lang.String displayTextPropertiesFileName
           
private  java.lang.String fileDialogType
           
private  FileEventListenerPluginPool filePool
           
private  java.lang.String[] hideFileCommand
           
private  java.lang.String initialLookAndFeel
           
private static SourceJammerClient instance
           
static java.lang.String ITALIC
           
static java.lang.String J_FILE_CHOOSER
           
private  java.lang.String keyStoreFile
           
static java.lang.String lfa_DELETE
           
static java.lang.String lfa_GET_LATEST
           
static java.lang.String lfa_NO_SPECIAL_ACTION
           
static java.lang.String lfa_SET_READ_ONLY
           
private  java.lang.String[] makeWritableCommand
           
private  int maxFileSendChunkSize
           
private  java.awt.Color modifiedColor
           
private  java.awt.Font monoFont
           
private  java.awt.Color notInArchiveColor
           
private  java.awt.Color notInLocalColor
           
private  java.awt.Color notInSyncColor
           
private  java.lang.String onAddFileAction
           
private  java.lang.String onCheckInFileAction
           
private  java.lang.String onFileModifiedOnCheckin
           
private  java.lang.String onGetFileAction
           
static java.lang.String PLAIN
           
private  java.util.ArrayList plugins
           
private  java.lang.String[] showFileCommand
           
private  int tabSize
           
static java.lang.String TREE_FILE_DIALOG
           
static java.lang.String VERSION
           
private  int zipIfLargerThan
           
 
Constructor Summary
private SourceJammerClient()
           
 
Method Summary
private  void addAttribIfNotNull(java.lang.String attrib, java.lang.String value, org.w3c.dom.Element elm)
           
private  void colorToElement(java.awt.Color color, org.w3c.dom.Element elm)
           
private  java.lang.String commandToString(java.lang.String[] s)
           
 java.awt.Color getAddedColor()
          Returns the addedColor.
private  java.awt.Color getColorFromElement(org.w3c.dom.Element elm)
          Looks for r, g, and b attributes in elm and builds a Color based on the values.
 char[] getDefaultEndOfLine()
          Returns the defaultEndOfLine.
 int getDefaultEOLType()
          Returns the defaultEOLType.
 int getDefaultFileType()
          Returns the defaultFileType.
 java.awt.Color getDeletedColor()
          Returns the deletedColor.
 java.lang.String getDisplayTextPropertiesFileName()
          Returns the displayTextPropertiesFileName.
 java.lang.String getFileDialogType()
          Returns the fileDialogType.
 FileEventListenerPluginPool getFileListeners()
           
 FileEventListenerPluginPool getFilePool()
          Returns the filePool.
private  java.awt.Font getFontFromElement(org.w3c.dom.Element elm)
           
 java.lang.String[] getHideFileCommand()
          Returns the hideFileCommand.
 java.lang.String getInitialLookAndFeel()
          Returns the initialLookAndFeel.
static SourceJammerClient getInstance()
           
static SourceJammerClient getInstance(java.lang.String confPath)
           
 java.lang.String getKeyStoreFile()
           
 java.lang.String[] getMakeWritableCommand()
          Returns the makeWritableCommand.
 int getMaxFileSendChunkSize()
          Returns the maxFileSendChunkSize.
 java.awt.Color getModifiedColor()
          Returns the modifiedColor.
 java.awt.Font getMonoFont()
          Returns the monoFont.
 java.awt.Color getNotInArchiveColor()
          Returns the notInArchiveColor.
 java.awt.Color getNotInLocalColor()
          Returns the notInLocalColor.
 java.awt.Color getNotInSyncColor()
          Returns the notInSyncColor.
 java.lang.String getOnAddFileAction()
          Returns the onAddFileAction.
 java.lang.String getOnCheckInFileAction()
          Returns the onCheckInFileAction.
 java.lang.String getOnFileModifiedOnCheckin()
          Returns the onFileModifiedOnCheckin.
 java.lang.String getOnGetFileAction()
          Returns the onGetFileAction.
 java.util.ArrayList getPlugins()
           
 java.lang.String[] getShowFileCommand()
          Returns the showFileCommand.
 int getTabSize()
          Returns the tabSize.
 int getZipIfLargerThan()
          Returns the zipIfLargerThan.
private  void load(java.lang.String sBasePath)
           
private  void loadPlugins(org.w3c.dom.Element configRootElement)
           
 void save()
           
private  void savePlugins(org.w3c.dom.Element elmRoot)
           
 void setAddedColor(java.awt.Color addedColor)
          Sets the addedColor.
 void setDefaultEndOfLine(char[] defaultEndOfLine)
          Sets the defaultEndOfLine.
 void setDefaultEOLType(int defaultEOLType)
          Sets the defaultEOLType.
 void setDefaultFileType(int defaultFileType)
          Sets the defaultFileType.
 void setDeletedColor(java.awt.Color deletedColor)
          Sets the deletedColor.
 void setDisplayTextPropertiesFileName(java.lang.String displayTextPropertiesFileName)
          Sets the displayTextPropertiesFileName.
 void setFileDialogType(java.lang.String fileDialogType)
          Sets the fileDialogType.
 void setFilePool(FileEventListenerPluginPool filePool)
          Sets the filePool.
 void setHideFileCommand(java.lang.String[] hideFileCommand)
          Sets the hideFileCommand.
 void setInitialLookAndFeel(java.lang.String initialLookAndFeel)
          Sets the initialLookAndFeel.
 void setKeyStoreFile(java.lang.String keyStoreFile)
          Sets the keyStoreFile.
 void setMakeWritableCommand(java.lang.String[] makeWritableCommand)
          Sets the makeWritableCommand.
 void setMaxFileSendChunkSize(int maxFileSendChunkSize)
          Sets the maxFileSendChunkSize.
 void setModifiedColor(java.awt.Color modifiedColor)
          Sets the modifiedColor.
 void setMonoFont(java.awt.Font monoFont)
          Sets the monoFont.
 void setNotInArchiveColor(java.awt.Color notInArchiveColor)
          Sets the notInArchiveColor.
 void setNotInLocalColor(java.awt.Color notInLocalColor)
          Sets the notInLocalColor.
 void setNotInSyncColor(java.awt.Color notInSyncColor)
          Sets the notInSyncColor.
 void setOnAddFileAction(java.lang.String onAddFileAction)
          Sets the onAddFileAction.
 void setOnCheckInFileAction(java.lang.String onCheckInFileAction)
          Sets the onCheckInFileAction.
 void setOnFileModifiedOnCheckin(java.lang.String onFileModifiedOnCheckin)
          Sets the onFileModifiedOnCheckin.
 void setOnGetFileAction(java.lang.String onGetFileAction)
          Sets the onGetFileAction.
 void setShowFileCommand(java.lang.String[] showFileCommand)
          Sets the showFileCommand.
 void setTabSize(int tabSize)
          Sets the tabSize.
 void setZipIfLargerThan(int zipIfLargerThan)
          Sets the zipIfLargerThan.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

CONF_FILE

private static final java.lang.String CONF_FILE
See Also:
Constant Field Values

lfa_SET_READ_ONLY

public static final java.lang.String lfa_SET_READ_ONLY
See Also:
Constant Field Values

lfa_DELETE

public static final java.lang.String lfa_DELETE
See Also:
Constant Field Values

lfa_GET_LATEST

public static final java.lang.String lfa_GET_LATEST
See Also:
Constant Field Values

lfa_NO_SPECIAL_ACTION

public static final java.lang.String lfa_NO_SPECIAL_ACTION
See Also:
Constant Field Values

TREE_FILE_DIALOG

public static final java.lang.String TREE_FILE_DIALOG
See Also:
Constant Field Values

J_FILE_CHOOSER

public static final java.lang.String J_FILE_CHOOSER
See Also:
Constant Field Values

PLAIN

public static final java.lang.String PLAIN
See Also:
Constant Field Values

BOLD

public static final java.lang.String BOLD
See Also:
Constant Field Values

ITALIC

public static final java.lang.String ITALIC
See Also:
Constant Field Values

BOLDITALIC

public static final java.lang.String BOLDITALIC
See Also:
Constant Field Values

instance

private static SourceJammerClient instance

defaultEndOfLine

private char[] defaultEndOfLine

defaultFileType

private int defaultFileType

makeWritableCommand

private java.lang.String[] makeWritableCommand

zipIfLargerThan

private int zipIfLargerThan

initialLookAndFeel

private java.lang.String initialLookAndFeel

defaultEOLType

private int defaultEOLType

maxFileSendChunkSize

private int maxFileSendChunkSize

displayTextPropertiesFileName

private java.lang.String displayTextPropertiesFileName

fileDialogType

private java.lang.String fileDialogType

hideFileCommand

private java.lang.String[] hideFileCommand

showFileCommand

private java.lang.String[] showFileCommand

deletedColor

private java.awt.Color deletedColor

addedColor

private java.awt.Color addedColor

modifiedColor

private java.awt.Color modifiedColor

notInArchiveColor

private java.awt.Color notInArchiveColor

notInSyncColor

private java.awt.Color notInSyncColor

notInLocalColor

private java.awt.Color notInLocalColor

onAddFileAction

private java.lang.String onAddFileAction

onCheckInFileAction

private java.lang.String onCheckInFileAction

onGetFileAction

private java.lang.String onGetFileAction

onFileModifiedOnCheckin

private java.lang.String onFileModifiedOnCheckin

plugins

private java.util.ArrayList plugins

filePool

private FileEventListenerPluginPool filePool

monoFont

private java.awt.Font monoFont

tabSize

private int tabSize

keyStoreFile

private java.lang.String keyStoreFile

confFile

private java.io.File confFile
Constructor Detail

SourceJammerClient

private SourceJammerClient()
Method Detail

getFileListeners

public FileEventListenerPluginPool getFileListeners()

load

private void load(java.lang.String sBasePath)
           throws java.io.IOException,
                  org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException

commandToString

private java.lang.String commandToString(java.lang.String[] s)

save

public void save()
          throws javax.xml.transform.TransformerException,
                 java.io.IOException
javax.xml.transform.TransformerException
java.io.IOException

addAttribIfNotNull

private void addAttribIfNotNull(java.lang.String attrib,
                                java.lang.String value,
                                org.w3c.dom.Element elm)

colorToElement

private void colorToElement(java.awt.Color color,
                            org.w3c.dom.Element elm)

getPlugins

public java.util.ArrayList getPlugins()

loadPlugins

private void loadPlugins(org.w3c.dom.Element configRootElement)

savePlugins

private void savePlugins(org.w3c.dom.Element elmRoot)

getKeyStoreFile

public java.lang.String getKeyStoreFile()

getFontFromElement

private java.awt.Font getFontFromElement(org.w3c.dom.Element elm)

getColorFromElement

private java.awt.Color getColorFromElement(org.w3c.dom.Element elm)
Looks for r, g, and b attributes in elm and builds a Color based on the values.


getInstance

public static SourceJammerClient getInstance()

getInstance

public static SourceJammerClient getInstance(java.lang.String confPath)

getAddedColor

public java.awt.Color getAddedColor()
Returns the addedColor.

Returns:
Color

getDefaultEndOfLine

public char[] getDefaultEndOfLine()
Returns the defaultEndOfLine.

Returns:
char[]

getDefaultEOLType

public int getDefaultEOLType()
Returns the defaultEOLType.

Returns:
int

getDefaultFileType

public int getDefaultFileType()
Returns the defaultFileType.

Returns:
int

getDeletedColor

public java.awt.Color getDeletedColor()
Returns the deletedColor.

Returns:
Color

getDisplayTextPropertiesFileName

public java.lang.String getDisplayTextPropertiesFileName()
Returns the displayTextPropertiesFileName.

Returns:
String

getFileDialogType

public java.lang.String getFileDialogType()
Returns the fileDialogType.

Returns:
String

getFilePool

public FileEventListenerPluginPool getFilePool()
Returns the filePool.

Returns:
FileEventListenerPluginPool

getHideFileCommand

public java.lang.String[] getHideFileCommand()
Returns the hideFileCommand.

Returns:
String[]

getInitialLookAndFeel

public java.lang.String getInitialLookAndFeel()
Returns the initialLookAndFeel.

Returns:
String

getMakeWritableCommand

public java.lang.String[] getMakeWritableCommand()
Returns the makeWritableCommand.

Returns:
String[]

getMaxFileSendChunkSize

public int getMaxFileSendChunkSize()
Returns the maxFileSendChunkSize.

Returns:
int

getModifiedColor

public java.awt.Color getModifiedColor()
Returns the modifiedColor.

Returns:
Color

getMonoFont

public java.awt.Font getMonoFont()
Returns the monoFont.

Returns:
Font

getNotInArchiveColor

public java.awt.Color getNotInArchiveColor()
Returns the notInArchiveColor.

Returns:
Color

getNotInLocalColor

public java.awt.Color getNotInLocalColor()
Returns the notInLocalColor.

Returns:
Color

getNotInSyncColor

public java.awt.Color getNotInSyncColor()
Returns the notInSyncColor.

Returns:
Color

getOnAddFileAction

public java.lang.String getOnAddFileAction()
Returns the onAddFileAction.

Returns:
String

getOnCheckInFileAction

public java.lang.String getOnCheckInFileAction()
Returns the onCheckInFileAction.

Returns:
String

getOnFileModifiedOnCheckin

public java.lang.String getOnFileModifiedOnCheckin()
Returns the onFileModifiedOnCheckin.

Returns:
String

getOnGetFileAction

public java.lang.String getOnGetFileAction()
Returns the onGetFileAction.

Returns:
String

getShowFileCommand

public java.lang.String[] getShowFileCommand()
Returns the showFileCommand.

Returns:
String[]

getTabSize

public int getTabSize()
Returns the tabSize.

Returns:
int

getZipIfLargerThan

public int getZipIfLargerThan()
Returns the zipIfLargerThan.

Returns:
int

setAddedColor

public void setAddedColor(java.awt.Color addedColor)
Sets the addedColor.

Parameters:
addedColor - The addedColor to set

setDefaultEndOfLine

public void setDefaultEndOfLine(char[] defaultEndOfLine)
Sets the defaultEndOfLine.

Parameters:
defaultEndOfLine - The defaultEndOfLine to set

setDefaultEOLType

public void setDefaultEOLType(int defaultEOLType)
Sets the defaultEOLType.

Parameters:
defaultEOLType - The defaultEOLType to set

setDefaultFileType

public void setDefaultFileType(int defaultFileType)
Sets the defaultFileType.

Parameters:
defaultFileType - The defaultFileType to set

setDeletedColor

public void setDeletedColor(java.awt.Color deletedColor)
Sets the deletedColor.

Parameters:
deletedColor - The deletedColor to set

setDisplayTextPropertiesFileName

public void setDisplayTextPropertiesFileName(java.lang.String displayTextPropertiesFileName)
Sets the displayTextPropertiesFileName.

Parameters:
displayTextPropertiesFileName - The displayTextPropertiesFileName to set

setFileDialogType

public void setFileDialogType(java.lang.String fileDialogType)
Sets the fileDialogType.

Parameters:
fileDialogType - The fileDialogType to set

setFilePool

public void setFilePool(FileEventListenerPluginPool filePool)
Sets the filePool.

Parameters:
filePool - The filePool to set

setHideFileCommand

public void setHideFileCommand(java.lang.String[] hideFileCommand)
Sets the hideFileCommand.

Parameters:
hideFileCommand - The hideFileCommand to set

setInitialLookAndFeel

public void setInitialLookAndFeel(java.lang.String initialLookAndFeel)
Sets the initialLookAndFeel.

Parameters:
initialLookAndFeel - The initialLookAndFeel to set

setKeyStoreFile

public void setKeyStoreFile(java.lang.String keyStoreFile)
Sets the keyStoreFile.

Parameters:
keyStoreFile - The keyStoreFile to set

setMakeWritableCommand

public void setMakeWritableCommand(java.lang.String[] makeWritableCommand)
Sets the makeWritableCommand.

Parameters:
makeWritableCommand - The makeWritableCommand to set

setMaxFileSendChunkSize

public void setMaxFileSendChunkSize(int maxFileSendChunkSize)
Sets the maxFileSendChunkSize.

Parameters:
maxFileSendChunkSize - The maxFileSendChunkSize to set

setModifiedColor

public void setModifiedColor(java.awt.Color modifiedColor)
Sets the modifiedColor.

Parameters:
modifiedColor - The modifiedColor to set

setMonoFont

public void setMonoFont(java.awt.Font monoFont)
Sets the monoFont.

Parameters:
monoFont - The monoFont to set

setNotInArchiveColor

public void setNotInArchiveColor(java.awt.Color notInArchiveColor)
Sets the notInArchiveColor.

Parameters:
notInArchiveColor - The notInArchiveColor to set

setNotInLocalColor

public void setNotInLocalColor(java.awt.Color notInLocalColor)
Sets the notInLocalColor.

Parameters:
notInLocalColor - The notInLocalColor to set

setNotInSyncColor

public void setNotInSyncColor(java.awt.Color notInSyncColor)
Sets the notInSyncColor.

Parameters:
notInSyncColor - The notInSyncColor to set

setOnAddFileAction

public void setOnAddFileAction(java.lang.String onAddFileAction)
Sets the onAddFileAction.

Parameters:
onAddFileAction - The onAddFileAction to set

setOnCheckInFileAction

public void setOnCheckInFileAction(java.lang.String onCheckInFileAction)
Sets the onCheckInFileAction.

Parameters:
onCheckInFileAction - The onCheckInFileAction to set

setOnFileModifiedOnCheckin

public void setOnFileModifiedOnCheckin(java.lang.String onFileModifiedOnCheckin)
Sets the onFileModifiedOnCheckin.

Parameters:
onFileModifiedOnCheckin - The onFileModifiedOnCheckin to set

setOnGetFileAction

public void setOnGetFileAction(java.lang.String onGetFileAction)
Sets the onGetFileAction.

Parameters:
onGetFileAction - The onGetFileAction to set

setShowFileCommand

public void setShowFileCommand(java.lang.String[] showFileCommand)
Sets the showFileCommand.

Parameters:
showFileCommand - The showFileCommand to set

setTabSize

public void setTabSize(int tabSize)
Sets the tabSize.

Parameters:
tabSize - The tabSize to set

setZipIfLargerThan

public void setZipIfLargerThan(int zipIfLargerThan)
Sets the zipIfLargerThan.

Parameters:
zipIfLargerThan - The zipIfLargerThan to set


Copyright 2003 Soucejammer project.