home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 June / PCpro_2005_06.ISO / files / opensource / tvbrowser / TvBrowser_1.0.exe / plugins / PrintPlugin.jar / printplugin / AbstractColumnModel.class (.txt) next >
Encoding:
Java Class File  |  2004-09-19  |  924 b   |  29 lines

  1. package printplugin;
  2.  
  3. import devplugin.Program;
  4.  
  5. public abstract class AbstractColumnModel implements ColumnModel {
  6.    private String mTitle;
  7.    private Program[] mPrograms;
  8.  
  9.    public AbstractColumnModel() {
  10.       this.mPrograms = new Program[0];
  11.    }
  12.  
  13.    public AbstractColumnModel(Program[] progs) {
  14.       this.mPrograms = progs;
  15.    }
  16.  
  17.    public void setPrograms(Program[] progs) {
  18.       this.mPrograms = progs;
  19.    }
  20.  
  21.    public Program getProgramAt(int inx) {
  22.       return inx >= 0 && inx < this.mPrograms.length ? this.mPrograms[inx] : null;
  23.    }
  24.  
  25.    public int getProgramCount() {
  26.       return this.mPrograms == null ? 0 : this.mPrograms.length;
  27.    }
  28. }
  29.