2009-10-01 18:46:46 +02:00
|
|
|
/*
|
2010-02-04 06:57:00 +01:00
|
|
|
* This file is part of NavalPlan
|
2009-10-01 18:46:46 +02:00
|
|
|
*
|
2010-07-19 09:36:44 +02:00
|
|
|
* Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
|
2010-07-19 09:47:20 +02:00
|
|
|
* Desenvolvemento Tecnolóxico de Galicia
|
2011-01-19 18:00:09 +01:00
|
|
|
* Copyright (C) 2010-2011 Igalia, S.L.
|
2009-10-01 18:46:46 +02:00
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2009-04-14 17:51:03 +02:00
|
|
|
package org.zkoss.ganttz;
|
|
|
|
|
|
2011-01-19 10:04:58 +01:00
|
|
|
import org.apache.commons.lang.math.Fraction;
|
2010-10-01 12:46:31 +02:00
|
|
|
import org.joda.time.LocalDate;
|
|
|
|
|
import org.joda.time.ReadableDuration;
|
2011-01-19 10:04:58 +01:00
|
|
|
import org.zkoss.ganttz.util.Interval;
|
2009-04-14 17:51:03 +02:00
|
|
|
|
2009-08-03 13:13:14 +02:00
|
|
|
public interface IDatesMapper {
|
2009-04-14 17:51:03 +02:00
|
|
|
|
2010-05-13 12:57:08 +02:00
|
|
|
final long MILISECONDS_PER_HOUR = 3600000;
|
|
|
|
|
|
2010-10-01 12:46:31 +02:00
|
|
|
int toPixels(LocalDate date);
|
2009-04-14 17:51:03 +02:00
|
|
|
|
2010-10-01 12:46:31 +02:00
|
|
|
LocalDate toDate(int pixel);
|
2009-04-14 17:51:03 +02:00
|
|
|
|
2010-10-01 12:46:31 +02:00
|
|
|
int toPixels(ReadableDuration duration);
|
2009-04-14 17:51:03 +02:00
|
|
|
|
2010-10-01 12:46:31 +02:00
|
|
|
ReadableDuration toDuration(int pixels);
|
2009-04-14 17:51:03 +02:00
|
|
|
|
2010-05-13 12:57:08 +02:00
|
|
|
int toPixelsAbsolute(long milliseconds);
|
|
|
|
|
|
|
|
|
|
long getMilisecondsPerPixel();
|
|
|
|
|
|
2010-06-09 17:56:40 +02:00
|
|
|
int getHorizontalSize();
|
|
|
|
|
|
2011-01-19 10:04:58 +01:00
|
|
|
Fraction getPixelsPerDay();
|
|
|
|
|
|
|
|
|
|
Interval getInterval();
|
2009-04-14 17:51:03 +02:00
|
|
|
}
|