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


Java Plot3DPanel.setAutoBounds方法代码示例

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


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

示例1: addBase3dPanel

import org.math.plot.Plot3DPanel; //导入方法依赖的package包/类
protected void addBase3dPanel() {
    GridBagLayout gbl_plotPanel = (GridBagLayout)plotPanel.getLayout();
    gbl_plotPanel.columnWidths = new int[] {0, 0};
    gbl_plotPanel.columnWeights = new double[]{1.0, 1.0};
            
    newPlot3d = new Plot3DPanel("SOUTH") {
        private static final long serialVersionUID = 7914951068593204419L;
        public void addPlotToolBar(String location) {
            super.addPlotToolBar(location);
            super.plotToolBar.remove(7);
            super.plotToolBar.remove(5);
            super.plotToolBar.remove(4);
        }            
    };
    newPlot3d.setAutoBounds();
    newPlot3d.setAutoscrolls(true);
    newPlot3d.setEditable(false);
    newPlot3d.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    newPlot3d.setForeground(Color.BLACK);
    newPlot3d.getAxis(0).setColor(Color.BLACK);
    newPlot3d.getAxis(1).setColor(Color.BLACK);
    newPlot3d.getAxis(2).setColor(Color.BLACK);
    newPlot3d.setAxisLabel(0, x3dAxisName);
    newPlot3d.setAxisLabel(1, y3dAxisName);
    newPlot3d.setAxisLabel(2, z3dAxisName);
    
    GridBagConstraints gbl_chartPanel = new GridBagConstraints();
    gbl_chartPanel.anchor = GridBagConstraints.CENTER;
    gbl_chartPanel.insets = insets3;
    gbl_chartPanel.fill = GridBagConstraints.BOTH;
    gbl_chartPanel.gridx = 0;
    gbl_chartPanel.gridy = 0;
    plotPanel.add(plot3d, gbl_chartPanel);
    gbl_chartPanel.gridx = 1;
    plotPanel.add(newPlot3d, gbl_chartPanel);
}
 
开发者ID:vimsh,项目名称:mafscaling,代码行数:37,代码来源:TableRescale.java

示例2: create3dGraphTab

import org.math.plot.Plot3DPanel; //导入方法依赖的package包/类
protected void create3dGraphTab() {
    plotPanel = new JPanel();
    add(plotPanel, "<html><div style='text-align: center;'>3<br>D<br><br>C<br>h<br>a<br>r<br>t</div></html>");
    GridBagLayout gbl_plotPanel = new GridBagLayout();
    gbl_plotPanel.columnWidths = new int[] {0};
    gbl_plotPanel.rowHeights = new int[] {0};
    gbl_plotPanel.columnWeights = new double[]{1.0};
    gbl_plotPanel.rowWeights = new double[]{1.0};
    plotPanel.setLayout(gbl_plotPanel);
            
    plot3d = new Plot3DPanel("SOUTH") {
        private static final long serialVersionUID = 7914951068593204419L;
        public void addPlotToolBar(String location) {
            super.addPlotToolBar(location);
            super.plotToolBar.remove(7);
            super.plotToolBar.remove(5);
            super.plotToolBar.remove(4);
        }            
    };
    plot3d.setAutoBounds();
    plot3d.setAutoscrolls(true);
    plot3d.setEditable(false);
    plot3d.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    plot3d.setForeground(Color.BLACK);
    plot3d.getAxis(0).setColor(Color.BLACK);
    plot3d.getAxis(1).setColor(Color.BLACK);
    plot3d.getAxis(2).setColor(Color.BLACK);
    plot3d.setAxisLabel(0, x3dAxisName);
    plot3d.setAxisLabel(1, y3dAxisName);
    plot3d.setAxisLabel(2, z3dAxisName);
    
    GridBagConstraints gbl_chartPanel = new GridBagConstraints();
    gbl_chartPanel.anchor = GridBagConstraints.CENTER;
    gbl_chartPanel.insets = insets3;
    gbl_chartPanel.fill = GridBagConstraints.BOTH;
    gbl_chartPanel.gridx = 0;
    gbl_chartPanel.gridy = 0;
    plotPanel.add(plot3d, gbl_chartPanel);
}
 
开发者ID:vimsh,项目名称:mafscaling,代码行数:40,代码来源:ACompCalc.java

示例3: plot3D

import org.math.plot.Plot3DPanel; //导入方法依赖的package包/类
public static synchronized void plot3D(double[][] plotData, MetricProperties properties, String group, String plotNames, String plotNameHandlers, String colorNames, String typePlots, boolean threeD) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
    if (threeD) {
        String plotName = ((plotNames!=null)?plotNames:"defaultPlotName");
        String plotNameHandler = ((plotNameHandlers!=null)?plotNameHandlers:"defaultPlotNameHandler");
        Plot3DPanel plot = properties.get3DPlots().get(plotName);
        if (plot!=null) {
            Color color = null;
            String colorName = ((colorNames!=null)?colorNames:"red");
            color = properties.getColors().get(colorName);

            int plotHandler = 0;
            if (DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentInternalParameters(group).getPlotHandlerStore().get(plotName) != null) {
                if (DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentInternalParameters(group).getPlotHandlerStore().get(plotName).get(plotNameHandler) == null) {
                    plotHandler = DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentInternalParameters(group).getMaxPlotHandler(plotName) + 1;
                } else {
                    plotHandler = DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentInternalParameters(group).getPlotHandlerStore().get(plotName).get(plotNameHandler);
                }
            } else {
                DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentInternalParameters(group).putPlotHandlerStore(plotName, new HashMap<String,Integer>());
            }

            String typePlot = ((typePlots!=null)?typePlots:"line");

            int plotHandler2 = 0;
            Plot3DPanel plot2 = new Plot3DPanel();

            if (color != null) {
                if (typePlot.compareTo("box") == 0) {
                    plotHandler2 = plot2.addBoxPlot(plotNameHandler, color, plotData);
                } else if (typePlot.compareTo("scatter") == 0) {
                    plotHandler2 = plot2.addScatterPlot(plotNameHandler, color, plotData);
                } else if (typePlot.compareTo("grid") == 0) {
                    plotHandler2 = plot2.addGridPlot(plotNameHandler, color, increment(0, 1, plotData.length), increment(0, 1, plotData[0].length), plotData);
                } else if (typePlot.compareTo("histogram") == 0) {
                    plotHandler2 = plot2.addHistogramPlot(plotNameHandler, color, plotData);
                } else {
                    plotHandler2 = plot2.addLinePlot(plotNameHandler, color, plotData);
                }
            } else {
                if (typePlot.compareTo("box") == 0) {
                    plotHandler2 = plot2.addBoxPlot(plotNameHandler, plotData);
                } else if (typePlot.compareTo("scatter") == 0) {
                    plotHandler2 = plot2.addScatterPlot(plotNameHandler, plotData);
                } else if (typePlot.compareTo("grid") == 0) {
                    plotHandler2 = plot2.addGridPlot(plotName, increment(0, 1, plotData.length), increment(0, 1, plotData[0].length), plotData);
                } else if (typePlot.compareTo("histogram") == 0) {
                    plotHandler2 = plot2.addHistogramPlot(plotNameHandler, plotData);
                } else {
                    plotHandler2 = plot2.addLinePlot(plotNameHandler, plotData);
                }
            }

            if (plot.plotCanvas.getPlots().size()==0)
                plot.addPlot(plot2.getPlot(plotHandler2));
            else {
                if (plotHandler < plot.plotCanvas.getPlots().size())
                    plot.setPlot(plotHandler, plot2.getPlot(plotHandler2));
                else
                    plot.addPlot(plot2.getPlot(plotHandler2));
            }

            plot.setAutoBounds();
            plot.repaint();
            DeploymentMetricProperties.getDeploymentMetricProperties().getDeploymentInternalParameters(group).getPlotHandlerStore().get(plotName).put(plotNameHandler, plotHandler);
        }
    }
}
 
开发者ID:panossot,项目名称:jam-metrics,代码行数:68,代码来源:MetricPlot.java

示例4: createGraghTab

import org.math.plot.Plot3DPanel; //导入方法依赖的package包/类
private void createGraghTab() {
    JPanel plotPanel = new JPanel();
    add(plotPanel, "<html><div style='text-align: center;'>3<br>D<br> <br>C<br>h<br>a<br>r<br>t</div></html>");
    GridBagLayout gbl_plotPanel = new GridBagLayout();
    gbl_plotPanel.columnWidths = new int[] {0};
    gbl_plotPanel.rowHeights = new int[] {0, 0};
    gbl_plotPanel.columnWeights = new double[]{1.0};
    gbl_plotPanel.rowWeights = new double[]{0.0, 1.0};
    plotPanel.setLayout(gbl_plotPanel);

    JPanel cntlPanel = new JPanel();
    GridBagConstraints gbl_ctrlPanel = new GridBagConstraints();
    gbl_ctrlPanel.insets = insets3;
    gbl_ctrlPanel.anchor = GridBagConstraints.NORTH;
    gbl_ctrlPanel.weightx = 1.0;
    gbl_ctrlPanel.fill = GridBagConstraints.HORIZONTAL;
    gbl_ctrlPanel.gridx = 0;
    gbl_ctrlPanel.gridy = 0;
    plotPanel.add(cntlPanel, gbl_ctrlPanel);
    
    GridBagLayout gbl_cntlPanel = new GridBagLayout();
    gbl_cntlPanel.columnWidths = new int[]{0, 0, 0, 0, 0, 0};
    gbl_cntlPanel.rowHeights = new int[]{0};
    gbl_cntlPanel.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 1.0};
    gbl_cntlPanel.rowWeights = new double[]{0};
    cntlPanel.setLayout(gbl_cntlPanel);

    addRadioButton(cntlPanel, 0, "Grid", "grid");
    addRadioButton(cntlPanel, 1, "Histogram", "hist");
    addRadioButton(cntlPanel, 2, "Bar", "bar");
    addRadioButton(cntlPanel, 3, "Line", "line");
    addRadioButton(cntlPanel, 4, "Scatter", "scatter");
    
    plot = new Plot3DPanel("SOUTH") {
        private static final long serialVersionUID = 7914951068593204419L;
        public void addPlotToolBar(String location) {
            super.addPlotToolBar(location);
            super.plotToolBar.remove(7);
            super.plotToolBar.remove(5);
            super.plotToolBar.remove(4);
        }            
    };
    plot.setAutoBounds();
    plot.setAutoscrolls(true);
    plot.setEditable(false);
    plot.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    plot.setForeground(Color.BLACK);
    plot.getAxis(0).setColor(Color.BLACK);
    plot.getAxis(1).setColor(Color.BLACK);
    plot.getAxis(2).setColor(Color.BLACK);
    
    GridBagConstraints gbl_chartPanel = new GridBagConstraints();
    gbl_chartPanel.anchor = GridBagConstraints.CENTER;
    gbl_chartPanel.insets = insets3;
    gbl_chartPanel.weightx = 1.0;
    gbl_chartPanel.weighty = 1.0;
    gbl_chartPanel.fill = GridBagConstraints.BOTH;
    gbl_chartPanel.gridx = 0;
    gbl_chartPanel.gridy = 1;
    plotPanel.add(plot, gbl_chartPanel);
}
 
开发者ID:vimsh,项目名称:mafscaling,代码行数:62,代码来源:LogStats.java


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