|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.cosylab.gui.components.AbstractDisplayerPanel
com.cosylab.gui.components.AbstractNumericDisplayerPanel
com.cosylab.gui.components.LabelledWheelswitch
public class LabelledWheelswitch
LabelledWheelswitch is extended Wheelswitch with
title label and unit label in same style.
| 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 | |
|---|---|
static java.lang.String |
VALUE
Value property name. |
| Fields inherited from class com.cosylab.gui.components.AbstractDisplayerPanel |
|---|
DYNAMIC_LAYOUT, HORIZONTAL_LAYOUT, VERTICAL_LAYOUT |
| 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 | |
|---|---|
LabelledWheelswitch()
Creates a new LabelledWheelswitch object. |
|
LabelledWheelswitch(double value)
Creates a new LabelledWheelswitch object. |
|
LabelledWheelswitch(double value,
java.lang.String format,
java.lang.String title,
java.lang.String units)
Creates a new LabelledWheelswitch object. |
|
LabelledWheelswitch(java.lang.String format)
Creates a new LabelledWheelswitch object. |
|
| Method Summary | |
|---|---|
void |
addSetListener(SetListener l)
Adds set listener to the NumberField. |
AbstractCustomizerPanel |
getCustomizer()
Loads the default com.cosylab.gui.components.customizer.Customizer for this
displayer and returns it. |
boolean |
getDigitsTakeUpAllSpace()
true if digits take up all space,
otherwise false |
AbstractWheelswitchFormatter |
getFormatter()
Returns the formatter employed by the displayer. |
double |
getMaximum()
Returns the maximum alowed value. |
double |
getMinimum()
Returns the minimum alowed value. |
int |
getNumberOfAllDigits()
|
State |
getState()
Returns the current state of the component. |
double |
getValue()
Returns the value displayed by the Wheelswitch and stored by
the formatter. |
protected javax.swing.JComponent |
getValueComponent()
Should return the component to display the value of this displayer. |
protected Wheelswitch |
getWheelswitch()
|
protected void |
internalSetEnabled()
Overriden to enable/disable min/max labels. |
protected void |
internalSetEnhanced()
Overriden to set enahnced mode to min/max labels. |
protected void |
internalSetFormat()
|
protected void |
internalSetResizable()
Overriden to implement additional functionality. |
boolean |
isAnimated()
Returns weather the labelled wheelswitch is animated. |
boolean |
isEditable()
Returns whether the wheelswitch can be edited by the user. |
boolean |
isTiltingEnabled()
Returns true if tilting is enabled. |
protected void |
layoutValueAndTitleAndUnits()
|
protected void |
layoutValueAndTitleAndUnitsAndBounds()
|
protected void |
layoutValueAndUnits()
|
protected void |
layoutValueAndUnitsAndBounds()
|
static void |
main(java.lang.String[] args)
Runs simple test applet. |
void |
removeSetListener(SetListener l)
Removes set listener from the NumberField. |
void |
setAnimated(boolean animated)
Sets the animated property. |
void |
setBackground(java.awt.Color bg)
|
void |
setDigitsTakeUpAllSpace(boolean bool)
Set true if digits should take up all space, set
false if place for not visible digits should be reserved
(there is no resizing of digits and labels when 9 changes to 10 etc.). |
void |
setEditable(boolean newEditable)
Sets the editability of the wheelswitch. |
void |
setFormatter(AbstractWheelswitchFormatter formatter)
Set the formatter fot the value. |
void |
setMaximum(double newValue)
Sets the maximum allowed value. |
void |
setMaxMin(double max,
double min)
Sets the maximum and minimum allowed values. |
void |
setMinimum(double newValue)
Sets the minimum allowed value. |
void |
setNumberOfAllDigits(int numberOfAllDigits)
If setDigitsTakeUpAllSpace(boolean) is set to false
the place for numberOfAllDigits is reserved. |
void |
setPopupEnabled(boolean enabled)
Enables or disables the popup menu. |
void |
setState(State state)
Sets the state to the component. |
void |
setTiltingEnabled(boolean b)
Enables/disables tilting of the displayer. |
void |
setTitleMaximumFontSize(int max)
Sets the maximum title font size allowed. |
void |
setTitleMinimumFontSize(int min)
Sets the minimum title font size allowed. |
void |
setUnits(java.lang.String value)
Sets the units String to denote the physical units of numerical values displayed |
void |
setUnitsVisible(boolean b)
Set to true to display units. |
void |
setValue(double newValue)
Sets the value and displays it in the wheelswitch. |
| Methods inherited from class com.cosylab.gui.components.AbstractDisplayerPanel |
|---|
getPopupManager, getTitle, getTitleComponent, getTitleMaximumFontSize, getTitleMinimumFontSize, isDragEnabled, isDropEnabled, isEnhanced, isPopupEnabled, isResizable, isTitleVisible, layoutValue, layoutValueAndTitle, setDragEnabled, setDropEnabled, setEnabled, setEnhanced, setResizable, setTitle, setTitleVisible |
| 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, 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 |
| Methods inherited from interface com.cosylab.gui.components.util.PopupManageable |
|---|
getPopupManager |
| Field Detail |
|---|
public static final java.lang.String VALUE
| Constructor Detail |
|---|
public LabelledWheelswitch()
public LabelledWheelswitch(double value)
value - initial double valuepublic LabelledWheelswitch(java.lang.String format)
format - initial number (C-style) format
public LabelledWheelswitch(double value,
java.lang.String format,
java.lang.String title,
java.lang.String units)
value - initial double valueformat - initial number (C-style) formattitle - initial titleunits - initial units| Method Detail |
|---|
public AbstractCustomizerPanel getCustomizer()
AbstractDisplayerPanelcom.cosylab.gui.components.customizer.Customizer for this
displayer and returns it.
getCustomizer in class AbstractDisplayerPanelpublic void setEditable(boolean newEditable)
newEditable - public boolean isEditable()
public void setMaximum(double newValue)
newValue - AbstractWheelswitchFormatter.setMaximum(double)public double getMaximum()
AbstractWheelswitchFormatter.getMaximum()public void setMinimum(double newValue)
newValue - AbstractWheelswitchFormatter.setMinimum(double)public double getMinimum()
AbstractWheelswitchFormatter.getMaximum()
public void setMaxMin(double max,
double min)
max - min - Wheelswitch.setMaxMin(double, double)public void setState(State state)
AbstractDisplayerPanel
setState in interface StateOriginatorsetState in class AbstractNumericDisplayerPanelstate - to set.StateOriginator.setState(com.cosylab.application.state.State)public State getState()
AbstractDisplayerPanel
getState in interface StateOriginatorgetState in class AbstractNumericDisplayerPanelStateOriginator.getState()public void setTiltingEnabled(boolean b)
b - true if tilting is enabledWheelswitch.setTiltingEnabled(boolean);public boolean isTiltingEnabled()
public void setValue(double newValue)
newValue - AbstractWheelswitchFormatter.setValue(double)public void setAnimated(boolean animated)
animated - Wheelswitch.setAnimated(boolean)public boolean isAnimated()
Wheelswitch.isAnimated()public double getValue()
Wheelswitch and stored by
the formatter.
AbstractWheelswitchFormatter.getValue()public void addSetListener(SetListener l)
NumberField.
NumberField.addSetListener(SetListener)public void removeSetListener(SetListener l)
NumberField.
NumberField.removeSetListener(SetListener)protected Wheelswitch getWheelswitch()
protected javax.swing.JComponent getValueComponent()
AbstractDisplayerPanelvalueComponent to the AbstractDisplayerPanel. Subclasses
should thus use lazy initialization inside this method.
getValueComponent in class AbstractDisplayerPanelprotected void internalSetEnabled()
AbstractNumericDisplayerPanel
internalSetEnabled in class AbstractNumericDisplayerPanelprotected void internalSetEnhanced()
AbstractNumericDisplayerPanel
internalSetEnhanced in class AbstractNumericDisplayerPanelprotected void internalSetFormat()
internalSetFormat in class AbstractNumericDisplayerPanelprotected void internalSetResizable()
AbstractNumericDisplayerPanel
internalSetResizable in class AbstractNumericDisplayerPanelAbstractDisplayerPanel.setResizable(boolean)public void setUnitsVisible(boolean b)
AbstractNumericDisplayerPaneltrue to display units.
setUnitsVisible in class AbstractNumericDisplayerPanelb - true if units are to be displayed.public void setUnits(java.lang.String value)
AbstractNumericDisplayerPanel
setUnits in class AbstractNumericDisplayerPanelvalue - units Stringprotected void layoutValueAndTitleAndUnits()
layoutValueAndTitleAndUnits in class AbstractNumericDisplayerPanelprotected void layoutValueAndTitleAndUnitsAndBounds()
layoutValueAndTitleAndUnitsAndBounds in class AbstractNumericDisplayerPanelprotected void layoutValueAndUnits()
layoutValueAndUnits in class AbstractNumericDisplayerPanelprotected void layoutValueAndUnitsAndBounds()
layoutValueAndUnitsAndBounds in class AbstractNumericDisplayerPanelpublic void setBackground(java.awt.Color bg)
setBackground in class AbstractNumericDisplayerPanelpublic void setFormatter(AbstractWheelswitchFormatter formatter)
formatter - new formatterWheelswitch.setFormatter(AbstractWheelswitchFormatter)public AbstractWheelswitchFormatter getFormatter()
Wheelswitch.getFormatter()public void setTitleMaximumFontSize(int max)
AbstractDisplayerPanel
setTitleMaximumFontSize in class AbstractNumericDisplayerPanelpublic void setTitleMinimumFontSize(int min)
AbstractDisplayerPanel
setTitleMinimumFontSize in class AbstractNumericDisplayerPanelpublic void setDigitsTakeUpAllSpace(boolean bool)
true if digits should take up all space, set
false if place for not visible digits should be reserved
(there is no resizing of digits and labels when 9 changes to 10 etc.).
bool - boolean valuepublic boolean getDigitsTakeUpAllSpace()
true if digits take up all space,
otherwise false
public void setNumberOfAllDigits(int numberOfAllDigits)
setDigitsTakeUpAllSpace(boolean) is set to false
the place for numberOfAllDigits is reserved. Not needed
additional digits are not shown.
numberOfAllDigits - number of all digitspublic int getNumberOfAllDigits()
public void setPopupEnabled(boolean enabled)
AbstractDisplayerPanel
setPopupEnabled in class AbstractDisplayerPanelenabled - true if enable or false if disabledspublic static void main(java.lang.String[] args)
args - String[]
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||