com.hungry.javacvs.client.ui
Class CVSUI

java.lang.Object
  |
  +--com.hungry.javacvs.client.ui.CVSUI
Direct Known Subclasses:
CVSText, CVSView

public class CVSUI
extends java.lang.Object
implements CVSClientListener, CVSPassListener

The CVSUI class serves as the superclass to all UI implementations of the cvs client code. It abstracts away the idea of requests (which can make the UI code extremely large) and provides the command abstraction. The UI says "perform this command" and the CVSUI class maps that command to a series of requests.


Field Summary
static int CMD_ADD
           
static int CMD_ADMIN
           
static int CMD_ANNOTATE
           
static int CMD_CHECKOUT
           
static int CMD_COMMIT
           
static int CMD_DIFF
           
static int CMD_EDIT
           
static int CMD_EDITORS
           
static int CMD_EXPORT
           
static int CMD_HISTORY
           
static int CMD_IMPORT
           
static int CMD_INIT
           
static int CMD_LOG
           
static int CMD_LOGIN
           
static int CMD_RDIFF
           
static int CMD_RELEASE
           
static int CMD_REMOVE
           
static int CMD_RTAG
           
static int CMD_STATUS
           
static int CMD_TAG
           
static int CMD_UNEDIT
           
static int CMD_UPDATE
           
static int CMD_WATCH
           
static int CMD_WATCHERS
           
protected  javax.swing.event.EventListenerList listenerList
          our list of listeners.
protected  CVSClient m_client
          Our client thread object.
 
Constructor Summary
CVSUI()
          Creates a CVSUI object and starts a CVSClient thread
 
Method Summary
 void addCVSUIListener(CVSUIListener l)
           
 void clientEvent(CVSClientEvent e)
           
 void fireBusyStateChange(boolean busy)
           
 void fireConnectionClosed()
           
 void fireMessageText(java.lang.String text_message)
           
 void firePasswordPrompt()
           
 void fireRequestError(java.lang.String error_message)
           
 void fireStatusChange(java.lang.String status_message)
           
 void fireUIChange(CVSUIEvent e)
           
 CVSClient getClient()
           
 void passQuery(CVSPassQueryEvent e)
           
 void performCommandOnFiles(java.util.Vector cvs_params, int cvs_command, java.util.Vector command_params, java.util.Vector files)
          The main entry point used by subclasses of CVSUI.
 void removeCVSUIListener(CVSUIListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMD_ADD

public static final int CMD_ADD

CMD_ADMIN

public static final int CMD_ADMIN

CMD_ANNOTATE

public static final int CMD_ANNOTATE

CMD_CHECKOUT

public static final int CMD_CHECKOUT

CMD_COMMIT

public static final int CMD_COMMIT

CMD_DIFF

public static final int CMD_DIFF

CMD_EDIT

public static final int CMD_EDIT

CMD_EDITORS

public static final int CMD_EDITORS

CMD_HISTORY

public static final int CMD_HISTORY

CMD_IMPORT

public static final int CMD_IMPORT

CMD_EXPORT

public static final int CMD_EXPORT

CMD_INIT

public static final int CMD_INIT

CMD_LOG

public static final int CMD_LOG

CMD_LOGIN

public static final int CMD_LOGIN

CMD_RDIFF

public static final int CMD_RDIFF

CMD_RELEASE

public static final int CMD_RELEASE

CMD_REMOVE

public static final int CMD_REMOVE

CMD_STATUS

public static final int CMD_STATUS

CMD_TAG

public static final int CMD_TAG

CMD_UNEDIT

public static final int CMD_UNEDIT

CMD_RTAG

public static final int CMD_RTAG

CMD_UPDATE

public static final int CMD_UPDATE

CMD_WATCH

public static final int CMD_WATCH

CMD_WATCHERS

public static final int CMD_WATCHERS

m_client

protected CVSClient m_client
Our client thread object.

listenerList

protected javax.swing.event.EventListenerList listenerList
our list of listeners.
Constructor Detail

CVSUI

public CVSUI()
Creates a CVSUI object and starts a CVSClient thread
Method Detail

clientEvent

public void clientEvent(CVSClientEvent e)
Specified by:
clientEvent in interface CVSClientListener

passQuery

public void passQuery(CVSPassQueryEvent e)
Specified by:
passQuery in interface CVSPassListener

performCommandOnFiles

public void performCommandOnFiles(java.util.Vector cvs_params,
                                  int cvs_command,
                                  java.util.Vector command_params,
                                  java.util.Vector files)
The main entry point used by subclasses of CVSUI.
Parameters:
cvs_params - The parameters to the client. These normally appear on the left of the command in the TTY client.
cvs_command - One of the constants CMD_*.
command_params - The parameters to the command. These normally appear on the right of the command in the TTY client.
files - an array of java.lang.Strings representing the filenames being operated on.

getClient

public CVSClient getClient()

fireBusyStateChange

public void fireBusyStateChange(boolean busy)

fireMessageText

public void fireMessageText(java.lang.String text_message)

fireStatusChange

public void fireStatusChange(java.lang.String status_message)

firePasswordPrompt

public void firePasswordPrompt()

fireRequestError

public void fireRequestError(java.lang.String error_message)

fireConnectionClosed

public void fireConnectionClosed()

fireUIChange

public void fireUIChange(CVSUIEvent e)

addCVSUIListener

public void addCVSUIListener(CVSUIListener l)

removeCVSUIListener

public void removeCVSUIListener(CVSUIListener l)