@author Andrew Rambaut @version $Id$ $HeadURL$ $LastChangedBy$ $LastChangedDate$ $LastChangedRevision$
| 37 | * $LastChangedRevision$ |
| 38 | */ |
| 39 | public class ControllerOptionsPanel extends OptionsPanel { |
| 40 | |
| 41 | public ControllerOptionsPanel() { |
| 42 | super(); |
| 43 | } |
| 44 | |
| 45 | public ControllerOptionsPanel(int hGap, int vGap) { |
| 46 | super(hGap, vGap); |
| 47 | } |
| 48 | |
| 49 | protected void adjustComponent(JComponent comp) { |
| 50 | setComponentLook(comp); |
| 51 | } |
| 52 | |
| 53 | public static void setComponentLook(JComponent comp) { |
| 54 | comp.putClientProperty("Quaqua.Component.visualMargin", new Insets(0,0,0,0)); |
| 55 | Font font = UIManager.getFont("SmallSystemFont"); |
| 56 | if (font != null) { |
| 57 | comp.setFont(font); |
| 58 | } |
| 59 | comp.putClientProperty("JComponent.sizeVariant", "small"); |
| 60 | if (comp instanceof JSpinner && font != null) { |
| 61 | ((JSpinner.NumberEditor)((JSpinner)comp).getEditor()).getTextField().setFont(font); |
| 62 | } |
| 63 | if (comp instanceof JButton) { |
| 64 | comp.putClientProperty("JButton.buttonType", "roundRect"); |
| 65 | } |
| 66 | if (comp instanceof JComboBox) { |
| 67 | //comp.putClientProperty("JComboBox.isSquare", Boolean.TRUE); |
| 68 | } |
| 69 | if (!(comp instanceof JTextField)) { |
| 70 | comp.setFocusable(false); |
| 71 | } |
| 72 | } |
| 73 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…