JBCSolutions - JbcBeans v1.5

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


jbc.beans
Class JbcDateTimeChooser

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

public class JbcDateTimeChooser
extends javax.swing.JComponent
implements javax.swing.SwingConstants

With this bean, the user may choose a date and hours, minutes, seconds, in a user-friendly environment, JbcDateTimeChooser is compliant with SQL date.

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 CHOOSER_DATE
          Constant for chooser style.
static int CHOOSER_DATETIME
          Constant for chooser style.
static int CHOOSER_TIME
          Constant for chooser style.
static int DEFAULT
          Constant for default style pattern.
static int FLAT
          Constant for flat style.
static int FULL
          Constant for full style pattern.
static int LONG
          Constant for long style pattern.
static int LOWERED
          Constant for lowered style.
static int MEDIUM
          Constant for medium style pattern.
static int RAISED
          Constant for raised style.
static int SHORT
          Constant for short style pattern.
 
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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JbcDateTimeChooser()
          Default JbcDateTimeChooser constructor.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Adds a ChangeListener to the list that is notified each time the time chooser's value has changed.
 java.lang.String getAbout()
          Application code will not use these methods explicitly.
 java.awt.Color getBackground()
          Gets the background color of this component.
 java.util.Calendar getCalendar()
          Returns the calendar.
 int getChooserType()
          Returns the chooser type.
 int getClockBevelType()
          Returns the type of the clock bevel.
 int getClockBorderBevelType()
          Returns the type of the border bevel.
 java.util.Date getDate()
          Returns the date.
 java.awt.Color getForeground()
          Gets the foreground color of this component.
 int getHorizontalAlignment()
          Returns the alignment of the textField's contents along the X axis.
 int getHourOfDay()
          Gets the hour of day.
 java.util.Locale getLocale()
          Gets the locale of this component.
 int getMinute()
          Gets the minute.
 int getPopupMenuAlignment()
          Returns the alignment of the PopupMenu along the X axis.
 int getSecond()
          Gets the second.
 java.sql.Date getSqlDate()
          Returns the date.
 java.lang.String getStringDateTime()
          This function should return the string that will be printed in the component.
 int getStylePattern()
          Returns the style pattern.
 long getTime()
          Returns the time.
 java.lang.String getTitleTabDate()
          Returns the title tab date.
 java.lang.String getTitleTabTime()
          Returns the title tab time.
 javax.swing.JComponent getUserDateComponent()
          Returns the userDateComponent.
 javax.swing.JComponent getUserTimeComponent()
          Returns the userTimeComponent.
 void hidePopup()
          Causes the time chooser to close its popup window.
 boolean isClockWithAmPm()
          Indicates if the time chooser is displaying hours from 0 to 24 or from 1 to 12.
 boolean isPopupVisible()
          Determines the visibility of the popup.
 boolean isSecondEnabled()
          Returns the SecondEnabled.
 void paint(java.awt.Graphics g)
          Paints this component.
 void paintInterface(java.awt.Graphics g)
           
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes a ChangeListener from the list that's notified each time the time chooser's value has changed.
 void rollOverDay(javax.swing.JComponent dayComponent, java.util.Calendar calendar)
          The rollOverDay method is an empty method by default, it may be overloaded.
 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 setBounds(int x, int y, int width, int height)
          Moves and resizes this component.
 void setBounds(java.awt.Rectangle r)
          Moves and resizes this component to conform to the new bounding rectangle r.
 void setCalendar(java.util.Calendar c)
          Sets the calendar.
 void setChooserType(int v)
          Sets the chooser type.
 void setClockBevelType(int v)
          Sets the type of the clock bevel.
 void setClockBorderBevelType(int v)
          Sets the type of the border bevel.
 void setClockWithAmPm(boolean b)
          Causes the time chooser to display hours from 0 to 24 or from 1 to 12.
 void setDate(java.util.Date d)
          Sets the date.
 void setEnabled(boolean b)
          Sets whether or not this component is enabled.
 void setFont(java.awt.Font f)
          Gets the font of this component.
 void setForeground(java.awt.Color color)
          Sets the foreground color of this component.
 void setHorizontalAlignment(int alignment)
          Sets the alignment of the textField's contents along the X axis.
 void setHourOfDay(int h)
          Sets the hour of day.
 void setLocale(java.util.Locale l)
          Sets the locale of this component.
 void setMinute(int m)
          Sets the minute.
 void setPopupMenuAlignment(int alignment)
          Sets the alignment of the PopupMenu along the X axis.
 void setPopupVisible(boolean v)
          Sets the visibility of the popup.
 void setSecond(int s)
          Sets the second.
 void setSecondEnabled(boolean b)
          Sets the SecondEnabled.
 void setSize(java.awt.Dimension d)
          Resizes this component so that it has width d.width and height d.height.
 void setSize(int width, int height)
          Resizes this component so that it has width width and height height.
 void setSqlDate(java.sql.Date d)
          Sets the date.
 void setStylePattern(int v)
          Sets the style pattern.
 void setTime(long l)
          Sets the time.
 void setTitleTabDate(java.lang.String title)
          Sets the title tab date.
 void setTitleTabTime(java.lang.String title)
          Sets the title tab time.
 void setToolTipText(java.lang.String text)
          Registers the text to display in a tool tip.
 void setUserDateComponent(javax.swing.JComponent userDateComponent)
          Sets the userDateComponent.
 void setUserTimeComponent(javax.swing.JComponent userTimeComponent)
          Sets the userTimeComponent.
 void showPopup()
          Causes the time chooser to display its popup window.
 void updateUI()
          Notification from the UIFactory that the L&F has changed.
 void validateDay(javax.swing.JComponent dayComponent, java.util.Calendar calendar)
          The validateDay method is an empty method by default, it may be overloaded in order to enable or disable the component, eventually to change colors or fonts, aso...
 
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, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, 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, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, 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

