se.entitymanager
Class GnomeSwingFileIconFactory

java.lang.Object
  extended by se.entitymanager.GnomeSwingFileIconFactory
All Implemented Interfaces:
IconFactoryInterface

public class GnomeSwingFileIconFactory
extends java.lang.Object
implements IconFactoryInterface

A IconFactoryInterface to produce icons for se.entitymanager.presentation.swing in conjunction with se.entitymanager.logic.file.

createIcon

returns icons which are instances of se.entitymanager.presentation.swing.SwingIcon.


Field Summary
private static java.lang.String DIRECTORY_ICON_NAME
          Path to icon for directories.
private  SwingIcon directoryIcon
          Icon for directories.
private static java.lang.String FILE_SYSTEM_ROOT_ICON_NAME
          Path to icon for a file system root.
private  SwingIcon fileSystemsRootIcon
          Icon for a file system root.
private static GnomeSwingFileIconFactory iconFactory
          Static instance.
private static java.lang.String REGULAR_FILE_ICON_NAME
          Path to icon for regular files.
private  SwingIcon regularFileIcon
          Icon for regular files.
private static java.lang.String ZIP_FILE_ICON_NAME
          Path to icon for zip files.
private  SwingIcon zipFileIcon
          Icon for zip files.
private static java.lang.String ZIPPED_DIRECTORY_ICON_NAME
          Path to icon for zipped directories.
private static java.lang.String ZIPPED_FILE_ICON_NAME
          Path to icon for zipped files.
private  SwingIcon zippedDirectoryIcon
          Icon for zipped directories.
private  SwingIcon zippedFileIcon
          Icon for zipped files.
 
Constructor Summary
private GnomeSwingFileIconFactory()
          Constructs a GnomeSwingFileIconFactory.
 
Method Summary
 Icon createIcon(EntityInterface entity)
          Creates an icon for the given entity.
static GnomeSwingFileIconFactory getInstance()
          Returns the instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTORY_ICON_NAME

private static final java.lang.String DIRECTORY_ICON_NAME
Path to icon for directories.

See Also:
Constant Field Values

FILE_SYSTEM_ROOT_ICON_NAME

private static final java.lang.String FILE_SYSTEM_ROOT_ICON_NAME
Path to icon for a file system root.

See Also:
Constant Field Values

ZIP_FILE_ICON_NAME

private static final java.lang.String ZIP_FILE_ICON_NAME
Path to icon for zip files.

See Also:
Constant Field Values

ZIPPED_DIRECTORY_ICON_NAME

private static final java.lang.String ZIPPED_DIRECTORY_ICON_NAME
Path to icon for zipped directories.

See Also:
Constant Field Values

ZIPPED_FILE_ICON_NAME

private static final java.lang.String ZIPPED_FILE_ICON_NAME
Path to icon for zipped files.

See Also:
Constant Field Values

REGULAR_FILE_ICON_NAME

private static final java.lang.String REGULAR_FILE_ICON_NAME
Path to icon for regular files.

See Also:
Constant Field Values

iconFactory

private static GnomeSwingFileIconFactory iconFactory
Static instance.

See Also:
getInstance()

directoryIcon

private SwingIcon directoryIcon
Icon for directories.


fileSystemsRootIcon

private SwingIcon fileSystemsRootIcon
Icon for a file system root.


zipFileIcon

private SwingIcon zipFileIcon
Icon for zip files.


zippedDirectoryIcon

private SwingIcon zippedDirectoryIcon
Icon for zipped directories.


zippedFileIcon

private SwingIcon zippedFileIcon
Icon for zipped files.


regularFileIcon

private SwingIcon regularFileIcon
Icon for regular files.

Constructor Detail

GnomeSwingFileIconFactory

private GnomeSwingFileIconFactory()
Constructs a GnomeSwingFileIconFactory.

All file icons are constructed by this method.

See Also:
getInstance()
Method Detail

getInstance

public static GnomeSwingFileIconFactory getInstance()
Returns the instance.

Returns:
instance.

createIcon

public Icon createIcon(EntityInterface entity)
Description copied from interface: IconFactoryInterface
Creates an icon for the given entity.

Specified by:
createIcon in interface IconFactoryInterface
Parameters:
entity - the entity
Returns:
an icon for the entity