TV-Browser 3.3.3 API

tvbrowser.ui.programtable
Class DefaultProgramTableModel

java.lang.Object
  extended by tvbrowser.ui.programtable.DefaultProgramTableModel
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, ProgramTableModel

public class DefaultProgramTableModel
extends java.lang.Object
implements ProgramTableModel, javax.swing.event.ChangeListener

Author:
Til

Constructor Summary
DefaultProgramTableModel(Channel[] channelArr, int todayEarliestTime, int tomorrowLatestTime)
          Creates a new instance of DefaultProgramTableModel.
 
Method Summary
 void addProgramTableModelListener(ProgramTableModelListener listener)
           
 boolean contains(Program p)
          Checks if this model contains a program.
protected  void fireProgramHasChanged(Program program)
           
protected  void fireTableCellUpdated(int col, int row)
           
protected  void fireTableDataChanged(java.lang.Runnable callback)
           
 int getAvailableChannelCount()
           
 ChannelFilterComponent getChannelGroup()
           
 int getColumnCount()
           
protected  int getColumnOfChannel(Channel channel)
           
 Date getDate()
           
 ProgramFilter getProgramFilter()
           
 ProgramPanel getProgramPanel(int col, int row)
           
 int getRowCount(int col)
           
 Channel[] getShownChannels()
           
 void setChannelGroup(ChannelFilterComponent channelFilter)
          set the active channel group
 void setChannels(Channel[] channelArr)
           
 void setDate(Date date, ProgressMonitor monitor, java.lang.Runnable callback)
           
 void setProgramFilter(ProgramFilter filter)
           
 void setTimeRange(int todayEarliestTime, int tomorrowLatestTime)
           
 void stateChanged(javax.swing.event.ChangeEvent evt)
          Called when a program has changed.
 void updateTableContent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProgramTableModel

public DefaultProgramTableModel(Channel[] channelArr,
                                int todayEarliestTime,
                                int tomorrowLatestTime)
Creates a new instance of DefaultProgramTableModel.

Method Detail

setTimeRange

public void setTimeRange(int todayEarliestTime,
                         int tomorrowLatestTime)

setChannels

public void setChannels(Channel[] channelArr)

setProgramFilter

public void setProgramFilter(ProgramFilter filter)
Specified by:
setProgramFilter in interface ProgramTableModel

setChannelGroup

public void setChannelGroup(ChannelFilterComponent channelFilter)
Description copied from interface: ProgramTableModel
set the active channel group

Specified by:
setChannelGroup in interface ProgramTableModel

getProgramFilter

public ProgramFilter getProgramFilter()

getChannelGroup

public ChannelFilterComponent getChannelGroup()

setDate

public void setDate(Date date,
                    ProgressMonitor monitor,
                    java.lang.Runnable callback)

getDate

public Date getDate()
Specified by:
getDate in interface ProgramTableModel

updateTableContent

public void updateTableContent()

addProgramTableModelListener

public void addProgramTableModelListener(ProgramTableModelListener listener)
Specified by:
addProgramTableModelListener in interface ProgramTableModel

getShownChannels

public Channel[] getShownChannels()
Specified by:
getShownChannels in interface ProgramTableModel

getAvailableChannelCount

public int getAvailableChannelCount()
Returns:
The number of available channels.

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface ProgramTableModel

getRowCount

public int getRowCount(int col)
Specified by:
getRowCount in interface ProgramTableModel

getProgramPanel

public ProgramPanel getProgramPanel(int col,
                                    int row)
Specified by:
getProgramPanel in interface ProgramTableModel

fireTableDataChanged

protected void fireTableDataChanged(java.lang.Runnable callback)

fireTableCellUpdated

protected void fireTableCellUpdated(int col,
                                    int row)

getColumnOfChannel

protected int getColumnOfChannel(Channel channel)

contains

public boolean contains(Program p)
                 throws java.lang.Exception
Checks if this model contains a program.

Parameters:
p - The program to check.
Returns:
True if the program is contained.
Throws:
java.lang.Exception - Thrown if something goes wrong.
Since:
2.5.3

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent evt)
Called when a program has changed.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
evt - The change event.

fireProgramHasChanged

protected void fireProgramHasChanged(Program program)

TV-Browser 3.3.3 API

TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)