Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5482/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties
Modified Files:
ColorPropertiesPanel.java I18NStrings.properties
ColorPropertiesController.java
Log Message:
Added i18nStrings and tests.
Index: ColorPropertiesPanel.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/ColorPropertiesPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ColorPropertiesPanel.java 28 Nov 2009 20:14:51 -0000 1.1
--- ColorPropertiesPanel.java 28 Nov 2009 21:38:59 -0000 1.2
***************
*** 63,69 ****
private JCheckBox toolbarBackgroundColorChk = new JCheckBox("");
! private JButton toolbarBackgroundColorBtn = new JButton("Choose Toolbar Color");
! private JLabel toolBarBackgroundLbl = new JLabel("Background Color");
private JPanel toolbarBackgroundColorPnl = new JPanel();
--- 63,69 ----
private JCheckBox toolbarBackgroundColorChk = new JCheckBox("");
! private JButton toolbarBackgroundColorBtn = null;
! private JLabel toolBarBackgroundLbl = null;
private JPanel toolbarBackgroundColorPnl = new JPanel();
***************
*** 71,76 ****
private Color toolbarBackgroundColor = null;
! private JCheckBox syncComponentBackgroundColorChk =
! new JCheckBox("Use toolbar background color for all components");
// Object Tree
--- 71,75 ----
private Color toolbarBackgroundColor = null;
! private JCheckBox syncComponentBackgroundColorChk = null;
// Object Tree
***************
*** 78,84 ****
private JCheckBox objectTreeBackgroundColorChk = new JCheckBox("");
! private JButton objectTreeBackgroundColorBtn = new JButton("Choose Object Tree Color");
! private JLabel objectTreeBackgroundLbl = new JLabel("Background Color");
private JPanel objectTreeBackgroundColorPnl = new JPanel();
--- 77,83 ----
private JCheckBox objectTreeBackgroundColorChk = new JCheckBox("");
! private JButton objectTreeBackgroundColorBtn = null;
! private JLabel objectTreeBackgroundLbl = null;
private JPanel objectTreeBackgroundColorPnl = new JPanel();
***************
*** 90,96 ****
private JCheckBox statusBarBackgroundColorChk = new JCheckBox("");
! private JButton statusBarBackgroundColorBtn = new JButton("Choose Status Bar Color");
! private JLabel statusBarBackgroundLbl = new JLabel("Background Color");
private JPanel statusBarBackgroundColorPnl = new JPanel();
--- 89,95 ----
private JCheckBox statusBarBackgroundColorChk = new JCheckBox("");
! private JButton statusBarBackgroundColorBtn = null;
! private JLabel statusBarBackgroundLbl = null;
private JPanel statusBarBackgroundColorPnl = new JPanel();
***************
*** 98,104 ****
private Color statusBarBackgroundColor = null;
! private interface i18n
{
String INSTRUCTIONS = s_stringMgr.getString("ColorPropertiesPanel.instructions");
}
--- 97,140 ----
private Color statusBarBackgroundColor = null;
! public interface i18n
{
+ // i18n[ColorPropertiesPanel.backgroundColorLabel=Background Color]
+ String BACKGROUND_COLOR_LABEL = s_stringMgr.getString("ColorPropertiesPanel.backgroundColorLabel");
+
+ // i18n[ColorPropertiesPanel.instructions=These settings control the background colors...]
String INSTRUCTIONS = s_stringMgr.getString("ColorPropertiesPanel.instructions");
+
+ // i18n[ColorPropertiesPanel.objectTreeBackgroundColorChooserDialogTitle=Select Background Color for
+ // Object Tree]
+ String OBJECT_TREE_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE =
+ s_stringMgr.getString("ColorPropertiesPanel.objectTreeBackgroundColorChooserDialogTitle");
+
+ // i18n[ColorPropertiesPanel.statusBarBackgroundColorBtnLabel=Choose Status Bar Color]
+ String STATUS_BAR_BACKGROUND_COLOR_BUTTON_LABEL =
+ s_stringMgr.getString("ColorPropertiesPanel.statusBarBackgroundColorBtnLabel");
+
+ // i18n[ColorPropertiesPanel.toolbarBackgroundColorChooserDialogTitle=Select Background Color for
+ // Toolbar]
+ String TOOLBAR_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE =
+ s_stringMgr.getString("ColorPropertiesPanel.toolbarBackgroundColorChooserDialogTitle");
+
+ // i18n[ColorPropertiesPanel.toolbarBackgroundColorBtnLabel=Choose Toolbar Color]
+ String TOOLBAR_BACKGROUND_COLOR_BUTTON_LABEL =
+ s_stringMgr.getString("ColorPropertiesPanel.toolbarBackgroundColorBtnLabel");
+
+ // i18n[ColorPropertiesPanel.syncComponentBackgroundColorChkLabel=Use toolbar background color for all
+ // components]
+ String SYNC_COMPONENT_BACKGROUND_COLOR_CHK_LABEL =
+ s_stringMgr.getString("ColorPropertiesPanel.syncComponentBackgroundColorChkLabel");
+
+ // i18n[ColorPropertiesPanel.objectTreeBackgroundColorButtonLabel=Choose Object Tree Color]
+ String OBJECT_TREE_BACKGROUND_COLOR_BUTTON_LABEL =
+ s_stringMgr.getString("ColorPropertiesPanel.objectTreeBackgroundColorButtonLabel");
+
+ // i18n[ColorPropertiesPanel.statusBarBackgroundColorChooserDialogTitle=Select Background Color for
+ // Status Bar]
+ String STATUS_BAR_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE =
+ s_stringMgr.getString("ColorPropertiesPanel.statusBarBackgroundColorChooserDialogTitle");
+
}
***************
*** 201,204 ****
--- 237,241 ----
++gbc.gridx;
gbc.gridwidth = 2;
+ syncComponentBackgroundColorChk = new JCheckBox(i18n.SYNC_COMPONENT_BACKGROUND_COLOR_CHK_LABEL);
add(syncComponentBackgroundColorChk, gbc);
***************
*** 236,239 ****
--- 273,277 ----
// Set object tree color button
++gbc.gridx;
+ statusBarBackgroundColorBtn = new JButton(i18n.STATUS_BAR_BACKGROUND_COLOR_BUTTON_LABEL);
add(statusBarBackgroundColorBtn, gbc);
***************
*** 244,250 ****
statusBarBackgroundColorChk.setSelected(_props.isOverrideStatusBarBackgroundColor());
statusBarBackgroundColorBtn.setEnabled(_props.isOverrideObjectTreeBackgroundColor());
statusBarBackgroundColorPnl.add(statusBarBackgroundLbl);
statusBarBackgroundColorPnl.setEnabled(_props.isOverrideStatusBarBackgroundColor());
! statusBarBackgroundLbl.setEnabled(_props.isOverrideStatusBarBackgroundColor());
if (_props.isOverrideStatusBarBackgroundColor())
{
--- 282,292 ----
statusBarBackgroundColorChk.setSelected(_props.isOverrideStatusBarBackgroundColor());
statusBarBackgroundColorBtn.setEnabled(_props.isOverrideObjectTreeBackgroundColor());
+
+ statusBarBackgroundLbl = new JLabel(i18n.BACKGROUND_COLOR_LABEL);
+ statusBarBackgroundLbl.setEnabled(_props.isOverrideStatusBarBackgroundColor());
+
statusBarBackgroundColorPnl.add(statusBarBackgroundLbl);
statusBarBackgroundColorPnl.setEnabled(_props.isOverrideStatusBarBackgroundColor());
!
if (_props.isOverrideStatusBarBackgroundColor())
{
***************
*** 283,287 ****
Color startColor = statusBarBackgroundColor == null ? Color.WHITE : statusBarBackgroundColor;
Color newColor =
! JColorChooser.showDialog(null, "Select Background Color for Status Bar", startColor);
if (newColor != null)
{
--- 325,330 ----
Color startColor = statusBarBackgroundColor == null ? Color.WHITE : statusBarBackgroundColor;
Color newColor =
! JColorChooser.showDialog(null, i18n.STATUS_BAR_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE,
! startColor);
if (newColor != null)
{
***************
*** 310,313 ****
--- 353,357 ----
// Set object tree color button
++gbc.gridx;
+ objectTreeBackgroundColorBtn = new JButton(i18n.OBJECT_TREE_BACKGROUND_COLOR_BUTTON_LABEL);
add(objectTreeBackgroundColorBtn, gbc);
***************
*** 318,321 ****
--- 362,366 ----
objectTreeBackgroundColorChk.setSelected(_props.isOverrideObjectTreeBackgroundColor());
objectTreeBackgroundColorBtn.setEnabled(_props.isOverrideObjectTreeBackgroundColor());
+ objectTreeBackgroundLbl = new JLabel(i18n.BACKGROUND_COLOR_LABEL);
objectTreeBackgroundColorPnl.add(objectTreeBackgroundLbl);
objectTreeBackgroundColorPnl.setEnabled(_props.isOverrideObjectTreeBackgroundColor());
***************
*** 357,361 ****
Color startColor = objectTreeBackgroundColor == null ? Color.WHITE : objectTreeBackgroundColor;
Color newColor =
! JColorChooser.showDialog(null, "Select Background Color for Object Tree", startColor);
if (newColor != null)
{
--- 402,407 ----
Color startColor = objectTreeBackgroundColor == null ? Color.WHITE : objectTreeBackgroundColor;
Color newColor =
! JColorChooser.showDialog(null, i18n.OBJECT_TREE_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE,
! startColor);
if (newColor != null)
{
***************
*** 377,380 ****
--- 423,427 ----
// Set toolbar color button
++gbc.gridx;
+ toolbarBackgroundColorBtn = new JButton(i18n.TOOLBAR_BACKGROUND_COLOR_BUTTON_LABEL);
add(toolbarBackgroundColorBtn, gbc);
***************
*** 385,388 ****
--- 432,436 ----
toolbarBackgroundColorChk.setSelected(_props.isOverrideToolbarBackgroundColor());
toolbarBackgroundColorBtn.setEnabled(_props.isOverrideToolbarBackgroundColor());
+ toolBarBackgroundLbl = new JLabel(i18n.BACKGROUND_COLOR_LABEL);
toolbarBackgroundColorPnl.add(toolBarBackgroundLbl);
toolbarBackgroundColorPnl.setEnabled(_props.isOverrideToolbarBackgroundColor());
***************
*** 424,428 ****
Color startColor = toolbarBackgroundColor == null ? Color.WHITE : toolbarBackgroundColor;
Color newColor =
! JColorChooser.showDialog(null, "Select Background Color for Toolbar", startColor);
if (newColor != null)
{
--- 472,476 ----
Color startColor = toolbarBackgroundColor == null ? Color.WHITE : toolbarBackgroundColor;
Color newColor =
! JColorChooser.showDialog(null, i18n.TOOLBAR_BACKGROUND_COLOR_CHOOSER_DIALOG_TITLE, startColor);
if (newColor != null)
{
Index: I18NStrings.properties
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/I18NStrings.properties,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** I18NStrings.properties 28 Nov 2009 20:14:51 -0000 1.10
--- I18NStrings.properties 28 Nov 2009 21:38:59 -0000 1.11
***************
*** 11,19 ****
ColorPropertiesController.hint=Set session colors for this Alias
ColorPropertiesPanel.instructions=These settings control the background colors for various components in the \
sessions created from this alias. This can provide a visual clue for differentiating sessions so that, for \
example, production databases aren't mistaken for development databases. Select the checkbox on the left \
for each component background color to override.
! ColorPropertiesController.title=Color Properties
DriverPropertiesController.noDriverSelected=No driver available in this Alias.\nCan not load driver properties tab.
--- 11,30 ----
ColorPropertiesController.hint=Set session colors for this Alias
+ ColorPropertiesController.title=Color Properties
+
+
+ ColorPropertiesPanel.backgroundColorLabel=Background Color
ColorPropertiesPanel.instructions=These settings control the background colors for various components in the \
sessions created from this alias. This can provide a visual clue for differentiating sessions so that, for \
example, production databases aren't mistaken for development databases. Select the checkbox on the left \
for each component background color to override.
! ColorPropertiesPanel.objectTreeBackgroundColorButtonLabel=Choose Object Tree Color
! ColorPropertiesPanel.objectTreeBackgroundColorChooserDialogTitle=Select Background Color for Object Tree
! ColorPropertiesPanel.statusBarBackgroundColorBtnLabel=Choose Status Bar Color
! ColorPropertiesPanel.statusBarBackgroundColorChooserDialogTitle=Select Background Color for Status Bar
! ColorPropertiesPanel.syncComponentBackgroundColorChkLabel=Use toolbar background color for all components
! ColorPropertiesPanel.toolbarBackgroundColorBtnLabel=Choose Toolbar Color
! ColorPropertiesPanel.toolbarBackgroundColorChooserDialogTitle=Select Background Color for Toolbar
!
DriverPropertiesController.noDriverSelected=No driver available in this Alias.\nCan not load driver properties tab.
Index: ColorPropertiesController.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/ColorPropertiesController.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ColorPropertiesController.java 28 Nov 2009 20:14:51 -0000 1.1
--- ColorPropertiesController.java 28 Nov 2009 21:38:59 -0000 1.2
***************
*** 44,47 ****
--- 44,55 ----
private ISQLAliasExt _alias;
+ public static interface i18n {
+ // i18n[ColorPropertiesController.title=Color Properties]
+ String TITLE = s_stringMgr.getString("ColorPropertiesController.title");
+
+ // i18n[ColorPropertiesController.hint=Set session colors for this Alias]
+ String HINT = s_stringMgr.getString("ColorPropertiesController.hint");
+ }
+
public ColorPropertiesController(ISQLAliasExt alias, IApplication app)
{
***************
*** 62,73 ****
public String getTitle()
{
! // i18n[ColorPropertiesController.title=Color Properties]
! return s_stringMgr.getString("ColorPropertiesController.title");
}
public String getHint()
{
! // i18n[ColorPropertiesController.hint=Set session colors for this Alias]
! return s_stringMgr.getString("ColorPropertiesController.hint");
}
--- 70,79 ----
public String getTitle()
{
! return i18n.TITLE;
}
public String getHint()
{
! return i18n.HINT;
}
|