CHOOSER_DATE

public static final int CHOOSER_DATE
Constant for chooser style.

See Also:
getChooserType(), setChooserType(int), Constant Field Values

CHOOSER_TIME

public static final int CHOOSER_TIME
Constant for chooser style.

See Also:
getChooserType(), setChooserType(int), Constant Field Values

CHOOSER_DATETIME

public static final int CHOOSER_DATETIME
Constant for chooser style.

See Also:
getChooserType(), setChooserType(int), Constant Field Values

FULL

public static final int FULL
Constant for full style pattern.

See Also:
getStylePattern(), setStylePattern(int), Constant Field Values

LONG

public static final int LONG
Constant for long style pattern.

See Also:
getStylePattern(), setStylePattern(int), Constant Field Values

MEDIUM

public static final int MEDIUM
Constant for medium style pattern.

See Also:
getStylePattern(), setStylePattern(int), Constant Field Values

SHORT

public static final int SHORT
Constant for short style pattern.

See Also:
getStylePattern(), setStylePattern(int), Constant Field Values

DEFAULT

public static final int DEFAULT
Constant for default style pattern. Its value is FULL.

See Also:
Constant Field Values
Constructor Detail

JbcDateTimeChooser

public JbcDateTimeChooser()
Default JbcDateTimeChooser constructor.

Creates a JbcDateTimeChooser 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.


getStringDateTime

public java.lang.String getStringDateTime()
This function should return the string that will be printed in the component. This string may contain html tags. This function may be overloaded.

Returns:
the string that will be printed in the component.

validateDay

public void validateDay(javax.swing.JComponent dayComponent,
                        java.util.Calendar calendar)
The validateDay method is an empty method by default, it may be overloaded in order to enable or disable the component, eventually to change colors or fonts, aso... This method is called before displaying the Day component.

Parameters:
dayComponent - The component that will be displayed.
calendar - The calendar associated to the component.

rollOverDay

public void rollOverDay(javax.swing.JComponent dayComponent,
                        java.util.Calendar calendar)
The rollOverDay method is an empty method by default, it may be overloaded. This method is called when the mouse is moved over the Day component and before displaying this Day component.

Parameters:
dayComponent - The component that will be displayed.
calendar - The calendar associated to the component.

getUserDateComponent

public javax.swing.JComponent getUserDateComponent()
Returns the userDateComponent.

See Also:
setUserDateComponent(javax.swing.JComponent)

setUserDateComponent

public void setUserDateComponent(javax.swing.JComponent userDateComponent)
Sets the userDateComponent. When calling this method, the userDateComponent component will be added to the popup menu. This component may be any component, except a combo box, at the user convenience. The user should manage this component, it should be considered as an add-on.

