1 package mhr.appcore.tasks;
3 import mhr.appcore.AppCore;
4 import mhr.appcore.bitmap.NBitmap;
5 import mhr.appcore.image.Image;
6 import mhr.appcore.interfaces.PDBitmap;
7 import mhr.appcore.interfaces.PDDisplayer;
8 import mhr.appcore.utils.Rect;
24 NONE, INCREMENTAL, MERGED, HEURISTIC, ALL;
46 protected Thread.UncaughtExceptionHandler
handler = null;
64 throw new IllegalArgumentException(
"app should not be null");
73 public void init() throws IllegalStateException {
75 throw new IllegalStateException(
"Instance is already in use");
115 thread =
new Thread(
this);
119 synchronized (
lock) {
128 public synchronized void stop(){
132 synchronized (
lock) {
138 }
catch (InterruptedException exc) {
152 public void susepnd(Object o)
throws NullPointerException, IllegalStateException {
154 throw new NullPointerException(
"o cannot be null");
156 synchronized (
lock) {
158 throw new IllegalStateException(
"Thread is already suspended by someone else");
173 public void wake(Object o)
throws NullPointerException, IllegalStateException {
175 throw new NullPointerException(
"o cannot be null");
177 synchronized (
lock) {
179 throw new IllegalArgumentException(
"Bad object supplied");
193 synchronized (
lock) {
220 synchronized (
lock) {
231 synchronized (
lock) {
244 synchronized (
lock) {
262 }
catch (InterruptedException e) {
276 }
catch (InterruptedException e) {