|
| 1 | +package com.fangxuele.tool.push.ui.form.account; |
| 2 | + |
| 3 | +import com.fangxuele.tool.push.util.UndoUtil; |
| 4 | +import com.intellij.uiDesigner.core.GridConstraints; |
| 5 | +import com.intellij.uiDesigner.core.GridLayoutManager; |
| 6 | +import com.intellij.uiDesigner.core.Spacer; |
| 7 | + |
| 8 | +import javax.swing.*; |
| 9 | +import java.awt.*; |
| 10 | + |
| 11 | +public class QiniuYunAccountForm implements IAccountForm { |
| 12 | + private JPanel wxMpAccountPanel; |
| 13 | + private JTextField qiniuAccessKeyTextField; |
| 14 | + private JTextField qiniuSecretKeyTextField; |
| 15 | + |
| 16 | + private static QiniuYunAccountForm wxMpAccountForm; |
| 17 | + |
| 18 | + @Override |
| 19 | + public void init(String accountName) { |
| 20 | + |
| 21 | + } |
| 22 | + |
| 23 | + @Override |
| 24 | + public void save(String accountName) { |
| 25 | + |
| 26 | + } |
| 27 | + |
| 28 | + @Override |
| 29 | + public JPanel getMainPanel() { |
| 30 | + return wxMpAccountPanel; |
| 31 | + } |
| 32 | + |
| 33 | + public static QiniuYunAccountForm getInstance() { |
| 34 | + if (wxMpAccountForm == null) { |
| 35 | + wxMpAccountForm = new QiniuYunAccountForm(); |
| 36 | + } |
| 37 | + UndoUtil.register(wxMpAccountForm); |
| 38 | + return wxMpAccountForm; |
| 39 | + } |
| 40 | + |
| 41 | + { |
| 42 | +// GUI initializer generated by IntelliJ IDEA GUI Designer |
| 43 | +// >>> IMPORTANT!! <<< |
| 44 | +// DO NOT EDIT OR ADD ANY CODE HERE! |
| 45 | + $$$setupUI$$$(); |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * Method generated by IntelliJ IDEA GUI Designer |
| 50 | + * >>> IMPORTANT!! <<< |
| 51 | + * DO NOT edit this method OR call it in your code! |
| 52 | + * |
| 53 | + * @noinspection ALL |
| 54 | + */ |
| 55 | + private void $$$setupUI$$$() { |
| 56 | + wxMpAccountPanel = new JPanel(); |
| 57 | + wxMpAccountPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 5, 0, 0), -1, -1)); |
| 58 | + final JPanel panel1 = new JPanel(); |
| 59 | + panel1.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1)); |
| 60 | + wxMpAccountPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
| 61 | + final Spacer spacer1 = new Spacer(); |
| 62 | + panel1.add(spacer1, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); |
| 63 | + final JLabel label1 = new JLabel(); |
| 64 | + label1.setText("AcessKey"); |
| 65 | + panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
| 66 | + final JLabel label2 = new JLabel(); |
| 67 | + label2.setText("SecretKey"); |
| 68 | + panel1.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
| 69 | + qiniuAccessKeyTextField = new JTextField(); |
| 70 | + panel1.add(qiniuAccessKeyTextField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(300, -1), new Dimension(300, -1), null, 0, false)); |
| 71 | + qiniuSecretKeyTextField = new JTextField(); |
| 72 | + panel1.add(qiniuSecretKeyTextField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(300, -1), new Dimension(300, -1), null, 0, false)); |
| 73 | + } |
| 74 | + |
| 75 | + /** |
| 76 | + * @noinspection ALL |
| 77 | + */ |
| 78 | + public JComponent $$$getRootComponent$$$() { |
| 79 | + return wxMpAccountPanel; |
| 80 | + } |
| 81 | + |
| 82 | +} |
0 commit comments