public class SlimScrollbar extends JComponent implements ColumnScrollBar, Adjustable
JScrollBar.JComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static ColumnScrollBarFactory |
FACTORY
A factory creating new
SlimScrollbars. |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTHORIZONTAL, NO_ORIENTATION, VERTICALABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
SlimScrollbar()
Creates a new scrollbar
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdjustmentListener(AdjustmentListener listener)
Adds a listener to this scrollbar, the listener is to be called whenever the
value
changes. |
int |
getBlockIncrement() |
Component |
getComponent()
Gets a
Component which is the graphical representation of this scrollbar |
int |
getMaximum() |
int |
getMinimum() |
Dimension |
getMinimumSize() |
int |
getOrientation() |
Dimension |
getPreferredSize() |
int |
getUnitIncrement() |
int |
getValue()
Gets the offset of the scrollbar.
|
int |
getVisibleAmount() |
protected void |
paintComponent(Graphics g) |
void |
removeAdjustmentListener(AdjustmentListener listener)
Removes
listener from this scrollbar. |
void |
setBlockIncrement(int b) |
void |
setMaximum(int max) |
void |
setMinimum(int min) |
void |
setOrientation(Orientation orientation)
Sets the orientation of the scrollbar
|
void |
setUnitIncrement(int u) |
void |
setValue(int v) |
void |
setValues(int required,
int available)
Tells this scrollbar how much space is required, and how much space is available.
|
void |
setVisibleAmount(int v) |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final ColumnScrollBarFactory FACTORY
SlimScrollbars.public Dimension getMinimumSize()
getMinimumSize in class JComponentpublic Dimension getPreferredSize()
getPreferredSize in class JComponentprotected void paintComponent(Graphics g)
paintComponent in class JComponentpublic void setValues(int required,
int available)
ColumnScrollBarsetValues in interface ColumnScrollBarrequired - the required pixels to show a columnavailable - the pixels actually availablepublic int getValue()
ColumnScrollBar0 and
available - required.getValue in interface ColumnScrollBargetValue in interface Adjustablepublic Component getComponent()
ColumnScrollBarComponent which is the graphical representation of this scrollbargetComponent in interface ColumnScrollBarnullpublic void setOrientation(Orientation orientation)
ColumnScrollBarsetOrientation in interface ColumnScrollBarorientation - the orientation, not nullpublic void addAdjustmentListener(AdjustmentListener listener)
ColumnScrollBarvalue
changes.addAdjustmentListener in interface ColumnScrollBaraddAdjustmentListener in interface Adjustablelistener - the new listener, not nullpublic void removeAdjustmentListener(AdjustmentListener listener)
ColumnScrollBarlistener from this scrollbar.removeAdjustmentListener in interface ColumnScrollBarremoveAdjustmentListener in interface Adjustablelistener - the listener to removepublic int getOrientation()
getOrientation in interface Adjustablepublic void setMinimum(int min)
setMinimum in interface Adjustablepublic int getMinimum()
getMinimum in interface Adjustablepublic void setMaximum(int max)
setMaximum in interface Adjustablepublic int getMaximum()
getMaximum in interface Adjustablepublic void setUnitIncrement(int u)
setUnitIncrement in interface Adjustablepublic int getUnitIncrement()
getUnitIncrement in interface Adjustablepublic void setBlockIncrement(int b)
setBlockIncrement in interface Adjustablepublic int getBlockIncrement()
getBlockIncrement in interface Adjustablepublic void setVisibleAmount(int v)
setVisibleAmount in interface Adjustablepublic int getVisibleAmount()
getVisibleAmount in interface Adjustablepublic void setValue(int v)
setValue in interface AdjustableCopyright © 2018. All rights reserved.