JBCSolutions - JbcBeans v1.5

This document is the API specification for the JbcBeans, version 1.5


jbc.beans
Class JbcClock

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by jbc.beans.JbcClock
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class JbcClock
extends javax.swing.JComponent

A graphic object that may be used at the developer's convenience.

Author:
Copyright © 1999-2004, JBC. All Rights Reserved.
Licensed Materials - Property of JBC.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
static int FLAT
          Constant for flat style.
static int LOWERED
          Constant for lowered style.
static int RAISED
          Constant for raised style.
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
JbcClock()
          Default JbcClock constructor.
 
Method Summary
 java.lang.String getAbout()
          Application code will not use these methods explicitly.
 java.awt.Color getBackground()
          Gets the background color of this component.
 int getBevelSize()
          Gets the size of the bevel.
 java.util.Calendar getCalendar()
          Returns the calendar property.
 int getClockBevelType()
          Returns the type of clock bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.
 int getClockBorderBevelType()
          Returns the type of border bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.
 java.util.Date getDate()
          Returns the date property.
 java.awt.Color getForeground()
          Gets the foreground color of this component.
 int getHourOfDay()
          Gets the hour of day property.
 int getMinute()
          Gets the minute property.
 int getSecond()
          Gets the second property.
 long getTime()
          Returns the time property.
 boolean isSecondEnabled()
          Returns true if the second hand is enabled.
 void paint(java.awt.Graphics g)
          Paints this component.
 void paintInterface(java.awt.Graphics g)
           
 void setAbout(java.lang.String text)
          Application code will not use these methods explicitly.
 void setBackground(java.awt.Color color)
          Sets the background color of this component.
 void setBevelSize(int size)
          Sets the size of the bevel.
 void setCalendar(java.util.Calendar c)
          Sets the calendar property.
 void setClockBevelType(int v)
          Sets the type of clock bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.
 void setClockBorderBevelType(int v)
          Sets the type of border bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.
 void setDate(java.util.Date d)
          Sets the date property.
 void setForeground(java.awt.Color color)
          Sets the foreground color of this component.
 void setHourOfDay(int h)
          Sets the hour of day property.
 void setMinute(int m)
          Sets the minute property.
 void setSecond(int s)
          Sets the second property.
 void setSecondEnabled(boolean b)
          Sets whether the second hand is enabled or not.
 void setTime(long l)
          Sets the time property.
 void updateUI()
          Notification from the UIFactory that the L&F has changed.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RAISED

public static final int RAISED
Constant for raised style.

See Also:
getClockBorderBevelType(), setClockBorderBevelType(int), getClockBevelType(), setClockBevelType(int), Constant Field Values

LOWERED

public static final int LOWERED
Constant for lowered style.

See Also:
getClockBorderBevelType(), setClockBorderBevelType(int), getClockBevelType(), setClockBevelType(int), Constant Field Values

FLAT

public static final int FLAT
Constant for flat style.

See Also:
getClockBorderBevelType(), setClockBorderBevelType(int), getClockBevelType(), setClockBevelType(int), Constant Field Values
Constructor Detail

JbcClock

public JbcClock()
Default JbcClock constructor.

Creates a JbcClock instance.

Method Detail

setAbout

public void setAbout(java.lang.String text)
Application code will not use these methods explicitly.


getAbout

public java.lang.String getAbout()
Application code will not use these methods explicitly.


paintInterface

public final void paintInterface(java.awt.Graphics g)

paint

public void paint(java.awt.Graphics g)
Paints this component. This method is called when the contents of the component should be painted.

Overrides:
paint in class javax.swing.JComponent
Parameters:
g - The graphics context to use for painting.

getClockBorderBevelType

public int getClockBorderBevelType()
Returns the type of border bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.

See Also:
setClockBorderBevelType(int)

setClockBorderBevelType

public void setClockBorderBevelType(int v)
Sets the type of border bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.

See Also:
getClockBorderBevelType()

getClockBevelType

public int getClockBevelType()
Returns the type of clock bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.

See Also:
setClockBevelType(int)

setClockBevelType

public void setClockBevelType(int v)
Sets the type of clock bevel, one of the following constants defined in JbcClock: RAISED, LOWERED, or FLAT.

See Also:
getClockBevelType()

getCalendar

public java.util.Calendar getCalendar()
Returns the calendar property.

See Also:
setCalendar(java.util.Calendar), setDate(java.util.Date), setTime(long), setHourOfDay(int), setMinute(int), setSecond(int)

setCalendar

public void setCalendar(java.util.Calendar c)
Sets the calendar property.

See Also:
getCalendar(), getDate(), getTime(), getHourOfDay(), getMinute(), getSecond()

getDate

public java.util.Date getDate()
Returns the date property.

See Also:
setCalendar(java.util.Calendar), setDate(java.util.Date), setTime(long), setHourOfDay(int), setMinute(int), setSecond(int)

setDate

public void setDate(java.util.Date d)
Sets the date property.

See Also:
getCalendar(), getDate(), getTime(), getHourOfDay(), getMinute(), getSecond()

getTime

public long getTime()
Returns the time property.

See Also:
setCalendar(java.util.Calendar), setDate(java.util.Date), setTime(long), setHourOfDay(int), setMinute(int), setSecond(int)

setTime

public void setTime(long l)
Sets the time property.

See Also:
getCalendar(), getDate(), getTime(), getHourOfDay(), getMinute(), getSecond()

setHourOfDay

public void setHourOfDay(int h)
Sets the hour of day property.

See Also:
setCalendar(java.util.Calendar), setDate(java.util.Date), setTime(long), setHourOfDay(int), setMinute(int), setSecond(int)

getHourOfDay

public int getHourOfDay()
Gets the hour of day property.

See Also:
getCalendar(), getDate(), getTime(), getHourOfDay(), getMinute(), getSecond()

setMinute

public void setMinute(int m)
Sets the minute property.

See Also:
setCalendar(java.util.Calendar), setDate(java.util.Date), setTime(long), setHourOfDay(int), setMinute(int), setSecond(int)

getMinute

public int getMinute()
Gets the minute property.

Returns:
minute.
See Also:
getCalendar(), getDate(), getTime(), getHourOfDay(), getMinute(), getSecond()

setSecond

public void setSecond(int s)
Sets the second property.

See Also:
setCalendar(java.util.Calendar), setDate(java.util.Date), setTime(long), setHourOfDay(int), setMinute(int), setSecond(int)

getSecond

public int getSecond()
Gets the second property.

Returns:
second.
See Also:
getCalendar(), getDate(), getTime(), getHourOfDay(), getMinute(), getSecond()

isSecondEnabled

public boolean isSecondEnabled()
Returns true if the second hand is enabled. By default, the second hand is enabled.

Returns:
true if the second hand is enabled, else false
See Also:
setSecondEnabled(boolean)

setSecondEnabled

public void setSecondEnabled(boolean b)
Sets whether the second hand is enabled or not.

Parameters:
b - true if the second hand is enabled, else false
See Also:
isSecondEnabled()

setBevelSize

public void setBevelSize(int size)
Sets the size of the bevel.

Parameters:
size - the value of the bevel size
See Also:
getBevelSize()

getBevelSize

public int getBevelSize()
Gets the size of the bevel.

Returns:
the value of the bevel size
See Also:
setBevelSize(int)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.

Overrides:
updateUI in class javax.swing.JComponent
See Also:
JComponent.updateUI()

getBackground

public java.awt.Color getBackground()
Gets the background color of this component.

Overrides:
getBackground in class java.awt.Component
Returns:
This component's background color. If this component does not have a background color, the default background color is returned.
See Also:
setBackground(java.awt.Color)

setBackground

public void setBackground(java.awt.Color color)
Sets the background color of this component.

Overrides:
setBackground in class javax.swing.JComponent
Parameters:
color - The color to become this component's background color. If this parameter is null then this component will inherit the default background.
See Also:
getBackground()

getForeground

public java.awt.Color getForeground()
Gets the foreground color of this component.

Overrides:
getForeground in class java.awt.Component
Returns:
This component's foreground color. If this component does not have a foreground color, the default foreground color is returned.
See Also:
setForeground(java.awt.Color)

setForeground

public void setForeground(java.awt.Color color)
Sets the foreground color of this component.

Overrides:
setForeground in class javax.swing.JComponent
Parameters:
color - The color to become this component's foreground color. If this parameter is null then this component will inherit the default foreground.
See Also:
getForeground()

JBCSolutions - JbcBeans v1.5

JBCSolutions - JbcBeans v1.5