public class RangeSelector
extends javax.swing.JComponent
implements java.awt.event.ComponentListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
javax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
java.util.function.Function<com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.awt.Graphics,java.awt.Rectangle>>,java.lang.Void> |
DrawBackground
Invoked to allow custom-drawing of the selector's background.
|
java.util.function.Function<com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.lang.Double,java.lang.Double>>,java.lang.Void> |
ValueChanged
Invoked when the selection has changed interactively by the user.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
RangeSelector()
Initializes a new instance of the RangeSelector 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) |
Brush |
getBorderBrush() |
int |
getBorderThickness() |
Brush |
getButtonBackgroundBrush()
Gets the brush used to fill the selector buttons when they are in normal state.
|
Brush |
getButtonBackgroundBrushDisabled()
Gets the brush used to fill selector buttons when the selector is disabled.
|
Brush |
getButtonBackgroundBrushDown()
Gets the brush used to fill the selector buttons when they are pressed.
|
Brush |
getButtonBackgroundBrushOver()
Gets the brush used to fill the selector buttons when they are pointed with the mouse.
|
Brush |
getButtonBorderBrush()
Gets the brush used to draw the border of selector buttons.
|
Brush |
getButtonBorderBrushDisabled()
Gets the border brush used to draw the border of selector buttons when the selector is disabled.
|
Brush |
getButtonBorderBrushDown()
Gets the brush used to draw the border of selector buttons when they are pressed.
|
Brush |
getButtonBorderBrushOver()
Gets the brush used to draw the border of selector buttons when they are pointed with the mouse.
|
int |
getButtonBorderThickness()
Gets the border thickness of the selector buttons.
|
double |
getButtonSize() |
int |
getHeight()
Gets the control's height.
|
boolean |
getIsRightToLeft()
Gets whether the control is laid out in right-to-left direction.
|
double |
getMaximum()
Gets the maximum of the control range.
|
double |
getMinimum()
Gets the minimum of the control range.
|
double |
getMinimumSelectionLength()
Gets the minimum size of selected range.
|
Brush |
getProjectionBrush()
Gets the brush used to fill the selection projection.
|
Brush |
getScrollBackgroundBrush()
Gets the brush used to fill the scroll background.
|
Brush |
getSelectionBrush()
Gets the brush used to fill the selection.
|
double |
getSelectionEnd()
Gets the end of selected range.
|
double |
getSelectionStart()
Gets the start of selected range.
|
double |
getStep() |
int |
getWidth()
Gets the control's width.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e)
MouseListener.mouseDragged override.
|
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e)
MouseListener.mousePressed override.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
MouseListener.mouseReleased override.
|
protected void |
onDrawBackground(com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.awt.Graphics,java.awt.Rectangle>> e) |
protected void |
onValueChanged(com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.lang.Double,java.lang.Double>> e) |
void |
paint(java.awt.Graphics e)
JComponent.paint override.
|
void |
setBorderBrush(Brush value) |
void |
setBorderThickness(int value) |
void |
setButtonBackgroundBrush(Brush value)
Sets the brush used to fill the selector buttons when they are in normal state.
|
void |
setButtonBackgroundBrushDisabled(Brush value)
Sets the brush used to fill selector buttons when the selector is disabled.
|
void |
setButtonBackgroundBrushDown(Brush value)
Sets the brush used to fill the selector buttons when they are pressed.
|
void |
setButtonBackgroundBrushOver(Brush value)
Sets the brush used to fill the selector buttons when they are pointed with the mouse.
|
void |
setButtonBorderBrush(Brush value)
Sets the brush used to draw the border of selector buttons.
|
void |
setButtonBorderBrushDisabled(Brush value)
Sets the border brush used to draw the border of selector buttons when the selector is disabled.
|
void |
setButtonBorderBrushDown(Brush value)
Sets the brush used to draw the border of selector buttons when they are pressed.
|
void |
setButtonBorderBrushOver(Brush value)
Sets the brush used to draw the border of selector buttons when they are pointed with the mouse.
|
void |
setButtonBorderThickness(int value)
Sets the border thickness of the selector buttons.
|
void |
setButtonSize(int value) |
void |
setHeight(int value)
Sets the control's height.
|
void |
setIsRightToLeft(boolean value)
Gets whether the control is laid out in right-to-left direction.
|
void |
setMaximum(double value)
Sets the maximum of the control range.
|
void |
setMinimum(double value)
Gets the minimum of the control range.
|
void |
setMinimumSelectionLength(double value)
Sets the minimum size of selected range.
|
void |
setProjectionBrush(Brush value)
Sets the brush used to fill the selection projection.
|
void |
setScrollBackgroundBrush(Brush value)
Sets the brush used to fill the scroll background.
|
void |
setSelectionBrush(Brush value)
Sets the brush used to fill the selection.
|
void |
setSelectionEnd(double value)
Sets the end of selected range.
|
void |
setSelectionStart(double value)
Sets the start of selected range.
|
void |
setStep(double value) |
void |
setWidth(int value)
Sets the control's width.
|
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, 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, 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, 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 java.util.function.Function<com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.lang.Double,java.lang.Double>>,java.lang.Void> ValueChanged
public java.util.function.Function<com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.awt.Graphics,java.awt.Rectangle>>,java.lang.Void> DrawBackground
public RangeSelector()
public void paint(java.awt.Graphics e)
paint in class javax.swing.JComponentpublic 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 mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerprotected void onValueChanged(com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.lang.Double,java.lang.Double>> e)
protected void onDrawBackground(com.mindfusion.common.Pair<RangeSelector,com.mindfusion.common.Pair<java.awt.Graphics,java.awt.Rectangle>> e)
public double getMinimum()
public void setMinimum(double value)
value - A double value.public double getMaximum()
public void setMaximum(double value)
value - A double value.public double getSelectionStart()
public void setSelectionStart(double value)
value - A double value.public double getSelectionEnd()
public void setSelectionEnd(double value)
value - A double value.public double getMinimumSelectionLength()
public void setMinimumSelectionLength(double value)
value - A double value.public double getStep()
public void setStep(double value)
public double getButtonSize()
public void setButtonSize(int value)
public int getWidth()
getWidth in class javax.swing.JComponentpublic void setWidth(int value)
value - The new width.public int getHeight()
getHeight in class javax.swing.JComponentpublic void setHeight(int value)
value - The new height.public boolean getIsRightToLeft()
public void setIsRightToLeft(boolean value)
value - true if right-to-left, or false otherwise.public int getBorderThickness()
public void setBorderThickness(int value)
public Brush getBorderBrush()
public void setBorderBrush(Brush value)
public Brush getSelectionBrush()
public void setSelectionBrush(Brush value)
value - A Brush instance.public Brush getProjectionBrush()
public void setProjectionBrush(Brush value)
value - A Brush instance.public Brush getScrollBackgroundBrush()
public void setScrollBackgroundBrush(Brush value)
value - A Brush instance.public int getButtonBorderThickness()
public void setButtonBorderThickness(int value)
value - An integer value specifying border 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 void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked 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 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.ComponentListener