|
JBCSolutions - JbcBeans v1.5 This document is the API specification for the JbcBeans, version 1.5 |
|||||||
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
jbc.beans.JbcDateTimeChooser
public class JbcDateTimeChooser
With this bean, the user may choose a date and hours, minutes,
seconds, in a user-friendly environment, JbcDateTimeChooser is compliant with SQL date.
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 |
---|
public static final int RAISED
getClockBorderBevelType()
,
setClockBorderBevelType(int)
,
getClockBevelType()
,
setClockBevelType(int)
,
Constant Field Valuespublic static final int LOWERED
getClockBorderBevelType()
,
setClockBorderBevelType(int)
,
getClockBevelType()
,
setClockBevelType(int)
,
Constant Field Valuespublic static final int FLAT
getClockBorderBevelType()
,
setClockBorderBevelType(int)
,
getClockBevelType()
,
setClockBevelType(int)
,
Constant Field Valuespublic static final int CHOOSER_DATE
getChooserType()
,
setChooserType(int)
,
Constant Field Valuespublic static final int CHOOSER_TIME
getChooserType()
,
setChooserType(int)
,
Constant Field Valuespublic static final int CHOOSER_DATETIME
getChooserType()
,
setChooserType(int)
,
Constant Field Valuespublic static final int FULL
getStylePattern()
,
setStylePattern(int)
,
Constant Field Valuespublic static final int LONG
getStylePattern()
,
setStylePattern(int)
,
Constant Field Valuespublic static final int MEDIUM
getStylePattern()
,
setStylePattern(int)
,
Constant Field Valuespublic static final int SHORT
getStylePattern()
,
setStylePattern(int)
,
Constant Field Valuespublic static final int DEFAULT
Constructor Detail |
---|
public JbcDateTimeChooser()
Creates a JbcDateTimeChooser
instance.
Method Detail |
---|
public void setAbout(java.lang.String text)
public java.lang.String getAbout()
public java.lang.String getStringDateTime()
public void validateDay(javax.swing.JComponent dayComponent, java.util.Calendar calendar)
dayComponent
- The component that will be displayed.calendar
- The calendar associated to the component.public void rollOverDay(javax.swing.JComponent dayComponent, java.util.Calendar calendar)
dayComponent
- The component that will be displayed.calendar
- The calendar associated to the component.public javax.swing.JComponent getUserDateComponent()
setUserDateComponent(javax.swing.JComponent)
public void setUserDateComponent(javax.swing.JComponent userDateComponent)
userDateComponent
- The userDateComponent will be added then displayed in the popup menu.getUserDateComponent()
public javax.swing.JComponent getUserTimeComponent()
setUserTimeComponent(javax.swing.JComponent)
public void setUserTimeComponent(javax.swing.JComponent userTimeComponent)
userTimeComponent
- The userTimeComponent will be added then displayed in the popup menu.getUserTimeComponent()
public java.lang.String getTitleTabDate()
setTitleTabDate(java.lang.String)
public void setTitleTabDate(java.lang.String title)
title
- The title to be displayed in the tabgetTitleTabDate()
public java.lang.String getTitleTabTime()
setTitleTabTime(java.lang.String)
public void setTitleTabTime(java.lang.String title)
title
- - the title to be displayed in the tabgetTitleTabTime()
public int getClockBorderBevelType()
setClockBorderBevelType(int)
public void setClockBorderBevelType(int v)
getClockBorderBevelType()
public int getClockBevelType()
setClockBevelType(int)
public void setClockBevelType(int v)
getClockBevelType()
public java.util.Calendar getCalendar()
setCalendar(java.util.Calendar)
,
setDate(java.util.Date)
,
setTime(long)
public void setCalendar(java.util.Calendar c)
getCalendar()
,
getDate()
,
getSqlDate()
,
getTime()
,
getHourOfDay()
,
getMinute()
,
getSecond()
public java.util.Date getDate()
setCalendar(java.util.Calendar)
,
setDate(java.util.Date)
,
setSqlDate(java.sql.Date)
,
setTime(long)
,
setHourOfDay(int)
,
setMinute(int)
,
setSecond(int)
public void setDate(java.util.Date d)
getCalendar()
,
getDate()
,
getSqlDate()
,
getTime()
,
getHourOfDay()
,
getMinute()
,
getSecond()
public java.sql.Date getSqlDate()
setCalendar(java.util.Calendar)
,
setDate(java.util.Date)
,
setSqlDate(java.sql.Date)
,
setTime(long)
,
setHourOfDay(int)
,
setMinute(int)
,
setSecond(int)
public void setSqlDate(java.sql.Date d)
getCalendar()
,
getDate()
,
getSqlDate()
,
getTime()
,
getHourOfDay()
,
getMinute()
,
getSecond()
public long getTime()
setCalendar(java.util.Calendar)
,
setDate(java.util.Date)
,
setTime(long)
,
setHourOfDay(int)
,
setMinute(int)
,
setSecond(int)
public void setTime(long l)
getCalendar()
,
getDate()
,
getTime()
,
getHourOfDay()
,
getMinute()
,
getSecond()
public void setHourOfDay(int h)
setCalendar(java.util.Calendar)
,
setDate(java.util.Date)
,
setTime(long)
,
setHourOfDay(int)
,
setMinute(int)
,
setSecond(int)
public int getHourOfDay()
getCalendar()
,
getDate()
,
getTime()
,
getHourOfDay()
,
getMinute()
,
getSecond()
public void setMinute(int m)
m
- setCalendar(java.util.Calendar)
,
setDate(java.util.Date)
,
setTime(long)
,
setHourOfDay(int)
,
setMinute(int)
,
setSecond(int)
public int getMinute()
getCalendar()
,
getDate()
,
getTime()
,
getHourOfDay()
,
getMinute()
,
getSecond()
public void setSecond(int s)
setCalendar(java.util.Calendar)
,
setDate(java.util.Date)
,
setTime(long)
,
setHourOfDay(int)
,
setMinute(int)
,
setSecond(int)
public int getSecond()
getCalendar()
,
getDate()
,
getTime()
,
getHourOfDay()
,
getMinute()
,
getSecond()
public int getStylePattern()
setStylePattern
method description.
setStylePattern(int)
public void setStylePattern(int v)
getStylePattern()
public int getChooserType()
setChooserType(int)
public void setChooserType(int v)
getChooserType()
public boolean isSecondEnabled()
setSecondEnabled(boolean)
public void setSecondEnabled(boolean b)
b
- true if the second hand should be painted, false otherwiseisSecondEnabled()
public java.util.Locale getLocale()
getLocale
in class java.awt.Component
setLocale(java.util.Locale)
public void setLocale(java.util.Locale l)
setLocale
in class java.awt.Component
l
- The locale to become this component's locale.getLocale()
public void showPopup()
setPopupVisible(boolean)
,
hidePopup()
public void hidePopup()
setPopupVisible(boolean)
,
showPopup()
public void setPopupVisible(boolean v)
showPopup()
,
hidePopup()
,
isPopupVisible()
public boolean isPopupVisible()
setPopupVisible(boolean)
public final void paintInterface(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void updateUI()
updateUI
in class javax.swing.JComponent
JComponent.updateUI()
public void setToolTipText(java.lang.String text)
setToolTipText
in class javax.swing.JComponent
text
- the string to display; if the text is null,
the tool tip is turned off for this componentpublic void setBackground(java.awt.Color color)
setBackground
in class javax.swing.JComponent
color
- The color to become this component's
background color.
If this parameter is null then this component will inherit
the default background.getBackground()
public void setForeground(java.awt.Color color)
setForeground
in class javax.swing.JComponent
color
- The color to become this component's
foreground color.
If this parameter is null then this component will inherit
the default foreground.getForeground()
public java.awt.Color getBackground()
getBackground
in class java.awt.Component
setBackground(java.awt.Color)
public java.awt.Color getForeground()
getForeground
in class java.awt.Component
setForeground(java.awt.Color)
public void setFont(java.awt.Font f)
setFont
in class javax.swing.JComponent
Component.getFont()
public void setEnabled(boolean b)
setEnabled
in class javax.swing.JComponent
Component.isEnabled()
public void setBounds(int x, int y, int width, int height)
x
and y
, and the
new size is specified by width
and height
.
setBounds
in class java.awt.Component
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.public void setBounds(java.awt.Rectangle r)
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
setBounds
in class java.awt.Component
r
- The new bounding rectangle for this component.public void setSize(int width, int height)
width
and height height
.
setSize
in class java.awt.Component
width
- The new width of this component in pixels.height
- The new height of this component in pixels.JComponent.getSize(java.awt.Dimension)
,
setBounds(int, int, int, int)
public void setSize(java.awt.Dimension d)
d.width
and height d.height
.
setSize
in class java.awt.Component
d
- The dimension specifying the new size of this component.setSize(int, int)
,
setBounds(int, int, int, int)
public void addChangeListener(javax.swing.event.ChangeListener l)
ChangeListener
to the list that is
notified each time the time chooser's value has changed.
l
- the ChangeListener
to addremoveChangeListener(javax.swing.event.ChangeListener)
public void removeChangeListener(javax.swing.event.ChangeListener l)
ChangeListener
from the list that's notified each
time the time chooser's value has changed.
l
- the ChangeListener
to removeaddChangeListener(javax.swing.event.ChangeListener)
public void setHorizontalAlignment(int alignment)
alignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
(the default),
RIGHT
,
LEADING
or
TRAILING
.SwingConstants
,
getHorizontalAlignment()
public int getHorizontalAlignment()
SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.setHorizontalAlignment(int)
,
SwingConstants
public void setPopupMenuAlignment(int alignment)
alignment
- One of the following constants
defined in SwingConstants
:
LEFT
(the default),
CENTER
,
RIGHT
.SwingConstants
,
getPopupMenuAlignment()
public int getPopupMenuAlignment()
SwingConstants
:
LEFT
,
CENTER
,
RIGHT
.setPopupMenuAlignment(int)
,
SwingConstants
public boolean isClockWithAmPm()
setClockWithAmPm(boolean)
public void setClockWithAmPm(boolean b)
b
- if true, enables AM/PM; otherwise, disables itisClockWithAmPm()
|
JBCSolutions - JbcBeans v1.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |