jgGlyphs
Class GlyphImage

java.lang.Object
  extended byjgGlyphs.GlyphImage

public class GlyphImage
extends java.lang.Object

This class breaks down a filename into its basic parts. The glyph is the prefix: either the string up to the first drop ("_") if one exists in the filename, or the first Character otherwise. The name is the normalized name: if the glyph is a multi-Character prefix, this (and the following drop) is removed; the extension is also removed. The loc (location) is the full pathspec.


Field Summary
protected  java.io.File loc
          This is the full pathspec to the image
 
Constructor Summary
GlyphImage(java.io.File file)
          Constructor, specifies the File location
 
Method Summary
 boolean equalsNameOf(GlyphImage gi)
          This is a convenience wrapper for the static class method.
static boolean equalsNameOf(GlyphImage orange, GlyphImage apple)
          Compares the names of two GlyphImages to see if they are equal.
 java.lang.String getGlyph()
          This is a convenience wrapper for the static class method.
static java.lang.String getGlyph(java.io.File file)
          Returns the glyph that this image pertains to, lowercased if applicable.
 java.io.File getLocation()
          Returns the location of this image.
 java.lang.String getMarkupLabel()
          This is a convenience wrapper for the static class method.
static java.lang.String getMarkupName(GlyphImage gi)
          Gets the name of the image, marking up the name using html.
 java.lang.String getName()
          This is a convenience wrapper for the static class method.
static java.lang.String getName(java.io.File file)
          Returns the normalized name.
 java.lang.String toString()
          Returns the string representation of this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

loc

protected java.io.File loc
This is the full pathspec to the image

Constructor Detail

GlyphImage

public GlyphImage(java.io.File file)
Constructor, specifies the File location

Method Detail

toString

public java.lang.String toString()
Returns the string representation of this class


getGlyph

public java.lang.String getGlyph()
This is a convenience wrapper for the static class method. Returns the glyph that this image pertains to, lowercased if applicable. This is either the starting Character (as a String) if the filename does not contain any drops, or the starting String up to but not including the drop.

Returns:
a String representing the glyph that this image pertains to.

getGlyph

public static java.lang.String getGlyph(java.io.File file)
Returns the glyph that this image pertains to, lowercased if applicable. This is either the starting Character (as a String) if the filename does not contain any drops, or the starting String up to but not including the drop.

Returns:
a String representing the glyph that this image pertains to.

getName

public java.lang.String getName()
This is a convenience wrapper for the static class method. Returns the normalized name. This is the name of the file, lowercased if applicable, with the multi-Character prefix removed (if applicable) and the extension removed.

Returns:
the normallized name as a String

getName

public static java.lang.String getName(java.io.File file)
Returns the normalized name. This is the name of the file, lowercased if applicable, with the multi-Character prefix removed (if applicable) and the extension removed.

Returns:
the normallized name as a String

getLocation

public java.io.File getLocation()
Returns the location of this image.

Returns:
the location of this image as a File.

equalsNameOf

public boolean equalsNameOf(GlyphImage gi)
This is a convenience wrapper for the static class method. Compares the names of two GlyphImages to see tifthey are equal.

Parameters:
gi - a GlyphImage to compare names with
Returns:
true if both names are equal, false otherwise.

equalsNameOf

public static boolean equalsNameOf(GlyphImage orange,
                                   GlyphImage apple)
Compares the names of two GlyphImages to see if they are equal.

Parameters:
orange - a GlyphImage
apple - another GlyphImage
Returns:
true if both names are equal, false otherwise.

getMarkupName

public static java.lang.String getMarkupName(GlyphImage gi)
Gets the name of the image, marking up the name using html.

Returns:
the html marked up name

getMarkupLabel

public java.lang.String getMarkupLabel()
This is a convenience wrapper for the static class method. Gets the name of the image, marking up the name using html.

Returns:
the html marked up name