01: package de.ixdb.squirrel_sql.plugins.cache;
02:
03: import javax.swing.*;
04: import java.awt.*;
05:
06: public class NamespaceDlg extends JDialog {
07: JTextField txtAliasNameTemplate;
08: JTable tblNamespaces;
09:
10: public NamespaceDlg(JFrame mainFrame) {
11: super (mainFrame, "Create alias for namespace");
12:
13: getContentPane().setLayout(new BorderLayout(0, 3));
14:
15: JPanel pnlContent = new JPanel(new BorderLayout(0, 5));
16:
17: pnlContent.add(new JLabel(
18: "Double click namespace to create alias"),
19: BorderLayout.NORTH);
20:
21: tblNamespaces = new JTable();
22: tblNamespaces
23: .setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
24:
25: pnlContent.add(new JScrollPane(tblNamespaces),
26: BorderLayout.CENTER);
27:
28: JPanel pnlBottom = new JPanel(new GridLayout(4, 1));
29: pnlBottom.add(new JLabel("Edit alias name template:"));
30: pnlBottom.add(new JLabel(
31: "%server will be replaced by server name"));
32: pnlBottom.add(new JLabel(
33: "%namespace will be replaced by namespace name"));
34:
35: txtAliasNameTemplate = new JTextField();
36: pnlBottom.add(txtAliasNameTemplate);
37: pnlContent.add(pnlBottom, BorderLayout.SOUTH);
38:
39: getContentPane().add(new JPanel(), BorderLayout.NORTH);
40: getContentPane().add(pnlContent, BorderLayout.CENTER);
41:
42: }
43: }
|