public class IstiClockPanel
extends javax.swing.JPanel
implements java.awt.event.ActionListener
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static java.util.TimeZone |
DEFAULT_TIME_ZONE
Value to use when the default time zone is desired.
|
static int |
DISPMODE_ALWAYS_SHOW_DEFAULT_TIME_ZONE
Display mode value (displayMode): Always show the default time zone
|
static int |
DISPMODE_DEFAULT
Display mode value (displayMode): Default mode - only show the selected
time zone
|
static int |
DISPMODE_SHOW_LOCAL_WHEN_DEFAULT
Display mode value (displayMode): Show local time zone when the default
time zone is selected.
|
static int |
SHOW_24_HOUR_COMMAND
Command to show the time in 24 hour mode on the display.
|
static int |
SHOW_ALL_TIME_ZONES_COMMAND
Command to show the all time zones on the display.
|
static int |
SHOW_SECOND_TIME_ZONE_COMMAND
Command to show the second time zone on the display if more than one time
zone is displayed.
|
static int |
SHOW_SECONDS_COMMAND
Command to show seconds on the display.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
IstiClockPanel()
Creates a clock panel with the default time zone.
|
IstiClockPanel(java.util.TimeZone zone)
Creates a clock panel with the specified time zone.
|
IstiClockPanel(java.util.TimeZone zone,
int displayMode)
Creates a clock panel with the specified time zone.
|
IstiClockPanel(java.util.TimeZone zone,
int displayMode,
java.util.TimeZone defaultZone)
Creates a clock panel with the specified time zone.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Implements the ActionListener interface.
|
boolean |
disableCommand(int command)
Disables the specified command.
|
boolean |
getCommandState(int command)
Gets the state for the specified command.
|
boolean |
isCommandEnabled(int command)
Determines if the specified command is enabled.
|
boolean |
isFloatable()
Returns the "floatable" property for the panel.
|
boolean |
isRunning()
Returns true if the clock is running.
|
boolean |
setCommandEnable(int command,
boolean b)
Enables/disables the specified command.
|
boolean |
setCommandState(int command,
boolean b)
Sets the state for the specified command.
|
void |
setFloatable(boolean flgVal)
Sets the "floatable" property for the panel.
|
void |
setPopupEnabled(boolean b)
Enable/disables popup menu.
|
void |
setTimeZone(java.util.TimeZone zone)
Sets the time zone.
|
void |
start()
Starts the clock.
|
void |
stop()
Stops the clock.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, updateadd, 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, transferFocusDownCycle, validate, validateTreeaction, 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, 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, transferFocusBackward, transferFocusUpCyclepublic static final java.util.TimeZone DEFAULT_TIME_ZONE
public static final int DISPMODE_ALWAYS_SHOW_DEFAULT_TIME_ZONE
public static final int DISPMODE_DEFAULT
public static final int DISPMODE_SHOW_LOCAL_WHEN_DEFAULT
public static final int SHOW_24_HOUR_COMMAND
public static final int SHOW_ALL_TIME_ZONES_COMMAND
public static final int SHOW_SECOND_TIME_ZONE_COMMAND
public static final int SHOW_SECONDS_COMMAND
public IstiClockPanel()
startpublic IstiClockPanel(java.util.TimeZone zone)
zone - time zone for the clock or DEFAULT_TIME_ZONE for default.
The 'start' method needs to be called to start the clock after
the clock panel is setup.startpublic IstiClockPanel(java.util.TimeZone zone,
int displayMode)
zone - time zone for the clock or DEFAULT_TIME_ZONE for
default.displayMode - display mode.
The 'start' method needs to be called to start the clock
after the clock panel is setup.start, DISPMODE_*public IstiClockPanel(java.util.TimeZone zone,
int displayMode,
java.util.TimeZone defaultZone)
zone - time zone for the clock or DEFAULT_TIME_ZONE for
default.displayMode - display mode.defaultZone - default time zone for the clock or DEFAULT_TIME_ZONE for
system default.
The 'start' method needs to be called to start the clock
after the clock panel is setup.start, DISPMODE_*public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - action event.public boolean disableCommand(int command)
command - the command.SHOW_ALL_TIME_ZONES_COMMAND, SHOW_SECONDS_COMMAND, ...public boolean getCommandState(int command)
command - the command.SHOW_ALL_TIME_ZONES_COMMAND, SHOW_SECONDS_COMMAND, ...public boolean isCommandEnabled(int command)
command - the command.public boolean isFloatable()
public boolean isRunning()
start()public boolean setCommandEnable(int command,
boolean b)
command - the command.b - true if the command should be enabled.SHOW_ALL_TIME_ZONES_COMMAND, SHOW_SECONDS_COMMAND, ...public boolean setCommandState(int command,
boolean b)
command - the command.b - command state.SHOW_ALL_TIME_ZONES_COMMAND, SHOW_SECONDS_COMMAND, ...public void setFloatable(boolean flgVal)
flgVal - true to enable; false to disable.public void setPopupEnabled(boolean b)
b - true if popups should be enabled.public void setTimeZone(java.util.TimeZone zone)
zone - time zone.public void start()
public void stop()