|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.cosylab.gui.components.Slider
public class Slider
Slider is a GUI component for displaying double value. Slider defines limits within which the value may be set and fire update events when this value is changed. For precise control, textual entry and button controls are also available.
When displaying values slider can show two different values. The front thumb displays
the value that was set by the user. According to the set mode currently set on the
Slider (setSetMode(SliderSetMode)
) slider then notifies listeners of the value
change. The second value is displayed by a grey shadow. This value can be controlled by
the setReadback(double)
method and can only be changed manually (through this
method call).
Nested Class Summary | |
---|---|
static class |
Slider.Button
Button identifiers for any of the buttons used in the Slider. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
SET_MANUAL
Deprecated. use SliderSetMode.SET_MANUAL instead. |
static int |
SET_ON_CHANGE
Deprecated. use SliderSetMode.SET_ON_CHANGE instead. |
static int |
SET_ON_RELEASE
Deprecated. use SliderSetMode.SET_ON_RELEASE instead. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 | |
---|---|
Slider()
Creates a new Slider object. |
Method Summary | |
---|---|
void |
addSetListener(SetListener listener)
Adds set listener. |
void |
decrementBit()
Decrements value for a single bit. |
void |
decrementLarge()
Decrements value for the large step. |
void |
decrementSmall()
Decrements value for the small step. |
protected void |
fireSetPerformed(double newValue)
Fires event that value has changed. |
java.lang.String |
formatNumber(double value)
Formats the input value to a specific print format. |
long |
getAutoSynchronizeDelay()
Returns the time in milliseconds that specify the delay of the autoSynchronization. |
double |
getBitStep()
Returns the value of bit step. |
javax.swing.Icon |
getButtonIcon(Slider.Button b)
Returns the Icon of a desired button. |
java.lang.String |
getButtonText(Slider.Button b)
Returns the text of a desired button. |
java.lang.String |
getButtonTooltip(Slider.Button b)
Returns the tooltip of a desired button. |
int |
getContinuousModeDelayTime()
Returns the initial delay time after button press to first auto increment/decrement |
int |
getContinuousModeRepeatTime()
Returns the continuousModeEnabled |
AbstractCustomizerPanel |
getCustomizer()
Returns the Customizer instance for this component. |
java.lang.String |
getFieldFormat()
Returns format of the editable field. |
java.lang.String |
getFormat()
Deprecated. use getTicksFormat() and getFieldFormat() |
protected InfoBar |
getInfoBar()
|
double |
getLargeStep()
Returns the value of largeStep. |
double[] |
getMajorTickLabels()
Returns the values which have labeles painted next to the tick. |
double[] |
getMajorTicks()
Returns the values which are painted together with majot ticks. |
double |
getMaximum()
Returns currently set maxium value. |
double |
getMinimum()
Returns currently set minimum value. |
double |
getMinorTicksStep()
Returns the distance between two minor ticks in same units as value. |
int |
getMode()
Deprecated. use getSetMode() |
protected NavigationBar |
getNavigationBar()
|
PopupManager |
getPopupManager()
Returns popup manager, which manages popup menu. |
double |
getReadback()
Returns current readback position. |
java.lang.String |
getRestoreButtonTitle()
Returns the title of the restore button. |
SliderSetMode |
getSetMode()
Returns the set mode. |
protected javax.swing.JSlider |
getSlider()
|
protected CosySliderUI |
getSliderUI()
Create this slider UI. |
double |
getSmallStep()
Returns the value of the small step. |
State |
getState()
Will be called by the StateKeeper in the process of the
application state saving. |
double |
getStoredValue()
Returns the stored value. |
java.lang.String |
getTicksFormat()
Returns the formatter used for the slider ticks on the scale. |
java.lang.String |
getTitle()
Returns the title of the Slider. |
java.awt.Font |
getTitleFont()
Returns the font used to display the title. |
boolean |
getTitleVisible()
Returns true if title is visible. |
java.lang.String |
getToolTipText()
|
java.lang.String |
getUnits()
Returns string representing units that are displayed next to value entry field. |
java.awt.Font |
getUnitsFont()
Returns the font used to display units. |
double |
getValue()
Returns current value the slider is displaying. |
double |
getValuePrecision()
Returns the tolerance for current value set via slider. |
void |
incrementBit()
Increments value for a single bit. |
void |
incrementLarge()
Peforms a large value increment. |
void |
incrementSmall()
Performs a small value increment. |
boolean |
isAutoSynchronize()
Returns the state of autoSynchronization feature (enabled / disabled). |
boolean |
isBitStepRelative()
Returns true if bitStep is relative, else false. |
boolean |
isButtonVisible(Slider.Button b)
Returns the visibility of a button. |
boolean |
isContinuousControlVisible()
Returns true if contunyous mode checkbox is visible. |
boolean |
isContinuousModeEnabled()
Returns continuousModeEnabled |
boolean |
isDragEnabled()
Returns true if drag is enabled. |
boolean |
isDropEnabled()
Returns true if drop is enabled. |
boolean |
isEditable()
Returns whether this slider is settable. |
boolean |
isLargeStepRelative()
Returns true if largeStep is relative, else false. |
boolean |
isPopupEnabled()
Returns whether the user can trigger the component's popup menu through mouse click. |
boolean |
isSmallStepRelative()
Returns true if smallStep is relative, else false. |
boolean |
isSnapToTicks()
Returns true if snap to ticks is turned on. |
boolean |
isStorageButtonsVisible()
Returns the visibility flag of the store and restore buttons. |
boolean |
isStoredValueLabelVisible()
Returns true if the stored value label is set to be visible. |
boolean |
isSuspended()
Returns true if slider is suspended |
boolean |
isSyncButtonVisible()
Returns the visibility flag of the sync button. |
boolean |
isUnitsVisible()
Returns true if units are displayed next to value entry field. |
static void |
main(java.lang.String[] args)
Run test applet. |
int |
measureTick(double position,
java.lang.String text)
Returns size of tick label in pixels. |
void |
removeSetListener(SetListener listener)
Removes set listener. |
void |
resetSteps()
Resets sliders steps to default values |
void |
restoreValue()
Restores the stored value. |
void |
resume()
Resumes suspended slider. |
void |
setAutoSynchronize(boolean autoSynchronize)
Turns the autoSynchronization on/off. |
void |
setAutoSynchronizeDelay(long autoSynchronizeDelay)
Sets the autoSynchronization in miliseconds. |
void |
setBackground(java.awt.Color bg)
|
void |
setBitStep(double value)
Sets the value of a bit step. |
void |
setBitStepRelative(boolean value)
Sets bitStep to be relative if true (example: bitStep=20 means that bitStep will change for 20% of sliders current range(min,max)). |
void |
setButtonIcon(Slider.Button b,
javax.swing.Icon icon)
Sets a Icon to a desired button. |
void |
setButtonText(Slider.Button b,
java.lang.String text)
Sets a text to a desired button. |
void |
setButtonTooltip(Slider.Button b,
java.lang.String tooltip)
Sets a tooltip to a desired button. |
void |
setButtonVisible(Slider.Button b,
boolean visible)
Toggles the visibility of the specified button. |
void |
setContinuousControlVisible(boolean continuousControlVisible)
Sets visibility of control ofr continuous mode. |
void |
setContinuousModeDelayTime(int continuousModeDelayTime)
Sets the initial delay time in milliseconds betwean button pressed and hold for increment/decrement and continuous mode is fired. |
void |
setContinuousModeEnabled(boolean continuousModeEnabled)
Sets the continuousModeEnabled and updates combobox on InfoBar to appropriate index |
void |
setContinuousModeRepeatTime(int continuousModeRepeatTime)
Sets the continuousModeRepeatTime time in milliseconds between individual repetitions of contunuous increment/decrement. |
void |
setDragEnabled(boolean enabled)
Enables/disables mouse dragging. |
void |
setDropEnabled(boolean enabled)
Enable/disable the mouse drop. |
void |
setEditable(boolean settable)
Sets whether this slider is settable. |
void |
setEnabled(boolean enabled)
|
void |
setFieldFormat(java.lang.String s)
Sets format for editable field. |
void |
setForeground(java.awt.Color fg)
|
void |
setFormat(java.lang.String s)
Deprecated. use setTicksFormat(String) and setFieldFormat(String) |
void |
setLargeStep(double value)
Sets the value of large step |
void |
setLargeStepRelative(boolean value)
Sets largeStep to be relative if true (example: largeStep=20 means that largeStep will change for 20% of sliders current range(min,max)). |
void |
setMajorTickLabels(double[] labelledTicks)
Explicitely sets which major ticks will have value labels painted. |
void |
setMajorTicks(double[] ticks)
Explicitely sets which values on the slider scale should be painted with major ticks. |
void |
setManual()
If in SliderSetMode.SET_MANUAL method will notify listeners that set was
performed. |
void |
setMaximum(double maximum)
Sets new maximum value. |
void |
setMinimum(double minimum)
Sets new minimum value. |
void |
setMinorTicksStep(double step)
Sets the distance between two minor ticks in same units as value. |
void |
setMode(int newMode)
Deprecated. use Slider#setSetMode(com.cosylab.gui.components.Slider.SetMode) |
void |
setPopupEnabled(boolean b)
Enables or disables the popup capabilities of the component. |
void |
setReadback(double value)
Sets the readback indicator position. |
void |
setRestoreButtonTitle(java.lang.String title)
Sets the title of the restore button. |
void |
setSetMode(SliderSetMode mode)
Sets the slider set mode. |
void |
setSmallStep(double value)
Sets the small step. |
void |
setSmallStepRelative(boolean value)
Sets smallStep to be relative if true (example: smallStep=20 means that smallStep will change for 20% of sliders current range(min,max)). |
void |
setSnapToTicks(boolean snapToTicks)
Sets the snap to ticks property. |
void |
setState(State state)
Will be called by the StateKeepr when it reads
State object which belongs to this component. |
void |
setStorageButtonsVisible(boolean visible)
Sets the store and restore buttons visibile/invisible. |
void |
setStoredValue(double storedValue)
Stores new value. |
void |
setStoredValueLabelVisible(boolean visible)
Sets the stored value label to be visible. |
void |
setSyncButtonVisible(boolean visible)
Sets the sync button visibile/invisible. |
void |
setTicksFormat(java.lang.String ticksFormat)
Sets the string format for the ticks of this slider. |
void |
setTitle(java.lang.String title)
Sets the title of the slider. |
void |
setTitleFont(java.awt.Font font)
Sets the font used to display the title of the slider. |
void |
setTitleVisible(boolean titleVisible)
Sets the visibility of the title. |
void |
setToolTipText(java.lang.String tooltip)
|
void |
setUnits(java.lang.String units)
Sets string representing units displayed next to value entry field. |
void |
setUnitsFont(java.awt.Font font)
Sets the font used to display the units. |
void |
setUnitsVisible(boolean b)
Sets whether units are displayed next to value entry field. |
void |
setValue(double value)
Sets the new value that this slider will display. |
void |
setValuePrecision(double precision)
Sets the tolerance at which the thumb is considered to be synchronized with the trailer. |
void |
storeValue()
Stores the current setpoint value. |
void |
suspend()
Suspends displayer, minimal GUI action is taken, no data value events fired and slider is disabled. |
void |
synchronize()
Synchronized front thumb value with the shadow. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
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, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final int SET_MANUAL
SliderSetMode.SET_MANUAL
instead.
@Deprecated public static final int SET_ON_RELEASE
SliderSetMode.SET_ON_RELEASE
instead.
@Deprecated public static final int SET_ON_CHANGE
SliderSetMode.SET_ON_CHANGE
instead.
Constructor Detail |
---|
public Slider()
Method Detail |
---|
public void resetSteps()
public void addSetListener(SetListener listener)
listener
- SetListenerpublic void removeSetListener(SetListener listener)
listener
- SetListenerprotected void fireSetPerformed(double newValue)
newValue
- doubleprotected InfoBar getInfoBar()
protected NavigationBar getNavigationBar()
protected javax.swing.JSlider getSlider()
protected CosySliderUI getSliderUI()
public void setMinimum(double minimum)
minimum
- new minimum value.public void setMaximum(double maximum)
maximum
- new maximum value.public void setValue(double value)
value
- new value.public double getMinimum()
public double getMaximum()
public double getValue()
public void setUnits(java.lang.String units)
units
- new value for units, may be null.public java.lang.String getUnits()
public void setUnitsVisible(boolean b)
b
- wehter units are displayed.public boolean isUnitsVisible()
public void setReadback(double value)
value
- double new readback position.public double getReadback()
@Deprecated public void setFormat(java.lang.String s)
setTicksFormat(String)
and setFieldFormat(String)
s
- new C-Style format.@Deprecated public java.lang.String getFormat()
getTicksFormat()
and getFieldFormat()
public void setFieldFormat(java.lang.String s)
s
- new C-Style format.public java.lang.String getFieldFormat()
public void setTicksFormat(java.lang.String ticksFormat)
ticksFormat
- the ticks formatpublic java.lang.String getTicksFormat()
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- new titlepublic void setTitleVisible(boolean titleVisible)
titleVisible
- true if title should be visiblepublic boolean getTitleVisible()
public void incrementSmall()
setSmallStep(double)
public void incrementLarge()
setLargeStep(double)
public void incrementBit()
setBitStep(double)
public void decrementBit()
setBitStep(double)
public void decrementSmall()
setSmallStep(double)
public void decrementLarge()
setLargeStep(double)
public void setBitStep(double value)
value
- new bit steppublic double getBitStep()
public double getSmallStep()
public void setSmallStep(double value)
value
- new small steppublic void setLargeStep(double value)
value
- new large steppublic double getLargeStep()
public boolean isBitStepRelative()
public void setBitStepRelative(boolean value)
value
- true is realtivepublic boolean isSmallStepRelative()
public void setSmallStepRelative(boolean value)
value
- true if relativepublic boolean isLargeStepRelative()
public void setLargeStepRelative(boolean value)
value
- true if relative@Deprecated public int getMode()
getSetMode()
@Deprecated public void setMode(int newMode)
Slider#setSetMode(com.cosylab.gui.components.Slider.SetMode)
newMode
- intpublic void setSetMode(SliderSetMode mode)
mode
- SliderSetMode
public SliderSetMode getSetMode()
public int measureTick(double position, java.lang.String text)
TickParameters
measureTick
in interface TickParameters
position
- relative position of the tick on 0..1.text
- label to display, may be empty string or null.
public void setEditable(boolean settable)
settable
- true/falsepublic boolean isEditable()
public PopupManager getPopupManager()
PopupManageable
getPopupManager
in interface PopupManageable
public AbstractCustomizerPanel getCustomizer()
public void synchronize()
public void setManual()
SliderSetMode.SET_MANUAL
method will notify listeners that set was
performed. If in any other setMode, the call will have no effect.
public State getState()
StateOriginator
StateKeeper
in the process of the
application state saving. The component which implements this interface
will tipycally use StateFactory
to create a
State
object and fill it with needed values. For example a
component can use this snippet.
public State getState() {
State s = StateFactory.createState();
s.putDouble("Min", getMinimum());
s.putDouble("Max", getMaximum());
s.putString("Format", getFormat());
s.putString("Units", getUnits());
return s;
}
getState
in interface StateOriginator
public void setState(State state)
StateOriginator
StateKeepr
when it reads
State
object which belongs to this component.
setState
in interface StateOriginator
state
- object previously created by this componentpublic boolean isPopupEnabled()
public void setPopupEnabled(boolean b)
b
- the component should bring up popup dialog on mouse click.public java.lang.String getToolTipText()
getToolTipText
in class javax.swing.JComponent
public void suspend()
resume()
as many times as suspend was called.
public void resume()
resume()
as many times as suspend was
called.
suspend();
public boolean isSuspended()
true
if slider is suspended
true
if suspendedsuspend()
public void setEnabled(boolean enabled)
setEnabled
in class javax.swing.JComponent
public boolean isAutoSynchronize()
public void setAutoSynchronize(boolean autoSynchronize)
autoSynchronize
- setAutoSynchronizeDelay(long)
public long getAutoSynchronizeDelay()
public void setAutoSynchronizeDelay(long autoSynchronizeDelay)
autoSynchronizeDelay
- public void setDragEnabled(boolean enabled)
enabled
- public boolean isDragEnabled()
public void setDropEnabled(boolean enabled)
enabled
- public boolean isDropEnabled()
public void setBackground(java.awt.Color bg)
setBackground
in class javax.swing.JComponent
public void setForeground(java.awt.Color fg)
setForeground
in class javax.swing.JComponent
public java.lang.String formatNumber(double value)
TickParameters
formatNumber
in interface TickParameters
value
- double to be formatted
public void setButtonText(Slider.Button b, java.lang.String text)
b
- Button
to which a text we want to set.text
- String
containing a text for a Button
.public void setButtonIcon(Slider.Button b, javax.swing.Icon icon)
b
- Button
to which a text we want to set.icon
- Icon
containing a text for a Button
.public java.lang.String getButtonText(Slider.Button b)
b
- Button
of which a text we want to get.
String
containing the text for a Button
if the
text is set.public javax.swing.Icon getButtonIcon(Slider.Button b)
b
- Button
of which an Icon we want to get.
String
containing the Icon for a Button
if the
Icon is set.public void setButtonTooltip(Slider.Button b, java.lang.String tooltip)
b
- Button
to which a tooltip we want to set.tooltip
- String
containing a tooltip for a Button
.public java.lang.String getButtonTooltip(Slider.Button b)
b
- Button
of which a tooltip we want to get.
String
containing a tooltip for a Button
if a
tooltip is set.public void setButtonVisible(Slider.Button b, boolean visible)
b
- button to be set visible/invisiblevisible
- true if button should be visiblepublic boolean isButtonVisible(Slider.Button b)
b
- button
public void setStorageButtonsVisible(boolean visible)
visible
- visiblity of storage buttonspublic boolean isStoredValueLabelVisible()
visible
- visiblity of stored value labelisStorageButtonsVisible()
public void setStoredValueLabelVisible(boolean visible)
visible
- visiblity of storage buttonssetStorageButtonsVisible(boolean)
public boolean isStorageButtonsVisible()
public void setSyncButtonVisible(boolean visible)
visible
- visiblity of storage buttonspublic boolean isSyncButtonVisible()
public void setValuePrecision(double precision)
precision
- CosySliderUI.setTolerance(double)
public double getValuePrecision()
Double
precision valueCosySliderUI.getTolerance()
public void setTitleFont(java.awt.Font font)
font
- new fontpublic java.awt.Font getTitleFont()
public void setUnitsFont(java.awt.Font font)
font
- new fontpublic java.awt.Font getUnitsFont()
public double[] getMajorTicks()
public double[] getMajorTickLabels()
public double getMinorTicksStep()
public void setMajorTicks(double[] ticks)
ticks
- public void setMinorTicksStep(double step)
ticks
- public void setMajorTickLabels(double[] labelledTicks)
labelledTicks
- public double getStoredValue()
public void setStoredValue(double storedValue)
storedValue
- new stored valuerestoreValue();
public void storeValue()
public void restoreValue()
setValue(double)
where the parameter is
getStoredValue()
.
public void setRestoreButtonTitle(java.lang.String title)
title
- new titlepublic java.lang.String getRestoreButtonTitle()
public int getContinuousModeDelayTime()
public void setContinuousModeDelayTime(int continuousModeDelayTime)
the
- continuousModeDelayTime in millisecondspublic boolean isContinuousModeEnabled()
public void setContinuousModeEnabled(boolean continuousModeEnabled)
the
- continuousModeEnabledpublic int getContinuousModeRepeatTime()
public void setContinuousModeRepeatTime(int continuousModeRepeatTime)
the
- continuousModeRepeatTime in millisecondspublic void setContinuousControlVisible(boolean continuousControlVisible)
the
- continuousControlVisiblepublic boolean isContinuousControlVisible()
true
if contunyous mode checkbox is visible.
public void setToolTipText(java.lang.String tooltip)
setToolTipText
in class javax.swing.JComponent
public void setSnapToTicks(boolean snapToTicks)
snapToTicks
- true if thumb should snap to tickspublic boolean isSnapToTicks()
setSnapToTicks(boolean)
public static void main(java.lang.String[] args)
args
- command line parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |