当前位置: 首页>>代码示例>>Java>>正文


Java ChartPanel.setPopupMenu方法代码示例

本文整理汇总了Java中org.jfree.chart.ChartPanel.setPopupMenu方法的典型用法代码示例。如果您正苦于以下问题:Java ChartPanel.setPopupMenu方法的具体用法?Java ChartPanel.setPopupMenu怎么用?Java ChartPanel.setPopupMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.ChartPanel的用法示例。


在下文中一共展示了ChartPanel.setPopupMenu方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createComponent

import org.jfree.chart.ChartPanel; //导入方法依赖的package包/类
@Override
public JComponent createComponent() {
    ChartDataPlugin plugin = chartDataFramework
            .getChartDataPlugin(chartSource.getChartType());
    try {
        chartPanel = new ChartPanel(plugin.createChart(element));
        chartPanel.setPopupMenu(null);
    } catch (ChartNotSetupedException e) {
        JOptionPane.showMessageDialog(framework.getMainFrame(),
                ChartResourceManager.getString("Error.chartNotSetuped"));
        SwingUtilities.invokeLater(new Runnable() {

            @Override
            public void run() {
                close();
            }
        });
        return new JPanel();
    }
    return chartPanel;
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:22,代码来源:ChartView.java

示例2: createPanel

import org.jfree.chart.ChartPanel; //导入方法依赖的package包/类
public JPanel createPanel(XYDataset dataset) {
    JFreeChart chart = createChart(dataset);
    ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setVerticalAxisTrace(true);
    chartPanel.setHorizontalAxisTrace(true);
    chartPanel.setPopupMenu(null);
    chartPanel.setDomainZoomable(true);
    chartPanel.setRangeZoomable(true);
    return chartPanel;
}
 
开发者ID:Fanping,项目名称:iveely.ml,代码行数:11,代码来源:ScatterPlot.java

示例3: updateCharts

import org.jfree.chart.ChartPanel; //导入方法依赖的package包/类
/**
 * Updates the charts.
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
private void updateCharts() {
	for (int i = 0; i < listOfChartPanels.size(); i++) {
		JPanel panel = listOfChartPanels.get(i);
		panel.removeAll();
		final ChartPanel chartPanel = new ChartPanel(getModel().getChartOrNull(i)) {

			private static final long serialVersionUID = -6953213567063104487L;

			@Override
			public Dimension getPreferredSize() {
				return DIMENSION_CHART_PANEL_ENLARGED;
			}
		};
		chartPanel.setPopupMenu(null);
		chartPanel.setBackground(COLOR_TRANSPARENT);
		chartPanel.setOpaque(false);
		chartPanel.addMouseListener(enlargeAndHoverAndPopupMouseAdapter);
		panel.add(chartPanel, BorderLayout.CENTER);

		JPanel openChartPanel = new JPanel(new GridBagLayout());
		openChartPanel.setOpaque(false);

		GridBagConstraints gbc = new GridBagConstraints();
		gbc.anchor = GridBagConstraints.CENTER;
		gbc.fill = GridBagConstraints.NONE;
		gbc.weightx = 1.0;
		gbc.weighty = 1.0;

		JButton openChartButton = new JButton(OPEN_CHART_ACTION);
		openChartButton.setOpaque(false);
		openChartButton.setContentAreaFilled(false);
		openChartButton.setBorderPainted(false);
		openChartButton.addMouseListener(enlargeAndHoverAndPopupMouseAdapter);
		openChartButton.setHorizontalAlignment(SwingConstants.LEFT);
		openChartButton.setHorizontalTextPosition(SwingConstants.LEFT);
		openChartButton.setIcon(null);
		Font font = openChartButton.getFont();
		Map attributes = font.getAttributes();
		attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
		openChartButton.setFont(font.deriveFont(attributes).deriveFont(10.0f));

		openChartPanel.add(openChartButton, gbc);

		panel.add(openChartPanel, BorderLayout.SOUTH);
		panel.revalidate();
		panel.repaint();
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:53,代码来源:AttributeStatisticsPanel.java


注:本文中的org.jfree.chart.ChartPanel.setPopupMenu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。