|
WIDAR Classes | |||||||||
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
edu.nrao.widar.gui.widget.BlankPanel
ca.nrc.widar.mccc.crm.VariableLed
public class VariableLed
WIDAR/EVLA - VariableLed Class
An LED class inspired by the LedElement Class which will pulse at a specified rate in order to allow a GUI to portray to the user that the underlying application or task assigned to the LED is alive.
Copyright: National Research Council of Canada and Associated Universities Inc., 2010, 2011, 2012
![]() |
![]() |
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.awt.Color |
BLACK
|
static int |
BLINK
|
static java.awt.Color |
BLUE
|
static int |
DEFAULT_HEIGHT
|
static int |
DEFAULT_WIDTH
|
static java.awt.Color |
GRAY
|
static java.awt.Color |
GREEN
|
static java.awt.Color |
OFF
|
static java.awt.Color |
ORANGE
|
static java.awt.Color |
PINK
|
static int |
PULSE
|
static java.awt.Color |
RED
|
static int |
SOLID
|
static java.lang.Integer |
STEPS
|
static java.awt.Color |
YELLOW
|
Fields inherited from class edu.nrao.widar.gui.widget.BlankPanel |
---|
bigLabelFont, defaultFont, fieldFont, LABEL_POS_BOTTOM, LABEL_POS_LEFT, LABEL_POS_RIGHT, LABEL_POS_TOP |
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 | |
---|---|
VariableLed(java.awt.Color c)
Constructor for the Variable LED that places the LED in SOLID mode by default. |
|
VariableLed(java.awt.Color c,
int w,
int h)
Constructor for the Variable LED that places the LED in SOLID mode by default. |
|
VariableLed(java.awt.Color c,
int m,
java.lang.Long i)
Constructor for the Variable LED that places the LED in the mode specified by the user, at the specified interval. |
|
VariableLed(java.awt.Color c,
int m,
java.lang.Long i,
int w,
int h)
Constructor for the Variable LED that places the LED in the mode specified by the user, at the specified interval. |
Method Summary | |
---|---|
java.awt.Color |
getColor()
Return the active colour. |
java.lang.Long |
getInterval()
Returns the current BLINK/PULSE interval value (ms). |
int |
getMode()
Return the current active mode of the VariableLed. |
java.awt.Color |
getOffColor()
Returns the current OFF colour. |
boolean |
isActive()
Returns the response the the query of whether the VariableLed is active or not. |
void |
paint(java.awt.Graphics g)
Override of the component paint method. |
void |
restart()
A method used to restart the VariableLED in the case that a vital parameter has been changed. |
void |
setBlink(java.lang.Long newInt)
Set the VariableLed to BLINK mode with the specified interval (ms) and restart. |
void |
setBlink(java.lang.Long newInt,
java.awt.Color c)
Set the VariableLed to BLINK mode with the specified interval (ms) and and a new colour. |
void |
setColor(java.awt.Color c)
Set the active colour for the VariableLed and restart. |
void |
setInterval(java.lang.Long newInt)
Set the BLINK/PULSE interval to the supplied value and restart the VariableLed |
void |
setMode(int newMode)
Set the active mode for the VariableLed and restart. |
void |
setOffColor(java.awt.Color c)
Set the colour to display when the VariableLed is OFF. |
void |
setPulse(java.lang.Long newInt)
Set the VariableLed to PULSE mode with the specified interval (ms) and restart. |
void |
setPulse(java.lang.Long newInt,
java.awt.Color c)
Set the VariableLed to PULSE mode with the specified interval (ms) and and a new colour. |
void |
setSolid()
Set the VariableLed to SOLID mode and restart. |
void |
setSolid(java.awt.Color c)
Set the VariableLed to SOLID mode with the specified colour and restart. |
void |
start()
Start the VariableLED. |
void |
stop()
Stop the VariableLED from running. |
Methods inherited from class edu.nrao.widar.gui.widget.BlankPanel |
---|
add, add, add, add, add, add, add, add, add, add, add, add, add, add, addButton, addComponent, addComponent, addComponent, addComponent, addComponent, addComponent, addLabel, addPanel, drawGrid, drawGrid, fixMarginsAndGetDimension, getComponent, getField, getFieldText, getValue, setAndAlarm, setField |
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, 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, 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 |
---|
public static final java.awt.Color RED
public static final java.awt.Color GREEN
public static final java.awt.Color YELLOW
public static final java.awt.Color BLUE
public static final java.awt.Color PINK
public static final java.awt.Color ORANGE
public static final java.awt.Color BLACK
public static final java.awt.Color GRAY
public static final java.awt.Color OFF
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static final int SOLID
public static final int BLINK
public static final int PULSE
public static final java.lang.Integer STEPS
Constructor Detail |
---|
public VariableLed(java.awt.Color c)
c
- The active colour for the VariableLed.public VariableLed(java.awt.Color c, int m, java.lang.Long i)
c
- The active colour for the VariableLed.m
- The active mode for the VariableLed.i
- The interval (ms) for the VariableLed.public VariableLed(java.awt.Color c, int w, int h)
c
- The active colour for the VariableLed.w
- The desired width (pixels) of the VariableLed.h
- The desired height (pixels) of the VariableLed.public VariableLed(java.awt.Color c, int m, java.lang.Long i, int w, int h)
c
- The active colour for the VariableLed.m
- The active mode for the VariableLed.i
- The interval (ms) for the VariableLed.w
- The desired width (pixels) of the VariableLed.h
- The desired height (pixels) of the VariableLed.Method Detail |
---|
public void start()
public void restart()
public void stop()
public boolean isActive()
public void setInterval(java.lang.Long newInt)
newInt
- The new time interval (ms).public java.lang.Long getInterval()
public void setSolid()
public void setSolid(java.awt.Color c)
c
- The new colour.public void setPulse(java.lang.Long newInt)
newInt
- The PULSE interval (ms).public void setPulse(java.lang.Long newInt, java.awt.Color c)
newInt
- The PULSE interval (ms).c
- The new active colour.public void setBlink(java.lang.Long newInt)
newInt
- The BLINK interval (ms).public void setBlink(java.lang.Long newInt, java.awt.Color c)
newInt
- The BLINK interval (ms).c
- The new active colour.public void setMode(int newMode)
newMode
- The new active mode.public int getMode()
public void setColor(java.awt.Color c)
c
- The new active colour.public java.awt.Color getColor()
public void setOffColor(java.awt.Color c)
c
- The colour to display when the LED is OFF.public java.awt.Color getOffColor()
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
g
- The graphics context.
|
NRAO/DRAO | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |