com.sun.j3d.exp.swing
Class JCanvas3D.ResizeThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.j3d.exp.swing.JCanvas3D.ResizeThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
JCanvas3D

static class JCanvas3D.ResizeThread
extends java.lang.Thread

This Thread handles the resizing changes and handles the timer up to the moment when the resizing has to really occur.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  JCanvas3D canvas
          the canvas that has to be checked
(package private)  int delay
          the delay that has to occur between last size change and real resize
(package private)  int height
          latest height that was requested
(package private)  boolean sizeChanged
          A flag indicating that since last check, size got changed again and the delay has to be reset
(package private)  int width
          latest width that was requested
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private JCanvas3D.ResizeThread()
          Creates a new ResizeThread object.
  JCanvas3D.ResizeThread(int width, int height, int delay, JCanvas3D canvas)
          Creates a new ResizeThread object.
 
Method Summary
 int getHeight()
          returns the latest height that is being requested for change
 int getWidth()
          returns the latest width that is being requested for change
 void run()
          
 void setHeight(int height)
          sets height.
 void setWidth(int width)
          Sets width.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

canvas

JCanvas3D canvas
the canvas that has to be checked


sizeChanged

boolean sizeChanged
A flag indicating that since last check, size got changed again and the delay has to be reset


delay

int delay
the delay that has to occur between last size change and real resize


height

int height
latest height that was requested


width

int width
latest width that was requested

Constructor Detail

JCanvas3D.ResizeThread

private JCanvas3D.ResizeThread()
Creates a new ResizeThread object.


JCanvas3D.ResizeThread

public JCanvas3D.ResizeThread(int width,
                              int height,
                              int delay,
                              JCanvas3D canvas)
Creates a new ResizeThread object.

Parameters:
width - initial width change
height - initial height change
delay - delay to be used
canvas - the canvas that has to be checked
Method Detail

getHeight

public int getHeight()
returns the latest height that is being requested for change

Returns:
latest height requested

getWidth

public int getWidth()
returns the latest width that is being requested for change

Returns:
latest width requested

run

public void run()

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

setHeight

public void setHeight(int height)
sets height. this has the effect of resetting the timeout.

Parameters:
height - the new height.
Throws:
java.lang.RuntimeException - DOCUMENT ME!

setWidth

public void setWidth(int width)
Sets width. This has the effect of resetting the timeout.

Parameters:
width - the new width.
Throws:
java.lang.RuntimeException - DOCUMENT ME!


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.