org.jvnet.substance.utils.params
Class PropertiesFileParamReader

java.lang.Object
  extended by org.jvnet.substance.utils.params.PropertiesFileParamReader
All Implemented Interfaces:
ParamReader

public class PropertiesFileParamReader
extends java.lang.Object
implements ParamReader

Reads the properties from a local file. This class is for internal use only.

Author:
Kirill Grouchnikov

Field Summary
protected  java.util.Properties props
          Parser for the local file.
 
Constructor Summary
PropertiesFileParamReader(java.lang.String configFile)
          Creates a new local file reader.
 
Method Summary
 java.lang.String getBorderPainterProperty()
          Returns the value that specifies the global Substance border painter.
 java.lang.String getButtonShaperProperty()
          Returns the value that specifies the global Substance button shaper.
 java.lang.String getGradientPainterProperty()
          Returns the value that specifies the global Substance gradient painter.
 java.lang.String getThemeProperty()
          Returns the value that specifies the global Substance theme.
 java.lang.String getTitlePainterProperty()
          Returns the value that specifies the global Substance title painter.
 java.lang.String getTraceFileNameProperty()
          Returns the name of the trace file.
 SubstanceConstants.ImageWatermarkKind getWatermarkImageKindProperty()
          Returns the value that specifies the kind of image-based watermark.
 java.lang.Float getWatermarkImageOpacityProperty()
          Returns the value that specifies the opacity of image-based watermark.
 java.lang.String getWatermarkImageProperty()
          Returns the value that specifies the image location for image-based watermark.
 java.lang.String getWatermarkProperty()
          Returns the value that specifies the global Substance watermark.
 boolean isDebugUiMode()
          Returns the indication whether Substance is running the application under debug UI mode.
 boolean toBleedWatermark()
          Returns indication whether the watermark should "bleed" through usuallu opaque controls, such as trees, lists, tables and text controls (text field, text area, etc).
 boolean toEnableInvertedThemes()
          Returns the indication whether Substance should enable inverted color themes.
 boolean toEnableNegatedThemes()
          Returns the indication whether Substance should enable negated color themes.
 boolean toShowExtraElementProperty()
          Returns the indication whether Substance can add additional UI elements (such as system menu items, menu search panel).
 java.lang.String toShowHeapStatusPanelProperty()
          Returns the indication for showing the heap status panel in the custom-decorated title panes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

protected java.util.Properties props
Parser for the local file.

Constructor Detail

PropertiesFileParamReader

public PropertiesFileParamReader(java.lang.String configFile)
Creates a new local file reader.

Parameters:
configFile - Location of the configuration file.
Method Detail

getButtonShaperProperty

public java.lang.String getButtonShaperProperty()
Description copied from interface: ParamReader
Returns the value that specifies the global Substance button shaper. If not null, should be a fully-qualified class name of a class that implements SubstanceButtonShaper.

Specified by:
getButtonShaperProperty in interface ParamReader
Returns:
The value that specifies the global Substance button shaper. If not null, should be a fully-qualified class name of a class that implements SubstanceButtonShaper.

getGradientPainterProperty

public java.lang.String getGradientPainterProperty()
Description copied from interface: ParamReader
Returns the value that specifies the global Substance gradient painter. If not null, should be a fully-qualified class name of a class that implements SubstanceGradientPainter.

Specified by:
getGradientPainterProperty in interface ParamReader
Returns:
The value that specifies the global Substance gradient painter. If not null, should be a fully-qualified class name of a class that implements SubstanceGradientPainter.

getTitlePainterProperty

public java.lang.String getTitlePainterProperty()
Description copied from interface: ParamReader
Returns the value that specifies the global Substance title painter. If not null, should be a fully-qualified class name of a class that implements SubstanceTitlePainter.

Specified by:
getTitlePainterProperty in interface ParamReader
Returns:
The value that specifies the global Substance title painter. If not null, should be a fully-qualified class name of a class that implements SubstanceTitlePainter.

getBorderPainterProperty

public java.lang.String getBorderPainterProperty()
Description copied from interface: ParamReader
Returns the value that specifies the global Substance border painter. If not null, should be a fully-qualified class name of a class that implements SubstanceBorderPainter.

Specified by:
getBorderPainterProperty in interface ParamReader
Returns:
The value that specifies the global Substance border painter. If not null, should be a fully-qualified class name of a class that implements SubstanceBorderPainter.

getThemeProperty

public java.lang.String getThemeProperty()
Description copied from interface: ParamReader
Returns the value that specifies the global Substance theme. If not null, should be a fully-qualified class name of a class that extends SubstanceTheme.

