@Override protected void installDefaults() { super.installDefaults(); // ensure the minimum size of the thumb int w = this.minimumThumbSize.width; int h = this.minimumThumbSize.height; if (this.myScrollBar.getOrientation() == Adjustable.VERTICAL) { h = Math.max(h, Math.min(this.maximumThumbSize.height, THUMB_MIN_SIZE)); } else { w = Math.max(w, Math.min(this.maximumThumbSize.width, THUMB_MIN_SIZE)); } this.minimumThumbSize = new Dimension(w, h); }
@Override protected void installDefaults() { super.installDefaults(); incrGap = 0; decrGap = 0; }
/** * Installs some default values. */ protected void installDefaults() { scrollBarWidth = Theme.scrollSize.getValue(); super.installDefaults(); scrollbar.setBorder(null); // If thumb is smaller than minimumThumbSize it // makes no sense to paint it minimumThumbSize = new Dimension(17, 17); }
/** Installs the UI defaults for the associated JScrollBar */ protected void installDefaults() { scrollBarWidth= ((Integer) (UIManager.get("ScrollBar.width"))).intValue(); super.installDefaults(); bumps= new TonicBumps(10, 10, thumbHighlightColor, thumbShadow, thumbColor); }
@Override protected void installDefaults() { super.installDefaults(); this.scrollBarWidth = SubstanceSizeUtils .getScrollBarWidth(SubstanceSizeUtils .getComponentFontSize(this.scrollbar)); }
@Override protected void installDefaults() { super.installDefaults(); this.scrollBarWidth = SubstanceSizeUtils .getScrollBarWidth(SubstanceSizeUtils .getComponentFontSize(this.scrollbar)); }
@Override protected void installDefaults() { final int incGap = UIManager.getInt("ScrollBar.incrementButtonGap"); final int decGap = UIManager.getInt("ScrollBar.decrementButtonGap"); try { UIManager.put("ScrollBar.incrementButtonGap", 0); UIManager.put("ScrollBar.decrementButtonGap", 0); super.installDefaults(); } finally { UIManager.put("ScrollBar.incrementButtonGap", incGap); UIManager.put("ScrollBar.decrementButtonGap", decGap); } myMacScrollerStyle = NSScrollerHelper.getScrollerStyle(); scrollbar.setFocusable(false); updateStyleDefaults(); }
protected void installDefaults() { super.installDefaults(); scrollBarWidth = UIManager.getInt("ScrollBar.width"); incrGap = UIManager.getInt("ScrollBar.incrementButtonGap"); decrGap = UIManager.getInt("ScrollBar.decrementButtonGap"); // TODO this can be removed when incrGap/decrGap become protected // handle scaling for sizeVarients for special case components. The // key "JComponent.sizeVariant" scales for large/small/mini // components are based on Apples LAF String scaleKey = (String)scrollbar.getClientProperty("JComponent.sizeVariant"); if (scaleKey != null){ if ("large".equals(scaleKey)){ scrollBarWidth *= 1.15; incrGap *= 1.15; decrGap *= 1.15; } else if ("small".equals(scaleKey)){ scrollBarWidth *= 0.857; incrGap *= 0.857; decrGap *= 0.857; } else if ("mini".equals(scaleKey)){ scrollBarWidth *= 0.714; incrGap *= 0.714; decrGap *= 0.714; } } }
protected void installDefaults() { /* * NOTE: This next line of code was added because, since incrGap and * decrGap in BasicScrollBarUI are private, I need to have some way of * updating them. This is an incomplete solution (since it implies that * the incrGap and decrGap are set once, and not reset per state. * Probably ok, but not always ok). This line of code should be removed * at the same time that incrGap and decrGap are removed and made * protected in the super class. */ super.installDefaults(); trackHighlight = NO_HIGHLIGHT; if (scrollbar.getLayout() == null || (scrollbar.getLayout() instanceof UIResource)) { scrollbar.setLayout(this); } updateStyle(scrollbar); }