miSim

misim.editor
Class TokenWhitespace

java.lang.Object
  |
  +--misim.editor.Token
        |
        +--misim.editor.TokenWhitespace
All Implemented Interfaces:
java.lang.Cloneable

public class TokenWhitespace
extends Token


Fields inherited from class misim.editor.Token
display, text, TYPE_ALIAS, TYPE_COLON, TYPE_COMMA, TYPE_COMMAND, TYPE_COMMENT, TYPE_INSTRUCTION, TYPE_LISTING, TYPE_NUMBER, TYPE_OPERATOR, TYPE_STRING, TYPE_TOKEN, TYPE_WHITESPACE
 
Constructor Summary
TokenWhitespace(java.lang.String text, EditorPrefs prefs)
           
 
Method Summary
static Token consume(Token aToken, int start)
          Parsing method - to be implemented by subclasses.
 void draw(java.awt.Graphics g, int x, int y)
          Whitespace is invisible..
static java.lang.String getDelimiters()
           
 
Methods inherited from class misim.editor.Token
clone, draw, drawChars, getColour, getColumn, getLength, getPixelPos, getPrefs, getType, getValue, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenWhitespace

public TokenWhitespace(java.lang.String text,
                       EditorPrefs prefs)
Method Detail

getDelimiters

public static java.lang.String getDelimiters()

consume

public static Token consume(Token aToken,
                            int start)
Parsing method - to be implemented by subclasses. Build a new token based on as much of the given token as possible, starting at the given index. The method may return null if the text is not appropriate for this token type.
Parameters:
aToken - The token to consume
start - The start index
Returns:
A new token, or null

draw

public void draw(java.awt.Graphics g,
                 int x,
                 int y)
Whitespace is invisible.. so don't draw anything

miSim