comirva.config
Class VisuPreferences

java.lang.Object
  extended by comirva.config.VisuPreferences
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
VisuDefaultPreferences

public class VisuPreferences
extends Object
implements Serializable

This class represents the global preferences for the visualization pane and the data management area.

See Also:
Serialized Form

Field Summary
static Color VISU_BACKGROUND
          background of the visualisation pane.
static int VISU_BORDER_SIZE
          size of the area between visualisation and the eadge of the painting area.
static boolean VISU_ENABLE_EPS
          eps output is disabled by default
static int VISU_FONT_SIZE
          size of the font used for labels etc.
static int VISU_NAME_ALL
          constant for index of setting: use all visualisation parameters
static String[] VISU_NAME_NAMES
          the titles for the options concerning the visualisation name generation
static int VISU_NAME_NONSTANDARD
          constant for index of setting: use only non-standard configuration values
static int VISU_NAME_NOTHING
          constant for index of setting: use no configuration values
static String VISU_PATH
          path where open/save dialogs start.
static boolean VISU_TOOLBAR_FLOATABLE
          the toolbar is fixed (not floatable) by default
static int VISU_TOOLBAR_LAYOUT
          the toolbar layout is JTabbedPane.SCROLL_TAB_LAYOUT by default which means that the tabs in one line and may be scrolled
static boolean VISU_USE_DATA_MATRIX_NAME
          the data matrix name is used for generating a visualisation name by default
 
Constructor Summary
VisuPreferences()
          Constructs a new instance of a preferences object with the standard values of the fields.
VisuPreferences(Color backgroundColor, int borderSize, int labelFontSize, boolean enableEPS)
          Creates a new instance of the preferences object.
VisuPreferences(String lastDir, boolean toolbarFloatable, int tabLayout, int visuName, boolean useDataMatrixName)
          Creates a new instance of the preferences object
 
Method Summary
 Color getBackgroundColor()
          Returns the background color.
 int getBorderSize()
          Returns the border size.
 int getLabelFontSize()
          Returns the standard font used for drawing labels.
 String getLastDir()
          the last directory the user has selected
 int getTabLayout()
          this property determines whether the tabs are arranged in multiple lines or in one single line with buttons for scrolling.
 int getVisuName()
          this property determines how much of the visualisation configuration parameters should be used for generating a appropiate name for the new visualistion.
 boolean isEnableEPS()
          Returns whether the EPS output option is enabled.
 boolean isToolbarFloatable()
          when a toolbar is floatable it means that it can be moved to another edge inside its container or own window.
 void setDataManagementPreferences(boolean toolbarFloatable, int tabLayout, int visuName, boolean useDataMatrixName)
          Set data management preferences without changing the last directory setting.
 void setDataManagementPreferences(String lastDir, boolean toolbarFloatable, int tabLayout, int visuName, boolean useDataMatrixName)
          Set data management preferences.
 void setLastDir(String lastDirectory)
          set last directory.
 void setVisuPreferences(Color backgroundColor, int borderSize, int labelFontSize, boolean enableEPS)
          Set visualisation preferences.
 boolean useDataMatrixName()
          this property determines if the name of the data matrix should be appended to the name of the visualisation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VISU_BACKGROUND

public static final Color VISU_BACKGROUND
background of the visualisation pane. Standard value is Color(250,250,255)


VISU_BORDER_SIZE

public static final int VISU_BORDER_SIZE
size of the area between visualisation and the eadge of the painting area. Standard value is 50

See Also:
Constant Field Values

VISU_FONT_SIZE

public static final int VISU_FONT_SIZE
size of the font used for labels etc. Standard value is 10.

See Also:
Constant Field Values

VISU_ENABLE_EPS

public static final boolean VISU_ENABLE_EPS
eps output is disabled by default

See Also:
Constant Field Values

VISU_PATH

public static final String VISU_PATH
path where open/save dialogs start. Standard is the user's home directory


VISU_TOOLBAR_FLOATABLE

public static final boolean VISU_TOOLBAR_FLOATABLE
the toolbar is fixed (not floatable) by default

See Also:
Constant Field Values

VISU_TOOLBAR_LAYOUT

public static final int VISU_TOOLBAR_LAYOUT
the toolbar layout is JTabbedPane.SCROLL_TAB_LAYOUT by default which means that the tabs in one line and may be scrolled

See Also:
Constant Field Values

VISU_USE_DATA_MATRIX_NAME

public static final boolean VISU_USE_DATA_MATRIX_NAME
the data matrix name is used for generating a visualisation name by default

See Also:
Constant Field Values

VISU_NAME_ALL

public static final int VISU_NAME_ALL
constant for index of setting: use all visualisation parameters

See Also:
Constant Field Values

VISU_NAME_NONSTANDARD

public static final int VISU_NAME_NONSTANDARD
constant for index of setting: use only non-standard configuration values

See Also:
Constant Field Values

VISU_NAME_NOTHING

public static final int VISU_NAME_NOTHING
constant for index of setting: use no configuration values

See Also:
Constant Field Values

VISU_NAME_NAMES

public static final String[] VISU_NAME_NAMES
the titles for the options concerning the visualisation name generation

Constructor Detail

VisuPreferences

public VisuPreferences(Color backgroundColor,
                       int borderSize,
                       int labelFontSize,
                       boolean enableEPS)
Creates a new instance of the preferences object.

Parameters:
backgroundColor - the Color that defines the background color of the visualization pane
borderSize - the border size of the visualization pane
labelFontSize - the font size of the labels and other text of the visualization pane
enableEPS - enable EPS-Output (slower graphics display!)

VisuPreferences

public VisuPreferences(String lastDir,
                       boolean toolbarFloatable,
                       int tabLayout,
                       int visuName,
                       boolean useDataMatrixName)
Creates a new instance of the preferences object

Parameters:
lastDir - the last directory that was selected in a open/save dialog
toolbarFloatable - the toolbar is floatable or not (floatable means that the user can move the toolbar around)
tabLayout - the layout of the tabulators (see JTabbedPane.SCROLL_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUT)
visuName - defines how visualisation names are constructed (one of VISU_NAME_ALL, VISU_NAME_NONSTANDARD or 2)
useDataMatrixName - append the data matrix name to visualisation name

VisuPreferences

public VisuPreferences()
Constructs a new instance of a preferences object with the standard values of the fields. The standard values are defined in constants. See the "See also" list below.

See Also:
VISU_BACKGROUND, VISU_BORDER_SIZE, VISU_ENABLE_EPS, VISU_FONT_SIZE, VISU_PATH, VISU_TOOLBAR_FLOATABLE, VISU_TOOLBAR_LAYOUT, VISU_USE_DATA_MATRIX_NAME
Method Detail

setVisuPreferences

public void setVisuPreferences(Color backgroundColor,
                               int borderSize,
                               int labelFontSize,
                               boolean enableEPS)
Set visualisation preferences. This method is also called by the constructor with the parameters passed to it. If no parameters are passed, the default values defined by the constants are used.

Parameters:
backgroundColor - the Color that defines the background color of the visualisation pane
borderSize - the border size of the visualisation pane
labelFontSize - the font size of the labels and other text of the visualisation pane
enableEPS - enable EPS-Output (slower graphics display!)

setDataManagementPreferences

public void setDataManagementPreferences(String lastDir,
                                         boolean toolbarFloatable,
                                         int tabLayout,
                                         int visuName,
                                         boolean useDataMatrixName)
Set data management preferences. This method is also called by the constructor with the parameters passed to it. If no parameters are passed to the constructor this method is only called with the default values, so the default values defined by the constants are used.

Parameters:
lastDir - the last directory that was selected in a open/save dialog
toolbarFloatable - the toolbar is floatable or not (floatable means that the user can move the toolbar around)
tabLayout - the layout of the tabulators (see JTabbedPane.SCROLL_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUT)
visuName - defines how visualisation names are constructed (one of VISU_NAME_ALL, VISU_NAME_NONSTANDARD or 2)
useDataMatrixName - append the data matrix name to visualisation name

setDataManagementPreferences

public void setDataManagementPreferences(boolean toolbarFloatable,
                                         int tabLayout,
                                         int visuName,
                                         boolean useDataMatrixName)
Set data management preferences without changing the last directory setting. In fact it only calls setDataManagementPreferences(String, boolean, int, int, boolean) with the current directory setting.

Parameters:
toolbarFloatable - the toolbar is floatable or not (floatable means that the user can move the toolbar around)
tabLayout - the layout of the tabulators (see JTabbedPane.SCROLL_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUT)
visuName - defines how visualisation names are constructed (one of VISU_NAME_ALL, VISU_NAME_NONSTANDARD or 2)
useDataMatrixName - append the data matrix name to visualisation name
See Also:
setDataManagementPreferences(String, boolean, int, int, boolean)

getBackgroundColor

public Color getBackgroundColor()
Returns the background color.

Returns:
the background color of the visualization pane

getBorderSize

public int getBorderSize()
Returns the border size.

Returns:
the border size (in pixels) of the visualization pane

getLabelFontSize

public int getLabelFontSize()
Returns the standard font used for drawing labels.

Returns:
the size of the font which is used for drawing labels or other text within a visualization

isEnableEPS

public boolean isEnableEPS()
Returns whether the EPS output option is enabled.

Returns:
true, if EPS-output is enabled; false if disabled

getLastDir

public String getLastDir()
the last directory the user has selected

Returns:
the last directory

setLastDir

public void setLastDir(String lastDirectory)
set last directory. This property is not set from the data management option dialog but after closing any file open/save dialog boxes.

Parameters:
lastDirectory - the new last directory

isToolbarFloatable

public boolean isToolbarFloatable()
when a toolbar is floatable it means that it can be moved to another edge inside its container or own window. This property corresponds to the floatable property of a JToolBar

Returns:
false if toolbar cannot be moved
See Also:
JToolBar#isFloatable(), JToolBar#setFloatable(boolean)

getTabLayout

public int getTabLayout()
this property determines whether the tabs are arranged in multiple lines or in one single line with buttons for scrolling. It corresponds to the layout policy of a JTabbdedPane

Returns:
tab layout policy
See Also:
JTabbedPane.getTabLayoutPolicy(), JTabbedPane.setTabLayoutPolicy(int)

getVisuName

public int getVisuName()
this property determines how much of the visualisation configuration parameters should be used for generating a appropiate name for the new visualistion. The return value is one of these constants

Returns:
the visualisation name option

useDataMatrixName

public boolean useDataMatrixName()
this property determines if the name of the data matrix should be appended to the name of the visualisation. It may be to turned off if the data matrix name is not needed or not suitable to identify a visualisation or the resulting name would be unreadable long.

Returns:
use data matrix name