Top Description Inners Fields Constructors Methods
org.python.indexer.demos

pack-priv Class StyleApplier

extends Object
Class Inheritance
Imports
org.python.indexer.StyleRun, java.util.ArrayList, .List, .HashSet, .Set, .SortedSet, .TreeSet

Turns a list of StyleRuns into HTML spans.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class
pack-priv abstract class

Field Summary

Modifier and TypeField and Description
private StringBuilder
private String
private String
private static final int
private int
private SortedSet<StyleApplier.Tag>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the html
apply
()

private void
copySource(int
the starting source offset
beg
,
int
the end offset, or -1 to go to end of file
end
)

Copies code from the input source to the output html.

private String
private String
toCSS(StyleRun style)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private StringBuilder buffer
pathback to summary
private String path
sourceback to summary
private String source
SOURCE_BUF_MULTIPLIERback to summary
private static final int SOURCE_BUF_MULTIPLIER
sourceOffsetback to summary
private int sourceOffset
tagsback to summary
private SortedSet<StyleApplier.Tag> tags

Constructor Detail

StyleApplierback to summary
public StyleApplier(String path, String src, List<StyleRun> runs)

Method Detail

applyback to summary
public String apply()
Returns:String

the html

copySourceback to summary
private void copySource(int beg, int end)

Copies code from the input source to the output html.

Parameters
beg:int

the starting source offset

end:int

the end offset, or -1 to go to end of file

escapeback to summary
private String escape(String s)
toCSSback to summary
private String toCSS(StyleRun style)
org.python.indexer.demos back to summary

pack-priv Class StyleApplier.EndTag

extends Tag
Class Inheritance

Field Summary

Inherited from org.python.indexer.demos.StyleApplier.Tag:
offsetstyle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
Inherited from org.python.indexer.demos.StyleApplier.Tag:
compareTo

Constructor Detail

EndTagback to summary
public EndTag(StyleRun style)

Method Detail

insertback to summary
pack-priv void insert()

Overrides org.python.indexer.demos.StyleApplier.Tag.insert.

Annotations
@Override
org.python.indexer.demos back to summary

pack-priv Class StyleApplier.StartTag

extends Tag
Class Inheritance

Field Summary

Inherited from org.python.indexer.demos.StyleApplier.Tag:
offsetstyle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
Inherited from org.python.indexer.demos.StyleApplier.Tag:
compareTo

Constructor Detail

StartTagback to summary
public StartTag(StyleRun style)

Method Detail

insertback to summary
pack-priv void insert()

Overrides org.python.indexer.demos.StyleApplier.Tag.insert.

Annotations
@Override
org.python.indexer.demos back to summary

pack-priv abstract Class StyleApplier.Tag

extends Object
implements Comparable<StyleApplier.Tag>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Known Direct Subclasses
org.python.indexer.demos.StyleApplier.StartTag, org.python.indexer.demos.StyleApplier.EndTag

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv StyleRun

Constructor Summary

AccessConstructor and Description
pack-priv
Tag()

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(StyleApplier.Tag
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

offsetback to summary
pack-priv int offset
styleback to summary
pack-priv StyleRun style

Constructor Detail

Tagback to summary
pack-priv Tag()

Method Detail

compareToback to summary
public int compareTo(StyleApplier.Tag other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:StyleApplier.Tag

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

insertback to summary
pack-priv void insert()