|
||||||||||
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.NavigationBar
public class NavigationBar
Button bar for exact control over slider behaviour. Consists of six buttons (3 for decrementing, 3 for incrementing the value) and editable text field for entering exact values. Text field is updated to reflect current value.
Nested Class Summary |
---|
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 |
---|
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 | |
---|---|
NavigationBar(Slider owner)
Constructor for NavigationBar. |
Method Summary | |
---|---|
void |
addSetListener(SetListener sl)
Adds a set listener which receives notification when a new value is set in the field. |
java.lang.String |
format(double value)
Convinience format with Slider format |
Slider.Button |
getAutoUpdateButton()
|
javax.swing.Icon |
getButtonIcon(Slider.Button button)
|
java.lang.String |
getButtonText(Slider.Button button)
Returns the button text. |
java.lang.String |
getButtonTooltip(Slider.Button button)
Returns the button tooltip. |
int |
getContinuousModeDelayTime()
Sets the continuous mode delay time for the buttons hold update. |
int |
getContinuousModeRepeatTime()
Returns the continuous mode repeat time for the buttons hold update. |
java.lang.String |
getFormat()
Returns current format of text field. |
java.lang.String |
getUnits()
Returns units currently displayed next to edit field. |
java.awt.Font |
getUnitsFont()
Returns the font used to display units. |
double |
getValue()
Returns text field value. |
boolean |
isButtonVisible(Slider.Button button)
Returns the visibility of the button. |
boolean |
isUnitsVisible()
Returns true if units are visible. |
void |
removeSetListener(SetListener sl)
Removes a set listener. |
void |
setAutoUpdateButton(Slider.Button autoUpdateButton)
|
void |
setBackground(java.awt.Color bg)
|
void |
setButtonIcon(Slider.Button button,
javax.swing.Icon icon)
|
void |
setButtonText(Slider.Button button,
java.lang.String text)
Sets text for buttons. |
void |
setButtonTooltip(Slider.Button button,
java.lang.String tooltip)
Sets tooltips for buttons. |
void |
setButtonVisible(Slider.Button button,
boolean visible)
Sets the visibility of the button. |
void |
setContinuousModeDelayTime(int continuousModeDelayTime)
Sets the continuous mode delay time for the buttons hold update. |
void |
setContinuousModeRepeatTime(int continuousModeRepeatTime)
Sets the continuous mode repeat time for the buttons hold update. |
void |
setEnabled(boolean enabled)
|
void |
setForeground(java.awt.Color fg)
|
void |
setFormat(java.lang.String format)
Sets new format for text field. |
void |
setMaximum(double min)
Sets the maximum value. |
void |
setMinimum(double min)
Sets the minimum value. |
void |
setUnits(java.lang.String units)
Sets units to be displayed next to text field. |
void |
setUnitsFont(java.awt.Font font)
Sets the font used to display units. |
void |
setUnitsVisible(boolean b)
Sets the units visibility. |
void |
setValue(double value)
Sets the value to the text field. |
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, 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, setToolTipText, 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 |
Constructor Detail |
---|
public NavigationBar(Slider owner)
owner
- Slider
java.lang.IllegalArgumentException
- if owner is null.Method Detail |
---|
public void setEnabled(boolean enabled)
setEnabled
in class javax.swing.JComponent
public void setValue(double value)
value
- new valuepublic double getValue()
public void setContinuousModeDelayTime(int continuousModeDelayTime)
continuousModeDelayTime
- the initial delay time in millispublic int getContinuousModeDelayTime()
public void setContinuousModeRepeatTime(int continuousModeRepeatTime)
continuousModeRepeatTime
- the update period in millispublic int getContinuousModeRepeatTime()
public java.lang.String getFormat()
public void setFormat(java.lang.String format)
format
- to set for textfield.public void setUnits(java.lang.String units)
units
- string to set.public java.lang.String getUnits()
public java.lang.String format(double value)
value
- the value
public void setMinimum(double min)
min
- minimumpublic void setMaximum(double min)
min
- maximumpublic void setUnitsVisible(boolean b)
b
- true if units are visiblepublic boolean isUnitsVisible()
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 void addSetListener(SetListener sl)
sl
- public void removeSetListener(SetListener sl)
sl
- public void setButtonText(Slider.Button button, java.lang.String text)
button
- text
-
public java.lang.String getButtonText(Slider.Button button)
button
-
public void setButtonTooltip(Slider.Button button, java.lang.String tooltip)
button
- tooltip
-
public java.lang.String getButtonTooltip(Slider.Button button)
button
-
public void setButtonVisible(Slider.Button button, boolean visible)
button
- the buttonvisible
- true if button should be visiblepublic boolean isButtonVisible(Slider.Button button)
button
-
public void setUnitsFont(java.awt.Font font)
font
- new fontpublic java.awt.Font getUnitsFont()
public Slider.Button getAutoUpdateButton()
public void setAutoUpdateButton(Slider.Button autoUpdateButton)
public void setButtonIcon(Slider.Button button, javax.swing.Icon icon)
public javax.swing.Icon getButtonIcon(Slider.Button button)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |