some work
This commit is contained in:
parent
ad3a5a7d32
commit
3c50dc80ca
@ -1,4 +1,4 @@
|
||||
#Mon, 11 Dec 2017 23:22:26 +0100
|
||||
#Sat, 16 Dec 2017 19:44:00 +0100
|
||||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
|
@ -11,6 +11,7 @@
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
|
||||
|
@ -25,25 +25,36 @@
|
||||
*/
|
||||
package chart;
|
||||
|
||||
import chart.painter.XLegendPainter;
|
||||
import gui.Globals;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.Border;
|
||||
import sesim.Stock;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 7u83 <7u83@mail.ru>
|
||||
*/
|
||||
public class MMChart extends javax.swing.JPanel {
|
||||
|
||||
Stock stock;
|
||||
|
||||
/**
|
||||
* Creates new form MMChart
|
||||
*/
|
||||
public MMChart() {
|
||||
stock = Globals.se.getDefaultStock();
|
||||
initComponents();
|
||||
setupLayout();
|
||||
|
||||
|
||||
}
|
||||
|
||||
JPanel xLegend;
|
||||
|
||||
void setupLayout() {
|
||||
Border redborder = javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 0, 0));
|
||||
Border blueborder = javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 255));
|
||||
@ -61,31 +72,40 @@ public class MMChart extends javax.swing.JPanel {
|
||||
p = new JPanel();
|
||||
p.setBorder(redborder);
|
||||
p.setBackground(Color.blue);
|
||||
p.setPreferredSize(new Dimension(0,0));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.gridwidth = 1;
|
||||
gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 0.7;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(p, gridBagConstraints);
|
||||
|
||||
|
||||
|
||||
p = new JPanel();
|
||||
p.setPreferredSize(new Dimension(100,40));
|
||||
p.setBorder(redborder);
|
||||
p.setBackground(Color.white);
|
||||
p.setPreferredSize(new Dimension(100,100));
|
||||
p.setBackground(Color.yellow);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(p, gridBagConstraints);
|
||||
|
||||
xLegend = new JPanel();
|
||||
xLegend.setBorder(redborder);
|
||||
xLegend.setBackground(Color.white);
|
||||
xLegend.setPreferredSize(new Dimension(100,0));
|
||||
xLegend.setMinimumSize(new Dimension(100,0));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.gridwidth = 1;
|
||||
gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
|
||||
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 0.0;
|
||||
gridBagConstraints.weighty = 0.7;
|
||||
add(p, gridBagConstraints);
|
||||
gridBagConstraints.weighty = 0.0;
|
||||
add(xLegend, gridBagConstraints);
|
||||
|
||||
|
||||
|
||||
|
@ -16,39 +16,33 @@
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Component class="javax.swing.JButton" name="jButton4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jButton1"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="jButton4"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="80" gridHeight="-1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="50.0" weightY="0.7"/>
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton2">
|
||||
<Component class="javax.swing.JButton" name="jButton5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jButton2"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="jButton5"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="-1" gridY="1" gridWidth="80" gridHeight="0" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.5" weightY="0.3"/>
|
||||
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton3">
|
||||
<Component class="javax.swing.JButton" name="jButton6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jButton3"/>
|
||||
<Property name="text" type="java.lang.String" value="jButton6"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="80" gridY="0" gridWidth="20" gridHeight="-1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.7"/>
|
||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
@ -47,50 +47,42 @@ public class NewPanel extends java.awt.Panel {
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jButton2 = new javax.swing.JButton();
|
||||
jButton3 = new javax.swing.JButton();
|
||||
jButton4 = new javax.swing.JButton();
|
||||
jButton5 = new javax.swing.JButton();
|
||||
jButton6 = new javax.swing.JButton();
|
||||
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
jButton1.setText("jButton1");
|
||||
jButton1.setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
jButton4.setText("jButton4");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.gridwidth = 80;
|
||||
gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 50.0;
|
||||
gridBagConstraints.weighty = 0.7;
|
||||
add(jButton1, gridBagConstraints);
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(jButton4, gridBagConstraints);
|
||||
|
||||
jButton2.setText("jButton2");
|
||||
jButton2.setPreferredSize(new java.awt.Dimension(0, 0));
|
||||
jButton5.setText("jButton5");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.gridwidth = 80;
|
||||
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 0.5;
|
||||
gridBagConstraints.weighty = 0.3;
|
||||
add(jButton2, gridBagConstraints);
|
||||
|
||||
jButton3.setText("jButton3");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 80;
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.gridwidth = 20;
|
||||
gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weighty = 0.7;
|
||||
add(jButton3, gridBagConstraints);
|
||||
add(jButton5, gridBagConstraints);
|
||||
|
||||
jButton6.setText("jButton6");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(jButton6, gridBagConstraints);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JButton jButton2;
|
||||
private javax.swing.JButton jButton3;
|
||||
private javax.swing.JButton jButton4;
|
||||
private javax.swing.JButton jButton5;
|
||||
private javax.swing.JButton jButton6;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user