91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 11KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-10
  • 語言: Java
  • 標(biāo)簽:

資源簡介

隨機(jī)路點(diǎn)移動(dòng)模型(RWP)Java代碼,要在eclipse中才能運(yùn)行,有三個(gè)子文件 elib, rwp ,stat.rwp文件中放了主程序。

資源截圖

代碼片段和文件信息

//
//?Simple?wrapper?to?get?rid?of?flickering
//?screen?with?simulation?visualisation
//
//??1.??call?get_graphics?with?the?dimensions?of?the?drawing?area
//??2.??draw?figure?using?the?return?Graphics?handle
//??3.??call?‘refresh‘?to?update?the?figure?in?the?visible?screen
//
//
//??Esa?Hyyti??2004
//

package?elib;

import?java.awt.*;
import?java.applet.*;

public?class?DoubleBuffer
{
????private?Image?????offscreenI;
????private?Graphics??offscreenG;
????private?Rectangle?offscreenR;
????private?Component?master;
????private?Color?????background;
????
????public?DoubleBuffer(?Component?m?)
????{
????????master?????=?m;
????????offscreenI?=?null;
????????offscreenG?=?null;
????????offscreenR?=?null;
????????background?=?null;
????}

????public?Graphics?get_graphics(?Rectangle?r?)
????{
????????if?(?r.width?????????{
????????????System.out.println(?“DoubleBuffer:?invalid?width?or?height“?);
????????????return?null;
????????}
????????
????????if?(?offscreenI?==?null?||?!offscreenR.equals(?r?)?)
????????{
????????????System.out.println(?“Reserving?memory?for?an?offscreen?image“?);
????????????offscreenR?=?r;
????????????offscreenI?=?master.createImage(?r.width?r.height?);
????????????if?(?offscreenI?==?null?)
????????????????return?null;
????????????offscreenG?=?offscreenI.getGraphics(?);
????????}
????????return?offscreenG;
????}

????public?Graphics?get_graphics(?)
????{
????????return?get_graphics(?master.getBounds()?);
????}

????public?void?clear_screen(?Color?c?)
????{
????????if?(?offscreenI?==?null?)
????????????return;
????????offscreenG.setColor(?c?);
????????offscreenG.fillRect(?0?0?offscreenR.width?offscreenR.height?);
????}

????public?void?clear_screen(?)
????{
????????clear_screen(?background?);
????}

????public?void?set_background(?Color?c?)
????{
????????background?=?c;
????}
????
????public?void?refresh(?Graphics?g?)
????{
????????if?(?g?!=?null?&&?offscreenI?!=?null?)
????????????g.drawImage(?offscreenI?0?0?master?);
????}

????public?void?refresh(?)
????{
????????refresh(?master.getGraphics()?);
????}
}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????2088??2006-04-26?06:01??RWPdemo\elib\DoubleBuffer.java

?????文件???????2817??2006-04-26?20:21??RWPdemo\elib\Loc.java

?????文件??????34029??2006-04-28?18:57??RWPdemo\rwp\RWPdemo.java

?????文件???????1010??2006-04-26?06:16??RWPdemo\stat\Bernoulli.java

?????文件???????2177??2006-04-28?19:17??RWPdemo\stat\doubleStat.java

?????文件????????741??2006-04-28?19:18??RWPdemo\stat\Stat.java

?????文件???????1152??2006-04-28?19:03??RWPdemo\stat\Stat2.java

?????目錄??????????0??2011-07-27?19:19??RWPdemo\elib

?????目錄??????????0??2011-07-27?19:19??RWPdemo\rwp

?????目錄??????????0??2011-07-27?19:19??RWPdemo\stat

?????目錄??????????0??2011-07-27?19:19??RWPdemo

-----------?---------??----------?-----??----

????????????????44014????????????????????11


評(píng)論

共有 條評(píng)論

相關(guān)資源