home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2004 May / DPPCPRO0504.ISO / May / Seatools / SeaTools.iso / tools / en / webhelp / webhelp.jar / hhapplet / VirtualEntry.class (.txt) < prev   
Encoding:
Java Class File  |  2002-04-17  |  1.4 KB  |  86 lines

  1. package hhapplet;
  2.  
  3. import XMLConsumer.IEntry;
  4. import java.awt.Color;
  5. import java.awt.Graphics;
  6. import java.awt.Image;
  7.  
  8. class VirtualEntry implements IEntry {
  9.    private int m_nPos;
  10.    private IEntry m_realEntry;
  11.    private boolean m_bHighLight;
  12.    private boolean m_bSelect;
  13.    private boolean m_bNeedAction;
  14.    private IActionSink m_accepter;
  15.  
  16.    public int getPrevSpan() {
  17.       return this.m_realEntry != null ? this.m_realEntry.getPrevSpan() : 0;
  18.    }
  19.  
  20.    public VirtualEntry(int var1) {
  21.       this.m_nPos = var1;
  22.    }
  23.  
  24.    public boolean isMainEntry() {
  25.       return this.m_realEntry != null ? this.m_realEntry.isMainEntry() : true;
  26.    }
  27.  
  28.    public void select(boolean var1) {
  29.       if (this.m_realEntry != null) {
  30.          this.m_realEntry.select(var1);
  31.       } else {
  32.          this.m_bSelect = var1;
  33.       }
  34.    }
  35.  
  36.    public String getName() {
  37.       return this.m_realEntry != null ? this.m_realEntry.getName() : "";
  38.    }
  39.  
  40.    public void highLight(boolean var1) {
  41.       if (this.m_realEntry != null) {
  42.          this.m_realEntry.highLight(var1);
  43.       } else {
  44.          this.m_bHighLight = var1;
  45.       }
  46.    }
  47.  
  48.    public void action(IActionSink var1) {
  49.       if (this.m_realEntry != null) {
  50.          this.m_realEntry.action(var1);
  51.       } else {
  52.          this.m_bNeedAction = true;
  53.          this.m_accepter = var1;
  54.       }
  55.    }
  56.  
  57.    public int getNextSpan() {
  58.       return this.m_realEntry != null ? this.m_realEntry.getNextSpan() : 0;
  59.    }
  60.  
  61.    public void display(Graphics var1, int var2, int var3, Color var4, Image var5) {
  62.       if (this.m_realEntry != null) {
  63.          this.m_realEntry.display(var1, var2, var3, var4, var5);
  64.       }
  65.  
  66.    }
  67.  
  68.    public int getWidth(Graphics var1) {
  69.       return this.m_realEntry != null ? this.m_realEntry.getWidth(var1) : 0;
  70.    }
  71.  
  72.    public void fillReal(IEntry var1) {
  73.       this.m_realEntry = var1;
  74.       var1.select(this.m_bSelect);
  75.       var1.highLight(this.m_bHighLight);
  76.       if (this.m_bNeedAction) {
  77.          var1.action(this.m_accepter);
  78.       }
  79.  
  80.    }
  81.  
  82.    public int getPos() {
  83.       return this.m_nPos;
  84.    }
  85. }
  86.