working ...
This commit is contained in:
parent
36c1826778
commit
167fee1502
@ -1,6 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo">
|
||||
<BevelBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[900, 300]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
@ -16,12 +27,12 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="396" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="296" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
|
@ -38,8 +38,13 @@ public class Chart extends javax.swing.JPanel {
|
||||
System.out.print(bounds.width + "\n");
|
||||
|
||||
//g.fillRect(0, 0, 100, 100);
|
||||
Dimension d = this.getSize();
|
||||
|
||||
g.drawString("Hello world", 810, 10);
|
||||
g.drawLine(0,0, 800, 100);
|
||||
g.drawLine(0, 0, d.width, d.height);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -51,15 +56,19 @@ public class Chart extends javax.swing.JPanel {
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
setPreferredSize(new java.awt.Dimension(900, 300));
|
||||
setRequestFocusEnabled(false);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 400, Short.MAX_VALUE)
|
||||
.addGap(0, 396, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 300, Short.MAX_VALUE)
|
||||
.addGap(0, 296, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
@ -94,25 +94,31 @@
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="chart.Chart" name="chart1">
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="chart.Chart" name="chart2">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="241" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="231" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="582" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="572" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -69,7 +69,8 @@ public class MainWin extends javax.swing.JFrame {
|
||||
jMenuItem1 = new javax.swing.JMenuItem();
|
||||
controlPanel2 = new gui.ControlPanel();
|
||||
orderBookPanel1 = new gui.OrderBookPanel();
|
||||
chart1 = new chart.Chart();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
chart2 = new chart.Chart();
|
||||
MainMenu = new javax.swing.JMenuBar();
|
||||
FileMenu = new javax.swing.JMenu();
|
||||
FileNew = new javax.swing.JMenuItem();
|
||||
@ -90,18 +91,20 @@ public class MainWin extends javax.swing.JFrame {
|
||||
getContentPane().add(controlPanel2, java.awt.BorderLayout.LINE_END);
|
||||
getContentPane().add(orderBookPanel1, java.awt.BorderLayout.LINE_START);
|
||||
|
||||
javax.swing.GroupLayout chart1Layout = new javax.swing.GroupLayout(chart1);
|
||||
chart1.setLayout(chart1Layout);
|
||||
chart1Layout.setHorizontalGroup(
|
||||
chart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 241, Short.MAX_VALUE)
|
||||
javax.swing.GroupLayout chart2Layout = new javax.swing.GroupLayout(chart2);
|
||||
chart2.setLayout(chart2Layout);
|
||||
chart2Layout.setHorizontalGroup(
|
||||
chart2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 231, Short.MAX_VALUE)
|
||||
);
|
||||
chart1Layout.setVerticalGroup(
|
||||
chart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 582, Short.MAX_VALUE)
|
||||
chart2Layout.setVerticalGroup(
|
||||
chart2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 572, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
getContentPane().add(chart1, java.awt.BorderLayout.CENTER);
|
||||
jScrollPane1.setViewportView(chart2);
|
||||
|
||||
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
|
||||
|
||||
FileMenu.setBackground(new java.awt.Color(254, 203, 1));
|
||||
FileMenu.setText("File");
|
||||
@ -226,11 +229,12 @@ public class MainWin extends javax.swing.JFrame {
|
||||
private javax.swing.JMenuItem FileNew;
|
||||
private javax.swing.JMenuItem FileRun;
|
||||
private javax.swing.JMenuBar MainMenu;
|
||||
private chart.Chart chart1;
|
||||
private chart.Chart chart2;
|
||||
private gui.ControlPanel controlPanel2;
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JMenu jMenu2;
|
||||
private javax.swing.JMenuItem jMenuItem1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private gui.OrderBookPanel orderBookPanel1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user