    001package org.vishia.gral.awt;
    002
    003import java.awt.Frame;
    004
    005import org.vishia.gral.base.GralGraphicThread;
    006import org.vishia.gral.base.GralWindow;
    007import org.vishia.msgDispatch.LogMessage;
    008
    009public class AwtGraphicThread extends GralGraphicThread.ImplAccess
    010{
    011
    012  /**Version, history and license.
    013   * <ul>
    014   * <li>2016-07-16 Hartmut chg: The main window will be created with same methods like all other windows.
    015   * <li>2015-05-01 Hartmut chg: gral: some gardening, improving AWT
    016   * <li>2011-10-23 Hartmut created.
    017   * </ul>
    018   * <b>Copyright/Copyleft</b>:
    019   * For this source the LGPL Lesser General Public License,
    020   * published by the Free Software Foundation is valid.
    021   * It means:
    022   * <ol>
    023   * <li> You can use this source without any restriction for any desired purpose.
    024   * <li> You can redistribute copies of this source to everybody.
    025   * <li> Every user of this source, also the user of redistribute copies
    026   *    with or without payment, must accept this license for further using.
    027   * <li> But the LPGL is not appropriate for a whole software product,
    028   *    if this source is only a part of them. It means, the user
    029   *    must publish this part of source,
    030   *    but don't need to publish the whole source of the own product.
    031   * <li> You can study and modify (improve) this source
    032   *    for own using or for redistribution, but you have to license the
    033   *    modified sources likewise under this LGPL Lesser General Public License.
    034   *    You mustn't delete this Copyright/Copyleft inscription in this source file.
    035   * </ol>
    036   * If you are intent to use this sources without publishing its usage, you can get
    037   * a second license subscribing a special contract with the author.
    038   *
    039   * @author Hartmut Schorrig = hartmut.schorrig@vishia.de
    040   *
    041   */
    042  //@SuppressWarnings("hiding")
    043  public final static String version = "2016-07-16";
    044
    045  Frame window;
    046
    047  //final String sTitle;
    048  //final int xPos, yPos, xSize, ySize;
    049
    050  AwtWidgetMng awtMng;
    051
    052  AwtGraphicThread(GralWindow windowGral, char sizeShow, LogMessage log)
    053  { super(sizeShow, windowGral, log);
    054    //this.xPos = left; this.yPos = top; this.xSize = xSize; this.ySize = ySize;
    055    //threadGuiDispatch.start();  //invokes initGraphic()
    056    startThread();
    057  }
    058
    059  @Override protected void initGraphic()
    060  {
    061    AwtProperties propertiesGui = new AwtProperties(sizeCharProperties);
    062    //AwtSubWindow awtWindow = new AwtSubWindow(mainWindow, true);
    063    awtMng = new AwtWidgetMng(propertiesGui, log);
    064
    065  }
    066
    067
    068
    069  @Override
    070  protected boolean dispatchOsEvents()
    071  {
    072    // TODO Auto-generated method stub
    073    return false;
    074  }
    075
    076  @Override
    077  protected void graphicThreadSleep()
    078  {
    079    synchronized(this){
    080      try{ wait(100);} catch(InterruptedException exc){}
    081    }
    082  }
    083
    084
    085  @Override
    086  public void wakeup()
    087  {
    088    // TODO Auto-generated method stub
    089
    090  }
    091
    092}