work on charts
This commit is contained in:
parent
92930d9417
commit
2ff7097661
@ -1,4 +1,4 @@
|
|||||||
#Sun, 17 Sep 2017 23:52:04 +0200
|
#Fri, 29 Sep 2017 22:33:34 +0200
|
||||||
annotation.processing.enabled=true
|
annotation.processing.enabled=true
|
||||||
annotation.processing.enabled.in.editor=false
|
annotation.processing.enabled.in.editor=false
|
||||||
annotation.processing.processors.list=
|
annotation.processing.processors.list=
|
||||||
|
@ -504,7 +504,7 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
|
|||||||
p0 = 0;
|
p0 = 0;
|
||||||
}
|
}
|
||||||
JViewport vp = (JViewport) this.getParent();
|
JViewport vp = (JViewport) this.getParent();
|
||||||
Point pp = vp.getViewPosition();
|
// Point pp = vp.getViewPosition();
|
||||||
Point cp = vp.getViewPosition();
|
Point cp = vp.getViewPosition();
|
||||||
|
|
||||||
if (autoScroll && this.lastvpos != cp.x) {
|
if (autoScroll && this.lastvpos != cp.x) {
|
||||||
|
@ -7,6 +7,11 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
|
import java.awt.event.AdjustmentEvent;
|
||||||
|
import java.awt.event.AdjustmentListener;
|
||||||
|
import java.awt.geom.AffineTransform;
|
||||||
|
import javax.swing.JScrollBar;
|
||||||
|
import javax.swing.JViewport;
|
||||||
import javax.swing.Scrollable;
|
import javax.swing.Scrollable;
|
||||||
import sesim.Exchange.QuoteReceiver;
|
import sesim.Exchange.QuoteReceiver;
|
||||||
import sesim.OHLCData;
|
import sesim.OHLCData;
|
||||||
@ -17,7 +22,9 @@ import sesim.Quote;
|
|||||||
*
|
*
|
||||||
* @author 7u83 <7u83@mail.ru>
|
* @author 7u83 <7u83@mail.ru>
|
||||||
*/
|
*/
|
||||||
public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrollable {
|
public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, AdjustmentListener {
|
||||||
|
|
||||||
|
public JScrollBar xbar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form Chart1
|
* Creates new form Chart1
|
||||||
@ -28,10 +35,14 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
|
|||||||
|
|
||||||
setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
|
setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (Globals.se == null) {
|
if (Globals.se == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setSize(new Dimension(9000,500));
|
setSize(new Dimension(9000,500));
|
||||||
Globals.se.addQuoteReceiver(this);
|
Globals.se.addQuoteReceiver(this);
|
||||||
}
|
}
|
||||||
@ -40,14 +51,27 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
|
|||||||
|
|
||||||
private void drawChart(Graphics2D g) {
|
private void drawChart(Graphics2D g) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JViewport vp = new JViewport();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if (Globals.se==null)
|
||||||
|
// return;
|
||||||
|
|
||||||
|
Dimension d = new Dimension(200,200);
|
||||||
|
setPreferredSize(d);
|
||||||
|
|
||||||
|
|
||||||
|
g.setClip(10,10,800,200);
|
||||||
|
g.setColor(Color.red);
|
||||||
|
g.drawLine(0, 0, 8000, 610);
|
||||||
|
|
||||||
if (Globals.se==null)
|
if (Globals.se==null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g.setColor(Color.red);
|
|
||||||
g.drawLine(0, 0, 7000, 610);
|
|
||||||
|
|
||||||
Dimension d = new Dimension(8000,200);
|
|
||||||
setPreferredSize(d);
|
|
||||||
|
|
||||||
revalidate();
|
revalidate();
|
||||||
|
|
||||||
@ -58,7 +82,7 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
|
|||||||
|
|
||||||
|
|
||||||
OHLCData data = Globals.se.getOHLCdata(60000);
|
OHLCData data = Globals.se.getOHLCdata(60000);
|
||||||
|
/*
|
||||||
int first_bar = 0;
|
int first_bar = 0;
|
||||||
int last_bar = data.size();
|
int last_bar = data.size();
|
||||||
|
|
||||||
@ -79,6 +103,7 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
|
|||||||
prev = di;
|
prev = di;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -88,6 +113,7 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
|
|||||||
// Calculate the number of pixels for 1 em
|
// Calculate the number of pixels for 1 em
|
||||||
em_width = g.getFontMetrics().stringWidth("M");
|
em_width = g.getFontMetrics().stringWidth("M");
|
||||||
|
|
||||||
|
this.xbar.setMaximum(994000);
|
||||||
|
|
||||||
|
|
||||||
drawChart((Graphics2D)g);
|
drawChart((Graphics2D)g);
|
||||||
@ -120,29 +146,12 @@ public class Chart1 extends javax.swing.JPanel implements QuoteReceiver, Scrolla
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension getPreferredScrollableViewportSize() {
|
public void adjustmentValueChanged(AdjustmentEvent e) {
|
||||||
return this.getPreferredSize();
|
System.out.printf("Adjustemntlistener called %d\n",xbar.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean getScrollableTracksViewportWidth() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean getScrollableTracksViewportHeight() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
|
@ -21,54 +21,36 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
<Component id="jScrollBar1" alignment="1" max="32767" attributes="0"/>
|
||||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="100" max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane1" min="-2" pref="223" max="-2" attributes="0"/>
|
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="71" max="32767" attributes="0"/>
|
<EmptySpace pref="119" max="32767" attributes="0"/>
|
||||||
</Group>
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
|
||||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<EmptySpace pref="47" max="32767" attributes="0"/>
|
<EmptySpace pref="189" max="32767" attributes="0"/>
|
||||||
<Component id="jScrollPane1" min="-2" pref="247" max="-2" attributes="0"/>
|
<Component id="jScrollBar1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="63" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
<Component class="javax.swing.JScrollBar" name="jScrollBar1">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="horizontalScrollBarPolicy" type="int" value="32"/>
|
<Property name="orientation" type="int" value="0"/>
|
||||||
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
|
|
||||||
</Properties>
|
</Properties>
|
||||||
|
</Component>
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
<Component class="javax.swing.JButton" name="jButton1">
|
||||||
<SubComponents>
|
<Properties>
|
||||||
<Container class="chart.Chart1" name="chart11">
|
<Property name="text" type="java.lang.String" value="jButton1"/>
|
||||||
|
</Properties>
|
||||||
<Layout>
|
</Component>
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="217" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="241" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -25,11 +25,16 @@
|
|||||||
*/
|
*/
|
||||||
package chart;
|
package chart;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import javax.swing.Scrollable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author 7u83 <7u83@mail.ru>
|
* @author 7u83 <7u83@mail.ru>
|
||||||
*/
|
*/
|
||||||
public class ChartPanal extends javax.swing.JPanel {
|
public class ChartPanal extends javax.swing.JPanel implements Scrollable{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form ChartPanal
|
* Creates new form ChartPanal
|
||||||
@ -38,6 +43,19 @@ public class ChartPanal extends javax.swing.JPanel {
|
|||||||
initComponents();
|
initComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void paint(Graphics g) {
|
||||||
|
// Dimension psize = this.chart12.getPreferredSize();
|
||||||
|
// this.setPreferredSize(psize);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
super.paint(g); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called from within the constructor to initialize the form.
|
* This method is called from within the constructor to initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is always
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
@ -47,52 +65,64 @@ public class ChartPanal extends javax.swing.JPanel {
|
|||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
jScrollPane1 = new javax.swing.JScrollPane();
|
jScrollBar1 = new javax.swing.JScrollBar();
|
||||||
chart11 = new chart.Chart1();
|
jButton1 = new javax.swing.JButton();
|
||||||
|
|
||||||
setPreferredSize(new java.awt.Dimension(300, 300));
|
setPreferredSize(new java.awt.Dimension(300, 300));
|
||||||
|
|
||||||
jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
jScrollBar1.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
|
||||||
jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout chart11Layout = new javax.swing.GroupLayout(chart11);
|
jButton1.setText("jButton1");
|
||||||
chart11.setLayout(chart11Layout);
|
|
||||||
chart11Layout.setHorizontalGroup(
|
|
||||||
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 217, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
chart11Layout.setVerticalGroup(
|
|
||||||
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGap(0, 241, Short.MAX_VALUE)
|
|
||||||
);
|
|
||||||
|
|
||||||
jScrollPane1.setViewportView(chart11);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
this.setLayout(layout);
|
this.setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGap(0, 300, Short.MAX_VALUE)
|
.addComponent(jScrollBar1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addGap(100, 100, 100)
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jButton1)
|
||||||
.addContainerGap(71, Short.MAX_VALUE)))
|
.addContainerGap(119, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGap(0, 300, Short.MAX_VALUE)
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addContainerGap(47, Short.MAX_VALUE)
|
.addContainerGap(189, Short.MAX_VALUE)
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap()))
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(jButton1)
|
||||||
|
.addGap(63, 63, 63))
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private chart.Chart1 chart11;
|
private javax.swing.JButton jButton1;
|
||||||
private javax.swing.JScrollPane jScrollPane1;
|
private javax.swing.JScrollBar jScrollBar1;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getPreferredScrollableViewportSize() {
|
||||||
|
return this.getPreferredSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getScrollableTracksViewportWidth() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getScrollableTracksViewportHeight() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,12 @@
|
|||||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[800, 600]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[100, 100]"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<SyntheticProperties>
|
<SyntheticProperties>
|
||||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||||
@ -23,9 +29,13 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace pref="387" max="32767" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane1" min="-2" pref="123" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="chart11" alignment="1" pref="482" max="32767" attributes="0"/>
|
||||||
|
<Component id="jScrollBar1" alignment="1" pref="482" max="32767" attributes="0"/>
|
||||||
|
<Component id="jToolBar1" alignment="0" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
@ -33,38 +43,45 @@
|
|||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<EmptySpace pref="59" max="32767" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane1" min="-2" pref="254" max="-2" attributes="0"/>
|
<Component id="chart11" min="-2" pref="157" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="120" max="32767" attributes="0"/>
|
<EmptySpace min="-2" pref="53" max="-2" attributes="0"/>
|
||||||
|
<Component id="jToolBar1" min="-2" pref="25" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="89" max="32767" attributes="0"/>
|
||||||
|
<Component id="jScrollBar1" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
<Component class="javax.swing.JScrollBar" name="jScrollBar1">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="horizontalScrollBarPolicy" type="int" value="32"/>
|
<Property name="orientation" type="int" value="0"/>
|
||||||
<Property name="verticalScrollBarPolicy" type="int" value="22"/>
|
|
||||||
</Properties>
|
</Properties>
|
||||||
|
</Component>
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="chart.Chart1" name="chart11">
|
<Container class="chart.Chart1" name="chart11">
|
||||||
|
|
||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<EmptySpace min="0" pref="102" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<EmptySpace min="0" pref="233" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="157" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
</Container>
|
</Container>
|
||||||
</SubComponents>
|
<Container class="javax.swing.JToolBar" name="jToolBar1">
|
||||||
|
<Properties>
|
||||||
|
<Property name="floatable" type="boolean" value="false"/>
|
||||||
|
<Property name="rollover" type="boolean" value="true"/>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||||
</Container>
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -38,6 +38,8 @@ public class ChartTestDialog extends javax.swing.JDialog {
|
|||||||
super(parent, modal);
|
super(parent, modal);
|
||||||
initComponents();
|
initComponents();
|
||||||
setLocationRelativeTo(parent);
|
setLocationRelativeTo(parent);
|
||||||
|
this.chart11.xbar=this.jScrollBar1;
|
||||||
|
this.jScrollBar1.addAdjustmentListener(chart11);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,42 +51,52 @@ public class ChartTestDialog extends javax.swing.JDialog {
|
|||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
jScrollPane1 = new javax.swing.JScrollPane();
|
jScrollBar1 = new javax.swing.JScrollBar();
|
||||||
chart11 = new chart.Chart1();
|
chart11 = new chart.Chart1();
|
||||||
|
jToolBar1 = new javax.swing.JToolBar();
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
|
setMaximumSize(new java.awt.Dimension(800, 600));
|
||||||
|
setMinimumSize(new java.awt.Dimension(100, 100));
|
||||||
|
|
||||||
jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
jScrollBar1.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
|
||||||
jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout chart11Layout = new javax.swing.GroupLayout(chart11);
|
javax.swing.GroupLayout chart11Layout = new javax.swing.GroupLayout(chart11);
|
||||||
chart11.setLayout(chart11Layout);
|
chart11.setLayout(chart11Layout);
|
||||||
chart11Layout.setHorizontalGroup(
|
chart11Layout.setHorizontalGroup(
|
||||||
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGap(0, 102, Short.MAX_VALUE)
|
.addGap(0, 0, Short.MAX_VALUE)
|
||||||
);
|
);
|
||||||
chart11Layout.setVerticalGroup(
|
chart11Layout.setVerticalGroup(
|
||||||
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
chart11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGap(0, 233, Short.MAX_VALUE)
|
.addGap(0, 157, Short.MAX_VALUE)
|
||||||
);
|
);
|
||||||
|
|
||||||
jScrollPane1.setViewportView(chart11);
|
jToolBar1.setFloatable(false);
|
||||||
|
jToolBar1.setRollover(true);
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap(387, Short.MAX_VALUE)
|
.addContainerGap()
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(chart11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
|
||||||
|
.addComponent(jScrollBar1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
|
||||||
|
.addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addContainerGap(59, Short.MAX_VALUE)
|
.addContainerGap()
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(chart11, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap(120, Short.MAX_VALUE))
|
.addGap(53, 53, 53)
|
||||||
|
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
|
||||||
|
.addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
@ -134,6 +146,7 @@ public class ChartTestDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private chart.Chart1 chart11;
|
private chart.Chart1 chart11;
|
||||||
private javax.swing.JScrollPane jScrollPane1;
|
private javax.swing.JScrollBar jScrollBar1;
|
||||||
|
private javax.swing.JToolBar jToolBar1;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user