Package com.ibm.icu.dev.demo.holiday
Class HolidayCalendarDemo.CalendarPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Canvas
-
- com.ibm.icu.dev.demo.holiday.HolidayCalendarDemo.CalendarPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
- Enclosing class:
- HolidayCalendarDemo
private static class HolidayCalendarDemo.CalendarPanel extends java.awt.Canvas
-
-
Field Summary
Fields Modifier and Type Field Description private int
daysInMonth
private int
daysInWeek
private boolean
dirty
private Holiday[]
fAllHolidays
private Calendar
fCalendar
private java.util.Locale
fCalendarLocale
private java.util.Locale
fDisplayLocale
private java.util.Vector
fHolidays
private int
firstDayInMonth
private int
firstDayOfWeek
private java.util.Date
fStartOfMonth
private java.text.DateFormatSymbols
fSymbols
(package private) static int
INSET
private int
minDay
private int
numWeeks
private static long
serialVersionUID
For serialization
-
Constructor Summary
Constructors Constructor Description CalendarPanel(java.util.Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int field, int delta)
private void
calculate()
private java.awt.Point
dateToCell(int date)
private void
dateToCell(int date, java.awt.Point pos)
java.util.Date
firstOfMonth()
Calendar
getCalendar()
java.util.Locale
getCalendarLocale()
java.util.Locale
getDisplayLocale()
void
paint(java.awt.Graphics g)
void
set(java.util.Date date)
void
set(java.util.Locale loc, java.util.Locale display, java.util.Date date)
void
setCalendarLocale(java.util.Locale locale)
void
setDisplayLocale(java.util.Locale locale)
private java.util.Date
startOfMonth(java.util.Date dateInMonth)
-
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization- See Also:
- Constant Field Values
-
INSET
static final int INSET
- See Also:
- Constant Field Values
-
fCalendarLocale
private java.util.Locale fCalendarLocale
-
fCalendar
private Calendar fCalendar
-
fDisplayLocale
private java.util.Locale fDisplayLocale
-
fSymbols
private java.text.DateFormatSymbols fSymbols
-
fStartOfMonth
private java.util.Date fStartOfMonth
-
minDay
private transient int minDay
-
daysInWeek
private transient int daysInWeek
-
firstDayOfWeek
private transient int firstDayOfWeek
-
numWeeks
private transient int numWeeks
-
daysInMonth
private transient int daysInMonth
-
firstDayInMonth
private transient int firstDayInMonth
-
fAllHolidays
private transient Holiday[] fAllHolidays
-
fHolidays
private transient java.util.Vector fHolidays
-
dirty
private transient boolean dirty
-
-
Method Detail
-
setCalendarLocale
public void setCalendarLocale(java.util.Locale locale)
-
setDisplayLocale
public void setDisplayLocale(java.util.Locale locale)
-
set
public void set(java.util.Date date)
-
set
public void set(java.util.Locale loc, java.util.Locale display, java.util.Date date)
-
add
public void add(int field, int delta)
-
getCalendar
public Calendar getCalendar()
-
getCalendarLocale
public java.util.Locale getCalendarLocale()
-
getDisplayLocale
public java.util.Locale getDisplayLocale()
-
firstOfMonth
public java.util.Date firstOfMonth()
-
startOfMonth
private java.util.Date startOfMonth(java.util.Date dateInMonth)
-
calculate
private void calculate()
-
dateToCell
private void dateToCell(int date, java.awt.Point pos)
-
dateToCell
private java.awt.Point dateToCell(int date)
-
paint
public void paint(java.awt.Graphics g)
- Overrides:
paint
in classjava.awt.Canvas
-
-