org.pfsw.joi
Class Preferences

java.lang.Object
  extended by org.pfsw.joi.Preferences

public class Preferences
extends java.lang.Object

This singleton contains the general settings of JOI.


Field Summary
protected static java.lang.String CONFIG_FILENAME
           
protected static boolean DEFAULT_ALLOW_MODIFY
           
protected static boolean DEFAULT_AUTO_SORT
           
protected static java.lang.String DEFAULT_CONFIG_FILENAME
           
protected static int DEFAULT_DOUBLE_CLICK_MODE
           
protected static int DEFAULT_MAIN_MARGIN
           
protected static int DEFAULT_MIDDLE_BUTTON_MODE
           
protected static int DEFAULT_TREE_WIDTH
           
protected static int DEFAULT_WINDOW_HEIGHT
           
protected static int DEFAULT_WINDOW_WIDTH
           
protected static java.lang.String DOUBLE_CLICK_OPEN_TAB
           
protected static java.lang.String DOUBLE_CLICK_OPEN_WINDOW
           
protected static java.lang.String DOUBLE_CLICK_REPLACE
           
protected static java.lang.String OPT_ALLOW_MODIFY
           
protected static java.lang.String OPT_AUTO_SORT
           
protected static java.lang.String OPT_DOUBLE_CLICK_ACTION
           
protected static java.lang.String OPT_FINAL_DEFAULT
           
protected static java.lang.String OPT_MIDDLE_BUTTON
           
protected static java.lang.String OPT_PACKAGE_DEFAULT
           
protected static java.lang.String OPT_PRIVATE_DEFAULT
           
protected static java.lang.String OPT_PROTECTED_DEFAULT
           
protected static java.lang.String OPT_PUBLIC_DEFAULT
           
protected static java.lang.String OPT_QUOTE_STRINGS
           
protected static java.lang.String OPT_STATIC_DEFAULT
           
protected static java.lang.String OPT_TRANSIENT_DEFAULT
           
protected static java.lang.String OPT_TREE_WIDTH
           
protected static java.lang.String OPT_WINDOW_HEIGHT
           
protected static java.lang.String OPT_WINDOW_WIDTH
           
 
Method Summary
protected  int detectOpenAction(java.lang.String option)
          Returns the action code or a negative value if nothing (correct) was specified in the given option.
protected  boolean getAutoSort()
           
 int getDoubleClickMode()
          Returns a open mode that defines where to inspect the selected element with a double-click.
 ElementFilter getInitialElementFilter()
          Returns the a copy of the initial element filter
 int getMainMargin()
          Returns the margin to be used inside the main window
 int getMiddleButtonMode()
          Returns a open mode that defines where to inspect the selected element with pressing the middle mouse button.
 boolean getQuoteStrings()
          Returns whether or not strings should be enclosed by quotes when shown in an inspector.
 int getTreeWidth()
          Returns the the width of the tree view
 int getWindowHeight()
          Returns the initial width for a window
 int getWindowWidth()
          Returns the initial width for a window
protected  void initAllowModify(java.lang.String option)
           
protected  void initAutoSort(java.lang.String option)
           
protected  void initDoubleClickAction(java.lang.String option)
           
protected  void initialize()
           
protected  void initialize(java.util.Properties config)
           
protected  void initInitialElementFilter(java.util.Properties config)
           
protected  void initMiddleButtonAction(java.lang.String option)
           
protected  void initQuoteStrings(java.lang.String option)
           
protected  void initTreeWidth(java.lang.String option)
           
protected  void initWindowHeight(java.lang.String option)
           
protected  void initWindowWidth(java.lang.String option)
           
static Preferences instance()
          Returns the only instance this class supports (design pattern "Singleton")
 boolean isAutoSortOn()
          Returns true if automatic sorting of elements is desired
 boolean isEditingSupported()
          Returns true if editing og object values is supported
protected  int positiveInt(java.lang.String str)
           
protected  void setAutoSort(boolean newValue)
           
protected  void setDoubleClickMode(int newValue)
           
protected  void setInitialElementFilter(ElementFilter newValue)
           
protected  void setIsEditingSupported(boolean newValue)
           
protected  void setMiddleButtonMode(int newValue)
           
protected  void setQuoteStrings(boolean newValue)
           
protected  void setTreeWidth(int newValue)
           
protected  void setWindowHeight(int newValue)
           
