|
1 | 1 | package com.tagmycode.plugin.gui.form; |
2 | 2 |
|
| 3 | +import com.intellij.uiDesigner.core.GridConstraints; |
| 4 | +import com.intellij.uiDesigner.core.GridLayoutManager; |
| 5 | +import com.intellij.uiDesigner.core.Spacer; |
| 6 | +import com.jgoodies.forms.layout.CellConstraints; |
| 7 | +import com.jgoodies.forms.layout.FormLayout; |
3 | 8 | import com.tagmycode.plugin.AbstractVersion; |
4 | 9 | import com.tagmycode.plugin.Framework; |
5 | 10 | import com.tagmycode.plugin.gui.GuiUtil; |
@@ -88,4 +93,112 @@ public JComponent getMainComponent() { |
88 | 93 | protected void onOK() { |
89 | 94 |
|
90 | 95 | } |
| 96 | + |
| 97 | + { |
| 98 | +// GUI initializer generated by IntelliJ IDEA GUI Designer |
| 99 | +// >>> IMPORTANT!! <<< |
| 100 | +// DO NOT EDIT OR ADD ANY CODE HERE! |
| 101 | + $$$setupUI$$$(); |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * Method generated by IntelliJ IDEA GUI Designer |
| 106 | + * >>> IMPORTANT!! <<< |
| 107 | + * DO NOT edit this method OR call it in your code! |
| 108 | + * |
| 109 | + * @noinspection ALL |
| 110 | + */ |
| 111 | + private void $$$setupUI$$$() { |
| 112 | + contentPane = new JPanel(); |
| 113 | + contentPane.setLayout(new GridLayoutManager(8, 1, new Insets(10, 10, 10, 10), -1, -1)); |
| 114 | + final JPanel panel1 = new JPanel(); |
| 115 | + panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); |
| 116 | + contentPane.add(panel1, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false)); |
| 117 | + final JPanel panel2 = new JPanel(); |
| 118 | + panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); |
| 119 | + panel1.add(panel2, new GridConstraints(0, 2, 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)); |
| 120 | + buttonCancel = new JButton(); |
| 121 | + buttonCancel.setText("Close"); |
| 122 | + panel2.add(buttonCancel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
| 123 | + licenseButton = new JButton(); |
| 124 | + licenseButton.setText("License"); |
| 125 | + panel1.add(licenseButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
| 126 | + reportAnIssueButton = new JButton(); |
| 127 | + reportAnIssueButton.setText("Report an issue"); |
| 128 | + panel1.add(reportAnIssueButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
| 129 | + final JPanel panel3 = new JPanel(); |
| 130 | + panel3.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1)); |
| 131 | + contentPane.add(panel3, 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)); |
| 132 | + final JLabel label1 = new JLabel(); |
| 133 | + label1.setIcon(new ImageIcon(getClass().getResource("/images/tagmycode_logo.png"))); |
| 134 | + label1.setText(""); |
| 135 | + panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
| 136 | + final JPanel panel4 = new JPanel(); |
| 137 | + panel4.setLayout(new FormLayout("fill:d:grow", "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:d:grow,top:4dlu:noGrow,top:4dlu:noGrow")); |
| 138 | + contentPane.add(panel4, new GridConstraints(3, 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)); |
| 139 | + pluginVersionLabel = new JLabel(); |
| 140 | + pluginVersionLabel.setText("Plugin version:"); |
| 141 | + CellConstraints cc = new CellConstraints(); |
| 142 | + panel4.add(pluginVersionLabel, cc.xy(1, 3)); |
| 143 | + frameworkBuildDateLabel = new JLabel(); |
| 144 | + frameworkBuildDateLabel.setText("Framework build date:"); |
| 145 | + panel4.add(frameworkBuildDateLabel, cc.xy(1, 9)); |
| 146 | + title = new JLabel(); |
| 147 | + Font titleFont = this.$$$getFont$$$(null, Font.BOLD, 16, title.getFont()); |
| 148 | + if (titleFont != null) title.setFont(titleFont); |
| 149 | + title.setText("TagMyCode Plugin"); |
| 150 | + panel4.add(title, cc.xy(1, 1)); |
| 151 | + frameworkVersionLabel = new JLabel(); |
| 152 | + frameworkVersionLabel.setText("Framework version:"); |
| 153 | + panel4.add(frameworkVersionLabel, cc.xy(1, 7)); |
| 154 | + final Spacer spacer1 = new Spacer(); |
| 155 | + panel4.add(spacer1, cc.xy(1, 15, CellConstraints.DEFAULT, CellConstraints.FILL)); |
| 156 | + final JToolBar.Separator toolBar$Separator1 = new JToolBar.Separator(); |
| 157 | + panel4.add(toolBar$Separator1, cc.xy(1, 5)); |
| 158 | + final JLabel label2 = new JLabel(); |
| 159 | + label2.setText("User directory:"); |
| 160 | + panel4.add(label2, cc.xy(1, 11)); |
| 161 | + userDirectoryTextField = new JTextField(); |
| 162 | + userDirectoryTextField.setEditable(false); |
| 163 | + panel4.add(userDirectoryTextField, cc.xy(1, 13, CellConstraints.FILL, CellConstraints.DEFAULT)); |
| 164 | + final JPanel panel5 = new JPanel(); |
| 165 | + panel5.setLayout(new BorderLayout(0, 0)); |
| 166 | + contentPane.add(panel5, new GridConstraints(1, 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, new Dimension(-1, 30), null, 0, false)); |
| 167 | + final JSeparator separator1 = new JSeparator(); |
| 168 | + panel5.add(separator1, BorderLayout.CENTER); |
| 169 | + tagmycodeLinkLabel = new JLabel(); |
| 170 | + tagmycodeLinkLabel.setHorizontalAlignment(0); |
| 171 | + tagmycodeLinkLabel.setText("<html><a href=\"\">www.tagmycode.com</a>"); |
| 172 | + contentPane.add(tagmycodeLinkLabel, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
| 173 | + final Spacer spacer2 = new Spacer(); |
| 174 | + contentPane.add(spacer2, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); |
| 175 | + final Spacer spacer3 = new Spacer(); |
| 176 | + contentPane.add(spacer3, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); |
| 177 | + } |
| 178 | + |
| 179 | + /** |
| 180 | + * @noinspection ALL |
| 181 | + */ |
| 182 | + private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) { |
| 183 | + if (currentFont == null) return null; |
| 184 | + String resultName; |
| 185 | + if (fontName == null) { |
| 186 | + resultName = currentFont.getName(); |
| 187 | + } else { |
| 188 | + Font testFont = new Font(fontName, Font.PLAIN, 10); |
| 189 | + if (testFont.canDisplay('a') && testFont.canDisplay('1')) { |
| 190 | + resultName = fontName; |
| 191 | + } else { |
| 192 | + resultName = currentFont.getName(); |
| 193 | + } |
| 194 | + } |
| 195 | + return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), size >= 0 ? size : currentFont.getSize()); |
| 196 | + } |
| 197 | + |
| 198 | + /** |
| 199 | + * @noinspection ALL |
| 200 | + */ |
| 201 | + public JComponent $$$getRootComponent$$$() { |
| 202 | + return contentPane; |
| 203 | + } |
91 | 204 | } |
0 commit comments