public class VisADSlider extends JPanel implements ChangeListener, ControlListener, ScalarMapListener
BoxLayout doesn't handle a mixture
of the standard center-aligned widgets and VisADSliders, which
are left-aligned by default. If you have problems with widgets
being too wide, you may want to change the other widgets in
the JPanel to align on the left
(e.g. widget.setAlignmentX(BoxLayout.LEFT_ALIGNMENT))JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategylistenerList, 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_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
VisADSlider(DataReference ref,
float min,
float max)
construct a VisADSlider from an existing Real pointed to by r,
with minimum and maximum bounds min and max
|
VisADSlider(DataReference ref,
float min,
float max,
float start,
RealType rt,
String n)
construct a VisADSlider by creating a Real and linking it to r,
using RealType rt and name n, with minimum and maximum bounds
min and max, and starting value start
|
VisADSlider(ScalarMap smap)
construct a VisADSlider from a ScalarMap that maps to
Display.SelectValue, with auto-scaling minimum and maximum bounds,
non-integral values, and a statically sized label.
|
VisADSlider(ScalarMap smap,
boolean integralTicks)
construct a VisADSlider from a ScalarMap that maps to
Display.SelectValue, with auto-scaling minimum and maximum bounds,
either integer or floating-point values, depending on the setting
of integralTicks, and a statically sized label.
|
VisADSlider(ScalarMap smap,
boolean integralTicks,
boolean dynamicLabelWidth)
construct a VisADSlider from a ScalarMap that maps to
Display.SelectValue, with auto-scaling minimum and maximum bounds,
either integer or floating-point values (depending on the setting
of integralTicks, and either a static or dynamically
sized label (depending on the setting of dynamicLabelWidth.
|
VisADSlider(ScalarMap smap,
float min,
float max)
construct a VisADSlider from a ScalarMap that maps to
Display.SelectValue, with minimum and maximum bounds min and max,
no auto-scaling, non-integer values, and a static label width.
|
VisADSlider(String n,
int lo,
int hi,
int st,
double scale,
DataReference ref,
RealType rt)
JSlider values range between low and hi
(with initial value st) and are multiplied by
scale to create Real values of RealType rt
referenced by ref.
|
VisADSlider(String n,
int lo,
int hi,
int st,
double scale,
DataReference ref,
RealType rt,
boolean dynamicLabelWidth)
JSlider values range between low and hi
(with initial value st) and are multiplied by
scale to create Real values of RealType rt
referenced by ref.
|
| Modifier and Type | Method and Description |
|---|---|
void |
controlChanged(ControlEvent e)
Update slider when value of linked ValueControl changes
|
void |
controlChanged(ScalarMapControlEvent evt)
ScalarMapListener method used to detect new control.
|
void |
hardcodeSizePercent(int percent)
Hardcode the preferred size of the slider after increasing
the current width by the specified percentage (or decreasing
it if percent is negative.)
This method is primarily useful to keep changes in the label (of a VisADSlider with dynamicLabelWidth set to true) from causing the rest of the window to be redrawn. |
void |
mapChanged(ScalarMapEvent e)
used for auto-scaling the minimum and maximum
|
void |
stateChanged(ChangeEvent e)
called when slider is adjusted
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, 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 VisADSlider(String n, int lo, int hi, int st, double scale, DataReference ref, RealType rt) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic VisADSlider(String n, int lo, int hi, int st, double scale, DataReference ref, RealType rt, boolean dynamicLabelWidth) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic VisADSlider(ScalarMap smap) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic VisADSlider(ScalarMap smap, boolean integralTicks) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic VisADSlider(ScalarMap smap, boolean integralTicks, boolean dynamicLabelWidth) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic VisADSlider(ScalarMap smap, float min, float max) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic VisADSlider(DataReference ref, float min, float max, float start, RealType rt, String n) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic VisADSlider(DataReference ref, float min, float max) throws VisADException, RemoteException
VisADExceptionRemoteExceptionpublic void hardcodeSizePercent(int percent)
percent - percent of current size to use for hardcoded
size. (e.g. to keep the current size, specify
100; to increase the size a bit,
specify 115, to decrease it a bit,
specify 85, etc.)public void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenerpublic void mapChanged(ScalarMapEvent e)
mapChanged in interface ScalarMapListenere - the eventpublic void controlChanged(ScalarMapControlEvent evt)
controlChanged in interface ScalarMapListenerevt - the eventpublic void controlChanged(ControlEvent e) throws VisADException, RemoteException
controlChanged in interface ControlListenerVisADExceptionRemoteExceptionCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.