Permalink
Browse files

Generate UI related code into .java files

This allows UI to be compiled in Eclipse or any other IDE.
  • Loading branch information...
1 parent 3b6b0e9 commit 9b6851713517a006ee1ec75601c8b3fcc62f64f9 Igor Cher committed Dec 23, 2012
View
53 pom.xml
@@ -27,6 +27,10 @@
</repository>
</repositories>
+ <properties>
+ <hbase.version>0.90.4</hbase.version>
+ </properties>
+
<profiles>
<profile>
<id>cdh4</id>
@@ -112,23 +116,6 @@
</executions>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>ideauidesigner-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
- <executions>
- <execution>
- <goals>
- <goal>javac2</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <fork>true</fork>
- <debug>true</debug>
- <failOnError>true</failOnError>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
@@ -156,6 +143,38 @@
</configuration>
</plugin>
</plugins>
+
+ <!--This section allows this POM to be valid for eclipse-->
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <versionRange>[2.5.1,)</versionRange>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
</build>
</project>
@@ -31,7 +31,7 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
- <text value="OK"/>
+ <text value="Add"/>
</properties>
</component>
<component id="5723f" class="javax.swing.JButton" binding="buttonCancel">
@@ -1,5 +1,8 @@
package hrider.ui.forms;
+import com.intellij.uiDesigner.core.GridConstraints;
+import com.intellij.uiDesigner.core.GridLayoutManager;
+
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
@@ -114,4 +117,95 @@ private void onCancel() {
dispose();
}
//endregion
+
+ {
+ // GUI initializer generated by IntelliJ IDEA GUI Designer
+ // >>> IMPORTANT!! <<<
+ // DO NOT EDIT OR ADD ANY CODE HERE!
+ $$$setupUI$$$();
+ }
+
+ /**
+ * Method generated by IntelliJ IDEA GUI Designer
+ * >>> IMPORTANT!! <<<
+ * DO NOT edit this method OR call it in your code!
+ *
+ * @noinspection ALL
+ */
+ private void $$$setupUI$$$() {
+ contentPane = new JPanel();
+ contentPane.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));
+ contentPane.setMaximumSize(new Dimension(342, 160));
+ final JPanel panel1 = new JPanel();
+ panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
+ contentPane.add(
+ panel1, new GridConstraints(
+ 2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
+ 1, null, null, null, 0, false));
+ final JPanel panel2 = new JPanel();
+ panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
+ panel1.add(
+ panel2, 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));
+ buttonOK = new JButton();
+ buttonOK.setText("Add");
+ panel2.add(
+ buttonOK, 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));
+ buttonCancel = new JButton();
+ buttonCancel.setText("Cancel");
+ panel2.add(
+ buttonCancel, 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));
+ final JPanel panel3 = new JPanel();
+ panel3.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));
+ 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));
+ final JLabel label1 = new JLabel();
+ label1.setText("Column Family");
+ panel3.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));
+ final JLabel label2 = new JLabel();
+ label2.setText("Column Name");
+ panel3.add(
+ label2, new GridConstraints(
+ 0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
+ null, 0, false));
+ comboBoxColumnFamilies = new JComboBox();
+ comboBoxColumnFamilies.setEditable(true);
+ panel3.add(
+ comboBoxColumnFamilies, new GridConstraints(
+ 1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
+ null, null, 0, false));
+ columnNameTextField = new JTextField();
+ panel3.add(
+ columnNameTextField, new GridConstraints(
+ 1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
+ new Dimension(150, -1), null, 0, false));
+ final JLabel label3 = new JLabel();
+ label3.setText(":");
+ panel3.add(
+ label3, new GridConstraints(
+ 1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
+ null, 0, false));
+ final JSeparator separator1 = new JSeparator();
+ contentPane.add(
+ separator1, new GridConstraints(
+ 1, 0, 1, 1, GridConstraints.ANCHOR_SOUTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
+ GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
+ }
+
+ /**
+ * @noinspection ALL
+ */
+ public JComponent $$$getRootComponent$$$() {
+ return contentPane;
+ }
}
@@ -1,5 +1,7 @@
package hrider.ui.forms;
+import com.intellij.uiDesigner.core.GridConstraints;
+import com.intellij.uiDesigner.core.GridLayoutManager;
import hrider.data.*;
import hrider.ui.ChangeTracker;
import hrider.ui.design.JCellEditor;
@@ -235,4 +237,78 @@ private void onCancel() {
dispose();
}
//endregion
+
+ {
+ // GUI initializer generated by IntelliJ IDEA GUI Designer
+ // >>> IMPORTANT!! <<<
+ // DO NOT EDIT OR ADD ANY CODE HERE!
+ $$$setupUI$$$();
+ }
+
+ /**
+ * Method generated by IntelliJ IDEA GUI Designer
+ * >>> IMPORTANT!! <<<
+ * DO NOT edit this method OR call it in your code!
+ *
+ * @noinspection ALL
+ */
+ private void $$$setupUI$$$() {
+ contentPane = new JPanel();
+ contentPane.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));
+ final JPanel panel1 = new JPanel();
+ panel1.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
+ contentPane.add(
+ panel1, new GridConstraints(
+ 2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
+ 1, null, null, null, 0, false));
+ final JPanel panel2 = new JPanel();
+ panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
+ panel1.add(
+ panel2, new GridConstraints(
+ 1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
+ buttonAdd = new JButton();
+ buttonAdd.setText("Add");
+ panel2.add(
+ buttonAdd, 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));
+ buttonCancel = new JButton();
+ buttonCancel.setText("Cancel");
+ panel2.add(
+ buttonCancel, 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));
+ final JSeparator separator1 = new JSeparator();
+ panel1.add(
+ separator1, new GridConstraints(
+ 0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
+ GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
+ final JPanel panel3 = new JPanel();
+ panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 5, 0), -1, -1));
+ contentPane.add(
+ panel3, 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, null, null, 0, false));
+ final JScrollPane scrollPane1 = new JScrollPane();
+ panel3.add(
+ scrollPane1, new GridConstraints(
+ 0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(500, 200), null, 0, false));
+ rowsTable = new JTable();
+ scrollPane1.setViewportView(rowsTable);
+ buttonAddColumn = new JButton();
+ buttonAddColumn.setText("Add Column...");
+ contentPane.add(
+ buttonAddColumn, new GridConstraints(
+ 0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
+ GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+ }
+
+ /**
+ * @noinspection ALL
+ */
+ public JComponent $$$getRootComponent$$$() {
+ return contentPane;
+ }
}
@@ -102,7 +102,7 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
- <text value="OK"/>
+ <text value="Add"/>
</properties>
</component>
<component id="5723f" class="javax.swing.JButton" binding="buttonCancel">
Oops, something went wrong.

0 comments on commit 9b68517

Please sign in to comment.