Package org.jjazz.flatcomponents.api
Class FlatIntegerVerticalSlider
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.jjazz.flatcomponents.api.FlatIntegerVerticalSlider
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
public class FlatIntegerVerticalSlider
extends JComponent
implements MouseListener, MouseMotionListener, MouseWheelListener
A vertical flat slider.
Whatever the actual component size, the drawing is done at preferred size.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
The last MouseEvent corresponding to the last mouse drag or wheel user action to change the slider value.int
int
int
int
getValue()
void
void
void
void
void
void
void
void
void
void
setButtonColor
(Color buttonColor) void
setButtonColorDisabled
(Color buttonColorDisabled) void
setButtonContourColor
(Color buttonContourColor) void
setButtonHeight
(int buttonHeight) The unique data to compute the preferred size.void
setEnabled
(boolean b) void
setGrooveLowerColor
(Color grooveLowerColor) void
setGrooveUpperColor
(Color grooveUpperColor) void
setMaxValue
(int maxValue) void
setMinValue
(int minValue) void
setPadding
(int padding) void
setTooltipLabel
(String tooltipLabel) void
setValue
(int v) void
setValueLineColor
(Color valueLineColor) Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
PROP_VALUE
- See Also:
-
-
Constructor Details
-
FlatIntegerVerticalSlider
public FlatIntegerVerticalSlider()
-
-
Method Details
-
getPreferredSize
- Overrides:
getPreferredSize
in classJComponent
-
paintComponent
-
getLastMouseEvent
The last MouseEvent corresponding to the last mouse drag or wheel user action to change the slider value.Can be used by listeners to retrieve the shift/ctrl/alt modifiers after having received a value property change.
- Returns:
- Can be null if last user action was not a mouse drag/wheel (e.g. if he used the inline editor)
-
getValueLineColor
- Returns:
- the valueLineColor
-
setValueLineColor
- Parameters:
valueLineColor
- the valueLineColor to set
-
getButtonHeight
public int getButtonHeight()- Returns:
- the buttonHeight
-
setButtonHeight
public void setButtonHeight(int buttonHeight) The unique data to compute the preferred size.- Parameters:
buttonHeight
-
-
getButtonColor
- Returns:
- the buttonColor
-
setButtonColor
- Parameters:
buttonColor
- the buttonColor to set
-
getMinValue
public int getMinValue()- Returns:
- the minValue
-
setMinValue
public void setMinValue(int minValue) - Parameters:
minValue
- the minValue to set
-
getMaxValue
public int getMaxValue()- Returns:
- the maxValue
-
setMaxValue
public void setMaxValue(int maxValue) - Parameters:
maxValue
- the maxValue to set
-
setValue
public void setValue(int v) -
getValue
public int getValue() -
setEnabled
public void setEnabled(boolean b) - Overrides:
setEnabled
in classJComponent
-
getTooltipLabel
-
setTooltipLabel
-
getButtonContourColor
- Returns:
- the buttonContourColor
-
setButtonContourColor
- Parameters:
buttonContourColor
- the buttonContourColor to set
-
getGrooveUpperColor
- Returns:
- the grooveUpperColor
-
setGrooveUpperColor
- Parameters:
grooveUpperColor
- the grooveUpperColor to set
-
getGrooveLowerColor
- Returns:
- the grooveLowerColor
-
setGrooveLowerColor
- Parameters:
grooveLowerColor
- the grooveLowerColor to set
-
getButtonColorDisabled
- Returns:
- the buttonColorDisabled
-
setButtonColorDisabled
- Parameters:
buttonColorDisabled
- the buttonColorDisabled to set
-
getPadding
public int getPadding()- Returns:
- the padding
-
setPadding
public void setPadding(int padding) - Parameters:
padding
- the padding to set
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseWheelMoved
- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
-