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

  1. package printplugin;
  2.  
  3. import devplugin.Program;
  4. import java.awt.Component;
  5. import java.awt.Graphics;
  6.  
  7. public class ProgramItem {
  8.    private Program mProgram;
  9.    private ProgramIcon mIcon;
  10.    // $FF: renamed from: mx double
  11.    private double field_0;
  12.    // $FF: renamed from: my double
  13.    private double field_1;
  14.  
  15.    public ProgramItem(Program prog, ProgramIconSettings settings) {
  16.       this.mProgram = prog;
  17.       this.mIcon = new ProgramIcon(prog, settings, ChannelPageRenderer.COLUMN_WIDTH);
  18.    }
  19.  
  20.    public void setPos(double x, double y) {
  21.       this.field_0 = x;
  22.       this.field_1 = y;
  23.    }
  24.  
  25.    public double getX() {
  26.       return this.field_0;
  27.    }
  28.  
  29.    public double getY() {
  30.       return this.field_1;
  31.    }
  32.  
  33.    public int getHeight() {
  34.       return this.mIcon.getIconHeight();
  35.    }
  36.  
  37.    public void setMaximumHeight(int maxHeight) {
  38.       this.mIcon.setMaximumHeight(maxHeight);
  39.    }
  40.  
  41.    public Program getProgram() {
  42.       return this.mProgram;
  43.    }
  44.  
  45.    public void paint(Graphics g, int x, int y) {
  46.       this.mIcon.paintIcon((Component)null, g, x, y);
  47.    }
  48.  
  49.    public void paint(Graphics g) {
  50.       this.paint(g, (int)this.getX(), (int)this.getY());
  51.    }
  52. }
  53.