de.jaret.util.ui.timebars.mod
Interface IntervalModificator

All Known Subinterfaces:
IIntervalModificator
All Known Implementing Classes:
DefaultIntervalModificator

public interface IntervalModificator

Interface for deciding about interval modifications through the time bar viewer (visual editing).

Version:
$Id: IntervalModificator.java 800 2008-12-27 22:27:33Z kliem $
Author:
Peter Kliem

Method Summary
 double getSecondGridSnap()
          If this method returns a positive value this is used as the modification interval.
 boolean isApplicable(TimeBarRow row, de.jaret.util.date.Interval interval)
          Decides whether the interval modificator is responsible for a given interval in a row.
 boolean isShiftingAllowed(TimeBarRow row, de.jaret.util.date.Interval interval)
          Decide whether a given interval in a row is allowed to be shifted.
 boolean isSizingAllowed(TimeBarRow row, de.jaret.util.date.Interval interval)
          Decide whether a given interval in a row is allowed to be sized.
 boolean newBeginAllowed(TimeBarRow row, de.jaret.util.date.Interval interval, de.jaret.util.date.JaretDate newBegin)
          Decide whether a given interval in a given row can change the begin date.
 boolean newEndAllowed(TimeBarRow row, de.jaret.util.date.Interval interval, de.jaret.util.date.JaretDate newEnd)
          Decide whether a given interval in a given row can change the end date.
 boolean shiftAllowed(TimeBarRow row, de.jaret.util.date.Interval interval, de.jaret.util.date.JaretDate newBegin)
          Decide whether an interval may be shifted in time to a new begin date.
 

Method Detail

isApplicable

boolean isApplicable(TimeBarRow row,
                     de.jaret.util.date.Interval interval)
Decides whether the interval modificator is responsible for a given interval in a row.

Parameters:
row - row of the interval
interval - interval in question
Returns:
true if this modificator should be questioned

isSizingAllowed

boolean isSizingAllowed(TimeBarRow row,
                        de.jaret.util.date.Interval interval)
Decide whether a given interval in a row is allowed to be sized.

Parameters:
row - row of the interval
interval - interval in question
Returns:
true if the interval may be sized

newBeginAllowed

boolean newBeginAllowed(TimeBarRow row,
                        de.jaret.util.date.Interval interval,
                        de.jaret.util.date.JaretDate newBegin)
Decide whether a given interval in a given row can change the begin date.

Parameters:
row - row of the interval
interval - interval to be modified
newBegin - new begin date
Returns:
true if the modification is allowed

newEndAllowed

boolean newEndAllowed(TimeBarRow row,
                      de.jaret.util.date.Interval interval,
                      de.jaret.util.date.JaretDate newEnd)
Decide whether a given interval in a given row can change the end date.

Parameters:
row - row of the interval
interval - interval to be modified
newEnd - new end date
Returns:
true if the modification is allowed

isShiftingAllowed

boolean isShiftingAllowed(TimeBarRow row,
                          de.jaret.util.date.Interval interval)
Decide whether a given interval in a row is allowed to be shifted.

Parameters:
row - row of the interval
interval - interval in question
Returns:
true if the interval may be shifted

shiftAllowed

boolean shiftAllowed(TimeBarRow row,
                     de.jaret.util.date.Interval interval,
                     de.jaret.util.date.JaretDate newBegin)
Decide whether an interval may be shifted in time to a new begin date.

Parameters:
row - row of the interval
interval - interval to be modified
newBegin - new begin date
Returns:
true if the modification is allowed

getSecondGridSnap

double getSecondGridSnap()
If this method returns a positive value this is used as the modification interval. The value is given in seconds.

Returns:
the positive grid snap or a negative value indicating no grid snap


Copyright © 2012. All Rights Reserved.