|
MDateSelector | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
mseries.plaf.basic.BasicCalendarPanelUI
public class BasicCalendarPanelUI
The BASIC look and feel UIDelegate for the CalendarPanel. It is envisaged that this is subclasses to provide something more acceptable. A Windows and Metal one are provided. A Look and Feel delegate for the CalenderPanel. This version renders the selected date with a raised border and dashed focus indicator. TAB moves around the calendar, Shift-Tab jumps out to the next component. The arrow keys move around the panel stopping (i.e. not rolling over) at the ends.
| Nested Class Summary | |
|---|---|
protected class |
BasicCalendarPanelUI.ArrowKeyAction
Inner class to handle presses of the arrow keys |
| Field Summary | |
|---|---|
protected Color |
background
|
protected CalendarPanel |
calendarPanel
|
protected int |
cellHeight
|
protected int |
cellWidth
|
protected int |
DAYS
|
protected FocusListener |
focusHandler
|
protected Font |
font
|
protected Color |
foreground
|
protected KeyListener |
keyHandler
|
protected MouseListener |
mouseHandler
|
protected Color |
selectedBackground
|
protected Color |
selectedForeground
|
protected int |
WEEKS
|
| Constructor Summary | |
|---|---|
BasicCalendarPanelUI()
|
|
| Method Summary | |
|---|---|
protected FocusListener |
createFocusHandler()
|
protected KeyListener |
createKeyHandler()
KeyHandler factory method, this implementation handles the push of the TAB and SHIFT-TAB key |
protected MouseListener |
createMouseHandler()
Creates the mouse listener for the panel. |
static ComponentUI |
createUI(JComponent x)
This method is called by the UIManager to get an instance of this class and must be overridden in subclasses. |
protected void |
drawFocusedEffect(Graphics g,
boolean focused,
boolean selected)
Draws the dashed rectangle around the number in the cell which is selected when the calendar panel has focus. |
void |
drawLegend(Graphics g,
String legend)
This is where the legend, the day is drawn |
protected void |
drawSelectedEffect(Graphics g,
boolean selected)
|
protected Dimension |
getCellSize()
|
protected void |
installDefaults()
|
protected void |
installListeners()
|
void |
installUI(JComponent c)
|
boolean |
isOpaque()
|
protected void |
moveToNextCell(int inc,
boolean roll)
Calculates the next cell that contains a valid date and therefore can be selected |
void |
paint(Graphics g,
JComponent c)
|
protected void |
uninstallDefaults()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(JComponent c)
|
void |
update(Graphics g,
JComponent c)
|
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Color background
protected Color foreground
protected Color selectedBackground
protected Color selectedForeground
protected CalendarPanel calendarPanel
protected KeyListener keyHandler
protected MouseListener mouseHandler
protected FocusListener focusHandler
protected int cellWidth
protected int cellHeight
protected int DAYS
protected int WEEKS
protected Font font
| Constructor Detail |
|---|
public BasicCalendarPanelUI()
| Method Detail |
|---|
public static ComponentUI createUI(JComponent x)
public void installUI(JComponent c)
installUI in class ComponentUIpublic void uninstallUI(JComponent c)
uninstallUI in class ComponentUIprotected void installDefaults()
protected void uninstallDefaults()
protected void installListeners()
protected void uninstallListeners()
public void update(Graphics g,
JComponent c)
update in class ComponentUI
public void paint(Graphics g,
JComponent c)
paint in class ComponentUI
protected void drawSelectedEffect(Graphics g,
boolean selected)
public void drawLegend(Graphics g,
String legend)
protected void drawFocusedEffect(Graphics g,
boolean focused,
boolean selected)
protected MouseListener createMouseHandler()
protected KeyListener createKeyHandler()
protected FocusListener createFocusHandler()
protected Dimension getCellSize()
protected void moveToNextCell(int inc,
boolean roll)
inc - minus -1 moves back one day, +1 forward wrapping around at
both the start and end of the monthroll - true if the selection rols to the next row at the endpublic boolean isOpaque()
|
MDateSelector | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||