diff options
Diffstat (limited to 'src/main/ui')
-rw-r--r-- | src/main/ui/Main.java | 5 | ||||
-rw-r--r-- | src/main/ui/MainUI.form | 111 | ||||
-rw-r--r-- | src/main/ui/MainUI.java | 22 |
3 files changed, 137 insertions, 1 deletions
diff --git a/src/main/ui/Main.java b/src/main/ui/Main.java index 1429532..aad69ca 100644 --- a/src/main/ui/Main.java +++ b/src/main/ui/Main.java @@ -1,7 +1,10 @@ package ui; +import javax.swing.*; + public class Main { public static void main(String[] args) throws Throwable { - new JCA().run(); + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + new MainUI().createWindow(); } } diff --git a/src/main/ui/MainUI.form b/src/main/ui/MainUI.form new file mode 100644 index 0000000..9ab1492 --- /dev/null +++ b/src/main/ui/MainUI.form @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="ui.MainUI"> + <grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> + <margin top="0" left="0" bottom="0" right="0"/> + <constraints> + <xy x="20" y="20" width="500" height="400"/> + </constraints> + <properties/> + <border type="none"/> + <children> + <splitpane id="efbf3"> + <constraints> + <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"> + <preferred-size width="200" height="200"/> + </grid> + </constraints> + <properties> + <orientation value="0"/> + </properties> + <border type="none"/> + <children> + <tabbedpane id="4cbb0" binding="tabbedPane"> + <constraints> + <splitpane position="left"/> + </constraints> + <properties/> + <border type="none"/> + <children> + <grid id="e83bf" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> + <margin top="0" left="0" bottom="0" right="0"/> + <constraints> + <tabbedpane title="CA"/> + </constraints> + <properties/> + <border type="none"/> + <children/> + </grid> + <grid id="7d4f3" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> + <margin top="0" left="0" bottom="0" right="0"/> + <constraints> + <tabbedpane title="Certificates"/> + </constraints> + <properties/> + <border type="none"/> + <children> + <component id="d436b" class="javax.swing.JList" binding="listCertificates"> + <constraints> + <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="2" anchor="0" fill="3" indent="0" use-parent-layout="false"> + <preferred-size width="150" height="50"/> + </grid> + </constraints> + <properties/> + </component> + </children> + </grid> + <grid id="5a23a" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> + <margin top="0" left="0" bottom="0" right="0"/> + <constraints> + <tabbedpane title="Templates"/> + </constraints> + <properties/> + <border type="none"/> + <children> + <component id="1f307" class="javax.swing.JList" binding="listTemplates"> + <constraints> + <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="2" anchor="0" fill="3" indent="0" use-parent-layout="false"> + <preferred-size width="150" height="50"/> + </grid> + </constraints> + <properties/> + </component> + </children> + </grid> + </children> + </tabbedpane> + <component id="e63cf" class="javax.swing.JList" binding="listLogs"> + <constraints> + <splitpane position="right"/> + </constraints> + <properties/> + </component> + </children> + </splitpane> + <toolbar id="a2d1e"> + <constraints> + <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"> + <preferred-size width="-1" height="20"/> + </grid> + </constraints> + <properties/> + <border type="none"/> + <children> + <component id="5ae86" class="javax.swing.JButton" binding="buttonSave"> + <constraints/> + <properties> + <text value="Save"/> + </properties> + </component> + </children> + </toolbar> + <component id="54c37" class="javax.swing.JLabel" binding="labelStatus"> + <constraints> + <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/> + </constraints> + <properties> + <text value="Ready"/> + </properties> + </component> + </children> + </grid> +</form> diff --git a/src/main/ui/MainUI.java b/src/main/ui/MainUI.java new file mode 100644 index 0000000..ee35a53 --- /dev/null +++ b/src/main/ui/MainUI.java @@ -0,0 +1,22 @@ +package ui; + +import javax.swing.*; + +public class MainUI { + private JTabbedPane tabbedPane; + private JPanel rootPanel; + private JList listTemplates; + private JList listCertificates; + private JList listLogs; + private JLabel labelStatus; + private JButton buttonSave; + + public JFrame createWindow() { + final JFrame frame = new JFrame("JCA"); + frame.setContentPane(this.rootPanel); + frame.setVisible(true); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.pack(); + return frame; + } +} |