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 / PrinterProgramIconSettings.class (.txt) < prev    next >
Encoding:
Java Class File  |  2004-09-19  |  2.6 KB  |  81 lines

  1. package printplugin;
  2.  
  3. import devplugin.ProgramFieldType;
  4. import java.awt.Color;
  5. import java.awt.Font;
  6.  
  7. public class PrinterProgramIconSettings implements ProgramIconSettings {
  8.    private static final Font PROGRAMTITLEFONT = new Font("Dialog", 1, 12);
  9.    private static final Font PROGRAMTEXTFONT = new Font("Dialog", 0, 10);
  10.    private static final Font PROGRAMTIMEFONT = new Font("Dialog", 1, 12);
  11.    private static final Color COLOR_ON_AIR_DARK = new Color(128, 128, 255, 80);
  12.    private static final Color COLOR_ON_AIR_LIGHT = new Color(128, 128, 255, 40);
  13.    private static final Color COLOR_MARKED = new Color(255, 0, 0, 40);
  14.    private ProgramFieldType[] mProgramInfoFields;
  15.    private boolean mShowPluginMark;
  16.  
  17.    private PrinterProgramIconSettings() {
  18.       this.mProgramInfoFields = new ProgramFieldType[]{ProgramFieldType.SHORT_DESCRIPTION_TYPE, ProgramFieldType.ACTOR_LIST_TYPE, ProgramFieldType.DESCRIPTION_TYPE};
  19.       this.mShowPluginMark = false;
  20.    }
  21.  
  22.    public static ProgramIconSettings create(ProgramFieldType[] programInfoFields, boolean showPluginMark) {
  23.       PrinterProgramIconSettings settings = new PrinterProgramIconSettings();
  24.       settings.mProgramInfoFields = programInfoFields;
  25.       settings.mShowPluginMark = showPluginMark;
  26.       return settings;
  27.    }
  28.  
  29.    public static ProgramIconSettings create() {
  30.       return new PrinterProgramIconSettings();
  31.    }
  32.  
  33.    public Font getTitleFont() {
  34.       return PROGRAMTITLEFONT;
  35.    }
  36.  
  37.    public Font getTextFont() {
  38.       return PROGRAMTEXTFONT;
  39.    }
  40.  
  41.    public Font getTimeFont() {
  42.       return PROGRAMTIMEFONT;
  43.    }
  44.  
  45.    public int getTimeFieldWidth() {
  46.       return 35;
  47.    }
  48.  
  49.    public ProgramFieldType[] getProgramInfoFields() {
  50.       return this.mProgramInfoFields;
  51.    }
  52.  
  53.    public String[] getProgramTableIconPlugins() {
  54.       return new String[]{"programinfo.ProgramInfo"};
  55.    }
  56.  
  57.    public Color getColorOnAir_dark() {
  58.       return COLOR_ON_AIR_DARK;
  59.    }
  60.  
  61.    public Color getColorOnAir_light() {
  62.       return COLOR_ON_AIR_LIGHT;
  63.    }
  64.  
  65.    public Color getColorMarked() {
  66.       return COLOR_MARKED;
  67.    }
  68.  
  69.    public boolean getPaintExpiredProgramsPale() {
  70.       return false;
  71.    }
  72.  
  73.    public boolean getPaintProgramOnAir() {
  74.       return false;
  75.    }
  76.  
  77.    public boolean getPaintPluginMarks() {
  78.       return this.mShowPluginMark;
  79.    }
  80. }
  81.