Search in sources :

Example 1 with TimeSectionComparator

use of eu.hansolo.tilesfx.tools.TimeSectionComparator in project tilesfx by HanSolo.

the class Tile method setTimeSections.

/**
 * Sets the sections to the given list of TimeSection objects. The
 * sections will be used to colorize areas with a special
 * meaning. Sections in the Medusa library usually are less eye-catching
 * than Areas.
 * @param SECTIONS
 */
public void setTimeSections(final List<TimeSection> SECTIONS) {
    getTimeSections().setAll(SECTIONS);
    getTimeSections().sort(new TimeSectionComparator());
    fireTileEvent(SECTION_EVENT);
}
Also used : TimeSectionComparator(eu.hansolo.tilesfx.tools.TimeSectionComparator)

Example 2 with TimeSectionComparator

use of eu.hansolo.tilesfx.tools.TimeSectionComparator in project tilesfx by HanSolo.

the class Tile method removeTimeSection.

/**
 * Removes the given TimeSection from the list of sections.
 * Sections in the Medusa library usually are less eye-catching
 * than Areas.
 * @param SECTION
 */
public void removeTimeSection(final TimeSection SECTION) {
    if (null == SECTION)
        return;
    getTimeSections().remove(SECTION);
    getTimeSections().sort(new TimeSectionComparator());
    fireTileEvent(SECTION_EVENT);
}
Also used : TimeSectionComparator(eu.hansolo.tilesfx.tools.TimeSectionComparator)

Example 3 with TimeSectionComparator

use of eu.hansolo.tilesfx.tools.TimeSectionComparator in project tilesfx by HanSolo.

the class Tile method addTimeSection.

/**
 * Adds the given TimeSection to the list of sections.
 * Sections in the Medusa library usually are less eye-catching
 * than Areas.
 * @param SECTION
 */
public void addTimeSection(final TimeSection SECTION) {
    if (null == SECTION)
        return;
    getTimeSections().add(SECTION);
    getTimeSections().sort(new TimeSectionComparator());
    fireTileEvent(SECTION_EVENT);
}
Also used : TimeSectionComparator(eu.hansolo.tilesfx.tools.TimeSectionComparator)

Aggregations

TimeSectionComparator (eu.hansolo.tilesfx.tools.TimeSectionComparator)3