
xdev.ui.ganttchart.model.GanttEntryMapper Maven / Gradle / Ivy
package xdev.ui.ganttchart.model;
/*-
* #%L
* XDEV BI Suite
* %%
* Copyright (C) 2011 - 2021 XDEV Software
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
import xdev.ui.ganttchart.DateRangeProvider;
import xdev.ui.ganttchart.IntegerRangeProvider;
import xdev.ui.ganttchart.RangeProvider;
import xdev.vt.VirtualTable;
import xdev.vt.VirtualTable.VirtualTableRow;
import com.jidesoft.gantt.GanttEntry;
import com.jidesoft.gantt.GanttModel;
/**
* Maps a {@link VirtualTableRow} to a {@link GanttEntry}.
*
* Used to create a {@link GanttModel} from an existing {@link VirtualTable}.
*
*
*
* @param
* the mapping source type for example {@link VirtualTableRow}
* @param
* the {@link GanttEntry} type, also can be a customized
* implementation.
*
* @param
* the gantt charts data type, for example Date
or
* Integer
.
*
* @author XDEV Software jwill
* @since 4.0
*/
public interface GanttEntryMapper
{
/**
* Maps a target object of type {@code T} to an {@link GanttEntry}.
*
* @param input
* the object to create an {@link GanttEntry} from.
* @return an {@link Activity}
*/
public S dataToGanttEntry(T input);
/**
* Retruns a concrete {@link RangeProvider} related to the GanttChart data
* type.
*
* @return the concrete RangeProvider
.
*
* @see DateRangeProvider
* @see IntegerRangeProvider
*/
public RangeProvider getRangeProvider();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy