|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
org.jdesktop.swingx.plaf.MonthViewUI
org.jdesktop.swingx.plaf.basic.BasicMonthViewUI
public class BasicMonthViewUI
Base implementation of the JXMonthView
UI.
Note: The api changed considerably between releases 0.9.4 and 0.9.5.
The general drift of the change was to delegate all text rendering to a dedicated rendering controller (currently named RenderingHandler), similar to the collection view rendering. The UI itself keeps layout and positioning of the rendering components. Plus updating on property changes received from the monthView.
Painting: coordinate systems.
Added support (doesn't do anything yet, zoom-logic must yet be defined) by way of an active calendar header which is added to the monthView if zoomable. It is disabled by default. In this mode, the view is always traversable and shows exactly one calendar. It is orthogonal to the classic mode, that is client code should not be effected in any way as long as the mode is not explicitly enabled.
NOTE to LAF implementors: the active calendar header is very, very, very raw and sure to change without much notice. Better not yet to support it right now.
Field Summary | |
---|---|
static int |
MONTH_DOWN
Return value used to identify when the month down button is pressed. |
static int |
MONTH_UP
Return value used to identify when the month up button is pressed. |
Constructor Summary | |
---|---|
BasicMonthViewUI()
|
Method Summary | |
---|---|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
|
java.util.Date |
getDayAtLocation(int x,
int y)
Returns the Date at the given location. |
java.lang.String[] |
getDaysOfTheWeek()
Returns an array of String to use as names for the days of the week. |
java.util.Date |
getLastDisplayedDay()
Returns the last possible date that can be displayed. |
void |
installUI(javax.swing.JComponent c)
Installs the component as appropriate for the current lf. |
boolean |
isUsingKeyboard()
|
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
|
void |
setUsingKeyboard(boolean val)
|
void |
uninstallUI(javax.swing.JComponent c)
|
void |
update(java.awt.Graphics g,
javax.swing.JComponent c)
Overridden to extract the background painting for ease-of-use of subclasses. |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MONTH_DOWN
public static final int MONTH_UP
Constructor Detail |
---|
public BasicMonthViewUI()
Method Detail |
---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.ComponentUI
public void uninstallUI(javax.swing.JComponent c)
uninstallUI
in class javax.swing.plaf.ComponentUI
public java.lang.String[] getDaysOfTheWeek()
MonthViewUI
getDaysOfTheWeek
in class MonthViewUI
public boolean isUsingKeyboard()
public void setUsingKeyboard(boolean val)
public java.util.Date getDayAtLocation(int x, int y)
getDayAtLocation
in class MonthViewUI
x
- the x position of the location in pixely
- the y position of the location in pixel
getDayBounds(Date)
public void update(java.awt.Graphics g, javax.swing.JComponent c)
update
in class javax.swing.plaf.ComponentUI
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.ComponentUI
public java.util.Date getLastDisplayedDay()
It's up to the UI to keep this property, based on internal state and the firstDisplayed as controlled by the JXMonthView.
getLastDisplayedDay
in class MonthViewUI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |