public class BasicApplicationPreferences extends AbstractApplicationPreferences
| Modifier and Type | Field and Description |
|---|---|
static String |
ADJUST_TREE_SPACE
Name of the preference to adjust automatically the available space for
the trees
|
static boolean |
ADJUST_TREE_SPACE_VALUE |
static String |
APP_CONNECT_TO |
static String |
APP_FONTSIZE
Name of the preference to set the application font size
|
static String |
APP_LAST_LOGIN
Name of the preference to store the last login used in the application
|
static String |
APP_LAST_PASSWORD |
static String |
APP_LOCALE |
static String |
APP_REMEMBER_LAST_LOGIN
Name of the preference to remember or not the last login used
|
static String |
APP_REMEMBER_LAST_PASSWORD |
static String |
APP_STATUS_BAR_VISIBLE
Name of the preference to show/hide the application status bar
|
static String |
APP_TOOL_BAR_VISIBLE
Name of the preference to show/hide the application buttons bar
|
static String |
APP_TOOLBAR_LOCATION |
static String |
APP_USER_DIR |
static String |
APP_WINDOW_POSITION
Name of the preference to set the application window position
|
static String |
APP_WINDOW_SIZE
Name of the preference to set the application window size
|
static String |
APP_WINDOW_STATE
Name of the preference to set the application window state
|
protected JLabel |
backgroundColorFieldLabel |
protected String |
basePath |
protected JButton |
cancelButton |
static boolean |
checkOldPreferences |
static String |
COLLAPSIBLE_PANEL_VISIBLE |
protected JDialog |
colorDialog |
static boolean |
DEBUG |
static String |
DETAIL_DIALOG_SIZE_POSITION |
static String |
DIALOG_SIZE_POSITION |
boolean |
dirtyMode |
protected JDialog |
dPreferences |
protected String |
file |
static String |
FOCUSED_FIELD_BG_COLOR |
static String |
FORM_TABLEVIEW_COLUMNS |
protected static String |
L_EVEN_COLOR_TABLE_ROW |
protected static String |
L_FOCUS_COLOR_FIELD |
protected static String |
L_REQUIRED_BACKGROUND_COLOR_FIELD |
protected JLabel |
labelRequiredBackgroungColor |
protected JLabel |
labelTableColor |
protected boolean |
loadDeaults |
static String |
LOOK_AND_FEEL_CLASS_NAME
Name of the preference to store the application look and feel
|
static String |
MENU_ACCELERATOR |
protected JButton |
okButton |
protected JPanel |
panelFieldBackgroundColor |
protected JPanel |
panelRequiredBackgroundColor |
protected JPanel |
panelTableColor |
static boolean |
remoteUserPreferences |
static String |
REQUIRED_FIELDS_BG_COLOR
Name of the preference to set the required fields background color
|
protected JButton |
restoreButton |
protected RemoteApplicationPreferences |
rprefs |
static String |
SHOW_TABLE_CONTROLS
Name of the preference to show/hide the table controls
|
static String |
SHOW_TABLE_NUM_ROW
Name of the preference to show/hide the column with the rows number in a
table
|
static String |
SHOW_TIPS |
static String |
SPLIT_POSITION |
protected static String |
T_COLORS |
static String |
TABLE_CALCULATED_COLUMNS_CONFIGURATION |
static String |
TABLE_COLS_POSITION_SIZE |
static String |
TABLE_CONF_CHART_CONFIGURATIONS |
static String |
TABLE_CONF_PIVOT_TABLE_CONFIGURATIONS |
static String |
TABLE_CONF_REPORT_CONFIGURATIONS |
static String |
TABLE_CONF_SORT_FILTER |
static String |
TABLE_CONF_SORT_FILTER_CONFIGURATIONS |
static String |
TABLE_CONTROL_PANEL |
static String |
TABLE_EVEN_ROWS_COLOR
Name of the preference to set the even table rows background color
|
static String |
TABLE_VISIBLE_COLS |
defaultUserProps, listeners, props, separator, userProps| Constructor and Description |
|---|
BasicApplicationPreferences(String file)
Creates new BasicApplicationPreferences object with the preferences
stored in the file
file. |
BasicApplicationPreferences(String file,
RemoteApplicationPreferences rp)
Creates a BasicApplicationPreferences object with the preferences stored
in the file
file. |
BasicApplicationPreferences(String file,
String basePath)
Creates a BasicApplicationPreferences object with the preferences stored
in the file
file. |
BasicApplicationPreferences(String file,
String basePath,
RemoteApplicationPreferences rp)
Creates a BasicApplicationPreferences object with the preferences stored
in the file
file. |
| Modifier and Type | Method and Description |
|---|---|
protected Properties |
checkOldPreferences(String user)
This method extract the user preferences of old preferences file.
|
protected void |
createColorDialog(Window parent) |
Properties |
getAllPreferences() |
String |
getBasePath() |
protected String |
getDefault(String preferenceName)
Gets the default value for the specified preference
|
String |
getFile() |
String |
getPreference(String user,
String preferenceName)
Get the value of the preference with name
preferenceName for
the user user |
RemoteApplicationPreferences |
getRemoteApplicationPreferences() |
static Properties |
getUserLocalPreferences(String user,
Properties properties) |
Properties |
getUserPreferences() |
boolean |
isDirtyMode() |
protected void |
loadDefaults()
Initializes the default preference values
|
void |
loadPreferences()
Load the preference values
|
static void |
main(String[] args) |
static String |
parserPropertiesToStringBase64(Properties properties) |
static Properties |
parserStringBase64ToProperties(String properties) |
protected static Properties |
retrieveProperties(String properties) |
void |
savePreferences()
Save the current preference values
|
void |
setBasePath(String basePath) |
void |
setDirtyMode(boolean dirtyMode) |
void |
setFile(String file) |
void |
setLoadDefaults(boolean value) |
void |
setPreference(String user,
String preferenceName,
String value)
Sets the value of the preference with name
preferenceName
for the user user |
void |
setRemoteApplicationPreferences(RemoteApplicationPreferences rp) |
protected void |
setResourceBundleColorChooser() |
protected void |
setUserPreferences(Properties current) |
void |
showColorChooserDialog(Window parent) |
void |
showPreferencesDialog(String user,
String formManager,
String form,
Application a)
Show a dialog to configure the user preferences
|
addApplicationPreferencesListener, fireApplicationPreferencesChanged, getKeyPreference, getProperties, removeApplicationPreferencesListenerpublic static boolean remoteUserPreferences
public static boolean checkOldPreferences
public boolean dirtyMode
public static boolean DEBUG
public static final String APP_LOCALE
public static final String APP_CONNECT_TO
public static final String TABLE_EVEN_ROWS_COLOR
public static final String TABLE_VISIBLE_COLS
public static final String TABLE_CONTROL_PANEL
public static final String TABLE_CONF_SORT_FILTER
public static final String TABLE_CONF_SORT_FILTER_CONFIGURATIONS
public static final String TABLE_CONF_REPORT_CONFIGURATIONS
public static final String TABLE_CONF_CHART_CONFIGURATIONS
public static final String TABLE_COLS_POSITION_SIZE
public static final String TABLE_CONF_PIVOT_TABLE_CONFIGURATIONS
public static final String TABLE_CALCULATED_COLUMNS_CONFIGURATION
public static final String REQUIRED_FIELDS_BG_COLOR
public static final String FOCUSED_FIELD_BG_COLOR
public static final String SHOW_TIPS
public static final String SHOW_TABLE_CONTROLS
public static final String SHOW_TABLE_NUM_ROW
public static final String APP_WINDOW_POSITION
public static final String APP_WINDOW_STATE
public static final String APP_WINDOW_SIZE
public static final String APP_STATUS_BAR_VISIBLE
public static final String APP_TOOL_BAR_VISIBLE
public static final String APP_FONTSIZE
public static final String ADJUST_TREE_SPACE
public static boolean ADJUST_TREE_SPACE_VALUE
public static final String APP_REMEMBER_LAST_LOGIN
public static final String APP_LAST_LOGIN
public static final String APP_REMEMBER_LAST_PASSWORD
public static final String APP_LAST_PASSWORD
public static final String APP_USER_DIR
public static final String LOOK_AND_FEEL_CLASS_NAME
public static final String SPLIT_POSITION
public static final String COLLAPSIBLE_PANEL_VISIBLE
public static final String DETAIL_DIALOG_SIZE_POSITION
public static final String DIALOG_SIZE_POSITION
public static final String APP_TOOLBAR_LOCATION
public static final String MENU_ACCELERATOR
public static final String FORM_TABLEVIEW_COLUMNS
protected JDialog dPreferences
protected String file
protected String basePath
protected JDialog colorDialog
protected JPanel panelTableColor
protected JPanel panelRequiredBackgroundColor
protected JPanel panelFieldBackgroundColor
protected static String T_COLORS
protected static String L_EVEN_COLOR_TABLE_ROW
protected static String L_REQUIRED_BACKGROUND_COLOR_FIELD
protected static String L_FOCUS_COLOR_FIELD
protected JLabel labelTableColor
protected JLabel labelRequiredBackgroungColor
protected JLabel backgroundColorFieldLabel
protected JButton okButton
protected JButton cancelButton
protected JButton restoreButton
protected RemoteApplicationPreferences rprefs
protected boolean loadDeaults
public BasicApplicationPreferences(String file)
file.file - Name of the file (without path) that contains the application
preferences. This file must be in the user directorypublic BasicApplicationPreferences(String file, String basePath)
file.file - Name of the preferences filebasePath - Path where the file ispublic BasicApplicationPreferences(String file, RemoteApplicationPreferences rp)
file.file - Name of the file (without path). This file must be in the user
directoryrp - Remote preferencespublic BasicApplicationPreferences(String file, String basePath, RemoteApplicationPreferences rp)
file.file - Name of the filebasePath - Path where the file isrp - Remote preferencespublic String getFile()
public void setFile(String file)
public String getBasePath()
public void setBasePath(String basePath)
public void setLoadDefaults(boolean value)
public void loadPreferences()
ApplicationPreferencesprotected void loadDefaults()
public String getPreference(String user, String preferenceName)
ApplicationPreferencespreferenceName for
the user useruser - Name of the user or null if the preference is for all userspreferenceName - Name of the preferenceprotected String getDefault(String preferenceName)
preferenceName - public void setPreference(String user, String preferenceName, String value)
ApplicationPreferencespreferenceName
for the user useruser - Name of the user or null if the preference is for all userspreferenceName - Name of the preferencevalue - The value for the preferencepublic void savePreferences()
ApplicationPreferencespublic void showPreferencesDialog(String user, String formManager, String form, Application a)
ApplicationPreferencespublic void showColorChooserDialog(Window parent)
protected void setResourceBundleColorChooser()
protected void createColorDialog(Window parent)
public void setRemoteApplicationPreferences(RemoteApplicationPreferences rp)
public RemoteApplicationPreferences getRemoteApplicationPreferences()
public static String parserPropertiesToStringBase64(Properties properties)
public static Properties parserStringBase64ToProperties(String properties)
protected static Properties retrieveProperties(String properties) throws Exception
Exceptionpublic static Properties getUserLocalPreferences(String user, Properties properties)
public Properties getUserPreferences()
protected void setUserPreferences(Properties current)
protected Properties checkOldPreferences(String user)
user - public Properties getAllPreferences()
public boolean isDirtyMode()
public void setDirtyMode(boolean dirtyMode)
public static void main(String[] args)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.