Specified by:
getThemeProperty in interface ParamReader
Returns:
The value that specifies the global Substance theme. If not null, should be a fully-qualified class name of a class that extends SubstanceTheme.

getTraceFileNameProperty

public java.lang.String getTraceFileNameProperty()
Description copied from interface: ParamReader
Returns the name of the trace file. The trace file will contain output of the memory analyser which can be used to pinpoint the memory leaks.

Specified by:
getTraceFileNameProperty in interface ParamReader
Returns:
The name of the trace file for memory analysis. If null, the tracing mechanism will not be activated.

getWatermarkProperty

public java.lang.String getWatermarkProperty()
Description copied from interface: ParamReader
Returns the value that specifies the global Substance watermark. If not null, should be a fully-qualified class name of a class that implements SubstanceWatermark.

Specified by:
getWatermarkProperty in interface ParamReader
Returns:
The value that specifies the global Substance watermark. If not null, should be a fully-qualified class name of a class that implements SubstanceWatermark.

getWatermarkImageProperty

public java.lang.String getWatermarkImageProperty()
Description copied from interface: ParamReader
Returns the value that specifies the image location for image-based watermark. This value is relevant only if the ParamReader.getWatermarkProperty() returns the class name of SubstanceImageWatermark. The value can point at either the local file or remote HTTP-based file.

Specified by:
getWatermarkImageProperty in interface ParamReader
Returns:
The value that specifies the image location for image-based watermark.

toBleedWatermark

public boolean toBleedWatermark()
Description copied from interface: ParamReader
Returns indication whether the watermark should "bleed" through usuallu opaque controls, such as trees, lists, tables and text controls (text field, text area, etc).

Specified by:
toBleedWatermark in interface ParamReader
Returns:
Indication whether the watermark should "bleed" through usuallu opaque controls.

toShowExtraElementProperty

public boolean toShowExtraElementProperty()
Description copied from interface: ParamReader
Returns the indication whether Substance can add additional UI elements (such as system menu items, menu search panel).

Specified by:
toShowExtraElementProperty in interface ParamReader
Returns:
true if Substance can add additional UI elements (such as system menu items, menu search panel), false otherwise.

isDebugUiMode

public boolean isDebugUiMode()
Description copied from interface: ParamReader
Returns the indication whether Substance is running the application under debug UI mode.

Specified by:
isDebugUiMode in interface ParamReader
Returns:
true if Substance is running the application under debug UI mode, false otherwise.

toShowHeapStatusPanelProperty

public java.lang.String toShowHeapStatusPanelProperty()
Description copied from interface: ParamReader
Returns the indication for showing the heap status panel in the custom-decorated title panes. If the value is null, no heap status panel will be shown, if the value is an empty string, the heap status panel will be shown. Otherwise, the value is taken to be the filename for logging the heap status information (and the heap status panel will be shown).

Specified by:
toShowHeapStatusPanelProperty in interface ParamReader
Returns:
Indication for showing the heap status panel in the custom-decorated title panes. Possible return values:
  • If the value is null, no heap status panel will be shown.
  • If the value is an empty string, the heap status panel will be shown.
  • Otherwise, the value is taken to be the filename for logging the heap status information (and the heap status panel will be shown).

toEnableInvertedThemes

public boolean toEnableInvertedThemes()
Description copied from interface: ParamReader
Returns the indication whether Substance should enable inverted color themes.

Specified by:
toEnableInvertedThemes in interface ParamReader
Returns:
true if Substance should enable inverted color themes, false otherwise.

toEnableNegatedThemes

public boolean toEnableNegatedThemes()
Description copied from interface: ParamReader
Returns the indication whether Substance should enable negated color themes.

Specified by:
toEnableNegatedThemes in interface ParamReader
Returns:
true if Substance should enable negated color themes, false otherwise.

getWatermarkImageKindProperty

public SubstanceConstants.ImageWatermarkKind getWatermarkImageKindProperty()
Description copied from interface: ParamReader
Returns the value that specifies the kind of image-based watermark. This value is relevant only if the ParamReader.getWatermarkProperty() returns the class name of SubstanceImageWatermark.

Specified by:
getWatermarkImageKindProperty in interface ParamReader
Returns:
The value that specifies the kind of image-based watermark.

getWatermarkImageOpacityProperty

public java.lang.Float getWatermarkImageOpacityProperty()
Description copied from interface: ParamReader
Returns the value that specifies the opacity of image-based watermark. This value is relevant only if the ParamReader.getWatermarkProperty() returns the class name of SubstanceImageWatermark.

Specified by:
getWatermarkImageOpacityProperty in interface ParamReader
Returns:
The value that specifies the opacity of image-based watermark.