()
| 2046 | |
| 2047 | /// {@inheritDoc} |
| 2048 | @Override |
| 2049 | protected Dimension calcPreferredSize() { |
| 2050 | if (shouldShowHint()) { |
| 2051 | Label l = getHintLabelImpl(); |
| 2052 | if (l != null) { |
| 2053 | Dimension d1 = getUIManager().getLookAndFeel().getListPreferredSize(this); |
| 2054 | Dimension d2 = l.getPreferredSize(); |
| 2055 | return new Dimension(d1.getWidth() + d2.getWidth(), d1.getHeight() + d2.getHeight()); |
| 2056 | } |
| 2057 | } |
| 2058 | Dimension d = getUIManager().getLookAndFeel().getListPreferredSize(this); |
| 2059 | if (spinnerOverlay != null) { |
| 2060 | if (spinnerOverlay.getBorder() != null) { |
| 2061 | d.setWidth(Math.max(spinnerOverlay.getBorder().getMinimumWidth(), d.getWidth())); |
| 2062 | d.setHeight(Math.max(spinnerOverlay.getBorder().getMinimumHeight(), d.getHeight())); |
| 2063 | } |
| 2064 | |
| 2065 | } |
| 2066 | return d; |
| 2067 | } |
| 2068 | |
| 2069 | /// Allows adding an element to a list if the underlying model supports this, notice that |
| 2070 | /// it is an optional operation and if the model does not support it (default list model does) |
nothing calls this directly
no test coverage detected