MDateSelector

mseries.plaf.Metal
Class MetalCalendarPanelUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by mseries.plaf.basic.BasicCalendarPanelUI
          extended by mseries.plaf.Metal.MetalCalendarPanelUI

public class MetalCalendarPanelUI
extends BasicCalendarPanelUI

The Metal Look and Feel UIDelagate for CalendarPanel 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
 
Nested classes/interfaces inherited from class mseries.plaf.basic.BasicCalendarPanelUI
BasicCalendarPanelUI.ArrowKeyAction
 
Field Summary
 
Fields inherited from class mseries.plaf.basic.BasicCalendarPanelUI
background, calendarPanel, cellHeight, cellWidth, DAYS, focusHandler, font, foreground, keyHandler, mouseHandler, selectedBackground, selectedForeground, WEEKS
 
Constructor Summary
MetalCalendarPanelUI()
           
 
Method Summary
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.
 void drawFocus(Graphics g, int x, int y, int width, int height)
           
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.
protected  void drawSelectedEffect(Graphics g, boolean selected)
           
 
Methods inherited from class mseries.plaf.basic.BasicCalendarPanelUI
createFocusHandler, createKeyHandler, createMouseHandler, drawLegend, getCellSize, installDefaults, installListeners, installUI, isOpaque, moveToNextCell, paint, uninstallDefaults, uninstallListeners, uninstallUI, update
 
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
 

Constructor Detail

MetalCalendarPanelUI

public MetalCalendarPanelUI()
Method Detail

createUI

public 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.


drawSelectedEffect

protected void drawSelectedEffect(Graphics g,
                                  boolean selected)
Overrides:
drawSelectedEffect in class BasicCalendarPanelUI

drawFocusedEffect

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. Over ride this method in a subclass to change the appearance.

Overrides:
drawFocusedEffect in class BasicCalendarPanelUI

drawFocus

public void drawFocus(Graphics g,
                      int x,
                      int y,
                      int width,
                      int height)

MDateSelector

Copyright © 2001-2007 M Newstead. All Rights Reserved.