Commit a23a0a5d authored by 9731301's avatar 9731301

add center feature

parent 8add75eb
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f2dd20fb-7e97-49ef-9dfe-5631626d7912" name="Default Changelist" comment=""> <list default="true" id="f2dd20fb-7e97-49ef-9dfe-5631626d7912" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/Insomnia/InsomniaGUI.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Insomnia/InsomniaGUI.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/InsomniaGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/InsomniaGUI.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/InsomniaGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/InsomniaGUI.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -11,6 +11,20 @@ ...@@ -11,6 +11,20 @@
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="DatabaseView">
<option name="SHOW_INTERMEDIATE" value="true" />
<option name="GROUP_DATA_SOURCES" value="true" />
<option name="GROUP_SCHEMA" value="true" />
<option name="GROUP_CONTENTS" value="false" />
<option name="SORT_POSITIONED" value="false" />
<option name="SHOW_EMPTY_GROUPS" value="false" />
<option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
<option name="HIDDEN_KINDS">
<set />
</option>
<expand />
<select />
</component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
<list> <list>
...@@ -58,7 +72,9 @@ ...@@ -58,7 +72,9 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1588330863345</updated> <updated>1588330863345</updated>
<workItem from="1588330867580" duration="8005000" /> <workItem from="1588330867580" duration="8005000" />
<workItem from="1588425228961" duration="7926000" /> <workItem from="1588425228961" duration="8554000" />
<workItem from="1588437622203" duration="6269000" />
<workItem from="1588522915548" duration="9323000" />
</task> </task>
<servers /> <servers />
</component> </component>
...@@ -66,26 +82,30 @@ ...@@ -66,26 +82,30 @@
<option name="version" value="1" /> <option name="version" value="1" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state width="781" height="81" key="GridCell.Tab.0.bottom" timestamp="1588433110531"> <state x="309" y="122" key="#com.intellij.ide.util.MemberChooser" timestamp="1588443249650">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="309" y="122" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1588443249650" />
<state width="799" height="75" key="GridCell.Tab.0.bottom" timestamp="1588535347969">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="781" height="81" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1588433110531" /> <state width="799" height="75" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1588535347969" />
<state width="781" height="81" key="GridCell.Tab.0.center" timestamp="1588433110531"> <state width="799" height="75" key="GridCell.Tab.0.center" timestamp="1588535347968">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="781" height="81" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1588433110531" /> <state width="799" height="75" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1588535347968" />
<state width="781" height="81" key="GridCell.Tab.0.left" timestamp="1588433110531"> <state width="799" height="75" key="GridCell.Tab.0.left" timestamp="1588535347968">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="781" height="81" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1588433110531" /> <state width="799" height="75" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1588535347968" />
<state width="781" height="81" key="GridCell.Tab.0.right" timestamp="1588433110531"> <state width="799" height="75" key="GridCell.Tab.0.right" timestamp="1588535347969">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="781" height="81" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1588433110531" /> <state width="799" height="75" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1588535347969" />
<state x="425" y="237" key="com.intellij.ide.util.TipDialog" timestamp="1588330868442"> <state x="425" y="237" key="com.intellij.ide.util.TipDialog" timestamp="1588522979439">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state x="425" y="237" key="com.intellij.ide.util.TipDialog/0.0.1536.824@0.0.1536.824" timestamp="1588330868442" /> <state x="425" y="237" key="com.intellij.ide.util.TipDialog/0.0.1536.824@0.0.1536.824" timestamp="1588522979439" />
<state x="46" y="145" width="672" height="678" key="search.everywhere.popup" timestamp="1588333540387"> <state x="46" y="145" width="672" height="678" key="search.everywhere.popup" timestamp="1588333540387">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
......
...@@ -34,32 +34,37 @@ public class InsomniaGUI { ...@@ -34,32 +34,37 @@ public class InsomniaGUI {
auth.setBackground(Color.GRAY); auth.setBackground(Color.GRAY);
JPanel query = new JPanel(); JPanel query = new JPanel();
query.setBackground(Color.GRAY); query.setBackground(Color.GRAY);
JPanel header = new JPanel(); JPanel header = new JPanel(new BorderLayout());
header.setBackground(Color.GRAY); header.setBackground(Color.GRAY);
JPanel docs = new JPanel(); JPanel docs = new JPanel();
docs.setBackground(Color.GRAY); docs.setBackground(Color.GRAY);
//center_center
JTabbedPane tabbedPaneCenter = new JTabbedPane(); //request-center
tabbedPaneCenter.setBackground(Color.GRAY); JTabbedPane tabbedPaneCenterRequest = new JTabbedPane();
tabbedPaneCenter.add("Body" , body); tabbedPaneCenterRequest.setBackground(Color.GRAY);
tabbedPaneCenter.add("Auth" , auth); tabbedPaneCenterRequest.add("Body" , body);
tabbedPaneCenter.add("Query" , query); tabbedPaneCenterRequest.add("Auth" , auth);
tabbedPaneCenter.add("Header" , header); tabbedPaneCenterRequest.add("Query" , query);
tabbedPaneCenter.add("Docs" , docs); tabbedPaneCenterRequest.add("Header" , header);
tabbedPaneCenterRequest.add("Docs" , docs);
//center_up JTextField headerField = new JTextField("header");
JMenuItem patch = new JMenuItem(); headerField.setBorder(border);
JMenuItem put = new JMenuItem(); JTextField valueField = new JTextField("value");
JMenuItem post = new JMenuItem(); valueField.setBorder(border);
JMenuItem delete = new JMenuItem(); JCheckBox checkBox = new JCheckBox();
JMenuItem get = new JMenuItem(); JButton delete = new JButton();
JMenu centerMenu = new JMenu("Menu"); JPanel center_header = new JPanel(new GridLayout(1,2));
centerMenu.add("Patch",patch); center_header.add(headerField);
centerMenu.add("Put",put); center_header.add(valueField);
centerMenu.add("Post",post); header.add(checkBox,BorderLayout.EAST);
centerMenu.add("Delete",delete); header.add(center_header,BorderLayout.CENTER);
centerMenu.add("Get",get); header.add(delete,BorderLayout.WEST);
//request_up
String s []={"Patch","Put","Post","Delete","Get"};
JComboBox centerMenu = new JComboBox(s);
centerMenu.setFont(new Font("Arial",20,15 )); centerMenu.setFont(new Font("Arial",20,15 ));
JTextField URLTextField = new JTextField("http://api.myproduct.com/v1/users"); JTextField URLTextField = new JTextField("http://api.myproduct.com/v1/users");
...@@ -71,12 +76,51 @@ public class InsomniaGUI { ...@@ -71,12 +76,51 @@ public class InsomniaGUI {
centerUp.add(URLTextField , BorderLayout.CENTER); centerUp.add(URLTextField , BorderLayout.CENTER);
centerUp.add(sendButton , BorderLayout.EAST); centerUp.add(sendButton , BorderLayout.EAST);
JPanel center = new JPanel(new BorderLayout()); JPanel request = new JPanel(new BorderLayout());
center.add(centerUp,BorderLayout.NORTH); request.add(centerUp,BorderLayout.NORTH);
center.add(tabbedPaneCenter , BorderLayout.CENTER); request.add(tabbedPaneCenterRequest , BorderLayout.CENTER);
//respond
JPanel row = new JPanel();
row.setBackground(Color.GRAY);
JPanel header2 = new JPanel();
header2.setBackground(Color.GRAY);
JPanel cookie = new JPanel();
cookie.setBackground(Color.GRAY);
JPanel timeline = new JPanel(new BorderLayout());
timeline.setBackground(Color.GRAY);
JTabbedPane tabbedPaneCenterResponse = new JTabbedPane();
tabbedPaneCenterResponse.setBackground(Color.GRAY);
tabbedPaneCenterResponse.add("Row" , row);
tabbedPaneCenterResponse.add("Header" ,header2);
tabbedPaneCenterResponse.add("Cookie", cookie);
tabbedPaneCenterResponse.add("Timeline" , timeline);
JPanel response = new JPanel(new BorderLayout());
JTextField headerField2 = new JTextField("header");
JTextField valueField2 = new JTextField("value");
JPanel center_header2 = new JPanel(new GridLayout(1,2));
center_header2.add(headerField2);
center_header2.add(valueField2);
header2.add(center_header2);
JPanel up_response = new JPanel();
JLabel label1 = new JLabel("ok");
label1.setBorder(border);
JLabel label2 = new JLabel("s");
label2.setBorder(border);
JLabel label3 = new JLabel("KB");
label3.setBorder(border);
up_response.add(label1);
up_response.add(label2);
up_response.add(label3);
response.add(tabbedPaneCenterResponse , BorderLayout.CENTER);
response.add(up_response,BorderLayout.NORTH);
JPanel panelRight = new JPanel(new GridLayout(1 ,2 )); JPanel panelRight = new JPanel(new GridLayout(1 ,2 ));
panelRight.add(center); panelRight.add(request);
panelRight.add(response);
JMenu menu = new JMenu("Insomnia"); JMenu menu = new JMenu("Insomnia");
menu.setFont(new Font("Arial",20,15 )); menu.setFont(new Font("Arial",20,15 ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment