亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? defaultnumberaxiseditor.java

?? 制作圖表的好工具
?? JAVA
字號:
/* ===========================================================
 * JFreeChart : a free chart library for the Java(tm) platform
 * ===========================================================
 *
 * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 *
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Lesser General Public License as published by 
 * the Free Software Foundation; either version 2.1 of the License, or 
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
 * USA.  
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
 * in the United States and other countries.]
 *
 * ----------------------------
 * DefaultNumberAxisEditor.java
 * ----------------------------
 * (C) Copyright 2005, Object Refinery Limited and Contributors.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   Arnaud Lelievre;
 *
 * $Id: DefaultNumberAxisEditor.java,v 1.1.2.1 2005/11/24 16:11:48 mungady Exp $
 *
 * Changes:
 * --------
 * 24-Nov-2005 : Version 1, based on NumberAxisPropertyEditor (DG);
 */

package org.jfree.chart.editor;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.util.ResourceBundle;

import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import javax.swing.JColorChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;

import org.jfree.chart.axis.Axis;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.layout.LCBLayout;
import org.jfree.ui.PaintSample;
import org.jfree.ui.StrokeChooserPanel;
import org.jfree.ui.StrokeSample;

/**
 * A panel for editing the properties of a value axis.
 */
class DefaultNumberAxisEditor extends DefaultAxisEditor 
                              implements FocusListener {

    /** A flag that indicates whether or not the axis range is determined
     *  automatically.
     */
    private boolean autoRange;

    /** The lowest value in the axis range. */
    private double minimumValue;

    /** The highest value in the axis range. */
    private double maximumValue;

    /** A checkbox that indicates whether or not the axis range is determined
     *  automatically.
     */
    private JCheckBox autoRangeCheckBox;

    /** A text field for entering the minimum value in the axis range. */
    private JTextField minimumRangeValue;

    /** A text field for entering the maximum value in the axis range. */
    private JTextField maximumRangeValue;

    /** The paint selected for drawing the gridlines. */
    private PaintSample gridPaintSample;

    /** The stroke selected for drawing the gridlines. */
    private StrokeSample gridStrokeSample;

    /** An array of stroke samples to choose from (since I haven't written a
     *  decent StrokeChooser component yet).
     */
    private StrokeSample[] availableStrokeSamples;
    
    /** The resourceBundle for the localization. */
    protected static ResourceBundle localizationResources = 
        ResourceBundle.getBundle("org.jfree.chart.editor.LocalizationBundle");

    /**
     * Standard constructor: builds a property panel for the specified axis.
     *
     * @param axis  the axis, which should be changed.
     */
    public DefaultNumberAxisEditor(NumberAxis axis) {

        super(axis);

        this.autoRange = axis.isAutoRange();
        this.minimumValue = axis.getLowerBound();
        this.maximumValue = axis.getUpperBound();

        this.gridPaintSample = new PaintSample(Color.blue);
        this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f));

        this.availableStrokeSamples = new StrokeSample[3];
        this.availableStrokeSamples[0] 
            = new StrokeSample(new BasicStroke(1.0f));
        this.availableStrokeSamples[1] 
            = new StrokeSample(new BasicStroke(2.0f));
        this.availableStrokeSamples[2] 
            = new StrokeSample(new BasicStroke(3.0f));

        JTabbedPane other = getOtherTabs();

        JPanel range = new JPanel(new LCBLayout(3));
        range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

        range.add(new JPanel());
        this.autoRangeCheckBox = new JCheckBox(
            localizationResources.getString("Auto-adjust_range"), this.autoRange
        );
        this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff");
        this.autoRangeCheckBox.addActionListener(this);
        range.add(this.autoRangeCheckBox);
        range.add(new JPanel());

        range.add(
            new JLabel(localizationResources.getString("Minimum_range_value"))
        );
        this.minimumRangeValue = new JTextField(
            Double.toString(this.minimumValue)
        );
        this.minimumRangeValue.setEnabled(!this.autoRange);
        this.minimumRangeValue.setActionCommand("MinimumRange");
        this.minimumRangeValue.addActionListener(this);
        this.minimumRangeValue.addFocusListener(this);
        range.add(this.minimumRangeValue);
        range.add(new JPanel());

        range.add(
            new JLabel(localizationResources.getString("Maximum_range_value"))
        );
        this.maximumRangeValue = new JTextField(
            Double.toString(this.maximumValue)
        );
        this.maximumRangeValue.setEnabled(!this.autoRange);
        this.maximumRangeValue.setActionCommand("MaximumRange");
        this.maximumRangeValue.addActionListener(this);
        this.maximumRangeValue.addFocusListener(this);
        range.add(this.maximumRangeValue);
        range.add(new JPanel());

        other.add(localizationResources.getString("Range"), range);

    }

    /**
     * Returns the current setting of the auto-range property.
     *
     * @return <code>true</code> if auto range is enabled.
     */
    public boolean isAutoRange() {
        return this.autoRange;
    }

    /**
     * Returns the current setting of the minimum value in the axis range.
     *
     * @return The current setting of the minimum value in the axis range.
     */
    public double getMinimumValue() {
        return this.minimumValue;
    }

    /**
     * Returns the current setting of the maximum value in the axis range.
     *
     * @return The current setting of the maximum value in the axis range.
     */
    public double getMaximumValue() {
        return this.maximumValue;
    }

    /**
     * Handles actions from within the property panel.
     * @param event an event.
     */
    public void actionPerformed(ActionEvent event) {
        String command = event.getActionCommand();
        if (command.equals("GridStroke")) {
            attemptGridStrokeSelection();
        }
        else if (command.equals("GridPaint")) {
            attemptGridPaintSelection();
        }
        else if (command.equals("AutoRangeOnOff")) {
            toggleAutoRange();
        }
        else if (command.equals("MinimumRange")) {
            validateMinimum();
        }
        else if (command.equals("MaximumRange")) {
            validateMaximum();
        }
        else {
            // pass to the super-class for handling
            super.actionPerformed(event);
        }
    }

    /**
     * Handle a grid stroke selection.
     */
    private void attemptGridStrokeSelection() {
        StrokeChooserPanel panel = new StrokeChooserPanel(
            null, this.availableStrokeSamples
        );
        int result = JOptionPane.showConfirmDialog(
            this, panel, localizationResources.getString("Stroke_Selection"),
            JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE
        );

        if (result == JOptionPane.OK_OPTION) {
            this.gridStrokeSample.setStroke(panel.getSelectedStroke());
        }
    }

    /**
     * Handle a grid paint selection.
     */
    private void attemptGridPaintSelection() {
        Color c;
        c = JColorChooser.showDialog(
            this, localizationResources.getString("Grid_Color"), Color.blue
        );
        if (c != null) {
            this.gridPaintSample.setPaint(c);
        }
    }

    /**
     * Does nothing.
     *
     * @param event  the event.
     */
    public void focusGained(FocusEvent event) {
        // don't need to do anything
    }

    /**
     *  Revalidates minimum/maximum range.
     *
     *  @param event  the event.
     */
    public void focusLost(FocusEvent event) {
        if (event.getSource() == this.minimumRangeValue) {
            validateMinimum();
        }
        else if (event.getSource() == this.maximumRangeValue) {
            validateMaximum();
        }
    }

    /**
     *  Toggle the auto range setting.
     */
    public void toggleAutoRange() {
        this.autoRange = this.autoRangeCheckBox.isSelected();
        if (this.autoRange) {
            this.minimumRangeValue.setText(Double.toString(this.minimumValue));
            this.minimumRangeValue.setEnabled(false);
            this.maximumRangeValue.setText(Double.toString(this.maximumValue));
            this.maximumRangeValue.setEnabled(false);
        }
        else {
            this.minimumRangeValue.setEnabled(true);
            this.maximumRangeValue.setEnabled(true);
        }
    }

    /**
     * Revalidate the range minimum.
     */
    public void validateMinimum() {
        double newMin;
        try {
            newMin = Double.parseDouble(this.minimumRangeValue.getText());
            if (newMin >= this.maximumValue) {
                newMin = this.minimumValue;
            }
        }
        catch (NumberFormatException e) {
            newMin = this.minimumValue;
        }

        this.minimumValue = newMin;
        this.minimumRangeValue.setText(Double.toString(this.minimumValue));
    }

    /**
     * Revalidate the range maximum.
     */
    public void validateMaximum() {
        double newMax;
        try {
            newMax = Double.parseDouble(this.maximumRangeValue.getText());
            if (newMax <= this.minimumValue) {
                newMax = this.maximumValue;
            }
        }
        catch (NumberFormatException e) {
            newMax = this.maximumValue;
        }

        this.maximumValue = newMax;
        this.maximumRangeValue.setText(Double.toString(this.maximumValue));
    }

    /**
     * Sets the properties of the specified axis to match the properties
     * defined on this panel.
     *
     * @param axis  the axis.
     */
    public void setAxisProperties(Axis axis) {
        super.setAxisProperties(axis);
        NumberAxis numberAxis = (NumberAxis) axis;
        numberAxis.setAutoRange(this.autoRange);
        if (!this.autoRange) {
            numberAxis.setRange(this.minimumValue, this.maximumValue);
        }
    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91黄色免费看| 亚洲欧美日韩中文播放 | 亚洲福利视频导航| 日韩不卡免费视频| 国产黄色成人av| 95精品视频在线| 欧美一区三区四区| 国产精品水嫩水嫩| 亚洲一区影音先锋| 精品一二三四区| 91色.com| 欧美变态tickle挠乳网站| 中文字幕一区二区三| 日本强好片久久久久久aaa| 国产精品伊人色| 精品污污网站免费看| 久久久无码精品亚洲日韩按摩| 亚洲免费观看高清| 狠狠色丁香久久婷婷综合_中| 色综合久久中文字幕综合网| 精品日韩欧美在线| 夜色激情一区二区| 国产99久久久国产精品| 欧美人与z0zoxxxx视频| 中文字幕欧美三区| 美女性感视频久久| 色哟哟国产精品| 国产亚洲综合性久久久影院| 亚洲国产三级在线| 波多野结衣在线一区| 日韩亚洲欧美在线| 亚洲永久免费视频| 9久草视频在线视频精品| 日韩欧美高清一区| 亚洲国产一区二区视频| bt欧美亚洲午夜电影天堂| 日韩免费高清av| 亚洲第一福利一区| 色又黄又爽网站www久久| 久久久不卡影院| 久久99最新地址| 欧美日本一区二区在线观看| 亚洲人快播电影网| 懂色av一区二区三区蜜臀| 日韩欧美亚洲国产另类| 亚洲va在线va天堂| 色噜噜久久综合| 国产精品久久久久久久久晋中 | 久久亚洲私人国产精品va媚药| 亚洲第一综合色| 91麻豆精品一区二区三区| 国产亚洲精久久久久久| 久久精品国产精品青草| 在线播放中文一区| 亚洲成人激情社区| 欧美中文字幕亚洲一区二区va在线 | 亚洲精品免费播放| 99国内精品久久| 国产精品久久看| 丁香桃色午夜亚洲一区二区三区| 精品国精品自拍自在线| 免费高清在线一区| 日韩欧美一级二级| 久久成人精品无人区| 日韩欧美综合一区| 男人的j进女人的j一区| 日韩视频在线你懂得| 日韩成人午夜电影| 欧美一区二区三区视频免费| 视频在线在亚洲| 欧美二区在线观看| 日本不卡在线视频| 日韩一区二区三区免费看 | 欧美mv日韩mv| 麻豆成人免费电影| 日韩欧美国产三级| 国产综合色视频| 国产欧美中文在线| thepron国产精品| 中文字幕亚洲成人| 99v久久综合狠狠综合久久| 一区视频在线播放| 91国产成人在线| 亚洲午夜电影在线观看| 欧美日韩免费在线视频| 日韩激情中文字幕| 精品少妇一区二区| 国产成人啪午夜精品网站男同| 欧美高清一级片在线观看| 不卡av免费在线观看| 亚洲一区精品在线| 5566中文字幕一区二区电影| 免费人成网站在线观看欧美高清| 日韩欧美不卡一区| 国产成人精品一区二| 自拍偷拍亚洲综合| 欧美日韩精品一区二区| 麻豆91精品91久久久的内涵| 久久美女高清视频| 色综合天天综合网天天狠天天 | 制服丝袜一区二区三区| 久久精品国产99国产| 国产精品视频yy9299一区| 色哟哟国产精品免费观看| 免费观看在线综合| 日本一区二区久久| 欧美专区亚洲专区| 国产一区999| 亚洲天堂精品在线观看| 制服丝袜激情欧洲亚洲| 国产一区二区三区四| 亚洲你懂的在线视频| 日韩欧美另类在线| 99热99精品| 免费人成在线不卡| 国产精品国产自产拍高清av| 欧美伦理影视网| 国产98色在线|日韩| 亚洲一区二区三区四区在线观看| 日韩免费视频一区二区| 99久久精品情趣| 美日韩一区二区三区| 成人免费视频在线观看| 日韩亚洲欧美一区| 色婷婷综合久久久中文字幕| 免费观看在线综合色| 亚洲私人黄色宅男| 日韩免费成人网| 在线视频综合导航| 丰满少妇久久久久久久| 午夜精品久久久久久久久久| 国产欧美中文在线| 日韩欧美一区在线| 91视频一区二区| 国产在线国偷精品免费看| 亚洲午夜影视影院在线观看| 欧美激情一区二区三区全黄| 欧美乱妇15p| 99在线精品视频| 韩国女主播成人在线| 婷婷国产v国产偷v亚洲高清| 国产精品免费网站在线观看| 日韩欧美国产麻豆| 欧美日韩dvd在线观看| 色综合久久久久| 成人午夜精品一区二区三区| 美女网站视频久久| 亚洲一区二区三区国产| 中文字幕亚洲欧美在线不卡| 久久综合色综合88| 欧美一级淫片007| 在线免费观看一区| 99久久久国产精品| 成人精品视频一区二区三区 | 亚洲国产精品黑人久久久| 日韩视频免费直播| 欧美日韩国产综合视频在线观看 | 亚洲综合免费观看高清在线观看| 国产清纯白嫩初高生在线观看91| 91精品国产乱| 欧美精品久久久久久久多人混战| 91免费国产在线| 不卡电影免费在线播放一区| 国产高清精品在线| 国精产品一区一区三区mba视频| 蜜桃精品视频在线观看| 日日夜夜精品视频天天综合网| 亚洲一区二区三区爽爽爽爽爽 | 色婷婷亚洲一区二区三区| 播五月开心婷婷综合| 成人av电影在线网| 国产不卡视频在线观看| 国产一区二区免费看| 精品一区二区在线看| 裸体健美xxxx欧美裸体表演| 男人的天堂亚洲一区| 美女视频黄 久久| 蜜桃av一区二区在线观看| 奇米在线7777在线精品| 奇米777欧美一区二区| 日本va欧美va欧美va精品| 蜜臀久久99精品久久久画质超高清 | 波多野洁衣一区| 91视频免费播放| 日本韩国欧美国产| 91福利社在线观看| 欧美亚洲国产怡红院影院| 欧美色综合天天久久综合精品| 欧美日韩在线一区二区| 欧美日韩精品福利| 日韩午夜电影在线观看| 欧美变态口味重另类| 国产欧美日本一区视频| 一区视频在线播放| 亚洲一二三四区不卡| 日韩精品电影在线| 久久精品久久99精品久久| 国产一区二区毛片| 成人免费毛片a| 日本电影亚洲天堂一区|