TileObserver — 타일 옵서버 인터페이스

TileObserver — 타일 옵서버 인터페이스 (java.awt.image)

WritableRenderedImage의 타일이 getWritableTile 호출로 쓰기 가능해질 때와 releaseWritableTile 마지막 호출로 쓰기 불가능해질 때 알림을 받기 원하는 객체를 위한 인터페이스예요.

출처: Java API Reference

본문

TileObserverWritableRenderedImage의 타일 수정 이벤트를 관찰하기 위한 인터페이스예요. 타일이 어떤 작성자에 의해 getWritableTile 호출로 수정 가능해지거나, releaseWritableTile의 마지막 호출로 수정 불가능해질 때 알림을 받아요.

메서드

tileUpdate(WritableRenderedImage source, int tileX, int tileY, boolean willBeWritable)

void tileUpdate(WritableRenderedImage source, int tileX, int tileY, boolean willBeWritable)

타일이 곧 갱신되려고 해요(작성을 위해 잡히려 하거나 작성에서 해제되려고 함).

파라미터: source — 타일을 소유하는 이미지, tileX / tileY — 갱신되는 타일의 X / Y 인덱스, willBeWritable — true면 타일이 쓰기를 위해 잡힐 것, false면 해제되는 중

더 알아보기