Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.renderer.macro.code
Class JavaCodeFormatter

java.lang.Object
  extended by com.jivesoftware.forum.renderer.macro.code.JavaCodeFormatter
All Implemented Interfaces:
SourceCodeFormatter

public class JavaCodeFormatter
extends java.lang.Object
implements SourceCodeFormatter

Syntax highlights java code.


Constructor Summary
JavaCodeFormatter()
           
 
Method Summary
 java.lang.String filter(java.lang.String input, RenderContext renderContext)
           
 boolean getApplyTableSurround()
           
 java.lang.String getBracketEnd()
          Returns the HTML tag that ends character blocks.
 java.lang.String getBracketStart()
          Returns the HTML tag that starts bracket blocks.
 java.lang.String getCharacterEnd()
          Returns the HTML tag that ends character blocks.
 java.lang.String getCharacterStart()
          Returns the HTML tag that starts character blocks.
 java.lang.String getCommentEnd()
          Returns the HTML tag that ends comment blocks.
 java.lang.String getCommentStart()
          Returns the HTML tag that starts comment blocks.
 boolean getFilterMethod()
          See if method filtering is enabled.
 boolean getFilterNumber()
          See if number filtering is enabled.
 java.lang.String getLineNumberColor()
           
 java.lang.String getMethodEnd()
          Returns the HTML tag that ends method blocks.
 java.lang.String getMethodStart()
          Returns the HTML tag that starts method blocks.
 java.lang.String getName()
           
 java.lang.String getNumberEnd()
          Returns the HTML tag that ends character blocks.
 java.lang.String getNumberStart()
          Gets the string value of the string escape character.
 java.lang.String getReservedWordEnd()
          Returns the HTML tag that ends keyword blocks.
 java.lang.String getReservedWordStart()
          Returns the HTML tag that starts keyword blocks.
 boolean getShowLineCount()
           
 java.lang.String getStringEnd()
          Returns the HTML tag that ends string blocks.
 java.lang.String getStringStart()
          Returns the HTML tag that starts string blocks.
 java.lang.String getTableBorderColor()
          Returns the code table's border color.
 java.lang.String getTableCodePanelBckgrndColor()
          Returns the code panel's background color.
 java.lang.String getTableLinePanelBckgrndColor()
          Returns the line-number panel's background color.
 void setApplyTableSurround(boolean applyTableSurround)
           
 void setBracketEnd(java.lang.String bracketEnd)
          Sets the HTML tag that ends character blocks.
 void setBracketStart(java.lang.String bracketStart)
          Sets the HTML tag that starts character blocks.
 void setCharacterEnd(java.lang.String characterEnd)
          Sets the HTML tag that ends character blocks.
 void setCharacterStart(java.lang.String characterStart)
          Sets the HTML tag that starts character blocks.
 void setCommentEnd(java.lang.String commentEnd)
          Sets the HTML tag that ends comment blocks.
 void setCommentStart(java.lang.String commentStart)
          Sets the HTML tag that starts comment blocks.
 void setFilterMethod(boolean filterMethod)
          Enables or disables method filtering.
 void setFilterNumber(boolean filterNumber)
          Enables or disables number filtering.
 void setLineNumberColor(java.lang.String lineNumberColor)
           
 void setMethodEnd(java.lang.String methodEnd)
          Sets the HTML tag that ends method blocks.
 void setMethodStart(java.lang.String methodStart)
          Sets the HTML tag that starts method blocks.
 void setNumberEnd(java.lang.String numberEnd)
          Sets the HTML tag that ends number literals.
 void setNumberStart(java.lang.String numberStart)
          Sets the HTML tag that starts character blocks.
 void setReservedWordEnd(java.lang.String reservedWordEnd)
          Sets the HTML tag that ends keyword blocks.
 void setReservedWordStart(java.lang.String reservedWordStart)
          Sets the HTML tag that starts reserved word blocks.
 void setShowLineCount(boolean showLineCount)
           
 void setStringEnd(java.lang.String stringEnd)
          Sets the HTML tag that ends string blocks.
 void setStringStart(java.lang.String stringStart)
          Sets the HTML tag that starts string blocks.
 void setTableBorderColor(java.lang.String tableBorderColor)
          Sets the code table's border color.
 void setTableCodePanelBckgrndColor(java.lang.String tableCodePanelBckgrndColor)
          Sets the code panel's background color.
 void setTableLinePanelBckgrndColor(java.lang.String tableLinePanelBckgrndColor)
          Sets the line-number panel's background color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaCodeFormatter

public JavaCodeFormatter()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface SourceCodeFormatter

filter

public java.lang.String filter(java.lang.String input,
                               RenderContext renderContext)
Specified by:
filter in interface SourceCodeFormatter

getApplyTableSurround

public boolean getApplyTableSurround()

setApplyTableSurround

public void setApplyTableSurround(boolean applyTableSurround)

getShowLineCount

public boolean getShowLineCount()

setShowLineCount

public void setShowLineCount(boolean showLineCount)

getTableBorderColor

public java.lang.String getTableBorderColor()
Returns the code table's border color. For example, it could be red or #123456.

Returns:
the code table's border color

setTableBorderColor

public void setTableBorderColor(java.lang.String tableBorderColor)
Sets the code table's border color. For example, it could be red or #123456.

Parameters:
tableBorderColor - the code table's border color

getTableLinePanelBckgrndColor

public java.lang.String getTableLinePanelBckgrndColor()
Returns the line-number panel's background color. For example, it could be white or #123456

Returns:
the line panel's background color.

setTableLinePanelBckgrndColor

public void setTableLinePanelBckgrndColor(java.lang.String tableLinePanelBckgrndColor)
Sets the line-number panel's background color. For example, it could be white or #123456.

Parameters:
tableLinePanelBckgrndColor - the line panel's background color

getTableCodePanelBckgrndColor

public java.lang.String getTableCodePanelBckgrndColor()
Returns the code panel's background color. For example, it could be blue or #123456.

Returns:
the code panel's background color

setTableCodePanelBckgrndColor

public void setTableCodePanelBckgrndColor(java.lang.String tableCodePanelBckgrndColor)
Sets the code panel's background color. For example, it could be blue or #123456.

Parameters:
tableCodePanelBckgrndColor - the code panel's background color

getLineNumberColor

public java.lang.String getLineNumberColor()

setLineNumberColor

public void setLineNumberColor(java.lang.String lineNumberColor)

getCommentStart

public java.lang.String getCommentStart()
Returns the HTML tag that starts comment blocks. For example, it could be <i>.

Returns:
the HTML tag to start comment blocks

setCommentStart

public void setCommentStart(java.lang.String commentStart)
Sets the HTML tag that starts comment blocks. For example, it could be <i>.

Parameters:
commentStart - the HTML tag to start comment blocks

getCommentEnd

public java.lang.String getCommentEnd()
Returns the HTML tag that ends comment blocks. For example, it could be </i>. The tag should correspond to the comment end tag.

Returns:
the HTML tag to end comment blocks

setCommentEnd

public void setCommentEnd(java.lang.String commentEnd)
Sets the HTML tag that ends comment blocks. For example, it could be </i>. The tag should correspond to the comment end tag.

Parameters:
commentEnd - the HTML tag to end comment blocks

getStringStart

public java.lang.String getStringStart()
Returns the HTML tag that starts string blocks. For example, it could be <font color="red">.

Returns:
the HTML tag to start string blocks

setStringStart

public void setStringStart(java.lang.String stringStart)
Sets the HTML tag that starts string blocks. For example, it could be <font color="red">.

Parameters:
stringStart - the HTML tag to start string blocks

getStringEnd

public java.lang.String getStringEnd()
Returns the HTML tag that ends string blocks. For example, it could be </font>. The tag should correspond to the string end tag.

Returns:
the HTML tag to end string blocks

setStringEnd

public void setStringEnd(java.lang.String stringEnd)
Sets the HTML tag that ends string blocks. For example, it could be </font>. The tag should correspond to the string end tag.

Parameters:
stringEnd - the HTML tag to end string blocks

getReservedWordStart

public java.lang.String getReservedWordStart()
Returns the HTML tag that starts keyword blocks. For example, it could be <font color="navy">.

Returns:
the HTML tag to start keyword blocks

setReservedWordStart

public void setReservedWordStart(java.lang.String reservedWordStart)
Sets the HTML tag that starts reserved word blocks. For example, it could be <font color="navy">.

Parameters:
reservedWordStart - the HTML tag to start keyword blocks

getReservedWordEnd

public java.lang.String getReservedWordEnd()
Returns the HTML tag that ends keyword blocks. For example, it could be </font>. This should correspond to the end tag for keyword blocks.

Returns:
the HTML tag to end keyword blocks

setReservedWordEnd

public void setReservedWordEnd(java.lang.String reservedWordEnd)
Sets the HTML tag that ends keyword blocks. For example, it could be <font color="navy">. This should correspond to the end tag for keyword blocks.

Parameters:
reservedWordEnd - the HTML tag to end keyword blocks

getMethodStart

public java.lang.String getMethodStart()
Returns the HTML tag that starts method blocks. For example, it could be <font color="brown">.

Returns:
the HTML tag to start method blocks

setMethodStart

public void setMethodStart(java.lang.String methodStart)
Sets the HTML tag that starts method blocks. For example, it could be <font color="brown">.

Parameters:
methodStart - the HTML tag to start method blocks

getMethodEnd

public java.lang.String getMethodEnd()
Returns the HTML tag that ends method blocks. For example, it could be </font>. This should correspond to the end tag for method blocks.

Returns:
the HTML tag to end method blocks

setMethodEnd

public void setMethodEnd(java.lang.String methodEnd)
Sets the HTML tag that ends method blocks. For example, it could be </font>. This should correspond to the end tag for method blocks.

Parameters:
methodEnd - the HTML tag to end method blocks

getCharacterStart

public java.lang.String getCharacterStart()
Returns the HTML tag that starts character blocks. For example, it could be <font color="navy">.

Returns:
the HTML tag to start method blocks

setCharacterStart

public void setCharacterStart(java.lang.String characterStart)
Sets the HTML tag that starts character blocks. For example, it could be <font color="navy">.

Parameters:
characterStart - the HTML tag to start method blocks

getCharacterEnd

public java.lang.String getCharacterEnd()
Returns the HTML tag that ends character blocks. For example, it could be </font>. This should correspond to the end tag for character blocks.

Returns:
the HTML tag to end method blocks

setCharacterEnd

public void setCharacterEnd(java.lang.String characterEnd)
Sets the HTML tag that ends character blocks. For example, it could be </font>. This should correspond to the end tag for character blocks.

Parameters:
characterEnd - the HTML tag to end character blocks

getBracketStart

public java.lang.String getBracketStart()
Returns the HTML tag that starts bracket blocks. For example, it could be <font color="navy">.

Returns:
the HTML tag to start bracket blocks

setBracketStart

public void setBracketStart(java.lang.String bracketStart)
Sets the HTML tag that starts character blocks. For example, it could be <font color="navy">.

Parameters:
bracketStart - the HTML tag to start bracket blocks

getBracketEnd

public java.lang.String getBracketEnd()
Returns the HTML tag that ends character blocks. For example, it could be </font>. This should correspond to the end tag for bracket blocks.

Returns:
the HTML tag to end bracket blocks.

setBracketEnd

public void setBracketEnd(java.lang.String bracketEnd)
Sets the HTML tag that ends character blocks. For example, it could be </font>. This should correspond to the end tag for bracket blocks.

Parameters:
bracketEnd - the HTML tag to end bracket blocks.

getNumberStart

public java.lang.String getNumberStart()
Gets the string value of the string escape character.

Returns:
the string value of the string escape character

setNumberStart

public void setNumberStart(java.lang.String numberStart)
Sets the HTML tag that starts character blocks. For example, it could be <font color="navy">.

Parameters:
numberStart - the HTML tag to start bracket blocks

getNumberEnd

public java.lang.String getNumberEnd()
Returns the HTML tag that ends character blocks. For example, it could be </font>. This should correspond to the end tag for number literals.

Returns:
the HTML tag to end bracket blocks.

setNumberEnd

public void setNumberEnd(java.lang.String numberEnd)
Sets the HTML tag that ends number literals. For example, it could be </font>. This should correspond to the end tag for number literals.

Parameters:
numberEnd - the HTML tag to end number literals.

getFilterMethod

public boolean getFilterMethod()
See if method filtering is enabled.


setFilterMethod

public void setFilterMethod(boolean filterMethod)
Enables or disables method filtering.


getFilterNumber

public boolean getFilterNumber()
See if number filtering is enabled.


setFilterNumber

public void setFilterNumber(boolean filterNumber)
Enables or disables number filtering.


Jive Forums Project Page

Copyright © 1999-2006 Jive Software.