com.miginfocom.calendar.grid
Class OffsetException

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

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

A concrete implementation of GridLineException modulo/offset with a start/stop range.

This class basically does the exact same thing as GridLineRepetition but it implements GridLineException for usage in the beans.

Since:
6.0
See Also:
Serialized Form

Constructor Summary
OffsetException()
          Constructor that makes everything an exception.
OffsetException(GridLineRepetition rep)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 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 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

OffsetException

public OffsetException()
Constructor that makes everything an exception. Not really useful other than for jave bean support.


OffsetException

public OffsetException(GridLineRepetition rep)
Constructor.

Parameters:
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.

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.