|
TreeMap Java Library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttreemap.TMPatternFactory
public class TMPatternFactory
The TMPatternFactory is a utility to get filling patterns. It's a Singleton design pattern, and the only method of interest is get(), which take a String in parameter and return the (if existing) corresponding Paint pattern object.
The patterns are :
Launch "java treemap.TMPatternFactory" to see the differents patterns.
Constructor Summary | |
---|---|
TMPatternFactory()
Constructor. |
Method Summary | |
---|---|
java.awt.Paint |
get(java.lang.String patternName)
Returns the pattern whose name is given in parameter. |
static TMPatternFactory |
getInstance()
Returns the running instance of TMPatternFactory. |
java.util.Enumeration |
getPatternsNames()
Returns an Enumeration of patterns names. |
static void |
main(java.lang.String[] args)
Display the differents patterns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TMPatternFactory()
Method Detail |
---|
public static TMPatternFactory getInstance()
public java.awt.Paint get(java.lang.String patternName)
null.
- Parameters:
patternName
- the name of the pattern to find
- Returns:
- the desired pattern;
null
if the pattern is not found
public java.util.Enumeration getPatternsNames()
public static void main(java.lang.String[] args)
|
TreeMap Java Library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |