Skip to content

Commit 4a5f4a1

Browse files
committed
Stage 1 Complete
1 parent ab05bfd commit 4a5f4a1

File tree

11 files changed

+137
-89
lines changed

11 files changed

+137
-89
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package gateFrame;
2+
import java.awt.*;
3+
import javax.swing.*;
4+
import java.awt.event.*;
5+
6+
public class GateFramePanel_Mother extends JPanel{
7+
JLabel versioninfo = new JLabel("Version 0.1.0");
8+
JLabel authors = new JLabel("Skywalker & Tiruss");
9+
10+
GateFramePanel_Mother() {
11+
setLayout(null);
12+
13+
versioninfo.setBounds(400, 420, 100, 20);
14+
authors.setBounds(380, 450, 150, 20);
15+
add(versioninfo);
16+
add(authors);
17+
18+
setVisible(true);
19+
}
20+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package gateFrame;
2+
import javax.swing.*;
3+
import java.awt.*;
4+
5+
public class GateFrame_Mother extends JInternalFrame {
6+
GateFramePanel_Mother motherpanel;
7+
static final int xPosition = 0, yPosition = 0;
8+
9+
public GateFrame_Mother() {
10+
super("Gate Frame", true, true, true, true);
11+
setSize(500, 500);
12+
setLocation(xPosition, yPosition);
13+
14+
15+
motherpanel = new GateFramePanel_Mother();
16+
add(motherpanel);
17+
18+
19+
20+
21+
setVisible(true);
22+
}
23+
}

Statistical_Analysis/GUISource/white/GeneralInfo_Mother.java renamed to Statistical_Analysis/GUISource/generalInfoFrame/GeneralInfo_Mother.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package white;
1+
package generalInfoFrame;
22

33
public class GeneralInfo_Mother {
44

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package graphFrame;
2+
3+
public class GraphFrame_Mother {
4+
5+
}

Statistical_Analysis/GUISource/white/GUIMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
public class GUIMain {
44
public static void main(String[] ar) {
5-
5+
new MotherFrame();
66
}
77
}

Statistical_Analysis/GUISource/white/GraphPanel_Mother.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

Statistical_Analysis/GUISource/white/MainPanel_Mother.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

Statistical_Analysis/GUISource/white/MotherFrame.java

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,106 @@
33

44

55
import javax.swing.*;
6+
7+
import gateFrame.GateFrame_Mother;
8+
import generalInfoFrame.GeneralInfo_Mother;
9+
import graphFrame.GraphFrame_Mother;
10+
611
import java.awt.*;
712
import java.awt.event.*;
813

914
public class MotherFrame extends JFrame{
10-
MotherPanel motherpanel;
15+
JDesktopPane jdpDesktop;
16+
static int openframes = 0;
17+
18+
19+
GateFrame_Mother mainpanelmother;
20+
GraphFrame_Mother graphpanelmother;
21+
GeneralInfo_Mother generalinfomother;
22+
23+
JMenu mainpanelmothermenu;
24+
JMenu graphpanelmothermenu;
25+
JMenu generalinfomothermenu;
26+
27+
JMenuItem menuitem_gate;
28+
29+
JMenuItem graphpanelMI1;
30+
JMenuItem graphpanelMI2;
31+
32+
JMenuItem generalinfoMI1;
33+
JMenuItem generalinfoMI2;
34+
35+
JMenuBar menubar;
36+
37+
BorderLayout borderlayout;
1138

1239
public MotherFrame() {
1340
setMotherFrame();
14-
createMotherPanel();
41+
createMenuBar();
42+
addMenuBar();
43+
setInternalFramework();
44+
createDefaultInternalFrames();
45+
46+
47+
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
48+
}
49+
private void createDefaultInternalFrames() {
50+
jdpDesktop.add(new GateFrame_Mother());
51+
}
52+
53+
private void setInternalFramework() {
54+
jdpDesktop = new JDesktopPane();
55+
setContentPane(jdpDesktop);
56+
57+
jdpDesktop.putClientProperty("JDesktopPane.dragMode", "outline");
1558
}
1659

1760
private void setMotherFrame() {
61+
borderlayout = new BorderLayout();
62+
setLayout(borderlayout);
1863
setSize(1024, 768);
1964
this.setBounds(0, 0, 1600, 900);
2065
this.setVisible(true);
2166
}
22-
23-
private void createMotherPanel() {
24-
motherpanel = new MotherPanel();
25-
26-
add(motherpanel);
67+
68+
private void addMenuBar() {
69+
add(menubar, BorderLayout.NORTH);
70+
setJMenuBar(menubar);
2771
}
2872

29-
30-
73+
private void createMenuBar() {
74+
menubar = new JMenuBar();
75+
76+
mainpanelmothermenu = new JMenu("Main");
77+
graphpanelmothermenu = new JMenu("Graph");
78+
generalinfomothermenu = new JMenu("General Info");
79+
80+
menuitem_gate = new JMenuItem("Gate");
81+
menuitem_gate.addActionListener(new ActionListener() {
82+
public void actionPerformed(ActionEvent e) {
83+
System.out.println("Creating GateFrame_Mother");
84+
new GateFrame_Mother();
85+
}
86+
});
87+
88+
89+
graphpanelMI1 = new JMenuItem("graphpanelMI1");
90+
graphpanelMI2 = new JMenuItem("graphpanelMI2");
91+
92+
generalinfoMI1 = new JMenuItem("generalinfoMI1");
93+
generalinfoMI2 = new JMenuItem("generalinfoMI2");
94+
95+
mainpanelmothermenu.add(menuitem_gate);
96+
97+
graphpanelmothermenu.add(graphpanelMI1);
98+
graphpanelmothermenu.add(graphpanelMI2);
99+
100+
generalinfomothermenu.add(generalinfoMI1);
101+
generalinfomothermenu.add(generalinfoMI2);
102+
103+
menubar.add(mainpanelmothermenu);
104+
menubar.add(graphpanelmothermenu);
105+
menubar.add(generalinfomothermenu);
106+
107+
}
31108
}

Statistical_Analysis/GUISource/white/MotherPanel.java

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)