public class ScrollBar
extends javax.swing.JComponent
implements java.awt.event.KeyListener, java.awt.event.ComponentListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener
javax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
java.util.function.Function<com.mindfusion.common.Pair<ScrollBar,com.mindfusion.common.Pair<java.awt.Graphics,com.mindfusion.common.Pair<com.mindfusion.ui.ScrollBar.ScrollBarDrawElement,java.awt.Rectangle>>>,java.lang.Void> |
draw
Invoked when the scroll bar is being painted.
|
java.util.function.Function<com.mindfusion.common.Pair<ScrollBar,java.lang.Integer>,java.lang.Void> |
scroll
Invoked when the scroll box has been moved by either a mouse or keyboard action.
|
java.util.function.Function<com.mindfusion.common.Pair<ScrollBar,java.lang.Integer>,java.lang.Void> |
valueChanged
Invoked when the value property has changed either interactively by the user or programmatically.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Modifier | Constructor and Description |
|---|---|
protected |
ScrollBar(boolean vertical)
Initializes a new instance of the ScrollBar class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
componentHidden(java.awt.event.ComponentEvent e) |
void |
componentMoved(java.awt.event.ComponentEvent e) |
void |
componentResized(java.awt.event.ComponentEvent e)
JComponent.componentResized override.
|
void |
componentShown(java.awt.event.ComponentEvent e) |
void |
focusGained(java.awt.event.FocusEvent e)
FocusListener.focusGained override.
|
void |
focusLost(java.awt.event.FocusEvent e)
FocusListener.focusLost override.
|
Brush |
getBackgroundBrush()
Gets the brush used to fill the scroll bar background.
|
Brush |
getBackgroundBrushDisabled()
Gets the brush used to fill the scroll bar background when the scroll bar is disabled.
|
Brush |
getBackgroundBrushDown()
Gets the brush used to fill the scroll bar background as indication when the user clicks in it.
|
Brush |
getButtonBackgroundBrush()
Gets the brush used to fill the scroll bar buttons when they are in normal state.
|
Brush |
getButtonBackgroundBrushDisabled()
Gets the brush used to fill scroll bar buttons when the scroll bar is disabled.
|
Brush |
getButtonBackgroundBrushDown()
Gets the brush used to fill the scroll bar buttons when they are pressed.
|
Brush |
getButtonBackgroundBrushOver()
Gets the brush used to fill the scroll bar buttons when they are pointed with the mouse.
|
Brush |
getButtonBorderBrush()
Gets the brush used to draw the border of scroll bar buttons.
|
Brush |
getButtonBorderBrushDisabled()
Gets the brush used to draw borders of scroll bar buttons when the scroll bar is disabled.
|
Brush |
getButtonBorderBrushDown()
Gets the brush used to draw borders of scroll bar buttons when they are pressed down.
|
Brush |
getButtonBorderBrushOver()
Gets the brush used to draw borders of scroll bar buttons when they are pointed with the mouse.
|
int |
getButtonBorderThickness()
Gets the border thickness of the scroll bar buttons.
|
int |
getButtonSize()
Gets the size of the buttons in the scroll bar.
|
Brush |
getForegroundBrush()
Gets the brush used to draw the content of scroll bar elements when they are in normal state.
|
Brush |
getForegroundBrushDisabled()
Gets the brush used to draw the content of scroll bar elements when the scroll bar is disabled.
|
Brush |
getForegroundBrushDown()
Gets the brush used to draw the content of scroll bar elements when they are pressed.
|
Brush |
getForegroundBrushOver()
Gets the brush used to draw the content of scroll bar elements when they are pointed with the mouse.
|
boolean |
getIsHorizontal()
Gets a value indicating whether the scrollbar is horizontal.
|
boolean |
getIsVertical()
Gets a value indicating whether the scrollbar is vertical.
|
int |
getLargeChange()
Gets the value to add or subtract from scroll position when user clicks the track outside the thumb.
|
int |
getMaximum()
Gets the upper limit of values of the scrollable range.
|
int |
getMinimum()
Gets the lower limit of values of the scrollable range.
|
int |
getSmallChange()
Gets the value to add or subtract from scroll position when user clicks a scroll arrow.
|
Brush |
getThumbBackgroundBrush()
Gets the brush used to fill the scroll bar thumb when it is in normal state.
|
Brush |
getThumbBackgroundBrushDisabled()
Gets the brush used to fill scroll bar thumb when the scroll bar is disabled.
|
Brush |
getThumbBackgroundBrushDown()
Gets the brush used to fill the scroll bar thumb when it is pressed down.
|
Brush |
getThumbBackgroundBrushOver()
Gets the brush used to fill the scroll bar thumb when it is pointed with the mouse.
|
Brush |
getThumbBorderBrush()
Gets the brush used to draw the border of scroll bar thumb.
|
Brush |
getThumbBorderBrushDisabled()
Gets the brush used to draw the border of scroll bar thumb when the scroll bar is disabled.
|
Brush |
getThumbBorderBrushDown()
Gets the brush used to draw the border of scroll bar thumb when it is pressed.
|
Brush |
getThumbBorderBrushOver()
Gets the brush used to draw borders of scrollbar thumb when it is pointed with the mouse.
|
int |
getThumbBorderThickness()
Gets the border thickness of the scroll bar thumb.
|
int |
getValue()
Gets the current scroll position.
|
protected boolean |
isInputKey(int keyData) |
void |
keyPressed(java.awt.event.KeyEvent e)
KeyListener.keyPressed override.
|
void |
keyReleased(java.awt.event.KeyEvent e)
KeyListener.keyReleased override.
|
void |
keyTyped(java.awt.event.KeyEvent e) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e)
MouseListener.mouseEntered override.
|
void |
mouseExited(java.awt.event.MouseEvent e)
MouseListener.mouseExited override.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
MouseListener.mouseMoved override.
|
void |
mousePressed(java.awt.event.MouseEvent e)
MouseListener.mousePressed override.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
MouseListener.mouseReleased override.
|
protected void |
onDraw(com.mindfusion.ui.ScrollBar.ScrollBarDrawElement e,
java.awt.Graphics g,
java.awt.Rectangle rect) |
protected void |
onRightToLeftChanged() |
protected void |
onScroll(int type,
int newValue) |
protected void |
onValueChanged(int old) |
void |
paint(java.awt.Graphics e)
JComponent.paint override.
|
void |
setBackgroundBrush(Brush value)
Sets the brush used to fill the scroll bar background.
|
void |
setBackgroundBrushDisabled(Brush value)
Sets the brush used to fill the scroll bar background when the scroll bar is disabled.
|
void |
setBackgroundBrushDown(Brush value)
Sets the brush used to fill the scroll bar background as indication when the user clicks in it.
|
void |
setButtonBackgroundBrush(Brush value)
Sets the brush used to fill the scroll bar buttons when they are in normal state.
|
void |
setButtonBackgroundBrushDisabled(Brush value)
Sets the brush used to fill scroll bar buttons when the scroll bar is disabled.
|
void |
setButtonBackgroundBrushDown(Brush value)
Sets the brush used to fill the scroll bar buttons when they are pressed.
|
void |
setButtonBackgroundBrushOver(Brush value)
Sets the brush used to fill the scroll bar buttons when they are pointed with the mouse.
|
void |
setButtonBorderBrush(Brush value)
Sets the brush used to draw the border of scroll bar buttons.
|
void |
setButtonBorderBrushDisabled(Brush value)
Sets the brush used to draw borders of scroll bar buttons when the scroll bar is disabled.
|
void |
setButtonBorderBrushDown(Brush value)
Sets the brush used to draw borders of scroll bar buttons when they are pressed down.
|
void |
setButtonBorderBrushOver(Brush value)
Sets the brush used to draw borders of scroll bar buttons when they are pointed with the mouse.
|
void |
setButtonBorderThickness(int value)
Sets the border thickness of the scroll bar buttons.
|
void |
setButtonSize(int value)
Sets the size of the buttons in the scroll bar.
|
void |
setEnabled(boolean value)
JComponent.setEnabled override.
|
void |
setForegroundBrush(Brush value)
Sets the brush used to draw the content of scroll bar elements when they are in normal state.
|
void |
setForegroundBrushDisabled(Brush value)
Sets the brush used to draw the content of scroll bar elements when the scroll bar is disabled.
|
void |
setForegroundBrushDown(Brush value)
Sets the brush used to draw the content of scroll bar elements when they are pressed.
|
void |
setForegroundBrushOver(Brush value)
Sets the brush used to draw the content of scroll bar elements when they are pointed with the mouse.
|
void |
setHeight(int value)
Sets the height of the scrollbar.
|
void |
setLargeChange(int value)
Sets the value to add or subtract from scroll position when user clicks the track outside the thumb.
|
void |
setMaximum(int value)
Sets the upper limit of values of the scrollable range.
|
void |
setMinimum(int value)
Sets the lower limit of values of the scrollable range.
|
void |
setSmallChange(int value)
Gets the value to add or subtract from scroll position when user clicks a scroll arrow.
|
void |
setThumbBackgroundBrush(Brush value)
Sets the brush used to fill the scroll bar thumb when it is in normal state.
|
void |
setThumbBackgroundBrushDisabled(Brush value)
Sets the brush used to fill scroll bar thumb when the scroll bar is disabled.
|
void |
setThumbBackgroundBrushDown(Brush value)
Sets the brush used to fill the scroll bar thumb when it is pressed down.
|
void |
setThumbBackgroundBrushOver(Brush value)
Sets the brush used to fill the scroll bar thumb when it is pointed with the mouse.
|
void |
setThumbBorderBrush(Brush value)
Sets the brush used to draw the border of scroll bar thumb.
|
void |
setThumbBorderBrushDisabled(Brush value)
Sets the brush used to draw the border of scroll bar thumb when the scroll bar is disabled.
|
void |
setThumbBorderBrushDown(Brush value)
Sets the brush used to draw the border of scroll bar thumb when it is pressed.
|
void |
setThumbBorderBrushOver(Brush value)
Sets the brush used to draw borders of scrollbar thumb when it is pointed with the mouse.
|
void |
setThumbBorderThickness(int value)
Sets the border thickness of the scroll bar thumb.
|
void |
setValue(int value)
Sets the current scroll position.
|
void |
setWidth(int value)
Sets the width of the scrollbar.
|
void |
setX(int x) |
void |
setY(int y) |
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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, 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, paintBorder, paintChildren, paintComponent, 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, 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 java.util.function.Function<com.mindfusion.common.Pair<ScrollBar,java.lang.Integer>,java.lang.Void> valueChanged
public java.util.function.Function<com.mindfusion.common.Pair<ScrollBar,java.lang.Integer>,java.lang.Void> scroll
public java.util.function.Function<com.mindfusion.common.Pair<ScrollBar,com.mindfusion.common.Pair<java.awt.Graphics,com.mindfusion.common.Pair<com.mindfusion.ui.ScrollBar.ScrollBarDrawElement,java.awt.Rectangle>>>,java.lang.Void> draw
protected ScrollBar(boolean vertical)
public void paint(java.awt.Graphics e)
paint in class javax.swing.JComponentpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerprotected boolean isInputKey(int keyData)
public void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic void setX(int x)
public void setY(int y)
protected void onRightToLeftChanged()
protected void onValueChanged(int old)
protected void onScroll(int type,
int newValue)
protected void onDraw(com.mindfusion.ui.ScrollBar.ScrollBarDrawElement e,
java.awt.Graphics g,
java.awt.Rectangle rect)
public int getButtonSize()
public void setButtonSize(int value)
value - public int getMinimum()
public void setMinimum(int value)
value - An integer value specifying lower limit.public int getMaximum()
public void setMaximum(int value)
public int getLargeChange()
public void setLargeChange(int value)
value - An integer value specifying the large change.public int getSmallChange()
public void setSmallChange(int value)
value - An integer value specifying the small change.public int getValue()
public void setValue(int value)
value - An integer value within Minimum - Maximum interval.public int getThumbBorderThickness()
public void setThumbBorderThickness(int value)
value - An integer value specifying thickness.public Brush getThumbBorderBrush()
public void setThumbBorderBrush(Brush value)
value - A Brush instance.public Brush getThumbBorderBrushOver()
public void setThumbBorderBrushOver(Brush value)
value - A Brush instance.public Brush getThumbBorderBrushDown()
public void setThumbBorderBrushDown(Brush value)
value - A Brush instance.public Brush getThumbBorderBrushDisabled()
public void setThumbBorderBrushDisabled(Brush value)
value - A Brush instance.public Brush getThumbBackgroundBrush()
public void setThumbBackgroundBrush(Brush value)
value - A Brush instance.public Brush getThumbBackgroundBrushOver()
public void setThumbBackgroundBrushOver(Brush value)
value - A Brush instance.public Brush getThumbBackgroundBrushDown()
public void setThumbBackgroundBrushDown(Brush value)
value - A Brush instance.public Brush getThumbBackgroundBrushDisabled()
public void setThumbBackgroundBrushDisabled(Brush value)
value - A Brush instance.public int getButtonBorderThickness()
public void setButtonBorderThickness(int value)
value - An integer value specifying thickness.public Brush getButtonBorderBrush()
public void setButtonBorderBrush(Brush value)
value - A Brush instance.public Brush getButtonBorderBrushOver()
public void setButtonBorderBrushOver(Brush value)
value - A Brush instance.public Brush getButtonBorderBrushDown()
public void setButtonBorderBrushDown(Brush value)
value - A Brush instance.public Brush getButtonBorderBrushDisabled()
public void setButtonBorderBrushDisabled(Brush value)
value - A Brush instance.public Brush getButtonBackgroundBrush()
public void setButtonBackgroundBrush(Brush value)
value - A Brush instance.public Brush getButtonBackgroundBrushOver()
public void setButtonBackgroundBrushOver(Brush value)
value - A Brush instance.public Brush getButtonBackgroundBrushDown()
public void setButtonBackgroundBrushDown(Brush value)
value - A Brush instance.public Brush getButtonBackgroundBrushDisabled()
public void setButtonBackgroundBrushDisabled(Brush value)
value - A Brush instance.public Brush getForegroundBrush()
public void setForegroundBrush(Brush value)
value - A Brush instance.public Brush getForegroundBrushOver()
public void setForegroundBrushOver(Brush value)
value - A Brush instance.public Brush getForegroundBrushDown()
public void setForegroundBrushDown(Brush value)
value - A Brush instance.public Brush getForegroundBrushDisabled()
public void setForegroundBrushDisabled(Brush value)
value - A Brush instance.public Brush getBackgroundBrush()
public void setBackgroundBrush(Brush value)
value - A Brush instance.public Brush getBackgroundBrushDown()
public void setBackgroundBrushDown(Brush value)
value - A Brush instance.public Brush getBackgroundBrushDisabled()
public void setBackgroundBrushDisabled(Brush value)
value - A Brush instance.public void setEnabled(boolean value)
setEnabled in class javax.swing.JComponentpublic void setWidth(int value)
value - The new width.public void setHeight(int value)
value - The new height .public boolean getIsHorizontal()
public boolean getIsVertical()
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved in interface java.awt.event.ComponentListenerpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown in interface java.awt.event.ComponentListenerpublic void componentHidden(java.awt.event.ComponentEvent e)
componentHidden in interface java.awt.event.ComponentListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListener