org.fife.rtext.plugins.tidy
Class JsonOptions

java.lang.Object
  extended by org.fife.ui.app.Prefs
      extended by org.fife.rtext.plugins.tidy.JsonOptions

public class JsonOptions
extends Prefs

Options for tidying JSON.

While all fields in this class are public, please use the getters and setters for accessing them for bounds checking, etc.

Version:
1.0
Author:
Robert Futrell

Field Summary
 boolean jsonIndentFirstLevel
           
 java.lang.String jsonOutputStyle
           
 int jsonSpaceCount
           
 
Constructor Summary
JsonOptions()
           
 
Method Summary
 boolean getIndentFirstLevel()
          Returns whether the "first level" of the top-level JSON object should be indented.
 java.lang.String getOutputStyle()
          Returns the style of the formatted JSON.
 int getSpaceCount()
          Returns the number of spaces to use for indentation when formatting JSON.
 void setDefaults()
          Sets all fields in this class to their default values.
 void setIndentFirstLevel(boolean indent)
          Sets whether the first level of the top-level JSON object should be indented.
 void setOutputStyle(java.lang.String outputStyle)
          Sets the output style to use when formatting JSON.
 void setSpaceCount(int count)
          Sets the number of spaces to use for indentation when formatting JSON.
 
Methods inherited from class org.fife.ui.app.Prefs
load, load, load, save, save, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jsonOutputStyle

public java.lang.String jsonOutputStyle

jsonSpaceCount

public int jsonSpaceCount

jsonIndentFirstLevel

public boolean jsonIndentFirstLevel
Constructor Detail

JsonOptions

public JsonOptions()
Method Detail

getIndentFirstLevel

public boolean getIndentFirstLevel()
Returns whether the "first level" of the top-level JSON object should be indented.

Returns:
Whether the "first level" of JSON objects should be indented.
See Also:
setIndentFirstLevel(boolean)

getOutputStyle

public java.lang.String getOutputStyle()
Returns the style of the formatted JSON.

Returns:
The formatted style.
See Also:
setOutputStyle(String)

getSpaceCount

public int getSpaceCount()
Returns the number of spaces to use for indentation when formatting JSON.

Returns:
The number of spaces to use.
See Also:
setSpaceCount(int)

setDefaults

public void setDefaults()
Sets all fields in this class to their default values.

Specified by:
setDefaults in class Prefs

setIndentFirstLevel

public void setIndentFirstLevel(boolean indent)
Sets whether the first level of the top-level JSON object should be indented.

Parameters:
indent - Whether to indent the first level of a JSON object.
See Also:
getIndentFirstLevel()

setOutputStyle

public void setOutputStyle(java.lang.String outputStyle)
Sets the output style to use when formatting JSON.

Parameters:
outputStyle - The output style to use. If this is invalid, a default style is used.
See Also:
getOutputStyle()

setSpaceCount

public void setSpaceCount(int count)
Sets the number of spaces to use for indentation when formatting JSON.

Parameters:
count - The number of spaces.
See Also:
getSpaceCount()