jfxtras.labs.scene.control.scheduler.skin.SchedulerMonthSkin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jfxtras-labs Show documentation
Show all versions of jfxtras-labs Show documentation
Experimental components for JavaFX 2
The newest version!
package jfxtras.labs.scene.control.scheduler.skin;
import jfxtras.labs.scene.control.scheduler.Scheduler;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
/**
* @author Tom Eugelink
* @author Islam Khachmakhov
*/
public class SchedulerMonthSkin extends SchedulerSkinAbstract {
/**
*
*/
public SchedulerMonthSkin(Scheduler control) {
super(control);
}
/**
* Assign a calendar to each day, so it knows what it must draw.
*/
protected List determineDisplayedLocalDates()
{
// the result
List lLocalDates = new ArrayList<>();
// From 1st day of this month to the end
LocalDate lStartLocalDate = LocalDate.now().withDayOfMonth(1);
for (int i = 0; i < LocalDate.now().lengthOfMonth(); i++) {
lLocalDates.add(lStartLocalDate.plusDays(i));
}
// done
return lLocalDates;
}
}