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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? jfontchooser.java

?? java swing控件
?? JAVA
字號(hào):
/**
 * L2FProd.com Common Components 6.9.1 License.
 *
 * Copyright 2005-2006 L2FProd.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.l2fprod.common.swing;

import com.l2fprod.common.swing.plaf.FontChooserUI;
import com.l2fprod.common.swing.plaf.JFontChooserAddon;
import com.l2fprod.common.swing.plaf.LookAndFeelAddons;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Window;

import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

/**
 * <code>JFontChooser</code> provides a pane of controls designed to allow a
 * user to manipulate and select a font.
 * 
 * @javabean.class
 *          name="JFontChooser"
 *          shortDescription="A component that supports selecting a Font."
 *          stopClass="javax.swing.JComponent"
 * 
 * @javabean.attribute
 *          name="isContainer"
 *          value="Boolean.FALSE"
 *          rtexpr="true"
 * 
 * @javabean.icons
 *          mono16="JFontChooser16-mono.gif"
 *          color16="JFontChooser16.gif"
 *          mono32="JFontChooser32-mono.gif"
 *          color32="JFontChooser32.gif"
 */
public class JFontChooser extends JComponent {

  // ensure at least the default ui is registered
  static {
    LookAndFeelAddons.contribute(new JFontChooserAddon());
  }

  public static final String SELECTED_FONT_CHANGED_KEY = "selectedFont";

  protected Font selectedFont;

  private FontChooserModel model;

  /**
   * Creates a font chooser with an initial default font and a default
   * model.
   */
  public JFontChooser() {
    this(new DefaultFontChooserModel());
  }

  /**
   * Creates a font chooser with an initial default font and a custom
   * model.
   * 
   * @param model
   */
  public JFontChooser(FontChooserModel model) {
    super();
    this.model = model;
    selectedFont = getFont();
    updateUI();
  }

  /**
   * Notification from the <code>UIManager</code> that the L&F has
   * changed. Replaces the current UI object with the latest version
   * from the <code>UIManager</code>.
   * 
   * @see javax.swing.JComponent#updateUI
   */
  public void updateUI() {
    setUI((FontChooserUI)LookAndFeelAddons.getUI(this, FontChooserUI.class));
  }

  /**
   * Sets the L&F object that renders this component.
   * 
   * @param ui the <code>FontChooserUI</code> L&F object
   * @see javax.swing.UIDefaults#getUI
   * 
   * @beaninfo
   *  bound: true
   *  hidden: true
   *  description: The UI object that implements the font chooser's LookAndFeel.
   */
  public void setUI(FontChooserUI ui) {
    super.setUI(ui);
  }

  /**
   * Returns the name of the L&F class that renders this component.
   * 
   * @return the string "FontChooserUI"
   * @see javax.swing.JComponent#getUIClassID
   * @see javax.swing.UIDefaults#getUI
   */
  public String getUIClassID() {
    return "FontChooserUI";
  }

  /**
   * Sets the selected font of this JFontChooser. This will fire a <code>PropertyChangeEvent</code>
   * for the property named {@link #SELECTED_FONT_CHANGED_KEY}.
   * 
   * @param f the font to select
   * @see javax.swing.JComponent#addPropertyChangeListener(java.beans.PropertyChangeListener)
   * 
   * @javabean.property
   *  bound="true"
   *  preferred="true"
   *  shortDescription="The current font the chooser is to display"
   */
  public void setSelectedFont(Font f) {
    Font oldFont = selectedFont;
    selectedFont = f;
    firePropertyChange(SELECTED_FONT_CHANGED_KEY, oldFont, selectedFont);
  }

  /**
   * Gets the current font value from the font chooser.
   * 
   * @return the current font value of the font chooser
   */
  public Font getSelectedFont() {
    return selectedFont;
  }

  /**
   * Gets the font chooser model of this font chooser.
   * 
   * @return the font chooser model of this font chooser.
   */
  public FontChooserModel getModel() {
    return model;
  }

  /**
   * Shows a modal font-chooser dialog and blocks until the dialog is
   * hidden. If the user presses the "OK" button, then this method
   * hides/disposes the dialog and returns the selected color. If the
   * user presses the "Cancel" button or closes the dialog without
   * pressing "OK", then this method hides/disposes the dialog and
   * returns <code>null</code>.
   * 
   * @param parent the parent <code>Component</code> for the
   *          dialog
   * @param title the String containing the dialog's title
   * @return the selected font or <code>null</code> if the user
   *         opted out
   * @exception java.awt.HeadlessException if GraphicsEnvironment.isHeadless()
   *              returns true.
   * @see java.awt.GraphicsEnvironment#isHeadless
   */
  public Font showFontDialog(Component parent, String title) {
    BaseDialog dialog = createDialog(parent, title);
    if (dialog.ask()) {
      return getSelectedFont();
    } else {
      return null;
    }
  }
  
  protected BaseDialog createDialog(Component parent, String title) {    
    BaseDialog dialog;
    Window window = (parent == null?JOptionPane.getRootFrame():SwingUtilities
      .windowForComponent(parent));
    if (window instanceof Frame) {
      dialog = new BaseDialog((Frame)window, title, true);
    } else {
      dialog = new BaseDialog((Dialog)window, title, true);
    }
    dialog.setDialogMode(BaseDialog.OK_CANCEL_DIALOG);
    dialog.getBanner().setVisible(false);
    
    dialog.getContentPane().setLayout(new BorderLayout());
    dialog.getContentPane().add("Center", this);
    dialog.pack();
    dialog.setLocationRelativeTo(parent);

    return dialog;
  }
  
  /**
   * Similar to {@link #showFontDialog(Component, String)} except it can be
   * called from a static context. Prefer
   * {@link #showFontDialog(Component, String)} if you want to control the
   * dialog created by the method call or if you want to specify a custom
   * {@link FontChooserModel}.
   * 
   * @param parent
   *          the parent <code>Component</code> for the dialog
   * @param title
   *          the String containing the dialog's title
   * @param initialFont
   *          the initial Font set when the font-chooser is shown
   * @return the selected font or <code>null</code> if the user opted out
   * @exception java.awt.HeadlessException
   *              if GraphicsEnvironment.isHeadless() returns true.
   * @see java.awt.GraphicsEnvironment#isHeadless
   * @see #showFontDialog(Component, String)
   */
  public static Font showDialog(Component parent, String title, Font initialFont) {
    JFontChooser chooser = new JFontChooser();
    chooser.setSelectedFont(initialFont);
    return chooser.showFontDialog(parent, title);
  }

}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久精品人人澡人人爽| 亚洲成人动漫一区| 亚洲欧美激情一区二区| 亚洲午夜精品17c| 久久国产麻豆精品| 成人动漫在线一区| 欧美色老头old∨ideo| 精品国产亚洲在线| 亚洲乱码国产乱码精品精的特点 | 久久成人免费电影| 国产凹凸在线观看一区二区| 色激情天天射综合网| 欧美变态tickling挠脚心| 国产精品福利av| 美女视频一区在线观看| 不卡av在线网| 欧美成人福利视频| 亚洲欧美乱综合| 国产精品原创巨作av| 精品污污网站免费看| 国产视频一区在线播放| 日韩经典一区二区| 91蜜桃婷婷狠狠久久综合9色| 精品人伦一区二区色婷婷| 一区二区三区免费观看| 国产精品一区久久久久| 欧美日本一道本在线视频| 中文字幕av一区二区三区高 | 精品日本一线二线三线不卡| 亚洲精品高清视频在线观看| 国产黄色成人av| 日韩一区二区免费视频| 樱桃视频在线观看一区| 国产成人午夜精品影院观看视频| 欧美一区二区三区视频在线 | 色94色欧美sute亚洲线路一久| 精品人在线二区三区| 亚洲国产精品久久人人爱蜜臀 | 国产精品国产三级国产有无不卡 | 久久久影视传媒| 日韩av网站在线观看| 91看片淫黄大片一级| 久久精品这里都是精品| 秋霞电影网一区二区| 欧美亚洲一区二区三区四区| 国产精品素人一区二区| 精品亚洲国内自在自线福利| 欧美日韩亚州综合| 一区二区在线免费| 91色婷婷久久久久合中文| 国产精品视频免费| 国产精品538一区二区在线| 欧美成人精品高清在线播放| 日欧美一区二区| 欧美日韩一区三区| 亚洲国产乱码最新视频| 欧美写真视频网站| 亚洲伦在线观看| 99九九99九九九视频精品| 国产日产欧美一区二区三区 | 欧美激情综合网| 国产成人综合视频| 久久久噜噜噜久久中文字幕色伊伊| 七七婷婷婷婷精品国产| 欧美妇女性影城| 亚洲成av人**亚洲成av**| 欧美三区在线观看| 香蕉久久夜色精品国产使用方法 | 亚洲一区二区免费视频| 欧美性受极品xxxx喷水| 亚洲一区二区精品3399| 在线观看一区不卡| 亚洲综合小说图片| 欧美剧情电影在线观看完整版免费励志电影 | 最新国产成人在线观看| 成人综合日日夜夜| 国产精品久久国产精麻豆99网站| 成人sese在线| 国产精品剧情在线亚洲| 91在线国产观看| 亚洲伦在线观看| 欧美伊人久久久久久久久影院| 亚洲一级电影视频| 欧美日韩视频在线一区二区| 丝袜国产日韩另类美女| 欧美一级在线免费| 激情欧美一区二区三区在线观看| 久久久久九九视频| 国产成人日日夜夜| 免费人成精品欧美精品| 日韩视频在线观看一区二区| 国产专区欧美精品| 国产精品区一区二区三| 色天使色偷偷av一区二区| 一区二区三区久久| 69堂成人精品免费视频| 理论片日本一区| 中文字幕av在线一区二区三区| 99久久99久久久精品齐齐| 亚洲成a人片在线不卡一二三区| 51精品视频一区二区三区| 黄网站免费久久| 亚洲视频狠狠干| 欧美理论片在线| 国产精品亚洲视频| 亚洲欧美色一区| 日韩欧美视频一区| 成人免费三级在线| 亚洲超碰精品一区二区| 久久午夜免费电影| 一本到不卡精品视频在线观看| 偷窥国产亚洲免费视频| 久久久蜜桃精品| 欧洲一区二区三区在线| 久久福利资源站| 亚洲欧洲精品一区二区精品久久久| 日本电影欧美片| 麻豆91免费看| 亚洲欧美另类综合偷拍| 欧美一级专区免费大片| www.日韩大片| 青青草原综合久久大伊人精品 | 粉嫩av一区二区三区在线播放 | 91福利视频网站| 国内外成人在线| 亚洲一卡二卡三卡四卡 | av不卡免费在线观看| 视频在线观看国产精品| 欧美国产精品v| 在线播放视频一区| 成人app网站| 久久国产精品区| 亚洲女同一区二区| 精品久久一二三区| 日本久久电影网| 国产精品自拍毛片| 亚洲成人1区2区| 国产精品久久久久婷婷| 日韩三区在线观看| 一本到一区二区三区| 国产精品一区二区无线| 舔着乳尖日韩一区| 一区二区三区在线免费视频| 久久精品亚洲精品国产欧美kt∨| 欧美老女人在线| 99re成人在线| 国产一区二区中文字幕| 日韩av中文在线观看| 亚洲激情网站免费观看| 国产午夜亚洲精品理论片色戒| 欧美精品在线观看播放| 99r精品视频| 国产.欧美.日韩| 精品一区二区三区久久| 亚洲一卡二卡三卡四卡五卡| 日韩一区在线看| 国产欧美一区二区精品性| 日韩午夜精品视频| 欧美体内she精高潮| 99久久精品免费看| 成人综合日日夜夜| 国产精品一区二区果冻传媒| 久久激情综合网| 天天综合天天做天天综合| 一区二区日韩av| 亚洲色大成网站www久久九九| 精品成人在线观看| 日韩情涩欧美日韩视频| 91精品国产综合久久精品图片| 欧美中文字幕一区| 在线视频一区二区三| 色哟哟精品一区| a美女胸又www黄视频久久| 国产精品亚洲午夜一区二区三区 | 久久久国产一区二区三区四区小说| 91麻豆精品国产91久久久久久| 欧美日韩亚洲不卡| 欧美日韩dvd在线观看| 国产精品污www在线观看| 国产午夜三级一区二区三| 精品日韩欧美在线| 精品国产电影一区二区| 中文字幕乱码日本亚洲一区二区| 欧美精品丝袜久久久中文字幕| 欧美中文字幕一区二区三区| 欧美综合天天夜夜久久| 91免费观看视频在线| 91一区二区在线| 色婷婷亚洲婷婷| 欧洲精品视频在线观看| 欧洲精品一区二区| 在线成人小视频| 日韩欧美一级片| 久久色在线观看| 国产精品国产成人国产三级| 亚洲女女做受ⅹxx高潮| 亚洲专区一二三| 日本欧美一区二区| 国产一区二区在线视频| 国产69精品一区二区亚洲孕妇|