public class ArrowSlider extends Slider implements MouseListener, MouseMotionListener
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
ArrowSlider()
Construct a new arrow slider with the default values
|
ArrowSlider(float lower,
float upper,
float initial)
Construct a new arrow slider with the givden lower, upper and initial values
|
ArrowSlider(float lower,
float upper,
float initial,
String name)
Construct a new arrow slider with the given lower, upper and initial values
|
Modifier and Type | Method and Description |
---|---|
float |
getMaximum()
Return the maximum value of this slider
|
Dimension |
getMaximumSize()
Return the maximum size of the arrow slider
|
float |
getMinimum()
Return the minimum value of this slider
|
Dimension |
getMinimumSize()
Return the minimum size of the arrow slider
|
Dimension |
getPreferredSize()
Return the preferred sise of the arrow slider
|
float |
getValue()
Returns the current value of the slider
|
static void |
main(String[] argv)
For testing purposes
|
void |
mouseClicked(MouseEvent e)
Present to implement MouseListener, currently ignored
|
void |
mouseDragged(MouseEvent e)
Updates the slider position
|
void |
mouseEntered(MouseEvent e)
Present to implement MouseListener, currently ignored
|
void |
mouseExited(MouseEvent e)
Present to implement MouseListener, currently ignored
|
void |
mouseMoved(MouseEvent e)
Present to implement MouseMovementListener, currently ignored
|
void |
mousePressed(MouseEvent e)
Moves the slider to the clicked position
|
void |
mouseReleased(MouseEvent e)
Present to implement MouseListener, currently ignored
|
void |
paint(Graphics g)
Redraw the slider
|
void |
setBounds(float min,
float max,
float init)
Sets new minimum, maximum, and initial values for this slider
|
void |
setMaximum(float value)
Sets the maximum value of this scrolbar
|
void |
setMaximumSize(Dimension dim)
Set the preferred size of the arrow slider
|
void |
setMinimum(float value)
Sets the minimum value for this slider
|
void |
setMinimumSize(Dimension dim)
Set the preferred size of the arrow slider
|
void |
setPreferredSize(Dimension dim)
Set the preferred size of the arrow slider
|
void |
setValue(float value)
Sets the current value of the slider
|
void |
update(Graphics g)
update the slider
|
addSliderChangeListener, getName, notifyListeners, removeSliderChangeListener
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction
add, 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, validateTree
action, 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, 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, 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, transferFocusUpCycle
public ArrowSlider()
public ArrowSlider(float lower, float upper, float initial)
IllegalArgumenentException
- if lower is not less than initial or initial
is not less than upperpublic ArrowSlider(float lower, float upper, float initial, String name)
IllegalArgumenentException
- if lower is not less than initial or initial
is not less than upperpublic static void main(String[] argv)
public void setBounds(float min, float max, float init)
public float getMinimum()
getMinimum
in class Slider
public void setMinimum(float value)
setMinimum
in class Slider
public float getMaximum()
getMaximum
in class Slider
public void setMaximum(float value)
setMaximum
in class Slider
public float getValue()
public void setValue(float value)
setValue
in class Slider
IllegalArgumentException
- if the new value is out of bounds for the sliderpublic Dimension getPreferredSize()
getPreferredSize
in class JComponent
public void setPreferredSize(Dimension dim)
setPreferredSize
in class JComponent
public Dimension getMaximumSize()
getMaximumSize
in class JComponent
public void setMaximumSize(Dimension dim)
setMaximumSize
in class JComponent
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public void setMinimumSize(Dimension dim)
setMinimumSize
in class JComponent
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void update(Graphics g)
update
in class JComponent
public void paint(Graphics g)
paint
in class JComponent
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.