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 / TimePageRenderer$ProgramItem.class (.txt) < prev    next >
Encoding:
Java Class File  |  2004-09-19  |  2.1 KB  |  45 lines

  1. package printplugin;
  2.  
  3. import devplugin.Program;
  4. import java.awt.Component;
  5. import java.awt.Graphics;
  6. import javax.swing.Icon;
  7.  
  8. class TimePageRenderer$ProgramItem implements Icon {
  9.    private Icon mIcon;
  10.    // $FF: renamed from: mX int
  11.    private int field_0;
  12.    // $FF: renamed from: mY int
  13.    private int field_1;
  14.    private Program mProgram;
  15.    // $FF: synthetic field
  16.    private final TimePageRenderer this$0;
  17.  
  18.    public TimePageRenderer$ProgramItem(TimePageRenderer this$0, Program prog) {
  19.       this.this$0 = this$0;
  20.       this.mProgram = prog;
  21.       ProgramIcon ico = new ProgramIcon(prog, TimePageRenderer.access$200(this$0), 180);
  22.       ico.setMaximumHeight(300);
  23.       this.mIcon = ico;
  24.    }
  25.  
  26.    public int getIconHeight() {
  27.       return this.mIcon.getIconHeight() + TimePageRenderer.CHANNEL_FONT.getSize() + 10;
  28.    }
  29.  
  30.    public int getIconWidth() {
  31.       return this.mIcon.getIconWidth();
  32.    }
  33.  
  34.    public void setPos(int x, int y) {
  35.       this.field_0 = x;
  36.       this.field_1 = y;
  37.    }
  38.  
  39.    public void paintIcon(Component comp, Graphics g, int x, int y) {
  40.       g.setFont(TimePageRenderer.CHANNEL_FONT);
  41.       g.drawString(this.mProgram.getChannel().getName() + ":", x + this.field_0, y + this.field_1 + 2 + TimePageRenderer.CHANNEL_FONT.getSize());
  42.       this.mIcon.paintIcon((Component)null, g, x + this.field_0, y + this.field_1 + TimePageRenderer.CHANNEL_FONT.getSize() + 4);
  43.    }
  44. }
  45.