edu.rice.cs.drjava.model.definitions.reducedmodel
Class HighlightStatus

java.lang.Object
  extended by edu.rice.cs.drjava.model.definitions.reducedmodel.HighlightStatus

public class HighlightStatus
extends Object

A block that represents information about the highlighting status of a particular section in the document.

Version:
$Id: HighlightStatus.java 5175 2010-01-20 08:46:32Z mgricken $

Field Summary
private  int _length
           
private  int _location
           
private  int _state
           
static int COMMENTED
           
static int DOUBLE_QUOTED
           
static int KEYWORD
           
static int NORMAL
           
static int NUMBER
           
static int SINGLE_QUOTED
           
static int TYPE
           
 
Constructor Summary
HighlightStatus(int location, int length, int state)
          Constructor.
 
Method Summary
 int getLength()
          Get the size of this coloring block.
 int getLocation()
          Get the starting location of this coloring block.
 int getState()
          Get the coloring state of this block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

COMMENTED

public static final int COMMENTED
See Also:
Constant Field Values

SINGLE_QUOTED

public static final int SINGLE_QUOTED
See Also:
Constant Field Values

DOUBLE_QUOTED

public static final int DOUBLE_QUOTED
See Also:
Constant Field Values

KEYWORD

public static final int KEYWORD
See Also:
Constant Field Values

NUMBER

public static final int NUMBER
See Also:
Constant Field Values

TYPE

public static final int TYPE
See Also:
Constant Field Values

_state

private int _state

_location

private int _location

_length

private int _length
Constructor Detail

HighlightStatus

public HighlightStatus(int location,
                       int length,
                       int state)
Constructor.

Parameters:
location - the starting character offset of the block
length - length of block
state - coloring state of the block
Method Detail

getState

public int getState()
Get the coloring state of this block.

Returns:
an integer representing the color to paint the text in the bounds of this block

getLocation

public int getLocation()
Get the starting location of this coloring block.

Returns:
an integer offset

getLength

public int getLength()
Get the size of this coloring block.

Returns:
the number of characters spanned by this block.