Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MidTerm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9731301
MidTerm
Commits
8add75eb
Commit
8add75eb
authored
May 02, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add center features
parent
ee6b767d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
18 deletions
+83
-18
vcs.xml
.idea/vcs.xml
+6
-0
workspace.xml
.idea/workspace.xml
+18
-9
InsomniaGUI.class
out/production/Insomnia/InsomniaGUI.class
+0
-0
InsomniaGUI.java
src/InsomniaGUI.java
+59
-9
No files found.
.idea/vcs.xml
0 → 100644
View file @
8add75eb
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
.idea/workspace.xml
View file @
8add75eb
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<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$/src/InsomniaGUI.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/InsomniaGUI.java"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_NON_ACTIVE_CHANGELIST"
value=
"false"
/>
...
...
@@ -14,6 +18,9 @@
</list>
</option>
</component>
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$"
/>
</component>
<component
name=
"ProjectId"
id=
"1bIsIYbvZExsc7FREkkeVEtlB9E"
/>
<component
name=
"ProjectViewState"
>
<option
name=
"hideEmptyMiddlePackages"
value=
"true"
/>
...
...
@@ -22,6 +29,7 @@
</component>
<component
name=
"PropertiesComponent"
>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"SHARE_PROJECT_CONFIGURATION_FILES"
value=
"true"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"aspect.path.notification.shown"
value=
"true"
/>
</component>
...
...
@@ -50,6 +58,7 @@
<option
name=
"presentableId"
value=
"Default"
/>
<updated>
1588330863345
</updated>
<workItem
from=
"1588330867580"
duration=
"8005000"
/>
<workItem
from=
"1588425228961"
duration=
"7926000"
/>
</task>
<servers
/>
</component>
...
...
@@ -57,22 +66,22 @@
<option
name=
"version"
value=
"1"
/>
</component>
<component
name=
"WindowStateProjectService"
>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1588338981527
"
>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1588433110531
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824"
timestamp=
"1588338981527
"
/>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.center"
timestamp=
"1588338981527
"
>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824"
timestamp=
"1588433110531
"
/>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.center"
timestamp=
"1588433110531
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824"
timestamp=
"1588338981527
"
/>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.left"
timestamp=
"1588338981527
"
>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824"
timestamp=
"1588433110531
"
/>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.left"
timestamp=
"1588433110531
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824"
timestamp=
"1588338981527
"
/>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.right"
timestamp=
"1588338981527
"
>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824"
timestamp=
"1588433110531
"
/>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.right"
timestamp=
"1588433110531
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"7
93"
height=
"208"
key=
"GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824"
timestamp=
"1588338981527
"
/>
<state
width=
"7
81"
height=
"81"
key=
"GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824"
timestamp=
"1588433110531
"
/>
<state
x=
"425"
y=
"237"
key=
"com.intellij.ide.util.TipDialog"
timestamp=
"1588330868442"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
...
...
out/production/Insomnia/InsomniaGUI.class
View file @
8add75eb
No preview for this file type
src/InsomniaGUI.java
View file @
8add75eb
import
javax.swing.*
;
import
javax.swing.border.Border
;
import
java.awt.*
;
public
class
InsomniaGUI
{
...
...
@@ -11,7 +12,9 @@ public class InsomniaGUI {
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
frame
.
setVisible
(
true
);
JMenuBar
menuBar
=
new
JMenuBar
();
Border
border
=
BorderFactory
.
createLineBorder
(
Color
.
BLACK
,
3
);
JMenuBar
upperMenuBar
=
new
JMenuBar
();
JMenu
application
=
new
JMenu
(
"Application"
);
JMenu
edit
=
new
JMenu
(
"Edit"
);
JMenu
view
=
new
JMenu
(
"View"
);
...
...
@@ -19,25 +22,72 @@ public class InsomniaGUI {
JMenuItem
minimize
=
new
JMenuItem
(
"Minimize"
);
window
.
add
(
minimize
);
JMenu
help
=
new
JMenu
(
"Help"
);
upperMenuBar
.
add
(
application
);
upperMenuBar
.
add
(
edit
);
upperMenuBar
.
add
(
view
);
upperMenuBar
.
add
(
window
);
upperMenuBar
.
add
(
help
);
JPanel
body
=
new
JPanel
();
body
.
setBackground
(
Color
.
GRAY
);
JPanel
auth
=
new
JPanel
();
auth
.
setBackground
(
Color
.
GRAY
);
JPanel
query
=
new
JPanel
();
query
.
setBackground
(
Color
.
GRAY
);
JPanel
header
=
new
JPanel
();
header
.
setBackground
(
Color
.
GRAY
);
JPanel
docs
=
new
JPanel
();
docs
.
setBackground
(
Color
.
GRAY
);
//center_center
JTabbedPane
tabbedPaneCenter
=
new
JTabbedPane
();
tabbedPaneCenter
.
setBackground
(
Color
.
GRAY
);
tabbedPaneCenter
.
add
(
"Body"
,
body
);
tabbedPaneCenter
.
add
(
"Auth"
,
auth
);
tabbedPaneCenter
.
add
(
"Query"
,
query
);
tabbedPaneCenter
.
add
(
"Header"
,
header
);
tabbedPaneCenter
.
add
(
"Docs"
,
docs
);
//center_up
JMenuItem
patch
=
new
JMenuItem
();
JMenuItem
put
=
new
JMenuItem
();
JMenuItem
post
=
new
JMenuItem
();
JMenuItem
delete
=
new
JMenuItem
();
JMenuItem
get
=
new
JMenuItem
();
JMenu
centerMenu
=
new
JMenu
(
"Menu"
);
centerMenu
.
add
(
"Patch"
,
patch
);
centerMenu
.
add
(
"Put"
,
put
);
centerMenu
.
add
(
"Post"
,
post
);
centerMenu
.
add
(
"Delete"
,
delete
);
centerMenu
.
add
(
"Get"
,
get
);
centerMenu
.
setFont
(
new
Font
(
"Arial"
,
20
,
15
));
JTextField
URLTextField
=
new
JTextField
(
"http://api.myproduct.com/v1/users"
);
menuBar
.
add
(
application
);
menuBar
.
add
(
edit
);
menuBar
.
add
(
view
);
menuBar
.
add
(
window
);
menuBar
.
add
(
help
);
JButton
sendButton
=
new
JButton
(
"send"
);
JPanel
centerUp
=
new
JPanel
(
new
BorderLayout
());
centerUp
.
add
(
centerMenu
,
BorderLayout
.
WEST
);
centerUp
.
add
(
URLTextField
,
BorderLayout
.
CENTER
);
centerUp
.
add
(
sendButton
,
BorderLayout
.
EAST
);
JPanel
center
=
new
JPanel
(
new
BorderLayout
());
center
.
add
(
centerUp
,
BorderLayout
.
NORTH
);
center
.
add
(
tabbedPaneCenter
,
BorderLayout
.
CENTER
);
JPanel
panelRight
=
new
JPanel
(
new
GridLayout
(
1
,
2
));
panelRight
.
add
(
center
);
JMenu
menu
=
new
JMenu
(
"Insomnia"
);
menu
.
setSize
(
100
,
60
);
// menu.setBorder();
menu
.
setFont
(
new
Font
(
"Arial"
,
20
,
15
));
menu
.
setBorder
(
border
);
menu
.
setPreferredSize
(
new
Dimension
(
200
,
60
));
JPanel
panelLeft
=
new
JPanel
(
new
BorderLayout
());
panelLeft
.
add
(
menu
,
BorderLayout
.
NORTH
);
panelLeft
.
setBackground
(
Color
.
LIGHT_GRAY
);
JPanel
panel
=
new
JPanel
(
new
BorderLayout
());
panel
.
add
(
m
enuBar
,
BorderLayout
.
NORTH
);
panel
.
add
(
upperM
enuBar
,
BorderLayout
.
NORTH
);
panel
.
add
(
panelLeft
,
BorderLayout
.
WEST
);
panel
.
add
(
panelRight
,
BorderLayout
.
CENTER
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment