Game Control Plus  1.2.2
 All Classes Namespaces Functions Variables Pages
org.gamecontrolplus.gui.MStyledString.AttributeRun Class Reference
Inheritance diagram for org.gamecontrolplus.gui.MStyledString.AttributeRun:

Public Member Functions

 AttributeRun (Attribute atype, Object value)
 
 AttributeRun (Attribute atype, Object value, int start, int end)
 
String toString ()
 

Public Attributes

Attribute atype
 
Object value
 
Integer start
 
Integer end
 

Private Member Functions

int intersectionWith (AttributeRun ar)
 

Static Private Attributes

static final long serialVersionUID = -8401062069478890163L
 

Detailed Description

Since most of the Java classes associated with AttributedString are immutable with virtually no public methods this class represents an attribute to be applied.

This class is only used from within StyledString.

Author
Peter Lager

Constructor & Destructor Documentation

org.gamecontrolplus.gui.MStyledString.AttributeRun.AttributeRun ( Attribute  atype,
Object  value 
)

The attribute and value to be applied over the whole string

Parameters
atype
value
org.gamecontrolplus.gui.MStyledString.AttributeRun.AttributeRun ( Attribute  atype,
Object  value,
int  start,
int  end 
)

The attribute and value to be applied over the given range

Parameters
atype
value
start
end

Member Function Documentation

int org.gamecontrolplus.gui.MStyledString.AttributeRun.intersectionWith ( AttributeRun  ar)
private

If possible merge the two runs or crop the prevRun run.

If both runs have the same attribute type and the represent the same location and size in the text then the intersection mode will be MM_SURROUNDS rather than MM_SURROUNDED because 'this' is the attribute being added.

Parameters
m
s
Returns