|
|
|
@ -10,12 +10,26 @@ import com.fr.stable.Constants;
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import sun.swing.DefaultLookup; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.AbstractButton; |
|
|
|
|
import javax.swing.JComboBox; |
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JList; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JScrollPane; |
|
|
|
|
import javax.swing.ListCellRenderer; |
|
|
|
|
import javax.swing.ScrollPaneConstants; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import javax.swing.plaf.ButtonUI; |
|
|
|
|
import javax.swing.plaf.basic.BasicComboBoxUI; |
|
|
|
|
import javax.swing.plaf.basic.BasicComboPopup; |
|
|
|
|
import javax.swing.plaf.basic.ComboPopup; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.Point; |
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
import java.awt.RenderingHints; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.awt.event.MouseListener; |
|
|
|
|
|
|
|
|
@ -159,6 +173,10 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
|
|
|
|
|
return new UIComboPopup(comboBox); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected ComboPopup createHorizontalNeverUIComboPopUp() { |
|
|
|
|
return new HorizontalNeverUIComboPopup(comboBox); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setRollover(boolean isRollover) { |
|
|
|
|
if (this.isRollover != isRollover) { |
|
|
|
|
this.isRollover = isRollover; |
|
|
|
@ -270,4 +288,16 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class HorizontalNeverUIComboPopup extends UIComboPopup { |
|
|
|
|
|
|
|
|
|
public HorizontalNeverUIComboPopup(JComboBox comboBox) { |
|
|
|
|
super(comboBox); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected JScrollPane createScroller() { |
|
|
|
|
return new UIScrollPane(list, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |