org.kwb.picl.PictureLabeler Class Reference

List of all members.

Detailed Description

The PictureLabeler application. This class represents the main PictureLabeler class and the GUI frame.

Author:
Kevin Brown
Todo:
Create a final definition of the replace string macros.
Todo:
Place the config.properties file in a more platform-standard location.
Todo:
Automatically generate the file extension. Make it clear to the user that they don't need to enter it as part of the replace string.


Public Member Functions

 PictureLabeler (String applicationName)
 Constructor.
boolean populateImageList (boolean force) throws Exception
 Populate the file list with the names of the image files contained in the given path.
void applyReplaceString (boolean supressExifErrors) throws Exception
 Populate the second column of the image list using the replace string information.
void renameFiles () throws Exception
 Rename the files in the set to match the filename described by their keys.
void logMessage (String message, String type)
 Log a message to the log window and to the standard output.
void logMessage (Exception exception, String type)
 Log an exception to the log window and to the standard output.

Static Public Member Functions

static void main (String args[])
 The main function.

Public Attributes

JTextField sourceDirectoryField
JTextField targetDirectoryField

Package Functions

boolean displayDirectory (File directory)
 Display the contents of the given directory.

Classes

class  Config
 The constants for the configuration file.
class  Log
 Log message types. More...


Constructor & Destructor Documentation

org.kwb.picl.PictureLabeler.PictureLabeler ( String  applicationName  ) 

Constructor.

Create the model for the image list, read the properties file if it exists (create it with defaults if it doesn't) and create the main window.

Parameters:
applicationName The name of the application.


Member Function Documentation

void org.kwb.picl.PictureLabeler.applyReplaceString ( boolean  supressExifErrors  )  throws Exception

Populate the second column of the image list using the replace string information.

Parameters:
supressExifErrors If true, Exif errors are supressed.
Exceptions:
Exception Thrown if the file names could not be generated.

boolean org.kwb.picl.PictureLabeler.displayDirectory ( File  directory  )  [package]

Display the contents of the given directory.

If the recursive flag is set, then display all files that match the image filter within the given directory and all subdirectories.

Parameters:
directory The directory to display images from.

void org.kwb.picl.PictureLabeler.logMessage ( Exception  exception,
String  type 
)

Log an exception to the log window and to the standard output.

Parameters:
exception The exception to log.
type The type of message to log.

void org.kwb.picl.PictureLabeler.logMessage ( String  message,
String  type 
)

Log a message to the log window and to the standard output.

Parameters:
message The message to log.
type The type of message to log.
exception An exception to get stack trace information from.

static void org.kwb.picl.PictureLabeler.main ( String  args[]  )  [static]

The main function.

This starts the application.

Parameters:
args The arguments.

boolean org.kwb.picl.PictureLabeler.populateImageList ( boolean  force  )  throws Exception

Populate the file list with the names of the image files contained in the given path.

Parameters:
force Whether or not to force a refresh of the list.
Returns:
boolean True if the image list needed updating.
Exceptions:
Exception Thrown if the image list could not be populated.

void org.kwb.picl.PictureLabeler.renameFiles (  )  throws Exception

Rename the files in the set to match the filename described by their keys.

Suffix each name with a counter and the extension.

Exceptions:
Exception Thrown if a file could not be renamed.


The documentation for this class was generated from the following file: