MCPcopy Create free account
hub / github.com/rambaut/figtree / ControllerOptionsPanel

Class ControllerOptionsPanel

src/figtree/treeviewer/ControllerOptionsPanel.java:39–73  ·  view source on GitHub ↗

@author Andrew Rambaut @version $Id$ $HeadURL$ $LastChangedBy$ $LastChangedDate$ $LastChangedRevision$

Source from the content-addressed store, hash-verified

37 * $LastChangedRevision$
38 */
39public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…