📄 synthcombopopup.java
字号:
/* * @(#)SynthComboPopup.java 1.8 05/11/17 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.synth;import javax.swing.*;import javax.swing.event.*;import javax.swing.plaf.basic.*;import java.awt.*;import java.awt.event.*;import java.beans.PropertyChangeListener;import java.beans.PropertyChangeEvent;import java.io.Serializable;/** * Synth's ComboPopup. * * @version 1.8, 11/17/05 * @author Scott Violet */class SynthComboPopup extends BasicComboPopup { public SynthComboPopup( JComboBox combo ) { super(combo); } /** * Configures the list which is used to hold the combo box items in the * popup. This method is called when the UI class * is created. * * @see #createList */ protected void configureList() { list.setFont( comboBox.getFont() ); list.setCellRenderer( comboBox.getRenderer() ); list.setFocusable( false ); list.setSelectionMode( ListSelectionModel.SINGLE_SELECTION ); int selectedIndex = comboBox.getSelectedIndex(); if ( selectedIndex == -1 ) { list.clearSelection(); } else { list.setSelectedIndex( selectedIndex ); list.ensureIndexIsVisible( selectedIndex ); } installListListeners(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -