Java Date Picker v2.0.0

com.standbysoft.datepicker
Class JMonth

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.standbysoft.datepicker.JMonth
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class JMonth
extends javax.swing.JComponent

Author:
Nicolae Cismaru
See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
JMonth()
          Creates a component that displays the days of a month.
JMonth(MonthModel model)
           
JMonth(MonthModel model, DateSelectionModel dateSelectionModel)
           
 
Method Summary
 void addDateSelectionListener(DateSelectionListener listener)
           
 void addMonthModelListener(MonthModelListener listener)
           
 DateSelectionModel getDateSelectionModel()
           
 int getDowFirst()
          Returns the first day of week.
 int getDowNamesFormat()
          Returns what format the names of days of week have.
 java.util.Locale getLocale()
           
 int getMonth()
          Returns the month displayed by this component.
 java.awt.Color getMonthBackground()
           
 MonthModel getMonthModel()
           
 int getMonthNamesFormat()
          Returns what format the names of months have.
 java.awt.Color getTitleBackground()
           
 java.awt.Color getTitleForeground()
           
 java.awt.Color getTrailingForeground()
           
 MonthUI getUI()
          Returns the L&F object that renders this component.
 java.lang.String getUIClassID()
          Returns the name of the L&F class that renders this component.
 int getYear()
          Returns the year that is displayed by this component.
 boolean isFocusTraversable()
           
 boolean isWeekNumbersVisible()
          Determines whether the week numbers are visible or not.
 void removeDateSelectionListener(DateSelectionListener listener)
           
 void removeMonthModelListener(MonthModelListener listener)
           
 void rollMonth(boolean up)
           
 void rollYear(boolean up)
           
 void selectDate(java.util.Date first, java.util.Date last)
           
 void selectToday()
           
 void setDateSelectionModel(DateSelectionModel dateSelectionModel)
           
 void setLocale(java.util.Locale locale)
          Specifies a new locale to be used by this component.
 void setMonth(int month)
          Specifies the month that is displayed by this component.
 void setMonthBackground(java.awt.Color monthBackgroundColor)
           
 void setMonthModel(MonthModel model)
           
 void setTitleBackground(java.awt.Color titleBackgroundColor)
           
 void setTitleForeground(java.awt.Color titleForegroundColor)
           
 void setTrailingForeground(java.awt.Color trailingForegroundColor)
           
 void setUI(MonthUI ui)
          Sets the L&F object that renders this component.
 void setWeekNumbersVisible(boolean visible)
          Specifies whether the week numbers are visible or not.
 void setYear(int year)
          Specifies the year that is displayed by this component.
 void updateUI()
          Resets the UI property to a value from the current look and feel.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, 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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMonth

public JMonth(MonthModel model,
              DateSelectionModel dateSelectionModel)

JMonth

public JMonth(MonthModel model)

JMonth

public JMonth()
Creates a component that displays the days of a month.
Method Detail

isFocusTraversable

public boolean isFocusTraversable()
Overrides:
isFocusTraversable in class javax.swing.JComponent

selectToday

public void selectToday()

selectDate

public void selectDate(java.util.Date first,
                       java.util.Date last)

addDateSelectionListener

public void addDateSelectionListener(DateSelectionListener listener)

removeDateSelectionListener

public void removeDateSelectionListener(DateSelectionListener listener)

getDateSelectionModel

public DateSelectionModel getDateSelectionModel()

setDateSelectionModel

public void setDateSelectionModel(DateSelectionModel dateSelectionModel)

addMonthModelListener

public void addMonthModelListener(MonthModelListener listener)

removeMonthModelListener

public void removeMonthModelListener(MonthModelListener listener)

getMonthModel

public MonthModel getMonthModel()

setMonthModel

public void setMonthModel(MonthModel model)

setUI

public void setUI(MonthUI ui)
Sets the L&F object that renders this component.
Parameters:
ui - the MonthUI L&F object

updateUI

public void updateUI()
Resets the UI property to a value from the current look and feel.
Overrides:
updateUI in class javax.swing.JComponent
See Also:
JComponent.updateUI()

getUIClassID

public java.lang.String getUIClassID()
Returns the name of the L&F class that renders this component.
Overrides:
getUIClassID in class javax.swing.JComponent
Returns:
the string "MonthUI"
See Also:
JComponent.getUIClassID()

getUI

public MonthUI getUI()
Returns the L&F object that renders this component.
Returns:
the MonthUI object that renders this component

setMonth

public void setMonth(int month)
Specifies the month that is displayed by this component. The values are those specified by java.util.Calendar.
Parameters:
month -  

rollMonth

public void rollMonth(boolean up)

getMonth

public int getMonth()
Returns the month displayed by this component.
Returns:
the month displayed by this component.
See Also:
getYear()

setYear

public void setYear(int year)
Specifies the year that is displayed by this component.
Parameters:
year - year that is displayed by this component.

rollYear

public void rollYear(boolean up)

getYear

public int getYear()
Returns the year that is displayed by this component.
Returns:
year that is displayed by this component.
See Also:
getMonth()

getDowNamesFormat

public int getDowNamesFormat()
Returns what format the names of days of week have.
Returns:
the format that the names of days of week have

getMonthNamesFormat

public int getMonthNamesFormat()
Returns what format the names of months have.
Returns:
the format that the names of months have

getDowFirst

public int getDowFirst()
Returns the first day of week.
Returns:
the first day of week.

setLocale

public void setLocale(java.util.Locale locale)
Specifies a new locale to be used by this component. The locale is very important because it is used to get the right names for the week days and to the first day of week.
Overrides:
setLocale in class java.awt.Component
Parameters:
locale - locale to be used by this component

getLocale

public java.util.Locale getLocale()
Overrides:
getLocale in class java.awt.Component

isWeekNumbersVisible

public boolean isWeekNumbersVisible()
Determines whether the week numbers are visible or not.
Returns:
true if the week numbers are visible or false otherwise.

setWeekNumbersVisible

public void setWeekNumbersVisible(boolean visible)
Specifies whether the week numbers are visible or not.
Parameters:
visible - visibility of the week numbers

getTitleBackground

public java.awt.Color getTitleBackground()

setTitleBackground

public void setTitleBackground(java.awt.Color titleBackgroundColor)

getTitleForeground

public java.awt.Color getTitleForeground()

setTitleForeground

public void setTitleForeground(java.awt.Color titleForegroundColor)

getTrailingForeground

public java.awt.Color getTrailingForeground()

setTrailingForeground

public void setTrailingForeground(java.awt.Color trailingForegroundColor)

getMonthBackground

public java.awt.Color getMonthBackground()

setMonthBackground

public void setMonthBackground(java.awt.Color monthBackgroundColor)

Java Date Picker v2.0.0

Copyright © 2003 Standby Soft Ltd. All Rights Reserved.