cc.gammasoft.date
Class MonthView

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--cc.gammasoft.date.MonthView
All Implemented Interfaces:
javax.swing.event.ChangeListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class MonthView
extends javax.swing.JComponent
implements javax.swing.event.ChangeListener

MonthView

Author:
levent Tinaz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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
MonthView()
          creates a new Datepicker.
MonthView(java.util.Calendar calendar)
          creates a new Datepicker.
MonthView(java.text.SimpleDateFormat dateFormat)
          creates a new Datepicker.
MonthView(java.text.SimpleDateFormat dateFormat, java.util.Calendar calendar)
          creates a new Datepicker.
 
Method Summary
 void enableReselection(boolean value)
          Enables or disables selected calendar values should be re-selected depending on the value of parameter.
 void enableSelectionTracking(boolean value)
          Enables or disables selected calendar values should be tracked depending on the value of parameter.
 java.text.SimpleDateFormat getDateFormat()
          gets the date format which is being used by the view.
 cc.gammasoft.date.DateModel getDateModel()
          gets the DateModel
 cc.gammasoft.date.DatePanel getDatePanel()
          returns MonthView's DatePanel Component
 javax.swing.JLabel getMonthEditor()
          gets the month editor
 javax.swing.JSpinner getMonthSpinner()
          gets the month spinner
 cc.gammasoft.date.MonthYearPanel getMonthYearPanel()
          returns MonthView's MonthYearPanel Component
 java.lang.String getSQLDateValue()
          process a getSQLDateValue()
 javax.swing.JComponent getStatusPanel()
          returns MonthView's StatusPanel Component
 java.lang.String getTimestampValue()
          process a getTimeStampValue()
 java.util.Calendar getValue()
          gets model's current value
 java.util.ArrayList getWeekDayLabels()
          gets Week day name labels(WeekDayLabel) This way, this class users can change the properties of labels.
 cc.gammasoft.date.WeekDayPanel getWeekDayPanel()
          returns MonthView's WeekDayPanel Component
 javax.swing.JLabel getYearEditor()
          gets the year editor
 javax.swing.JSpinner getYearSpinner()
          gets the year spinner
 boolean isReSelectionEnabled()
          Determines whether selected calendar values should be re-selected.
 boolean isSelectionTrackingEnabled()
          Determines whether calendar values should be tracked.
 void setDateFormat(java.text.SimpleDateFormat dateFormat)
          sets the pickers date format
 void setDateModel(cc.gammasoft.date.DateModel dateModel)
          sets DateModel
 void setFont(java.awt.Font monthViewFont)
          sets monthview fonts.
 void setForeground(java.awt.Color foreground)
          sets MonthView foreground color
 void setMonthNames(java.text.SimpleDateFormat dateFormat, int type)
          This method sets the month names.
 void setSQLDate(java.lang.String SQLDate)
          process a setValue(String SQLDate)
 void setStatusPanel(javax.swing.JComponent component)
          sets StatusPanel.
 void setTimestamp(java.lang.String timeStamp)
          process a setValue(String SQLDateTime)
 void setValue(java.util.Calendar calendar)
          sets current value
 void setWeekDayNames(java.text.SimpleDateFormat dateFormat, int weekDayType)
          This method sets weekday names.
 void stateChanged(javax.swing.event.ChangeEvent e)
          state change event
 
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, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonthView

public MonthView()
creates a new Datepicker. sets the model's calendar with todays date,and uses the local format.


MonthView

public MonthView(java.text.SimpleDateFormat dateFormat)
creates a new Datepicker. sets the model's calendar with todays date


MonthView

public MonthView(java.util.Calendar calendar)
creates a new Datepicker. uses the local format.


MonthView

public MonthView(java.text.SimpleDateFormat dateFormat,
                 java.util.Calendar calendar)
creates a new Datepicker.

Method Detail

setDateFormat

public void setDateFormat(java.text.SimpleDateFormat dateFormat)
sets the pickers date format


getDateFormat

public java.text.SimpleDateFormat getDateFormat()
gets the date format which is being used by the view.

Returns:
SimpleDateFormat

setDateModel

public void setDateModel(cc.gammasoft.date.DateModel dateModel)
sets DateModel


getDateModel

public cc.gammasoft.date.DateModel getDateModel()
gets the DateModel

Returns:
DateModel

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
state change event

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

getValue

public java.util.Calendar getValue()
gets model's current value

Returns:
Calendar calendar.

setValue

public void setValue(java.util.Calendar calendar)
sets current value


setSQLDate

public void setSQLDate(java.lang.String SQLDate)
process a setValue(String SQLDate)


setTimestamp

public void setTimestamp(java.lang.String timeStamp)
process a setValue(String SQLDateTime)


getSQLDateValue

public java.lang.String getSQLDateValue()
process a getSQLDateValue()


getTimestampValue

public java.lang.String getTimestampValue()
process a getTimeStampValue()


getWeekDayLabels

public java.util.ArrayList getWeekDayLabels()
gets Week day name labels(WeekDayLabel) This way, this class users can change the properties of labels.

Returns:
ArrayList

enableSelectionTracking

public void enableSelectionTracking(boolean value)
Enables or disables selected calendar values should be tracked depending on the value of parameter.


isSelectionTrackingEnabled

public boolean isSelectionTrackingEnabled()
Determines whether calendar values should be tracked.

Returns:
boolean. If the return value is true, this feature has been enabled.

enableReselection

public void enableReselection(boolean value)
Enables or disables selected calendar values should be re-selected depending on the value of parameter.


isReSelectionEnabled

public boolean isReSelectionEnabled()
Determines whether selected calendar values should be re-selected.

Returns:
boolean. If the return value is true, this feature has been enabled.

setMonthNames

public void setMonthNames(java.text.SimpleDateFormat dateFormat,
                          int type)
This method sets the month names. It takes two parameters SimpleDateFormat and type. if type is SHORT_MONTH_NAME lists shortnames otherwise long names.


setWeekDayNames

public void setWeekDayNames(java.text.SimpleDateFormat dateFormat,
                            int weekDayType)
This method sets weekday names. If the type is SHORT_WEEKDAY_NAME then it displays shortnames otherwise long names.


getYearSpinner

public javax.swing.JSpinner getYearSpinner()
gets the year spinner

Returns:
JSpinner

getMonthSpinner

public javax.swing.JSpinner getMonthSpinner()
gets the month spinner

Returns:
JSpinner

getYearEditor

public javax.swing.JLabel getYearEditor()
gets the year editor

Returns:
JLabel

getMonthEditor

public javax.swing.JLabel getMonthEditor()
gets the month editor

Returns:
JLabel

setFont

public void setFont(java.awt.Font monthViewFont)
sets monthview fonts.

Overrides:
setFont in class javax.swing.JComponent

setForeground

public void setForeground(java.awt.Color foreground)
sets MonthView foreground color

Overrides:
setForeground in class javax.swing.JComponent

getDatePanel

public cc.gammasoft.date.DatePanel getDatePanel()
returns MonthView's DatePanel Component

Returns:
DatePanel

getWeekDayPanel

public cc.gammasoft.date.WeekDayPanel getWeekDayPanel()
returns MonthView's WeekDayPanel Component

Returns:
WeekDayPanel

getMonthYearPanel

public cc.gammasoft.date.MonthYearPanel getMonthYearPanel()
returns MonthView's MonthYearPanel Component

Returns:
MonthYearPanel

getStatusPanel

public javax.swing.JComponent getStatusPanel()
returns MonthView's StatusPanel Component

Returns:
JComponent

setStatusPanel

public void setStatusPanel(javax.swing.JComponent component)
sets StatusPanel.



Gammasoft Inc All Rights Reserved.