ghm.follow
Class FollowApp

java.lang.Object
  extended by ghm.follow.FollowApp

public class FollowApp
extends java.lang.Object

This class' main() method is the entry point into the Follow application.

Author:
Greg Merrill
See Also:
main(String[])

Field Summary
static boolean DEBUG
           
static java.lang.String FILE_SEPARATOR
           
static boolean HAS_SOLARIS_BUG
           
static java.lang.String MESSAGE_LINE_SEPARATOR
           
 
Method Summary
static void centerWindowInScreen(java.awt.Window window)
           
 void closeFile()
          Close the current tab
 void disableDragAndDrop(java.awt.Component c)
           
 void enableDragAndDrop(java.awt.Component c)
           
 FollowAppAction getAction(java.lang.String name)
           
 java.util.HashMap<java.lang.String,FollowAppAction> getActions()
          Get all actions associated to the application
 java.util.List<FileFollowingPane> getAllFileFollowingPanes()
           
 FollowAppAttributes getAttributes()
           
 java.util.Map<java.io.File,FileFollowingPane> getFileToFollowingPaneMap()
           
 javax.swing.JFrame getFrame()
           
static javax.swing.ImageIcon getIcon(java.lang.Class<?> clazz, java.lang.String iconNameKey)
          Gets an image icon from the resource path.
static FollowApp getInstance()
           
static java.lang.String getResourceString(java.lang.String key)
          Get a string from the resource bundle.
 FileFollowingPane getSelectedFileFollowingPane()
           
 SystemInterface getSystemInterface()
           
 javax.swing.JTabbedPane getTabbedPane()
           
static void main(java.lang.String[] args)
          Invoke this method to start the Follow application.
 void openFile(java.io.File file)
           
 void putAction(java.lang.String name, FollowAppAction action)
          Set an action to the action map of the application.
 void setCursor(int cursorType)
          Warning: This method should be called only from the event dispatching thread.
 void setSystemInterface(SystemInterface systemInterface)
           
 void show()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_SEPARATOR

public static final java.lang.String FILE_SEPARATOR

MESSAGE_LINE_SEPARATOR

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

DEBUG

public static final boolean DEBUG

HAS_SOLARIS_BUG

public static boolean HAS_SOLARIS_BUG
Method Detail

closeFile

public void closeFile()
Close the current tab


getResourceString

public static java.lang.String getResourceString(java.lang.String key)
Get a string from the resource bundle. Convenience method to shorten and centralize this common call

Parameters:
key -
Returns:
The value of key in the resource bundle. null if the key is not found.

getIcon

public static javax.swing.ImageIcon getIcon(java.lang.Class<?> clazz,
                                            java.lang.String iconNameKey)
Gets an image icon from the resource path.

Parameters:
clazz - The class to use as an entry point to the resource path. Image path should be relative to this class.
iconNameKey - The resource key name where the image is defined.
Returns:
An image icon based on the URL generated from the value of iconNameKey. null if no URL can be found.

show

public void show()

getAction

public FollowAppAction getAction(java.lang.String name)

getActions

public java.util.HashMap<java.lang.String,FollowAppAction> getActions()
Get all actions associated to the application

Returns:

putAction

public void putAction(java.lang.String name,
                      FollowAppAction action)
Set an action to the action map of the application.

Parameters:
name - The key to set the action to.
action - The action to create an association for.

openFile

public void openFile(java.io.File file)
              throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

setCursor

public void setCursor(int cursorType)
Warning: This method should be called only from the event dispatching thread.

Parameters:
cursorType - may be Cursor.DEFAULT_CURSOR or Cursor.WAIT_CURSOR

enableDragAndDrop

public void enableDragAndDrop(java.awt.Component c)

disableDragAndDrop

public void disableDragAndDrop(java.awt.Component c)

getSelectedFileFollowingPane

public FileFollowingPane getSelectedFileFollowingPane()

getAllFileFollowingPanes

public java.util.List<FileFollowingPane> getAllFileFollowingPanes()

getAttributes

public FollowAppAttributes getAttributes()

getFileToFollowingPaneMap

public java.util.Map<java.io.File,FileFollowingPane> getFileToFollowingPaneMap()

getFrame

public javax.swing.JFrame getFrame()

getInstance

public static FollowApp getInstance()

getSystemInterface

public SystemInterface getSystemInterface()

setSystemInterface

public void setSystemInterface(SystemInterface systemInterface)

getTabbedPane

public javax.swing.JTabbedPane getTabbedPane()

centerWindowInScreen

public static void centerWindowInScreen(java.awt.Window window)

main

public static void main(java.lang.String[] args)
Invoke this method to start the Follow application. If any command-line arguments are passed in, they are assume to be filenames and are opened in the Follow application

Parameters:
args - files to be opened


Copyright © 2008. All Rights Reserved.