org.jdesktop.swingx.plaf.basic
Class DemoCalendarRenderingHandler
- java.lang.Object
-
- org.jdesktop.swingx.plaf.basic.DemoCalendarRenderingHandler
-
- All Implemented Interfaces:
- CalendarRenderingHandler
public class DemoCalendarRenderingHandler extends java.lang.ObjectAn example of a custom CalendarRenderingHandler. As of laziness (mine :-) this extends the BasicXX to widen access and provide hooks to add Highlighters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classDemoCalendarRenderingHandler.DemoCalendarAdapterCalendarAdapter, subclassed for public access and fix of selected day state.
-
Constructor Summary
Constructors Constructor and Description DemoCalendarRenderingHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddHighlighters(Highlighter... highlighters)Appends theHighlighters to the end of the list of usedHighlighters.javax.swing.JComponentprepareRenderingComponent(JXMonthView monthView, java.util.Calendar calendar, CalendarState dayState)Overridden to apply the additional highlighters, if any.voidsetHighlighters(Highlighter... highlighters)Sets theHighlighters to the table, replacing any old settings.voidsetLocale(java.util.Locale locale)Updates internal state to the given Locale.
-
-
-
Method Detail
-
setHighlighters
public void setHighlighters(Highlighter... highlighters)
Sets theHighlighters to the table, replacing any old settings. None of the given Highlighters must be null.- Parameters:
highlighters- zero or more not null highlighters to use for renderer decoration.- Throws:
java.lang.NullPointerException- if array is null or array contains null values.
-
addHighlighters
public void addHighlighters(Highlighter... highlighters)
Appends theHighlighters to the end of the list of usedHighlighters. None of the given Highlighters must be null.- Parameters:
highlighters- zero or more not null highlighters to use for renderer decoration.- Throws:
java.lang.NullPointerException- if array is null or array contains null values.
-
prepareRenderingComponent
public javax.swing.JComponent prepareRenderingComponent(JXMonthView monthView, java.util.Calendar calendar, CalendarState dayState)
Overridden to apply the additional highlighters, if any.- Specified by:
prepareRenderingComponentin interfaceCalendarRenderingHandler- Parameters:
monthView- the JXMonthView to render ontocalendar- the cell valuedayState- the DayState of the cell- Returns:
- a component configured for rendering the given cell
-
setLocale
public void setLocale(java.util.Locale locale)
Updates internal state to the given Locale.- Specified by:
setLocalein interfaceCalendarRenderingHandler- Parameters:
locale- the new Locale.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG