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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? defaulttitleeditor.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.]
 *
 * -----------------------
 * DefaultTitleEditor.java
 * -----------------------
 * (C) Copyright 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   Arnaud Lelievre;
 *                   Daniel Gredler;
 *
 * $Id: DefaultTitleEditor.java,v 1.1.2.1 2005/11/24 16:11:48 mungady Exp $
 *
 * Changes
 * -------
 * 24-Nov-2005 : Version 1, based on TitlePropertyEditPanel.java (DG);
 *
 */

package org.jfree.chart.editor;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.Paint;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ResourceBundle;

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

import org.jfree.chart.JFreeChart;
import org.jfree.chart.title.Title;
import org.jfree.chart.title.TextTitle;
import org.jfree.layout.LCBLayout;
import org.jfree.ui.FontChooserPanel;
import org.jfree.ui.FontDisplayField;
import org.jfree.ui.PaintSample;

/**
 * A panel for editing the properties of a chart title.
 */
class DefaultTitleEditor extends JPanel implements ActionListener {

    /** Whether or not to display the title on the chart. */
    private boolean showTitle;

    /** The checkbox to indicate whether or not to display the title. */
    private JCheckBox showTitleCheckBox;

    /** A field for displaying/editing the title text. */
    private JTextField titleField;

    /** The font used to draw the title. */
    private Font titleFont;

    /** A field for displaying a description of the title font. */
    private JTextField fontfield;

    /** The button to use to select a new title font. */
    private JButton selectFontButton;

    /** The paint (color) used to draw the title. */
    private PaintSample titlePaint;

    /** The button to use to select a new paint (color) to draw the title. */
    private JButton selectPaintButton;

    /** The resourceBundle for the localization. */
    protected static ResourceBundle localizationResources 
        = ResourceBundle.getBundle("org.jfree.chart.editor.LocalizationBundle");

    /**
     * Standard constructor: builds a panel for displaying/editing the
     * properties of the specified title.
     *
     * @param title  the title, which should be changed.
     */
    public DefaultTitleEditor(Title title) {

        TextTitle t = (title != null ? (TextTitle) title 
                : new TextTitle(localizationResources.getString("Title")));
        this.showTitle = (title != null);
        this.titleFont = t.getFont();
        this.titleField = new JTextField(t.getText());
        this.titlePaint = new PaintSample(t.getPaint());

        setLayout(new BorderLayout());

        JPanel general = new JPanel(new BorderLayout());
        general.setBorder(
            BorderFactory.createTitledBorder(
                BorderFactory.createEtchedBorder(), 
                localizationResources.getString("General")
            )
        );

        JPanel interior = new JPanel(new LCBLayout(4));
        interior.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));

        interior.add(new JLabel(localizationResources.getString("Show_Title")));
        this.showTitleCheckBox = new JCheckBox();
        this.showTitleCheckBox.setSelected(this.showTitle);
        this.showTitleCheckBox.setActionCommand("ShowTitle");
        this.showTitleCheckBox.addActionListener(this);
        interior.add(new JPanel());
        interior.add(this.showTitleCheckBox);

        JLabel titleLabel = new JLabel(localizationResources.getString("Text"));
        interior.add(titleLabel);
        interior.add(this.titleField);
        interior.add(new JPanel());

        JLabel fontLabel = new JLabel(localizationResources.getString("Font"));
        this.fontfield = new FontDisplayField(this.titleFont);
        this.selectFontButton = new JButton(
            localizationResources.getString("Select...")
        );
        this.selectFontButton.setActionCommand("SelectFont");
        this.selectFontButton.addActionListener(this);
        interior.add(fontLabel);
        interior.add(this.fontfield);
        interior.add(this.selectFontButton);

        JLabel colorLabel = new JLabel(
            localizationResources.getString("Color")
        );
        this.selectPaintButton = new JButton(
            localizationResources.getString("Select...")
        );
        this.selectPaintButton.setActionCommand("SelectPaint");
        this.selectPaintButton.addActionListener(this);
        interior.add(colorLabel);
        interior.add(this.titlePaint);
        interior.add(this.selectPaintButton);

        this.enableOrDisableControls();

        general.add(interior);
        add(general, BorderLayout.NORTH);
    }

    /**
     * Returns the title text entered in the panel.
     *
     * @return The title text entered in the panel.
     */
    public String getTitleText() {
        return this.titleField.getText();
    }

    /**
     * Returns the font selected in the panel.
     *
     * @return The font selected in the panel.
     */
    public Font getTitleFont() {
        return this.titleFont;
    }

    /**
     * Returns the paint selected in the panel.
     *
     * @return The paint selected in the panel.
     */
    public Paint getTitlePaint() {
        return this.titlePaint.getPaint();
    }

    /**
     * Handles button clicks by passing control to an appropriate handler 
     * method.
     *
     * @param event  the event
     */
    public void actionPerformed(ActionEvent event) {

        String command = event.getActionCommand();

        if (command.equals("SelectFont")) {
            attemptFontSelection();
        }
        else if (command.equals("SelectPaint")) {
            attemptPaintSelection();
        }
        else if (command.equals("ShowTitle")) {
            attemptModifyShowTitle();
        }
    }

    /**
     * Presents a font selection dialog to the user.
     */
    public void attemptFontSelection() {

        FontChooserPanel panel = new FontChooserPanel(this.titleFont);
        int result = 
            JOptionPane.showConfirmDialog(
                this, panel, localizationResources.getString("Font_Selection"),
                JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE
            );

        if (result == JOptionPane.OK_OPTION) {
            this.titleFont = panel.getSelectedFont();
            this.fontfield.setText(
                this.titleFont.getFontName() + " " + this.titleFont.getSize()
            );
        }
    }

    /**
     * Allow the user the opportunity to select a Paint object.  For now, we
     * just use the standard color chooser - all colors are Paint objects, but
     * not all Paint objects are colors (later we can implement a more general
     * Paint chooser).
     */
    public void attemptPaintSelection() {
        Paint p = this.titlePaint.getPaint();
        Color defaultColor = (p instanceof Color ? (Color) p : Color.blue);
        Color c = JColorChooser.showDialog(
            this, localizationResources.getString("Title_Color"), defaultColor
        );
        if (c != null) {
            this.titlePaint.setPaint(c);
        }
    }

    /**
     * Allow the user the opportunity to change whether the title is
     * displayed on the chart or not.
     */
    private void attemptModifyShowTitle() {
        this.showTitle = this.showTitleCheckBox.isSelected();
        this.enableOrDisableControls();
    }

    /**
     * If we are supposed to show the title, the controls are enabled.
     * If we are not supposed to show the title, the controls are disabled.
     */
    private void enableOrDisableControls() {
        boolean enabled = (this.showTitle == true);
        this.titleField.setEnabled(enabled);
        this.selectFontButton.setEnabled(enabled);
        this.selectPaintButton.setEnabled(enabled);
    }

    /**
     * Sets the properties of the specified title to match the properties
     * defined on this panel.
     *
     * @param chart  the chart whose title is to be modified.
     */
    public void setTitleProperties(JFreeChart chart) {
        if (this.showTitle) {
            TextTitle title = chart.getTitle();
            if (title == null) {
                title = new TextTitle();
                chart.setTitle(title);
            }
            title.setText(getTitleText());
            title.setFont(getTitleFont());
            title.setPaint(getTitlePaint());
        }
        else {
            chart.setTitle((TextTitle) null);
        }
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久99精品久久| 色综合色狠狠综合色| 日韩视频一区二区| 日韩专区在线视频| 国产又粗又猛又爽又黄91精品| 精品国产乱码久久久久久免费| 免费观看久久久4p| 日韩三区在线观看| 日韩av电影一区| 51午夜精品国产| 亚洲国产成人精品视频| 欧美色偷偷大香| 亚洲成人av在线电影| 欧美日本在线视频| 日韩中文字幕91| 日韩午夜激情视频| 激情国产一区二区| 久久网站热最新地址| 国产乱人伦偷精品视频不卡| 26uuu成人网一区二区三区| 国产精品一区二区久激情瑜伽| 久久青草国产手机看片福利盒子| 国产精品一区二区91| 中文字幕欧美激情| 99r国产精品| 亚洲制服丝袜在线| 欧美一级一级性生活免费录像| 欧美aaa在线| 久久精品视频一区二区| www.欧美精品一二区| 一区二区三区日韩欧美精品| 欧美日韩在线精品一区二区三区激情| 香蕉乱码成人久久天堂爱免费| 欧美一区二区三区视频| 国产一区二区91| 亚洲欧洲成人精品av97| 欧美日韩在线观看一区二区 | 91精品国产日韩91久久久久久| 免费在线观看视频一区| 久久久99精品免费观看| 91精品91久久久中77777| 国产精品福利一区| 欧美日韩aaaaa| 国产激情一区二区三区| 国产精品久久久爽爽爽麻豆色哟哟| 91黄色免费版| 激情伊人五月天久久综合| 日韩美女精品在线| 欧美一区二区高清| 一本到高清视频免费精品| 日韩av网站在线观看| 国产精品每日更新| 日韩欧美你懂的| 99热这里都是精品| 国产一区在线精品| 香蕉久久夜色精品国产使用方法 | 成人激情视频网站| 丝袜亚洲另类欧美| 国产欧美一区二区精品久导航| 欧美在线看片a免费观看| 国产麻豆视频一区| 日韩精品一二三区| 18涩涩午夜精品.www| 久久亚洲一区二区三区四区| 欧美亚洲综合一区| av电影天堂一区二区在线| 男女激情视频一区| 亚洲国产成人av网| 亚洲欧洲av一区二区三区久久| 日韩欧美一二三| 欧美在线短视频| 波多野结衣一区二区三区| 另类综合日韩欧美亚洲| 伊人色综合久久天天人手人婷| 久久精品夜色噜噜亚洲a∨| 91精品婷婷国产综合久久| 一本久久精品一区二区| 国产福利一区在线观看| 日本大胆欧美人术艺术动态| 一区二区三区在线免费观看| 国产精品久久久久久久久免费樱桃 | 久久精品国产久精国产| 五月天一区二区三区| 一二三区精品视频| 亚洲男女一区二区三区| 成人欧美一区二区三区在线播放| 久久精品一区蜜桃臀影院| 精品国产不卡一区二区三区| 91精品国产色综合久久| 91麻豆精品国产91久久久久| 欧美日韩激情在线| 欧美日韩国产bt| 在线免费观看视频一区| 久久久精品中文字幕麻豆发布| 欧美男生操女生| 在线91免费看| 国产一二精品视频| 一区二区三区欧美激情| 亚洲一区二区成人在线观看| 久久久久久麻豆| 7777女厕盗摄久久久| 欧美裸体bbwbbwbbw| 91精品国产色综合久久ai换脸| 欧美日韩中文一区| 欧美日韩成人综合天天影院 | 亚洲午夜在线电影| 久久精品欧美一区二区三区麻豆| 91精品国产综合久久久久久久久久| 成人午夜私人影院| 成人午夜在线播放| 91久久一区二区| 日韩视频国产视频| 91精品国产综合久久久久久久久久 | 亚洲品质自拍视频| 欧美群妇大交群的观看方式| 91高清视频在线| 色嗨嗨av一区二区三区| 欧美系列在线观看| 欧美日韩在线观看一区二区| 精品88久久久久88久久久| 亚洲精品你懂的| 亚洲欧美激情插 | 99国产精品国产精品毛片| 精品一二线国产| 日本韩国欧美一区| 亚洲午夜成aⅴ人片| 三级成人在线视频| 欧美在线看片a免费观看| 欧美日韩一区二区三区高清 | 久久99热狠狠色一区二区| 日韩和欧美的一区| 国产精品亚洲视频| 色呦呦国产精品| 欧美一区二区黄| 中文字幕在线不卡视频| 亚洲国产精品久久久久婷婷884| 日韩不卡免费视频| 从欧美一区二区三区| 欧美浪妇xxxx高跟鞋交| www久久精品| 亚洲精品免费播放| 五月婷婷激情综合| zzijzzij亚洲日本少妇熟睡| 欧美久久一区二区| 国产精品国产三级国产专播品爱网 | 性做久久久久久久久| 国产一区二区不卡| 一本色道久久综合亚洲91| 欧美精选一区二区| 中文字幕一区二区三区精华液| 日本不卡视频在线观看| 95精品视频在线| 2020国产精品久久精品美国| 亚洲第一激情av| 成人av网站在线观看免费| 日韩欧美高清dvd碟片| 悠悠色在线精品| caoporm超碰国产精品| 久久久亚洲综合| 免费在线视频一区| 欧美挠脚心视频网站| 亚洲日本丝袜连裤袜办公室| 国产酒店精品激情| 91啦中文在线观看| 日本一区二区成人| 久久99久久久久久久久久久| 欧美日韩亚洲综合在线| 有坂深雪av一区二区精品| 成人免费视频一区二区| 日本一区二区三区免费乱视频| 国产一区二区三区四区五区美女 | 日韩精品色哟哟| 欧美精品久久一区二区三区| 亚洲不卡一区二区三区| 777奇米成人网| 久久精品99国产精品| 26uuu亚洲综合色欧美| 国产精品99久久久久久似苏梦涵 | 欧美军同video69gay| 日韩黄色免费网站| 欧美精品一区二区高清在线观看| 国产一区二区精品久久91| 中文字幕乱码一区二区免费| 95精品视频在线| 亚洲成人黄色影院| 欧美大尺度电影在线| 久久精品72免费观看| 欧美国产精品久久| 一道本成人在线| 日本美女一区二区三区视频| 久久一二三国产| 91蝌蚪porny| 欧美bbbbb| 中文字幕第一区| 欧美性生活一区| 久久99精品国产91久久来源| 中文字幕亚洲在| 91精品国产综合久久国产大片| 国产九色精品成人porny| 亚洲欧美日韩国产手机在线|