protected  void setWindowWidth(int newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILENAME

protected static final java.lang.String CONFIG_FILENAME
See Also:
Constant Field Values

DEFAULT_CONFIG_FILENAME

protected static final java.lang.String DEFAULT_CONFIG_FILENAME
See Also:
Constant Field Values

DEFAULT_MAIN_MARGIN

protected static final int DEFAULT_MAIN_MARGIN
See Also:
Constant Field Values

DEFAULT_WINDOW_WIDTH

protected static final int DEFAULT_WINDOW_WIDTH
See Also:
Constant Field Values

DEFAULT_WINDOW_HEIGHT

protected static final int DEFAULT_WINDOW_HEIGHT
See Also:
Constant Field Values

DEFAULT_TREE_WIDTH

protected static final int DEFAULT_TREE_WIDTH
See Also:
Constant Field Values

DEFAULT_DOUBLE_CLICK_MODE

protected static final int DEFAULT_DOUBLE_CLICK_MODE
See Also:
Constant Field Values

DEFAULT_MIDDLE_BUTTON_MODE

protected static final int DEFAULT_MIDDLE_BUTTON_MODE
See Also:
Constant Field Values

DEFAULT_AUTO_SORT

protected static final boolean DEFAULT_AUTO_SORT
See Also:
Constant Field Values

DEFAULT_ALLOW_MODIFY

protected static final boolean DEFAULT_ALLOW_MODIFY
See Also:
Constant Field Values

OPT_DOUBLE_CLICK_ACTION

protected static final java.lang.String OPT_DOUBLE_CLICK_ACTION
See Also:
Constant Field Values

OPT_MIDDLE_BUTTON

protected static final java.lang.String OPT_MIDDLE_BUTTON
See Also:
Constant Field Values

OPT_WINDOW_WIDTH

protected static final java.lang.String OPT_WINDOW_WIDTH
See Also:
Constant Field Values

OPT_WINDOW_HEIGHT

protected static final java.lang.String OPT_WINDOW_HEIGHT
See Also:
Constant Field Values

OPT_TREE_WIDTH

protected static final java.lang.String OPT_TREE_WIDTH
See Also:
Constant Field Values

OPT_AUTO_SORT

protected static final java.lang.String OPT_AUTO_SORT
See Also:
Constant Field Values

OPT_ALLOW_MODIFY

protected static final java.lang.String OPT_ALLOW_MODIFY
See Also:
Constant Field Values

OPT_QUOTE_STRINGS

protected static final java.lang.String OPT_QUOTE_STRINGS
See Also:
Constant Field Values

OPT_STATIC_DEFAULT

protected static final java.lang.String OPT_STATIC_DEFAULT
See Also:
Constant Field Values

OPT_FINAL_DEFAULT

protected static final java.lang.String OPT_FINAL_DEFAULT
See Also:
Constant Field Values

OPT_TRANSIENT_DEFAULT

protected static final java.lang.String OPT_TRANSIENT_DEFAULT
See Also:
Constant Field Values

OPT_PUBLIC_DEFAULT

protected static final java.lang.String OPT_PUBLIC_DEFAULT
See Also:
Constant Field Values

OPT_PRIVATE_DEFAULT

protected static final java.lang.String OPT_PRIVATE_DEFAULT
See Also:
Constant Field Values

OPT_PROTECTED_DEFAULT

protected static final java.lang.String OPT_PROTECTED_DEFAULT
See Also:
Constant Field Values

OPT_PACKAGE_DEFAULT

protected static final java.lang.String OPT_PACKAGE_DEFAULT
See Also:
Constant Field Values

DOUBLE_CLICK_OPEN_WINDOW

protected static final java.lang.String DOUBLE_CLICK_OPEN_WINDOW
See Also:
Constant Field Values

DOUBLE_CLICK_OPEN_TAB

protected static final java.lang.String DOUBLE_CLICK_OPEN_TAB
See Also:
Constant Field Values

DOUBLE_CLICK_REPLACE

protected static final java.lang.String DOUBLE_CLICK_REPLACE
See Also:
Constant Field Values
Method Detail

setDoubleClickMode

protected void setDoubleClickMode(int newValue)

setMiddleButtonMode

protected void setMiddleButtonMode(int newValue)

setWindowWidth

protected void setWindowWidth(int newValue)

setWindowHeight

protected void setWindowHeight(int newValue)

setTreeWidth

protected void setTreeWidth(int newValue)

getAutoSort

protected boolean getAutoSort()

setAutoSort

protected void setAutoSort(boolean newValue)

setIsEditingSupported

protected void setIsEditingSupported(boolean newValue)

setQuoteStrings

protected void setQuoteStrings(boolean newValue)

setInitialElementFilter

protected void setInitialElementFilter(ElementFilter newValue)

instance

public static Preferences instance()
Returns the only instance this class supports (design pattern "Singleton")


getWindowWidth

public int getWindowWidth()
Returns the initial width for a window


getWindowHeight

public int getWindowHeight()
Returns the initial width for a window


getMainMargin

public int getMainMargin()
Returns the margin to be used inside the main window


getTreeWidth

public int getTreeWidth()
Returns the the width of the tree view


getDoubleClickMode

public int getDoubleClickMode()
Returns a open mode that defines where to inspect the selected element with a double-click.
  1. In the current place
  2. In a new tab
  3. In a new window


getMiddleButtonMode

public int getMiddleButtonMode()
Returns a open mode that defines where to inspect the selected element with pressing the middle mouse button.
  1. In the current place
  2. In a new tab
  3. In a new window


isAutoSortOn

public boolean isAutoSortOn()
Returns true if automatic sorting of elements is desired


isEditingSupported

public boolean isEditingSupported()
Returns true if editing og object values is supported


getQuoteStrings

public boolean getQuoteStrings()
Returns whether or not strings should be enclosed by quotes when shown in an inspector.


getInitialElementFilter

public ElementFilter getInitialElementFilter()
Returns the a copy of the initial element filter


initialize

protected void initialize()

initialize

protected void initialize(java.util.Properties config)

initDoubleClickAction

protected void initDoubleClickAction(java.lang.String option)

initMiddleButtonAction

protected void initMiddleButtonAction(java.lang.String option)

initWindowWidth

protected void initWindowWidth(java.lang.String option)

initWindowHeight

protected void initWindowHeight(java.lang.String option)

initTreeWidth

protected void initTreeWidth(java.lang.String option)

initAutoSort

protected void initAutoSort(java.lang.String option)

initAllowModify

protected void initAllowModify(java.lang.String option)

initQuoteStrings

protected void initQuoteStrings(java.lang.String option)

positiveInt

protected int positiveInt(java.lang.String str)

detectOpenAction

protected int detectOpenAction(java.lang.String option)
Returns the action code or a negative value if nothing (correct) was specified in the given option.


initInitialElementFilter

protected void initInitialElementFilter(java.util.Properties config)