01: package net.sourceforge.squirrel_sql.plugins.oracle;
02:
03: import net.sourceforge.squirrel_sql.fw.util.StringManager;
04: import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
05: import net.sourceforge.squirrel_sql.fw.gui.MultipleLineLabel;
06:
07: import javax.swing.*;
08: import java.awt.*;
09:
10: public class OracleAliasPrefsPanel extends JPanel {
11: private static final StringManager s_stringMgr = StringManagerFactory
12: .getStringManager(OracleAliasPrefsPanel.class);
13:
14: JRadioButton radLoadAccessibleSchemasExceptSYS;
15: JRadioButton radLoadAccessibleSchemasAndSYS;
16: JRadioButton radLoadAllSchemas;
17:
18: JButton btnApplyNow;
19:
20: public OracleAliasPrefsPanel() {
21: setLayout(new GridBagLayout());
22:
23: GridBagConstraints gbc;
24:
25: gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0,
26: GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
27: new Insets(5, 5, 15, 5), 0, 0);
28: // i18n[OracleAliasPrefsPanel.header=Configure Oracle Schema loading properties]
29: JLabel lblHeader = new JLabel(s_stringMgr
30: .getString("OracleAliasPrefsPanel.header"));
31: Font oldFont = lblHeader.getFont();
32: Font newFont = new Font(oldFont.getName(), Font.BOLD, oldFont
33: .getSize());
34: lblHeader.setFont(newFont);
35: add(lblHeader, gbc);
36:
37: gbc = new GridBagConstraints(0, 1, 1, 1, 1, 0,
38: GridBagConstraints.NORTHWEST,
39: GridBagConstraints.HORIZONTAL, new Insets(5, 5, 30, 5),
40: 0, 0);
41: // i18n[OraclePrefsPanel.Description= "Interactions with Schema Alias properties (see 'Schemas' tab):\n
42: //\n
43: //1. 'Load all Schemas, cache none': Oracle Alias properties will take effect immediately.\n
44: //\n
45: //2. 'Load and cache all Schemas': Oracle Alias properties will take effect on next 'Refresh all' inside a Session.\n
46: //\n
47: //3. 'Specify Schema loading and Caching': Oracle Alias properties will take effect when the Schemas table on the 'Schemas' tab is refreshed.\n
48: //\n
49: //Note: If Schema Alias properties are set to load all cache none and Oracle Alias properties is set to 'Allow all Schemas' this may result in very long Session startup time.]
50: String desc = s_stringMgr
51: .getString("OraclePrefsPanel.Description");
52: add(new MultipleLineLabel(desc), gbc);
53:
54: gbc = new GridBagConstraints(0, 2, 1, 1, 0, 0,
55: GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
56: new Insets(0, 5, 5, 5), 0, 0);
57: // i18n[OracleAliasPrefsPanel.AccessibleButSys=Allow accessible Schemas excluding SYS]
58: radLoadAccessibleSchemasExceptSYS = new JRadioButton(
59: s_stringMgr
60: .getString("OracleAliasPrefsPanel.AccessibleButSys"));
61: add(radLoadAccessibleSchemasExceptSYS, gbc);
62:
63: gbc = new GridBagConstraints(0, 3, 1, 1, 0, 0,
64: GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
65: new Insets(0, 5, 5, 5), 0, 0);
66: // i18n[OracleAliasPrefsPanel.AccessibleAndSys=Allow accessible Schemas and SYS]
67: radLoadAccessibleSchemasAndSYS = new JRadioButton(s_stringMgr
68: .getString("OracleAliasPrefsPanel.AccessibleAndSys"));
69: add(radLoadAccessibleSchemasAndSYS, gbc);
70:
71: gbc = new GridBagConstraints(0, 4, 1, 1, 0, 0,
72: GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
73: new Insets(0, 5, 5, 5), 0, 0);
74: // i18n[OracleAliasPrefsPanel.All=Allow all Schemas]
75: radLoadAllSchemas = new JRadioButton(s_stringMgr
76: .getString("OracleAliasPrefsPanel.All"));
77: add(radLoadAllSchemas, gbc);
78:
79: gbc = new GridBagConstraints(0, 5, 1, 1, 0, 0,
80: GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
81: new Insets(15, 5, 5, 5), 0, 0);
82: // i18n[OracleAliasPrefsPanel.ApplyNow=Apply now]
83: btnApplyNow = new JButton(s_stringMgr
84: .getString("OracleAliasPrefsPanel.ApplyNow"));
85: add(btnApplyNow, gbc);
86:
87: gbc = new GridBagConstraints(0, 6, 1, 1, 0, 1,
88: GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
89: new Insets(0, 0, 0, 0), 0, 0);
90: add(new JPanel(), gbc);
91:
92: ButtonGroup bg = new ButtonGroup();
93: bg.add(radLoadAccessibleSchemasExceptSYS);
94: bg.add(radLoadAccessibleSchemasAndSYS);
95: bg.add(radLoadAllSchemas);
96:
97: }
98:
99: }
|