/** * {@inheritDoc} */ @Override public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { switch(orientation) { case SwingConstants.VERTICAL: return getFontMetrics(getFont()).getHeight(); case SwingConstants.HORIZONTAL: return getFontMetrics(getFont()).charWidth('M'); default: throw new IllegalArgumentException("Invalid orientation: " + orientation); } }
/** * {@inheritDoc} */ @Override public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { switch(orientation) { case SwingConstants.VERTICAL: return getFontMetrics(getFont()).getHeight(); case SwingConstants.HORIZONTAL: return getFontMetrics(getFont()).charWidth('M'); default: throw new IllegalArgumentException("Invalid orientation: " + orientation); } }
/** * {@inheritDoc} */ @Override public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { switch(orientation) { case SwingConstants.VERTICAL: return getFontMetrics(getFont()).getHeight(); case SwingConstants.HORIZONTAL: return getFontMetrics(getFont()).charWidth('M'); default: throw new IllegalArgumentException("Invalid orientation: " + orientation); } }
/** * {@inheritDoc} */ @Override public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { switch(orientation) { case SwingConstants.VERTICAL: return getFontMetrics(getFont()).getHeight(); case SwingConstants.HORIZONTAL: return getFontMetrics(getFont()).charWidth('M'); default: throw new IllegalArgumentException("Invalid orientation: " + orientation); } }