com.miginfocom.calendar.grid
Class DateBoundaryException

java.lang.Object
  extended by com.miginfocom.calendar.grid.DateBoundaryException
All Implemented Interfaces:
GridLineException, java.io.Serializable

public class DateBoundaryException
extends java.lang.Object
implements GridLineException, java.io.Serializable

A concrete implementation of GridLineException that can make exceptions depending on date boundaries and/or modulo/offset.

Since:
6.0
See Also:
Serialized Form

Constructor Summary
DateBoundaryException()
          Constructor that makes day boundaries the exception.
DateBoundaryException(int boundaryRangeType, GridLineRepetition rep)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getBoundaryRangeType()
          The boundary type that specifies which grid lines should be included in this exception.
 GridLineRepetition getException(GridRow before, GridRow after, int n, int count)
          Optionally returns an exception to a grid line repetition.
 GridLineRepetition getGridLineRepetition()
          Property: The repetition that defines how the gridline should look like and also the modulo/offset and start/stop indexes.
 void setBoundaryRangeType(int rangeType)
          The boundary type that specifies which grid lines should be included in this exception.
 void setGridLineRepetition(GridLineRepetition rep)
          Property: The repetition that defines how the gridline should look like and also the modulo/offset and start/stop indexes.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateBoundaryException

public DateBoundaryException()
Constructor that makes day boundaries the exception. Not really useful other than for jave bean support.


DateBoundaryException

public DateBoundaryException(int boundaryRangeType,
                             GridLineRepetition rep)
Constructor.

Parameters:
boundaryRangeType - The boundary type that specifies which grid lines should be included in this exception. E.g. DateRangeI.RANGE_TYPE_MONTH.
rep - The repetition that defines how the gridline should look like and also the modulo/offset and start/stop indexes.
Method Detail

getException

public GridLineRepetition getException(GridRow before,
                                       GridRow after,
                                       int n,
                                       int count)
Description copied from interface: GridLineException
Optionally returns an exception to a grid line repetition.

Specified by:
getException in interface GridLineException
Parameters:
before - The grid row before the grid line. Only null if the grid line is the first one.
after - The grid row after the grid line. Only null if the grid line is the last one.
n - The grid line number. Starts at 0 and goes to length - 1.
count - The number of grid lines in this dimension.
Returns:
A GridLineRepetition if there is an exception or null if the "normal" grid line should be used.

getBoundaryRangeType

public int getBoundaryRangeType()
The boundary type that specifies which grid lines should be included in this exception.

Returns:
rThe boundary type. E.g. DateRangeI.RANGE_TYPE_DAY.

setBoundaryRangeType

public void setBoundaryRangeType(int rangeType)
The boundary type that specifies which grid lines should be included in this exception.

Parameters:
rangeType - The boundary type. E.g. DateRangeI.RANGE_TYPE_DAY.

getGridLineRepetition

public GridLineRepetition getGridLineRepetition()
Property: The repetition that defines how the gridline should look like and also the modulo/offset and start/stop indexes.

Returns:
The repetition. Not null.

setGridLineRepetition

public void setGridLineRepetition(GridLineRepetition rep)
Property: The repetition that defines how the gridline should look like and also the modulo/offset and start/stop indexes.

Parameters:
rep - The repetition. If null a default repetition will be set.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.