|
||||||||||
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.AbstractDisplayerPanel com.cosylab.gui.components.LabelledGauger
public class LabelledGauger
LabelledGauger
is an extension of AbstractDisplayerPanel which
provides Gauger
as the numerical value displayer.
AbstractDisplayerPanel
,
Gauger
,
Serialized FormNested 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 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 | |
---|---|
LabelledGauger()
Creates new gauger displayer. |
|
LabelledGauger(java.lang.String title)
Creates new gauger displayer with the given title. |
Method Summary | |
---|---|
AbstractCustomizerPanel |
getCustomizer()
Loads the default com.cosylab.gui.components.customizer.Customizer for this
displayer and returns it. |
java.lang.String |
getFormat()
|
protected Gauger |
getGauger()
Returns the Gauger displayer associated with this component. |
double |
getHighWarningLimit()
Returns the upper warning limit. |
double |
getLowWarningLimit()
Returns the lower warning limit. |
double |
getMaximum()
Returns the maximum value shown by displayer. |
double |
getMinimum()
Returns the minimum value shown by displayer. |
java.awt.Color |
getOutOfBoundsColor()
Returns the value which indicates that the value is out of bounds. |
PopupManager |
getPopupManager()
Returns popum manager for adding popup actions. |
int |
getScaleMode()
Deprecated. use getValuePolicy() |
State |
getState()
Returns the current state of the component. |
java.lang.String |
getUnits()
Returns the string representing the units. |
double |
getValue()
Returns the actual value on the displayer. |
protected javax.swing.JComponent |
getValueComponent()
Should return the component to display the value of this displayer. |
java.awt.Font |
getValueLabelFont()
Returns the font used to display value. |
RangedValuePolicy |
getValuePolicy()
Returns the value policy. |
java.awt.Color |
getWarningColor()
Returns the color which indicates the warning. |
boolean |
isEditable()
|
boolean |
isLinearScale()
Convenient method to see if linear scale is used. |
boolean |
isLogarithmicScale()
Returns true if logarithmic scale is used. |
boolean |
isUnitsVisible()
Returns true if units are visible. |
protected void |
layoutDisplayer()
Lays out the displayer according to the set layout orientation. |
static void |
main(java.lang.String[] args)
Run test applet. |
void |
setFormat(java.lang.String value)
|
void |
setHighWarningLimit(double value)
Sets new upper warning limit. |
void |
setLinearScale()
Convenient method to set linear scale. |
void |
setLogarithmicScale()
Convenient method to set logarithmic scale. |
void |
setLogarithmicScale(boolean b)
Switches between the logarithmic and linear scale. |
void |
setLowWarningLimit(double value)
Sets new lower warning limit. |
void |
setMaximum(double value)
Sets the maximum value used by the displayer. |
void |
setMinimum(double value)
Sets the minimum value shown by the displayer. |
void |
setOutOfBoundsColor(java.awt.Color color)
Sets the color which indicates that the value is out of bounds. |
void |
setPopupEnabled(boolean enabled)
Enables or disables the popup menu. |
void |
setScaleMode(int policy)
Deprecated. use setValuePolicy(RangedValuePolicy) |
void |
setState(State state)
Sets the state to the component. |
void |
setTransferHandler(javax.swing.TransferHandler newHandler)
|
void |
setUnits(java.lang.String u)
Sets the units shown by this displayer. |
void |
setUnitsVisible(boolean b)
Toggles the units visibility. |
void |
setValue(double d)
Sets the value to the displayer. |
void |
setValue(double newMin,
double newMax,
double newValue)
Sets new value and bounds to the displayer. |
void |
setValueLabelFont(java.awt.Font font)
Sets the font used to display value. |
void |
setValuePolicy(RangedValuePolicy policy)
Sets a new value policy. |
void |
setWarningColor(java.awt.Color color)
Sets the warning color for the gauger. |
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 |
Constructor Detail |
---|
public LabelledGauger(java.lang.String title)
public LabelledGauger()
Method Detail |
---|
public boolean isEditable()
public void setFormat(java.lang.String value)
public java.lang.String getFormat()
public void setLogarithmicScale(boolean b)
b
- true if scale should be logarithmicpublic boolean isLogarithmicScale()
public void setMaximum(double value)
value
- new maximumpublic double getMaximum()
public void setMinimum(double value)
value
- new minimumpublic double getMinimum()
public void setScaleMode(int policy)
setValuePolicy(RangedValuePolicy)
policy
- Gauger.setScaleMode(int)
public int getScaleMode()
getValuePolicy()
Gauger.getScaleMode()
public void setValuePolicy(RangedValuePolicy policy)
policy
- new value policypublic RangedValuePolicy getValuePolicy()
public void setState(State state)
AbstractDisplayerPanel
setState
in interface StateOriginator
setState
in class AbstractDisplayerPanel
state
- to set.StateOriginator.setState(com.cosylab.application.state.State)
public State getState()
AbstractDisplayerPanel
getState
in interface StateOriginator
getState
in class AbstractDisplayerPanel
StateOriginator.getState()
public void setUnitsVisible(boolean b)
b
- true if units are visiblepublic boolean isUnitsVisible()
protected Gauger getGauger()
protected javax.swing.JComponent getValueComponent()
AbstractDisplayerPanel
valueComponent
to the AbstractDisplayerPanel. Subclasses
should thus use lazy initialization inside this method.
getValueComponent
in class AbstractDisplayerPanel
public double getValue()
public void setValue(double d)
d
- new valueprotected void layoutDisplayer()
AbstractDisplayerPanel
layoutDisplayer
in class AbstractDisplayerPanel
public java.lang.String getUnits()
public void setUnits(java.lang.String u)
u
- new unitspublic AbstractCustomizerPanel getCustomizer()
AbstractDisplayerPanel
com.cosylab.gui.components.customizer.Customizer
for this
displayer and returns it.
getCustomizer
in class AbstractDisplayerPanel
public PopupManager getPopupManager()
AbstractDisplayerPanel
getPopupManager
in interface PopupManageable
getPopupManager
in class AbstractDisplayerPanel
PopupManageable.getPopupManager()
public void setPopupEnabled(boolean enabled)
AbstractDisplayerPanel
setPopupEnabled
in class AbstractDisplayerPanel
enabled
- true if enable or false if disabledspublic java.awt.Font getValueLabelFont()
public void setValueLabelFont(java.awt.Font font)
font
- new fontpublic void setLogarithmicScale()
public void setLinearScale()
public boolean isLinearScale()
public void setOutOfBoundsColor(java.awt.Color color)
color
- new out of bounds colorpublic java.awt.Color getOutOfBoundsColor()
public java.awt.Color getWarningColor()
public void setWarningColor(java.awt.Color color)
color
- new warning colorpublic void setHighWarningLimit(double value)
value
- new warning limitpublic double getHighWarningLimit()
public void setLowWarningLimit(double value)
value
- new warning limitpublic double getLowWarningLimit()
public void setValue(double newMin, double newMax, double newValue)
newMin
- new minimumnewMax
- new maximumnewValue
- new maximumpublic void setTransferHandler(javax.swing.TransferHandler newHandler)
setTransferHandler
in class AbstractDisplayerPanel
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 |