本文整理汇总了Java中org.jfree.chart.ChartFrame.setLocation方法的典型用法代码示例。如果您正苦于以下问题:Java ChartFrame.setLocation方法的具体用法?Java ChartFrame.setLocation怎么用?Java ChartFrame.setLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.ChartFrame
的用法示例。
在下文中一共展示了ChartFrame.setLocation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: imagejLabelMouseClicked
import org.jfree.chart.ChartFrame; //导入方法依赖的package包/类
private void imagejLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_imagejLabelMouseClicked
if (this.chart2 != null) {
ChartFrame frame = new ChartFrame("Attribute comparison", chart2,
true);
frame.pack();
frame.setBackground(new Color(225, 225, 225));
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setLocation((screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
frame.setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/keel/GraphInterKeel/resources/ico/logo/logo.gif")));
frame.setVisible(true);
}
}
示例2: imagejLabelMouseClicked
import org.jfree.chart.ChartFrame; //导入方法依赖的package包/类
private void imagejLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_imagejLabelMouseClicked
if (this.chart != null) {
this.chart.setTitle(((VisualizePanel) this.getParent().getParent()).getData().getAttributeIndex(
this.tableInfojTable.getSelectedRow()));
ChartFrame frame = new ChartFrame("Attribute chart", chart, true);
frame.pack();
frame.setBackground(new Color(225, 225, 225));
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setLocation((screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
frame.setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/keel/GraphInterKeel/resources/ico/logo/logo.gif")));
frame.setVisible(true);
}
}
示例3: display
import org.jfree.chart.ChartFrame; //导入方法依赖的package包/类
/**
* Wrap chart into a frame with specific title and display the frame at provided
* location.
*
* @param title frame title
* @param location frame location
*/
public void display (String title,
Point location)
{
ChartFrame frame = new ChartFrame(title, chart, true);
frame.pack();
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
frame.setLocation(location);
frame.setVisible(true);
}
示例4: plot
import org.jfree.chart.ChartFrame; //导入方法依赖的package包/类
public void plot (Point upperLeft)
{
// All values, quorum line & spread line
plotValues();
plotQuorumLine();
plotSpreadLine("", peak);
// Second peak spread line?
if (secondPeak != null) {
plotSpreadLine("Second", secondPeak);
}
// Chart
// JFreeChart chartLines = ChartFactory.createXYLineChart(
// sheet.getId() + " (" + name + " runs)", // Title
// "Lengths " + ((scale != null) ? scale : "*no scale*"), // X-Axis label
// "Counts", // Y-Axis label
// dataset, // Dataset
// PlotOrientation.VERTICAL, // orientation,
// true, // Show legend
// false, // Show tool tips
// false // urls
// );
// use a histogram so we can see the actual buckets values
// rather than being left to interpolate for any given length
JFreeChart chart = ChartFactory.createHistogram(
sheet.getId() + " (" + name + " runs)", // Title
"", // X-Axis label - already labeled in chartLines
"", // Y-Axis label - already labeled in chartLines
dataset, // Dataset
PlotOrientation.VERTICAL, // orientation,
true, // Show legend
false, // Show tool tips
false // urls
);
// have the quorum and spread be lines rather than bars
XYPlot xyPlot = (XYPlot) chart.getPlot();
xyPlot.setDataset(1, datasetLines);
XYLineAndShapeRenderer renderer1 = new XYLineAndShapeRenderer();
renderer1.setSeriesPaint(0, Color.GREEN);
xyPlot.setRenderer(1, renderer1);
// "FORWARD" causes the added dataset of
// lines to be overlayed on histogram bars
xyPlot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
// Hosting frame
ChartFrame frame = new ChartFrame(
sheet.getId() + " - " + name + " runs",
chart,
true);
frame.pack();
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
frame.setLocation(upperLeft);
frame.setVisible(true);
}