001 package cnslab.gui; 002 003 import thinlet.*; 004 005 /*********************************************************************** 006 * Graphics interface class for simulator: update message 007 * 008 * @author 009 * Yi Dong 010 * @author 011 * David Wallace Croft 012 ***********************************************************************/ 013 public final class UpdateMessage 014 implements Runnable 015 //////////////////////////////////////////////////////////////////////// 016 //////////////////////////////////////////////////////////////////////// 017 { 018 019 private Thinlet thin; 020 021 private Object obj; 022 023 private String mess; 024 025 //////////////////////////////////////////////////////////////////////// 026 //////////////////////////////////////////////////////////////////////// 027 028 public UpdateMessage ( 029 final Thinlet thin, 030 final Object obj, 031 final String mess ) 032 //////////////////////////////////////////////////////////////////////// 033 { 034 this.obj = obj; 035 036 this.mess = mess; 037 038 this.thin = thin; 039 } 040 041 @Override 042 public void run ( ) 043 //////////////////////////////////////////////////////////////////////// 044 { 045 try 046 { 047 Thread.sleep ( 10 ); 048 } 049 catch ( final Exception e ) 050 { 051 e.printStackTrace ( ); 052 } 053 054 thin.setString ( obj, "text", mess ); 055 } 056 057 //////////////////////////////////////////////////////////////////////// 058 //////////////////////////////////////////////////////////////////////// 059 }