home *** CD-ROM | disk | FTP | other *** search
- package hhapplet;
-
- import XMLConsumer.IEntry;
- import java.awt.Color;
- import java.awt.Graphics;
- import java.awt.Image;
-
- class VirtualEntry implements IEntry {
- private int m_nPos;
- private IEntry m_realEntry;
- private boolean m_bHighLight;
- private boolean m_bSelect;
- private boolean m_bNeedAction;
- private IActionSink m_accepter;
-
- public int getPrevSpan() {
- return this.m_realEntry != null ? this.m_realEntry.getPrevSpan() : 0;
- }
-
- public VirtualEntry(int var1) {
- this.m_nPos = var1;
- }
-
- public boolean isMainEntry() {
- return this.m_realEntry != null ? this.m_realEntry.isMainEntry() : true;
- }
-
- public void select(boolean var1) {
- if (this.m_realEntry != null) {
- this.m_realEntry.select(var1);
- } else {
- this.m_bSelect = var1;
- }
- }
-
- public String getName() {
- return this.m_realEntry != null ? this.m_realEntry.getName() : "";
- }
-
- public void highLight(boolean var1) {
- if (this.m_realEntry != null) {
- this.m_realEntry.highLight(var1);
- } else {
- this.m_bHighLight = var1;
- }
- }
-
- public void action(IActionSink var1) {
- if (this.m_realEntry != null) {
- this.m_realEntry.action(var1);
- } else {
- this.m_bNeedAction = true;
- this.m_accepter = var1;
- }
- }
-
- public int getNextSpan() {
- return this.m_realEntry != null ? this.m_realEntry.getNextSpan() : 0;
- }
-
- public void display(Graphics var1, int var2, int var3, Color var4, Image var5) {
- if (this.m_realEntry != null) {
- this.m_realEntry.display(var1, var2, var3, var4, var5);
- }
-
- }
-
- public int getWidth(Graphics var1) {
- return this.m_realEntry != null ? this.m_realEntry.getWidth(var1) : 0;
- }
-
- public void fillReal(IEntry var1) {
- this.m_realEntry = var1;
- var1.select(this.m_bSelect);
- var1.highLight(this.m_bHighLight);
- if (this.m_bNeedAction) {
- var1.action(this.m_accepter);
- }
-
- }
-
- public int getPos() {
- return this.m_nPos;
- }
- }
-