Parameters:
userDateComponent - The userDateComponent will be added then displayed in the popup menu.
See Also:
getUserDateComponent()

getUserTimeComponent

public javax.swing.JComponent getUserTimeComponent()
Returns the userTimeComponent.

See Also:
setUserTimeComponent(javax.swing.JComponent)

setUserTimeComponent

public void setUserTimeComponent(javax.swing.JComponent userTimeComponent)
Sets the userTimeComponent. When calling this method, the userTimeComponent component will be added to the popup menu. This component may be any component, except a combo box, at the user convenience. The user should manage this component, it should be considered as an add-on.

Parameters:
userTimeComponent - The userTimeComponent will be added then displayed in the popup menu.
See Also:
getUserTimeComponent()

getTitleTabDate

public java.lang.String getTitleTabDate()
Returns the title tab date.

See Also:
setTitleTabDate(java.lang.String)

setTitleTabDate

public void setTitleTabDate(java.lang.String title)
Sets the title tab date.

Parameters:
title - The title to be displayed in the tab
See Also:
getTitleTabDate()

getTitleTabTime

public java.lang.String getTitleTabTime()
Returns the title tab time.

See Also:
setTitleTabTime(java.lang.String)

setTitleTabTime

public void setTitleTabTime(java.lang.String title)
Sets the title tab time.

Parameters:
title - - the title to be displayed in the tab
See Also:
getTitleTabTime()

getClockBorderBevelType

public int getClockBorderBevelType()
Returns the type of the border bevel.

See Also:
setClockBorderBevelType(int)

setClockBorderBevelType

public void setClockBorderBevelType(int v)
Sets the type of the border bevel.

See Also:
getClockBorderBevelType()

getClockBevelType

public int getClockBevelType()
Returns the type of the clock bevel.

See Also:
setClockBevelType(int)

setClockBevelType

public void setClockBevelType(int v)
Sets the type of the clock bevel.

See Also:
getClockBevelType()

getCalendar

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

See Also:
setCalendar(java.util.Calendar), setDate(java.util.Date), setTime(long)

setCalendar

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

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

getDate

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

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

setDate

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

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

getSqlDate

public java.sql.Date getSqlDate()
Returns the date.

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

setSqlDate

public void setSqlDate(java.sql.Date d)
Sets the date.

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

getTime

public long getTime()
Returns the time.

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.

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

setHourOfDay

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

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.

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

setMinute

public void setMinute(int m)
Sets the minute.

Parameters:
m -
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.

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

setSecond

public void setSecond(int s)
Sets the second.

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.

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

getStylePattern

public int getStylePattern()
Returns the style pattern. The formatting styles include FULL, LONG, MEDIUM, and SHORT. More detail and examples of using these styles are provided in the setStylePattern method description.

See Also:
setStylePattern(int)

setStylePattern

public void setStylePattern(int v)
Sets the style pattern.
You can pass in different options to this factory method to control the length of the result; from SHORT to MEDIUM to LONG to FULL. The exact result depends on the locale, but generally:

See Also:
getStylePattern()

getChooserType

public int getChooserType()
Returns the chooser type. The chooser type include DATE, TIME, and DATETIME.

See Also:
setChooserType(int)

setChooserType

public void setChooserType(int v)
Sets the chooser type.
The chooser type include DATE, TIME, and DATETIME.

See Also:
getChooserType()

isSecondEnabled

public boolean isSecondEnabled()
Returns the SecondEnabled.

Returns:
true if the second hand should be painted, false otherwise
See Also:
setSecondEnabled(boolean)

setSecondEnabled

public void setSecondEnabled(boolean b)
Sets the SecondEnabled.

Parameters:
b - true if the second hand should be painted, false otherwise
See Also:
isSecondEnabled()

getLocale

public java.util.Locale getLocale()
Gets the locale of this component.

Overrides:
getLocale in class java.awt.Component
Returns:
This component's locale. If this component does not have a locale, the locale of its parent is returned.
See Also:
setLocale(java.util.Locale)

setLocale

public void setLocale(java.util.Locale l)
Sets the locale of this component.

Overrides:
setLocale in class java.awt.Component
Parameters:
l - The locale to become this component's locale.
See Also:
getLocale()

showPopup

public void showPopup()
Causes the time chooser to display its popup window.

See Also:
setPopupVisible(boolean), hidePopup()

hidePopup

public void hidePopup()
Causes the time chooser to close its popup window.

See Also:
setPopupVisible(boolean), showPopup()

setPopupVisible

public void setPopupVisible(boolean v)
Sets the visibility of the popup.

See Also:
showPopup(), hidePopup(), isPopupVisible()

isPopupVisible

public boolean isPopupVisible()
Determines the visibility of the popup.

See Also:
setPopupVisible(boolean)

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

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.

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

setToolTipText

public void setToolTipText(java.lang.String text)
Registers the text to display in a tool tip. The text displays when the cursor lingers over the component.

Overrides:
setToolTipText in class javax.swing.JComponent
Parameters:
text - the string to display; if the text is null, the tool tip is turned off for this component

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()

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()

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)

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)

setFont

public void setFont(java.awt.Font f)
Gets the font of this component.

Overrides:
setFont in class javax.swing.JComponent
See Also:
Component.getFont()

setEnabled

public void setEnabled(boolean b)
Sets whether or not this component is enabled.

Overrides:
setEnabled in class javax.swing.JComponent
See Also:
Component.isEnabled()

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this component. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Overrides:
setBounds in class java.awt.Component
Parameters:
x - The new x-coordinate of this component.
y - The new y-coordinate of this component.
width - The new width of this component.
height - The new height of this component.

setBounds

public void setBounds(java.awt.Rectangle r)
Moves and resizes this component to conform to the new bounding rectangle r. This component's new position is specified by r.x and r.y, and its new size is specified by r.width and r.height

Overrides:
setBounds in class java.awt.Component
Parameters:
r - The new bounding rectangle for this component.

setSize

public void setSize(int width,
                    int height)
Resizes this component so that it has width width and height height.

Overrides:
setSize in class java.awt.Component
Parameters:
width - The new width of this component in pixels.
height - The new height of this component in pixels.
See Also:
JComponent.getSize(java.awt.Dimension), setBounds(int, int, int, int)

setSize

public void setSize(java.awt.Dimension d)
Resizes this component so that it has width d.width and height d.height.

Overrides:
setSize in class java.awt.Component
Parameters:
d - The dimension specifying the new size of this component.
See Also:
setSize(int, int), setBounds(int, int, int, int)

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the list that is notified each time the time chooser's value has changed.

Parameters:
l - the ChangeListener to add
See Also:
removeChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from the list that's notified each time the time chooser's value has changed.

Parameters:
l - the ChangeListener to remove
See Also:
addChangeListener(javax.swing.event.ChangeListener)

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the alignment of the textField's contents along the X axis.

Parameters:
alignment - One of the following constants defined in SwingConstants: LEFT, CENTER (the default), RIGHT, LEADING or TRAILING.
See Also:
SwingConstants, getHorizontalAlignment()

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the alignment of the textField's contents along the X axis.

Returns:
The value of the horizontalAlignment property, one of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
setHorizontalAlignment(int), SwingConstants

setPopupMenuAlignment

public void setPopupMenuAlignment(int alignment)
Sets the alignment of the PopupMenu along the X axis.

Parameters:
alignment - One of the following constants defined in SwingConstants: LEFT (the default), CENTER, RIGHT.
See Also:
SwingConstants, getPopupMenuAlignment()

getPopupMenuAlignment

public int getPopupMenuAlignment()
Returns the alignment of the PopupMenu along the X axis.

Returns:
The value of the PopupMenuAlignment property, one of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT.
See Also:
setPopupMenuAlignment(int), SwingConstants

isClockWithAmPm

public boolean isClockWithAmPm()
Indicates if the time chooser is displaying hours from 0 to 24 or from 1 to 12.

Returns:
true if AM/PM is enabled, false otherwise
See Also:
setClockWithAmPm(boolean)

setClockWithAmPm

public void setClockWithAmPm(boolean b)
Causes the time chooser to display hours from 0 to 24 or from 1 to 12.

Parameters:
b - if true, enables AM/PM; otherwise, disables it
See Also:
isClockWithAmPm()

JBCSolutions - JbcBeans v1.5

JBCSolutions - JbcBeans v1.5