📄 kunststoffdateentryui.java
字号:
/** Copyright (c) 2003 Martin Newstead (mseries@brundell.fsnet.co.uk). All Rights Reserved.** The author makes no representations or warranties about the suitability of the* software, either express or implied, including but not limited to the* implied warranties of merchantability, fitness for a particular* purpose, or non-infringement. The author shall not be liable for any damages* suffered by licensee as a result of using, modifying or distributing* this software or its derivatives.** The author requests that he be notified of any application, applet, or other binary that* makes use of this code and that some acknowedgement is given. Comments, questions and* requests for change will be welcomed.** Created on 07-Mar-2004 at 12:27:41 by martin*/package mseries.plaf.Kunststoff;import mseries.plaf.basic.BasicDateEntryUI;import mseries.plaf.Metal.MetalDateEntryUI;import javax.swing.plaf.ComponentUI;import javax.swing.plaf.basic.BasicArrowButton;import javax.swing.plaf.metal.MetalComboBoxUI;import javax.swing.plaf.metal.MetalLookAndFeel;import javax.swing.*;import java.awt.*;import com.incors.plaf.kunststoff.KunststoffComboBoxUI;public class KunststoffDateEntryUI extends MetalDateEntryUI{ //private final ComboBoxUI comboBoxUI = new ComboBoxUI(); /** * This method is called by the UIManager to get an instance of * this class and must be overridden in subclasses. */ public static ComponentUI createUI(JComponent x) { return new KunststoffDateEntryUI(); } public void configureDisplay(JComponent display) { display.setBorder(null); display.setPreferredSize(new Dimension(75, 21)); } public void uninstallUI(JComponent c) { super.uninstallUI(c); dateEntry.setBorder(null); } protected void configureBorder(JComponent c) { c.setBorder(UIManager.getBorder("TextField.border")); } protected JButton createArrowButton() { KunststoffArrowButton b=new KunststoffArrowButton(BasicArrowButton.SOUTH); b.drawBorder(false, true, false, false); b.setBorder(BorderFactory.createEtchedBorder(MetalLookAndFeel.getControlHighlight(), MetalLookAndFeel.getControlDarkShadow() )); return b; } // //// hack to get createArrowButton //private class ComboBoxUI extends MetalComboBoxUI //{ // // public JButton createArrowButton() // { // return super.createArrowButton(); // } // //}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -