com.lightdev.app.filemanager
Class FileManager

java.lang.Object
  extended by com.lightdev.app.filemanager.FileManager
All Implemented Interfaces:
FileSystemListener, WindowListener, EventListener, InternalFrameListener

public class FileManager
extends Object
implements WindowListener, InternalFrameListener, FileSystemListener

The Light Development File Manager application class.

Version:
2, 19.09.2008
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Field Summary
static String ACTION_ABOUT_APP
          action name constant
static String ACTION_EDIT_PREFS
          action name constant
static String ACTION_HELP_CONTENTS
          action name constant
static String ACTION_OPEN_LOCAL_FILE_FRAME
          action name constant
static String ACTION_OPEN_PARENT_FOLDER
          action name constant
static String ACTION_OPEN_REMOTE_FILE_FRAME
          action name constant
static String ACTION_QUIT
          action name constant
static String ACTION_TEST
          action name constant
static FileActions fileActionProvider
          a central place for file actions shared with other parts of the application
protected static Logger logger
          logger for this Application
static String PK_LAF_CLASS_NAME
          preferences key constant
static FileTransferHandler transferHandler
          the file transfer handler
 
Constructor Summary
FileManager(Level level)
          create a new instance of class FileManager
 
Method Summary
 void contentChanged(FileSystemEvent event)
           
 void internalFrameActivated(InternalFrameEvent e)
          needed for implementation of InternalFrameListener, unused here
 void internalFrameClosed(InternalFrameEvent e)
          needed for implementation of InternalFrameListener, unused here
 void internalFrameClosing(InternalFrameEvent e)
          initiate application specific handling in case an internal frame is closed, e.g. logout probably existing TREC clients, etc.
 void internalFrameDeactivated(InternalFrameEvent e)
          needed for implementation of InternalFrameListener, unused here
 void internalFrameDeiconified(InternalFrameEvent e)
          needed for implementation of InternalFrameListener, unused here
 void internalFrameIconified(InternalFrameEvent e)
          needed for implementation of InternalFrameListener, unused here
 void internalFrameOpened(InternalFrameEvent e)
          needed for implementation of InternalFrameListener, unused here
static void log(String msg, Class source, Level level)
          log an information message
static void logStackTrace(Throwable ex, Class source)
          log an exception by writing the stack trace to the log as a warning
static void main(String[] args)
          application entry point
 void windowActivated(WindowEvent e)
          needed for implementation of WindowListener, unused here
 void windowClosed(WindowEvent e)
          needed for implementation of WindowListener, unused here
 void windowClosing(WindowEvent e)
          initiate application specific handling of closing the main application frame, e.g. close open connections, etc.
 void windowDeactivated(WindowEvent e)
          needed for implementation of WindowListener, unused here
 void windowDeiconified(WindowEvent e)
          needed for implementation of WindowListener, unused here
 void windowIconified(WindowEvent e)
          needed for implementation of WindowListener, unused here
 void windowOpened(WindowEvent e)
          needed for implementation of WindowListener, unused here
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static Logger logger
logger for this Application


transferHandler

public static final FileTransferHandler transferHandler
the file transfer handler


fileActionProvider

public static FileActions fileActionProvider
a central place for file actions shared with other parts of the application


ACTION_QUIT

public static final String ACTION_QUIT
action name constant

See Also:
Constant Field Values

ACTION_OPEN_LOCAL_FILE_FRAME

public static final String ACTION_OPEN_LOCAL_FILE_FRAME
action name constant

See Also:
Constant Field Values

ACTION_OPEN_REMOTE_FILE_FRAME

public static final String ACTION_OPEN_REMOTE_FILE_FRAME
action name constant

See Also:
Constant Field Values

ACTION_OPEN_PARENT_FOLDER

public static final String ACTION_OPEN_PARENT_FOLDER
action name constant

See Also:
Constant Field Values

ACTION_HELP_CONTENTS

public static final String ACTION_HELP_CONTENTS
action name constant

See Also:
Constant Field Values

ACTION_ABOUT_APP

public static final String ACTION_ABOUT_APP
action name constant

See Also:
Constant Field Values

ACTION_TEST

public static final String ACTION_TEST
action name constant

See Also:
Constant Field Values

ACTION_EDIT_PREFS

public static final String ACTION_EDIT_PREFS
action name constant

See Also:
Constant Field Values

PK_LAF_CLASS_NAME

public static final String PK_LAF_CLASS_NAME
preferences key constant

See Also:
Constant Field Values
Constructor Detail

FileManager

public FileManager(Level level)
create a new instance of class FileManager

Parameters:
level - the log level to use
Method Detail

main

public static void main(String[] args)
application entry point

Parameters:
args - command line arguments, recognised is -loglevel [level] with [level] being one of "all", "severe", "warning", "info", "fine", "finer", "finest", "off"; "info" is used when omitted or invalid

log

public static void log(String msg,
                       Class source,
                       Level level)
log an information message

Parameters:
msg - the message string
source - Class the class that logged this message
level - Level the log level the message has

logStackTrace

public static void logStackTrace(Throwable ex,
                                 Class source)
log an exception by writing the stack trace to the log as a warning

Parameters:
ex - the exception to log the stack trace for
source - Class the class the error came from

windowClosing

public void windowClosing(WindowEvent e)
initiate application specific handling of closing the main application frame, e.g. close open connections, etc.

Specified by:
windowClosing in interface WindowListener

windowActivated

public void windowActivated(WindowEvent e)
needed for implementation of WindowListener, unused here

Specified by:
windowActivated in interface WindowListener

windowClosed

public void windowClosed(WindowEvent e)
needed for implementation of WindowListener, unused here

Specified by:
windowClosed in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent e)
needed for implementation of WindowListener, unused here

Specified by:
windowDeactivated in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent e)
needed for implementation of WindowListener, unused here

Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
needed for implementation of WindowListener, unused here

Specified by:
windowIconified in interface WindowListener

windowOpened

public void windowOpened(WindowEvent e)
needed for implementation of WindowListener, unused here

Specified by:
windowOpened in interface WindowListener

internalFrameClosing

public void internalFrameClosing(InternalFrameEvent e)
initiate application specific handling in case an internal frame is closed, e.g. logout probably existing TREC clients, etc.

Specified by:
internalFrameClosing in interface InternalFrameListener

internalFrameActivated

public void internalFrameActivated(InternalFrameEvent e)
needed for implementation of InternalFrameListener, unused here

Specified by:
internalFrameActivated in interface InternalFrameListener

internalFrameClosed

public void internalFrameClosed(InternalFrameEvent e)
needed for implementation of InternalFrameListener, unused here

Specified by:
internalFrameClosed in interface InternalFrameListener

internalFrameDeactivated

public void internalFrameDeactivated(InternalFrameEvent e)
needed for implementation of InternalFrameListener, unused here

Specified by:
internalFrameDeactivated in interface InternalFrameListener

internalFrameDeiconified

public void internalFrameDeiconified(InternalFrameEvent e)
needed for implementation of InternalFrameListener, unused here

Specified by:
internalFrameDeiconified in interface InternalFrameListener

internalFrameIconified

public void internalFrameIconified(InternalFrameEvent e)
needed for implementation of InternalFrameListener, unused here

Specified by:
internalFrameIconified in interface InternalFrameListener

internalFrameOpened

public void internalFrameOpened(InternalFrameEvent e)
needed for implementation of InternalFrameListener, unused here

Specified by:
internalFrameOpened in interface InternalFrameListener

contentChanged

public void contentChanged(FileSystemEvent event)
Specified by:
contentChanged in interface FileSystemListener