本文整理汇总了Java中org.jfree.chart.ChartFrame.getSize方法的典型用法代码示例。如果您正苦于以下问题:Java ChartFrame.getSize方法的具体用法?Java ChartFrame.getSize怎么用?Java ChartFrame.getSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.ChartFrame
的用法示例。
在下文中一共展示了ChartFrame.getSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}