Skip to main content

JXMonthView/JXDatepicker day renderer changes coming up.

No replies
dmouse
Offline
Joined: 2003-06-09

Changes to the way a day is rendered are coming down the pipe.
Two new methods for rendering:
+paintDayForeground(Graphics g, int x, int y, int width, int height, long day)
+paintDayBackground(Graphics g, int x, int y, int width, int height, long day)
will be added and will control painting for any type of day.

Support methods:
+isFlaggedDate(long date)
+isSelectedDate(long date)
+isToday(long date)
+int getCurrentDayOfWeek(long date) // returns the currently painted day's day of week (mon, tues, ...)
can be used to determine the attributes set on a particular date.

The intent is to allow subclasses to provide their own rendering for any day. If there is a fundamental issue in the rendering API provided please follow up with comments to this message. Please remember this API is meant to be flexible as other developers will be using it. So if it does not do what you want in 3 lines of code I'm terribly sorry :)

I forgot to mention that these changes then deprecate the already existing methods:
- paintTodayBackground
- paintSelectedDayBackground

Message was edited by: dmouse