java.lang.Object
jpicedt.graphic.io.parser.AbstractRegularExpression
jpicedt.graphic.io.parser.AlternateExpression
jpicedt.format.pstricks.parser.UserDefinedColorExpression
- All Implemented Interfaces:
- jpicedt.graphic.io.parser.ExpressionConstants
- public class UserDefinedColorExpression
- extends jpicedt.graphic.io.parser.AlternateExpression
- implements jpicedt.graphic.io.parser.ExpressionConstants
Parse statement defining user-colours, that is :
- \\newgray{user-def colour name}{num} (where num is a gray scale specification b/w 0 and 1)
- \\newrgbcolor{user-def-colour-name}{num1 num2 num3} (where num are numbers b/w 0 and 1)
- \\newhsbcolor{user-def-colour-name}{num1 num2 num3} (where num are numbers b/w 0 and 1)
- \\newcmykcolor{user-def-colour-name}{num1 num2 num3 num4} (where num are numbers b/w 0 and 1)
Colour names may contain letters and numbers. Spaces are NOT allowed, except as separators b/w colour
numbers. New colours
are then added to the pool's hashtable associated with key = PstricksParser.KEY_USER_COLOURS.
- Version:
- $Id: UserDefinedColorExpression.java,v 1.2 2002/08/05 16:44:10 reynal Exp $
Fields inherited from interface jpicedt.graphic.io.parser.ExpressionConstants |
ANY_CHAR, ANY_CHAR_EOL, ANY_SIGN, AT_LEAST, AT_MOST, DEBUG, DOUBLE, EOL, EXACTLY, INTEGER, NEGATIVE, NON_NULL, POSITIVE, STRICTLY_NEGATIVE, STRICTLY_POSITIVE, WHITE_SPACES, WHITE_SPACES_OR_EOL |
pool
private jpicedt.graphic.io.parser.Pool pool
newColourName
private java.lang.String newColourName
num1
private float num1
num2
private float num2
num3
private float num3
num4
private float num4
UserDefinedColorExpression
public UserDefinedColorExpression(jpicedt.graphic.io.parser.Pool pl)
- Constructor for the UserDefinedColorExpression object
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null
, string concatenation will instead
use "null"
.
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode())
.