Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.text.rtf
Class ControlWordToken  view ControlWordToken download ControlWordToken.java

java.lang.Object
  extended byjavax.swing.text.rtf.Token
      extended byjavax.swing.text.rtf.ControlWordToken

class ControlWordToken
extends Token

A special Token that represents a control word in RTF like '\deff0' where 'deff' is the name of the control word and '0' is an optional parameter.


Field Summary
static int CONTROL_WORD
          A control word like '\rtf1'.
static int EOF
          This special type inidicates the end of the input stream.
static int LCURLY
          A left curly brace '{'.
 java.lang.String name
          The name of the control word.
 int param
          The optional parameter of the control word.
static int RCURLY
          A right curly brace '}'.
static int TEXT
          A token that contains text.
 int type
          The token type.
 
Constructor Summary
ControlWordToken(java.lang.String name)
          Constructs a new ControlWordToken with the specified name and without a parameter.
ControlWordToken(java.lang.String name, int param)
          Constructs a new ControlWordToken with the specified name and parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of the control word.


param

public int param
The optional parameter of the control word. Absence of a parameter is expressed through Integer.MIN_VALUE.


EOF

public static final int EOF
This special type inidicates the end of the input stream.

See Also:
Constant Field Values

LCURLY

public static final int LCURLY
A left curly brace '{'.

See Also:
Constant Field Values

RCURLY

public static final int RCURLY
A right curly brace '}'.

See Also:
Constant Field Values

CONTROL_WORD

public static final int CONTROL_WORD
A control word like '\rtf1'. Tokens with this type are represented through the subclass ControlWordToken.

See Also:
Constant Field Values

TEXT

public static final int TEXT
A token that contains text. This is represented through the subclass TextToken.

See Also:
Constant Field Values

type

public int type
The token type.

Constructor Detail

ControlWordToken

public ControlWordToken(java.lang.String name)
Constructs a new ControlWordToken with the specified name and without a parameter.


ControlWordToken

public ControlWordToken(java.lang.String name,
                        int param)
Constructs a new ControlWordToken with the specified name and parameter.