com.cc.framework.ui.painter.def.scheduler
Class DefDayViewPainter.AppointmentInfo

java.lang.Object
  extended bycom.cc.framework.ui.painter.def.scheduler.DefDayViewPainter.AppointmentInfo
Enclosing class:
DefDayViewPainter

protected class DefDayViewPainter.AppointmentInfo
extends java.lang.Object

This class adds some layout information to an appointment


Field Summary
private  Appointment appointment
          The Appointment
private  int colspan
          The number of columns spanned by this appointment
private  int column
          The column index for this appointment
private  int position
          Indicates the "out of bounds" position of the appointment
private  int rowCount
          The number of rows spanned by this appointment
private  int startHour
          The hour where the appointment starts
private  int startInterval
          The interval where the appointment starts
private  int startRow
          The row index where the appointment starts
private  int visibleRows
          The number of visible rows
private  int visibleStartRow
          The visible start row
 
Constructor Summary
DefDayViewPainter.AppointmentInfo(Appointment appointment, int dayStartHour, int dayEndHour, int interval)
          Constructor.
 
Method Summary
 Appointment getAppointment()
           
 int getColSpan()
           
 int getColumn()
           
 int getEndRow()
          Retrieves the last row that is covered by this appointment(absolute)
 int getPosition()
           
 int getStartRow()
          Returns the starting row of the appointment (absolute)
 int getVisibleRows()
          This Attribute indicates the number of rows to span for this appointment.
 int getVisibleStartRow()
          Returns the starting row relative to the first visible hour of the time table
 boolean isOverlapping(DefDayViewPainter.AppointmentInfo other)
          Checks if the appointment is overlapping the other appointment
 boolean isVisible()
          Checks if this appointment is visible
 void setColSpan(int colspan)
           
 void setColumn(int index)
          Assigns a free column to the appointment
 boolean showInCell(int row, int col)
          Checks if the appointment is shown in the given row of the time table
 boolean startsAt(int hour, int interval)
          Checks if the appointment starts at the given time coordinates
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

appointment

private Appointment appointment
The Appointment


startHour

private int startHour
The hour where the appointment starts


startInterval

private int startInterval
The interval where the appointment starts


startRow

private int startRow
The row index where the appointment starts


rowCount

private int rowCount
The number of rows spanned by this appointment


visibleStartRow

private int visibleStartRow
The visible start row


visibleRows

private int visibleRows
The number of visible rows


position

private int position
Indicates the "out of bounds" position of the appointment


column

private int column
The column index for this appointment


colspan

private int colspan
The number of columns spanned by this appointment

Constructor Detail

DefDayViewPainter.AppointmentInfo

public DefDayViewPainter.AppointmentInfo(Appointment appointment,
                                         int dayStartHour,
                                         int dayEndHour,
                                         int interval)
Constructor. Creates a new Appointment Wrapper and calculates the correct row index

Parameters:
appointment - the appointment
dayStartHour - The current day start hour
dayEndHour - The current day end hour
interval - The current interval setting
Method Detail

isOverlapping

public boolean isOverlapping(DefDayViewPainter.AppointmentInfo other)
Checks if the appointment is overlapping the other appointment

Parameters:
other - the other appointment
Returns:
true when the two appointments are overlapping

getStartRow

public int getStartRow()
Returns the starting row of the appointment (absolute)

Returns:
Starting row

startsAt

public boolean startsAt(int hour,
                        int interval)
Checks if the appointment starts at the given time coordinates

Parameters:
hour - the start hour to check
interval - the Minutes to check
Returns:
true if the appointment starts at the specified time coordinates

showInCell

public boolean showInCell(int row,
                          int col)
Checks if the appointment is shown in the given row of the time table

Parameters:
row - The row index
col - The column
Returns:
true if the appointment overlays the specified row

getEndRow

public int getEndRow()
Retrieves the last row that is covered by this appointment(absolute)

Returns:
Index of the last covered row

getColumn

public int getColumn()
Returns:
returns the column where this appointment can be rendered without overlapping another appointment

setColumn

public void setColumn(int index)
Assigns a free column to the appointment

Parameters:
index - the column index

getVisibleStartRow

public int getVisibleStartRow()
Returns the starting row relative to the first visible hour of the time table

Returns:
Starting row

getVisibleRows

public int getVisibleRows()
This Attribute indicates the number of rows to span for this appointment.

Returns:
The Rows to span

isVisible

public boolean isVisible()
Checks if this appointment is visible

Returns:
true if the appointment is visible

getAppointment

public Appointment getAppointment()
Returns:
The Appointment itself

getPosition

public int getPosition()
Returns:
The position of the appointment relative to the bounds of the time table

getColSpan

public int getColSpan()
Returns:
The number of columns spanned by this appointment

setColSpan

public void setColSpan(int colspan)
Parameters:
colspan - The number of columns spanned by this appointment

toString

public java.lang.String toString()
See Also:
Object.toString()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.