Commit d4a0e680 authored by 9731301's avatar 9731301

complete send button actionListener

parent c3e683b0
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
<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$/src/com/insomnia/GUI/InsomniaGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/insomnia/GUI/InsomniaGUI.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/com/insomnia/GUI/InsomniaGUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/insomnia/GUI/InsomniaGUI.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/insomnia/GUI/RequestPanel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/insomnia/GUI/RequestPanel.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/com/insomnia/GUI/RequestPanel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/insomnia/GUI/RequestPanel.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/insomnia/GUI/RespondPanel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/insomnia/GUI/RespondPanel.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/insomnia/parser/RequestLoader.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/insomnia/parser/RequestLoader.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -144,7 +146,7 @@ ...@@ -144,7 +146,7 @@
<workItem from="1590682418201" duration="308000" /> <workItem from="1590682418201" duration="308000" />
<workItem from="1590757579057" duration="2543000" /> <workItem from="1590757579057" duration="2543000" />
<workItem from="1590934179600" duration="31544000" /> <workItem from="1590934179600" duration="31544000" />
<workItem from="1591024948574" duration="4476000" /> <workItem from="1591024948574" duration="14918000" />
</task> </task>
<servers /> <servers />
</component> </component>
...@@ -155,10 +157,10 @@ ...@@ -155,10 +157,10 @@
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="472" y="159" key="#com.intellij.ide.util.MemberChooser" timestamp="1590962459070"> <state x="472" y="159" key="#com.intellij.ide.util.MemberChooser" timestamp="1591034675582">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state x="472" y="159" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1590962459070" /> <state x="472" y="159" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1591034675582" />
<state x="499" y="197" key="#com.intellij.ide.util.TreeClassChooserDialog" timestamp="1590961999762"> <state x="499" y="197" key="#com.intellij.ide.util.TreeClassChooserDialog" timestamp="1590961999762">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
...@@ -175,22 +177,22 @@ ...@@ -175,22 +177,22 @@
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state x="402" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1590494460700" /> <state x="402" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1590494460700" />
<state width="1493" height="2" key="GridCell.Tab.0.bottom" timestamp="1591028946800"> <state width="1493" height="105" key="GridCell.Tab.0.bottom" timestamp="1591040084950">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="1493" height="2" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1591028946800" /> <state width="1493" height="105" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1591040084950" />
<state width="1493" height="2" key="GridCell.Tab.0.center" timestamp="1591028946800"> <state width="1493" height="105" key="GridCell.Tab.0.center" timestamp="1591040084950">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="1493" height="2" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1591028946800" /> <state width="1493" height="105" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1591040084950" />
<state width="1493" height="2" key="GridCell.Tab.0.left" timestamp="1591028946800"> <state width="1493" height="105" key="GridCell.Tab.0.left" timestamp="1591040084950">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="1493" height="2" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1591028946800" /> <state width="1493" height="105" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1591040084950" />
<state width="1493" height="2" key="GridCell.Tab.0.right" timestamp="1591028946800"> <state width="1493" height="105" key="GridCell.Tab.0.right" timestamp="1591040084950">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
<state width="1493" height="2" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1591028946800" /> <state width="1493" height="105" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1591040084950" />
<state x="249" y="0" key="SettingsEditor" timestamp="1590962002174"> <state x="249" y="0" key="SettingsEditor" timestamp="1590962002174">
<screen x="0" y="0" width="1536" height="824" /> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
......
...@@ -223,7 +223,7 @@ public class InsomniaGUI { ...@@ -223,7 +223,7 @@ public class InsomniaGUI {
panel.add(panelRight , BorderLayout.CENTER); panel.add(panelRight , BorderLayout.CENTER);
frame.getContentPane().add(panel); frame.getContentPane().add(panel);
frame.pack(); frame.setSize(800,400);
} }
......
This diff is collapsed.
...@@ -10,7 +10,12 @@ public class RespondPanel extends JPanel { ...@@ -10,7 +10,12 @@ public class RespondPanel extends JPanel {
private Border border = BorderFactory.createLineBorder(Color.BLACK,3); private Border border = BorderFactory.createLineBorder(Color.BLACK,3);
private VerticalFlowLayout vfLayout = new VerticalFlowLayout(); private VerticalFlowLayout vfLayout = new VerticalFlowLayout();
private JPanel row = new JPanel(); private JPanel row = new JPanel();
private JTextArea massageBody = new JTextArea(); private JTextArea massageBody = new JTextArea() {
@Override
public Dimension getPreferredSize() {
return row.getSize();
}
};
private JPanel mainCenterHeader_respond = new JPanel(vfLayout); private JPanel mainCenterHeader_respond = new JPanel(vfLayout);
private JScrollPane scrollPane_Header_Respond = new JScrollPane(mainCenterHeader_respond); private JScrollPane scrollPane_Header_Respond = new JScrollPane(mainCenterHeader_respond);
private JPanel header_MainPanel = new JPanel(new BorderLayout()); private JPanel header_MainPanel = new JPanel(new BorderLayout());
...@@ -22,7 +27,7 @@ public class RespondPanel extends JPanel { ...@@ -22,7 +27,7 @@ public class RespondPanel extends JPanel {
public JTabbedPane tabbedPaneCenterResponse() { public JTabbedPane tabbedPaneCenterResponse() {
massageBody.setLineWrap(true); massageBody.setLineWrap(true);
massageBody.setPreferredSize(new Dimension(200, 300)); massageBody.setBorder(border);
row.add(massageBody); row.add(massageBody);
row.setBackground(Color.GRAY); row.setBackground(Color.GRAY);
scrollPane_Header_Respond.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scrollPane_Header_Respond.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
......
...@@ -88,13 +88,13 @@ public class RequestLoader { ...@@ -88,13 +88,13 @@ public class RequestLoader {
String crlf = "\r\n"; String crlf = "\r\n";
if (!data.getBody().isEmpty()) { if (!data.getBody().isEmpty()) {
HashMap<String, String> fields = new HashMap<>(); HashMap<String, String> fields = new HashMap<>();
if (!data.getBody().contains(";")) { if (!data.getBody().contains("&")) {
String[] f1 = data.getBody().split(":"); String[] f1 = data.getBody().split("=");
fields.put(f1[0], f1[1]); fields.put(f1[0], f1[1]);
} else { } else {
String[] mFields = data.getBody().split(";"); String[] mFields = data.getBody().split("&");
for (String f : mFields) { for (String f : mFields) {
String[] f0 = f.split(":"); String[] f0 = f.split("=");
fields.put(f0[0], f0[1]); fields.put(f0[0], f0[1]);
} }
} }
......
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