Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Midnight indicator (Read 3764 times)
florea
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Feb 13th, 2017
Midnight indicator
Mar 10th, 2017 at 2:04pm
Print Post  
Hello,
is it any simple configuration to show an midnight indicator (something similar with current time indicator)?

Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Midnight indicator
Reply #1 - Mar 10th, 2017 at 2:21pm
Print Post  
Hi,

There is no built-in property to display midnight, but you can custom draw it.

Regards,
Meppy
  
Back to top
 
IP Logged
 
florea
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Feb 13th, 2017
Re: Midnight indicator
Reply #2 - Mar 13th, 2017 at 9:36am
Print Post  
Thanks for the response.
But I didn't found any workaround to change the left part in a Timeable view (the part with Hours, Time intervals).
Can you give me an example of how can you do a Custom draw for that?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Midnight indicator
Reply #3 - Mar 13th, 2017 at 1:24pm
Print Post  
Use the following code as a guideline:

Code
Select All
calendar.setCustomDraw(CustomDrawElements.TimetableCell | CustomDrawElements.TimetableTimelineHourCell);
calendar.addCalendarListener(new CalendarAdapter() {
	@Override
	public void draw(DrawEvent e) {
		if (e.getElement() == CustomDrawElements.TimetableTimelineHourCell) {
			if (Objects.equals(e.getEndTime(), Duration.fromHours(24))) {
				e.getGraphics().fillRectangle(Brushes.Orange,
					e.getBounds().getLeft() + 1, e.getBounds().getBottom() - 2,
					e.getBounds().getWidth() - 2, 2);
			}
		}
	}
} 


Regards,
Meppy
  
Back to top
 
IP Logged
 
florea
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Feb 13th, 2017
Re: Midnight indicator
Reply #4 - Mar 14th, 2017 at 8:45am
Print Post  
Great. Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint