diff options
author | Harvey Harrison <[email protected]> | 2013-08-01 09:33:25 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2013-08-01 09:33:25 -0700 |
commit | 3a02ecfbf2aaa6066b9c2142578b34d262512b7c (patch) | |
tree | 42ec61552b5e39ba89881ee110c094dafdb57615 | |
parent | 79d84100e9a84a03f72897e535d1632f096c6d63 (diff) |
j3dutils: add all missing @Override annotations
Signed-off-by: Harvey Harrison <[email protected]>
217 files changed, 931 insertions, 0 deletions
diff --git a/src/classes/share/com/sun/j3d/audioengines/AudioEngine.java b/src/classes/share/com/sun/j3d/audioengines/AudioEngine.java index a3ebe03..f81fe4f 100644 --- a/src/classes/share/com/sun/j3d/audioengines/AudioEngine.java +++ b/src/classes/share/com/sun/j3d/audioengines/AudioEngine.java @@ -104,12 +104,14 @@ public abstract class AudioEngine implements AudioDevice { * Code to initialize the device * @return flag: true is initialized sucessfully, false if error */ + @Override public abstract boolean initialize(); /** * Code to close the device * @return flag: true is closed sucessfully, false if error */ + @Override public abstract boolean close(); /* @@ -120,6 +122,7 @@ public abstract class AudioEngine implements AudioDevice { * Valid types are HEADPHONE, MONO_SPEAKER, STEREO_SPEAKERS * @param type of audio output device */ + @Override public void setAudioPlaybackType(int type) { audioPlaybackType = type; } @@ -128,6 +131,7 @@ public abstract class AudioEngine implements AudioDevice { * Get Type of Audio Playback Output Device * returns audio playback type to which sound is currently output */ + @Override public int getAudioPlaybackType() { return audioPlaybackType; } @@ -136,6 +140,7 @@ public abstract class AudioEngine implements AudioDevice { * Set Distance from the Center Ear to a Speaker * @param distance from the center ear and to the speaker */ + @Override public void setCenterEarToSpeaker(float distance) { distanceToSpeaker = distance; } @@ -144,6 +149,7 @@ public abstract class AudioEngine implements AudioDevice { * Get Distance from Ear to Speaker * returns value set as distance from listener's ear to speaker */ + @Override public float getCenterEarToSpeaker() { return distanceToSpeaker; } @@ -151,6 +157,7 @@ public abstract class AudioEngine implements AudioDevice { /** * Set Angle Offset To Speaker * @param angle in radian between head coordinate Z axis and vector to speaker */ + @Override public void setAngleOffsetToSpeaker(float angle) { angleOffsetToSpeaker = angle; } @@ -159,6 +166,7 @@ public abstract class AudioEngine implements AudioDevice { * Get Angle Offset To Speaker * returns value set as angle between vector to speaker and Z head axis */ + @Override public float getAngleOffsetToSpeaker() { return angleOffsetToSpeaker; } @@ -169,6 +177,7 @@ public abstract class AudioEngine implements AudioDevice { * returns number of maximum sound channels you can run with this * library/device-driver. */ + @Override public int getTotalChannels() { // this method should be overridden by a device specific implementation return (totalChannels); @@ -179,6 +188,7 @@ public abstract class AudioEngine implements AudioDevice { * returns number of sound channels currently available (number * not being used by active sounds. */ + @Override public int getChannelsAvailable() { return (channelsAvailable); } @@ -190,6 +200,7 @@ public abstract class AudioEngine implements AudioDevice { * returns number of sound channels used by a specific Sound node * @deprecated This method is now part of the Sound class */ + @Override public int getChannelsUsedForSound(Sound sound) { if (sound != null) return sound.getNumberOfChannelsUsed(); diff --git a/src/classes/share/com/sun/j3d/audioengines/AudioEngine3D.java b/src/classes/share/com/sun/j3d/audioengines/AudioEngine3D.java index 09ff332..dcf334a 100644 --- a/src/classes/share/com/sun/j3d/audioengines/AudioEngine3D.java +++ b/src/classes/share/com/sun/j3d/audioengines/AudioEngine3D.java @@ -106,6 +106,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * Save a reference to the current View object. * @param reference to current view object */ + @Override public void setView(View reference) { currentView = reference; return; @@ -133,6 +134,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param soundData descrition of sound source data * @return index into sample vector of Sample object for sound */ + @Override public int prepareSound(int soundType, MediaContainer soundData) { // This method must be overridden by device specific implementation return Sample.NULL_SAMPLE; @@ -143,6 +145,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * Removes/clears associated sound data with this sound source node * @param index device specific reference number to device driver sample */ + @Override public abstract void clearSound(int index); /** @@ -150,6 +153,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @param trans is a reference to virtual world composite transform */ + @Override public void setVworldXfrm(int index, Transform3D trans) { Sample sample = getSample(index); if (sample != null) @@ -161,6 +165,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @return status: < 0 denotes an error */ + @Override public abstract int startSample(int index); /** @@ -168,6 +173,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @return status: < 0 denotes an error */ + @Override public abstract int stopSample(int index); /** @@ -176,30 +182,35 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample */ // TODO: The update method exists on a TEMPORARY basis. + @Override public abstract void updateSample(int index); /** * Mute sample. * @param index device specific reference number to device driver sample */ + @Override public abstract void muteSample(int index); /** * Unmute sample. * @param index device specific reference number to device driver sample */ + @Override public abstract void unmuteSample(int index); /** * Pause sample. * @param index device specific reference number to device driver sample */ + @Override public abstract void pauseSample(int index); /** * Unpause sample. * @param index device specific reference number to device driver sample */ + @Override public abstract void unpauseSample(int index); /* @@ -213,6 +224,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @param scaleFactor floating point multiplier applied to sample amplitude */ + @Override public void setSampleGain(int index, float scaleFactor) { Sample sample = getSample(index); if (sample != null) @@ -225,6 +237,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @param count number of times sample is repeated */ + @Override public void setLoop(int index, int count) { Sample sample = getSample(index); if (sample != null) @@ -237,6 +250,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @param position point location in virtual world coordinate of sample */ + @Override public void setPosition(int index, Point3d position) { Sample sample = getSample(index); if (sample != null) @@ -253,6 +267,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * thru which ellipses pass * @param backAttenuationScaleFactor gain scale factors */ + @Override public void setDistanceGain(int index, double[] frontDistance, float[] frontAttenuationScaleFactor, double[] backDistance, float[] backAttenuationScaleFactor) { @@ -268,6 +283,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @param direction vector in virtual world coordinate. */ + @Override public void setDirection(int index, Vector3d direction) { Sample sample = getSample(index); if (sample != null) @@ -286,6 +302,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param filterCutoff array containing filter cutoff frequencies. * The filter values for each tuples can be set to Sound.NO_FILTER. */ + @Override public void setAngularAttenuation(int index, int filterType, double[] angle, float[] attenuationScaleFactor, float[] filterCutoff) { Sample sample = getSample(index); @@ -299,6 +316,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * Set rolloff value for current aural attribute applied to all samples. * @param rolloff scale factor applied to standard speed of sound. */ + @Override public void setRolloff(float rolloff) { attribs.rolloff = rolloff; return; @@ -310,6 +328,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param coefficient applied to amplitude of reverbation added at each * iteration of reverb processing. */ + @Override public void setReflectionCoefficient(float coefficient) { attribs.reflectionCoefficient = coefficient; return; @@ -321,6 +340,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param reverbDelay amount of time in millisecond between each * iteration of reverb processing. */ + @Override public void setReverbDelay(float reverbDelay) { attribs.reverbDelay = reverbDelay; return; @@ -331,6 +351,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * samples. * @param reverbOrder number of times reverb process loop is iterated. */ + @Override public void setReverbOrder(int reverbOrder) { attribs.reverbOrder = reverbOrder; return; @@ -342,6 +363,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * to all sample based on distance between listener and sound. * @param dist is an attenuation array of distance and low-pass filter values. */ + @Override public void setDistanceFilter(int filterType, double[] dist, float[] filterCutoff) { attribs.setDistanceFilter(filterType, dist, filterCutoff); @@ -354,6 +376,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param scaleFactor frequency scale factor applied to samples normal * playback rate. */ + @Override public void setFrequencyScaleFactor(float scaleFactor) { attribs.frequencyScaleFactor = scaleFactor; return; @@ -365,6 +388,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * listener-to-soundSource velocity. * playback rate. */ + @Override public void setVelocityScaleFactor(float scaleFactor) { attribs.velocityScaleFactor = scaleFactor; return; @@ -375,6 +399,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @return number of channels currently being used by this sample. */ + @Override public int getNumberOfChannelsUsed(int index) { // This method must be overridden by device specific implementation Sample sample = getSample(index); @@ -394,6 +419,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @return number of channels that would be used by this sample if it * were playing. */ + @Override public int getNumberOfChannelsUsed(int index, boolean muteFlag) { // This method must be overridden by device specific implementation Sample sample = getSample(index); @@ -408,6 +434,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @return length of sample in milliseconds */ + @Override public long getSampleDuration(int index) { Sample sample = getSample(index); if (sample != null) @@ -421,6 +448,7 @@ public abstract class AudioEngine3D extends AudioEngine implements AudioDevice3D * @param index device specific reference number to device driver sample * @return system clock time sample started */ + @Override public long getStartTime(int index) { Sample sample = getSample(index); if (sample != null) diff --git a/src/classes/share/com/sun/j3d/audioengines/AudioEngine3DL2.java b/src/classes/share/com/sun/j3d/audioengines/AudioEngine3DL2.java index ad8ef2b..1bffd52 100644 --- a/src/classes/share/com/sun/j3d/audioengines/AudioEngine3DL2.java +++ b/src/classes/share/com/sun/j3d/audioengines/AudioEngine3DL2.java @@ -87,6 +87,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * Causes all cached sounds to be paused and all streaming sounds to be * stopped. */ + @Override public abstract void pause(); /** @@ -95,6 +96,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * Causes all paused cached sounds to be resumed and all streaming * sounds restarted. */ + @Override public abstract void resume(); /** @@ -102,6 +104,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param scaleFactor scale factor applied to calculated amplitudes for * all sounds playing on this device */ + @Override public abstract void setGain(float scaleFactor); /* @@ -123,6 +126,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * amplitudes for all sounds playing on this device * @see Sound#setRateScaleFactor */ + @Override public void setRateScaleFactor(int index, float scaleFactor) { Sample sample = getSample(index); if (sample != null) @@ -150,6 +154,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param coefficient late reflection attenuation factor * @see AuralAttributes#setReverbCoefficient */ + @Override public void setReverbCoefficient(float coefficient) { attribs.reverbCoefficient = coefficient; return; @@ -164,6 +169,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param reflectionDelay time between each order of early reflection * @see AuralAttributes#setReflectionDelay */ + @Override public void setReflectionDelay(float reflectionDelay) { attribs.reflectionDelay = reflectionDelay; return; @@ -175,6 +181,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param time decay time in milliseconds * @see AuralAttributes#setDecayTime */ + @Override public void setDecayTime(float time) { attribs.decayTime = time; return; @@ -190,6 +197,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * low-pass filter is applied. * @see AuralAttributes#setDecayFilter */ + @Override public void setDecayFilter(float frequencyCutoff) { attribs.decayFrequencyCutoff = frequencyCutoff; return; @@ -203,6 +211,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param diffusion percentage expressed within the range of 0.0 and 1.0 * @see AuralAttributes#setDiffusion */ + @Override public void setDiffusion(float diffusion) { attribs.diffusion = diffusion; return; @@ -218,6 +227,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * within the range of 0.0 and 1.0 * @see AuralAttributes#setDensity */ + @Override public void setDensity(float density) { attribs.density = density; return; @@ -233,6 +243,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param index device specific reference to device driver sample * @param scaleFactor non-negative factor applied to direct sound gain */ + @Override public void setObstructionGain(int index, float scaleFactor) { Sample sample = getSample(index); if (sample != null) @@ -252,6 +263,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * low-pass filter is applied. */ + @Override public void setObstructionFilter(int index, float frequencyCutoff) { Sample sample = getSample(index); if (sample != null) @@ -268,6 +280,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param index device specific reference to device driver sample * @param scaleFactor non-negative factor applied to direct sound gain */ + @Override public void setOcclusionGain(int index, float scaleFactor) { Sample sample = getSample(index); if (sample != null) @@ -286,6 +299,7 @@ public abstract class AudioEngine3DL2 extends AudioEngine3D implements AudioDevi * @param frequencyCutoff value of frequencies in Hertz above which a * low-pass filter is applied. */ + @Override public void setOcclusionFilter(int index, float frequencyCutoff) { Sample sample = getSample(index); if (sample != null) diff --git a/src/classes/share/com/sun/j3d/audioengines/AudioEngineThread.java b/src/classes/share/com/sun/j3d/audioengines/AudioEngineThread.java index df0b653..be16a6e 100644 --- a/src/classes/share/com/sun/j3d/audioengines/AudioEngineThread.java +++ b/src/classes/share/com/sun/j3d/audioengines/AudioEngineThread.java @@ -209,6 +209,7 @@ public class AudioEngineThread extends Thread { * This thread controls the syncing of all the canvases attached to * this view. */ + @Override public void run() { if (debugFlag) debugPrint("AudioEngineThread.run"); diff --git a/src/classes/share/com/sun/j3d/audioengines/javasound/JSClip.java b/src/classes/share/com/sun/j3d/audioengines/javasound/JSClip.java index 4e3ff3d..ba988c0 100644 --- a/src/classes/share/com/sun/j3d/audioengines/javasound/JSClip.java +++ b/src/classes/share/com/sun/j3d/audioengines/javasound/JSClip.java @@ -75,6 +75,7 @@ class JSClip extends JSChannel { * for a stream that is a sourceDataline * @return true is successful in initiallizing DataLine */ + @Override DataLine initDataLine(AudioInputStream ais) { if (debugFlag) debugPrintln("JSClip: initDataLine(" + ais + ")"); @@ -163,6 +164,7 @@ class JSClip extends JSChannel { * actual Java Sound start methods called are as immediate (without * delay between as possible. */ + @Override boolean startSamples(int loopCount, float leftGain, float rightGain, int leftDelay, int rightDelay) { // loop count is ignored for Stream and MIDI @@ -272,6 +274,7 @@ XXXX audioLeftStream.start(leftVolume, panLeft, reverbLeft); * Since the sound has no auralAttributes applied to it reverb * is not applied to the sample. */ + @Override boolean startSample(int loopCount, float gain, int delay) { /* if (debugFlag) { @@ -297,6 +300,7 @@ XXXX audioLeftStream.start(leftVolume, panLeft, reverbLeft); return true; } // end of start (single) Sample + @Override int stopSample() { // This will tell thread to stop reading and writing // reload with old URL - reloadSample()??? @@ -309,6 +313,7 @@ XXXX audioLeftStream.start(leftVolume, panLeft, reverbLeft); return 0; } + @Override int stopSamples() { // This will tell thread to stop reading and writing // TODO: For muting, stop sound but don't clear startTime... diff --git a/src/classes/share/com/sun/j3d/audioengines/javasound/JSDirectionalSample.java b/src/classes/share/com/sun/j3d/audioengines/javasound/JSDirectionalSample.java index 97e050d..05796c5 100644 --- a/src/classes/share/com/sun/j3d/audioengines/javasound/JSDirectionalSample.java +++ b/src/classes/share/com/sun/j3d/audioengines/javasound/JSDirectionalSample.java @@ -585,6 +585,7 @@ class JSDirectionalSample extends JSPositionalSample * both front and back attenuation linear distance and gain scale factor * arrays. */ + @Override float calculateDistanceAttenuation(float distance) { float factor = findFactor(distance, this.attenuationDistance, this.attenuationGain, this.backAttenuationDistance, @@ -600,6 +601,7 @@ class JSDirectionalSample extends JSPositionalSample * Simply calls generic (for PointSound) 'findFactor()' with * a single set of angular attenuation distance and gain scalefactor arrays. */ + @Override float calculateAngularGain() { float angle = findAngularOffset(); float factor = findFactor(angle, this.angularDistance, this.angularGain); @@ -653,6 +655,7 @@ class JSDirectionalSample extends JSPositionalSample * Calculate Filter * * *****************/ + @Override /* * Calculates the low-pass cutoff frequency filter value applied to the * a sound based on both: diff --git a/src/classes/share/com/sun/j3d/audioengines/javasound/JSPositionalSample.java b/src/classes/share/com/sun/j3d/audioengines/javasound/JSPositionalSample.java index 5992302..70519cc 100644 --- a/src/classes/share/com/sun/j3d/audioengines/javasound/JSPositionalSample.java +++ b/src/classes/share/com/sun/j3d/audioengines/javasound/JSPositionalSample.java @@ -179,9 +179,11 @@ class JSPositionalSample extends JSSample /* * Process request for Filtering fields */ + @Override boolean getFilterFlag() { return filterFlag; } + @Override float getFilterFreq() { return filterFreq; } @@ -191,6 +193,7 @@ class JSPositionalSample extends JSSample * Clears the fields associated with sample data for this sound, and * frees any device specific data associated with this sample. */ + @Override public void clear() { if (debugFlag) debugPrint("JSPositionalSample.clear() enter"); @@ -215,6 +218,7 @@ class JSPositionalSample extends JSSample * Reset time and count based fields associated with sample data * for this sound */ + @Override void reset() { if (debugFlag) debugPrint("JSPositionalSample.reset() enter"); @@ -645,6 +649,7 @@ class JSPositionalSample extends JSSample * Calculate the audiodevice parameters necessary to spatially play this * sound. */ + @Override public void render(int dirtyFlags, View view, AuralParameters attribs) { if (debugFlag) debugPrint("JSPositionalSample.render"); diff --git a/src/classes/share/com/sun/j3d/audioengines/javasound/JSSample.java b/src/classes/share/com/sun/j3d/audioengines/javasound/JSSample.java index 9a69ca7..c904b8c 100644 --- a/src/classes/share/com/sun/j3d/audioengines/javasound/JSSample.java +++ b/src/classes/share/com/sun/j3d/audioengines/javasound/JSSample.java @@ -139,6 +139,7 @@ class JSSample extends com.sun.j3d.audioengines.Sample * correct values before JavaSoundMixer either start or updates the * sample thru calls to JSThread. */ + @Override public void render(int dirtyFlags, View view, AuralParameters attribs) { if (debugFlag) debugPrint("JSSample.render "); @@ -161,6 +162,7 @@ class JSSample extends com.sun.j3d.audioengines.Sample * this sound, * and frees any device specific data associated with this sample. */ + @Override public void clear() { super.clear(); if (debugFlag) diff --git a/src/classes/share/com/sun/j3d/audioengines/javasound/JSThread.java b/src/classes/share/com/sun/j3d/audioengines/javasound/JSThread.java index fc50756..0d5a090 100644 --- a/src/classes/share/com/sun/j3d/audioengines/javasound/JSThread.java +++ b/src/classes/share/com/sun/j3d/audioengines/javasound/JSThread.java @@ -106,6 +106,7 @@ class JSThread extends com.sun.j3d.audioengines.AudioEngineThread { * increment/decrement changes in rate (and other future parameters) * until the target value is reached. */ + @Override synchronized public void doWork() { if (debugFlag) debugPrint("JSThread.doWork()"); @@ -817,6 +818,7 @@ leftDelay, rightDelay * This initializes this thread. Once this method returns, the thread is * ready to do work. */ + @Override public void initialize() { super.initialize(); // this.setPriority(Thread.MAX_PRIORITY); @@ -835,6 +837,7 @@ leftDelay, rightDelay return false; } + @Override public void shutdown() { } @@ -842,6 +845,7 @@ leftDelay, rightDelay // default resource clean up method + @Override public void cleanup() { super.cleanup(); if (debugFlag) diff --git a/src/classes/share/com/sun/j3d/audioengines/javasound/JavaSoundMixer.java b/src/classes/share/com/sun/j3d/audioengines/javasound/JavaSoundMixer.java index 438cb7b..1e96fee 100644 --- a/src/classes/share/com/sun/j3d/audioengines/javasound/JavaSoundMixer.java +++ b/src/classes/share/com/sun/j3d/audioengines/javasound/JavaSoundMixer.java @@ -116,6 +116,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Overridden method from AudioEngine. * @return number of maximum voices play simultaneously on JavaSound Mixer. */ + @Override public int getTotalChannels() { if (thread != null) return thread.getTotalChannels(); @@ -128,6 +129,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * New interface to mixer/engine specific methods * @return flag: true is initialized sucessfully, false if error */ + @Override public boolean initialize() { if (thread == null) { return false; @@ -145,6 +147,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * New interface to mixer/engine specific methods * @return flag: true is closed sucessfully, false if error */ + @Override public boolean close() { if (thread == null) return false; @@ -177,6 +180,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Store a reference to JSXxxxSample object in samples list. * @return index to the sample in samples list. */ + @Override public int prepareSound(int soundType, MediaContainer soundData) { int index = JSSample.NULL_SAMPLE; int methodType = ADD_TO_LIST; @@ -253,6 +257,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Clears the fields associated with sample data for this sound. * Overriden method from AudioEngine3D. */ + @Override public void clearSound(int index) { // TODO: call JSXXXX clear method JSSample sample = null; @@ -268,6 +273,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Save a reference to the local to virtual world coordinate space * Overriden method from AudioEngine3D. */ + @Override public void setVworldXfrm(int index, Transform3D trans) { if (debugFlag) debugPrintln("JavaSoundMixer: setVworldXfrm for index " + index); @@ -312,6 +318,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void setPosition(int index, Point3d position) { if (debugFlag) debugPrintln("JavaSoundMixer: setPosition for index " + index); @@ -330,6 +337,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void setDirection(int index, Vector3d direction) { if (debugFlag) debugPrintln("JavaSoundMixer: setDirection for index " + index); @@ -347,6 +355,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void setReflectionCoefficient(float coefficient) { super.setReflectionCoefficient(coefficient); auralParams.reverbDirty |= JSAuralParameters.REFLECTION_COEFF_CHANGED; @@ -356,6 +365,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void setReverbDelay(float reverbDelay) { super.setReverbDelay(reverbDelay); auralParams.reverbDirty |= JSAuralParameters.REVERB_DELAY_CHANGED; @@ -365,6 +375,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void setReverbOrder(int reverbOrder) { super.setReverbOrder(reverbOrder); auralParams.reverbDirty |= JSAuralParameters.REVERB_ORDER_CHANGED; @@ -380,6 +391,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * * Overriden method from AudioEngine3D. */ + @Override public int startSample(int index) { // TODO: Rewrite this function @@ -450,6 +462,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public int stopSample(int index) { // TODO: Rewrite this function @@ -486,6 +499,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void pauseSample(int index) { if (debugFlag) debugPrintln("JavaSoundMixer: PAUSESample for index " + index); @@ -499,6 +513,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void unpauseSample(int index) { if (debugFlag) debugPrintln("JavaSoundMixer: UNPAUSESample for index " + index); @@ -513,6 +528,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Overriden method from AudioEngine3D. */ + @Override public void updateSample(int index) { if (debugFlag) debugPrintln("JavaSoundMixer: UPDATESample for index " + index); @@ -568,6 +584,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void muteSample(int index) { JSSample sample = null; if ((sample = (JSSample)getSample(index)) == null) @@ -583,6 +600,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public void unmuteSample(int index) { JSSample sample = null; if ((sample = (JSSample)getSample(index)) == null) @@ -607,6 +625,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public long getSampleDuration(int index) { JSSample sample = null; if ((sample = (JSSample)getSample(index)) == null) @@ -625,6 +644,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public int getNumberOfChannelsUsed(int index) { /* * Calls same method with different signature containing the @@ -640,6 +660,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /** * Overriden method from AudioEngine3D. */ + @Override public int getNumberOfChannelsUsed(int index, boolean muted) { /* * The JavaSoundMixer implementation uses THREE channels to render @@ -673,6 +694,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { /* * Overriden method from AudioEngine3D. */ + @Override public long getStartTime(int index) { JSSample sample = null; if ((sample = (JSSample)getSample(index)) == null) @@ -844,6 +866,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { } // TEMPORARY: Override of method due to bug in Java Sound + @Override public void setLoop(int index, int count) { JSSample sample = null; if ((sample = (JSSample)getSample(index)) == null) @@ -913,6 +936,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { // Set overall gain for device // @since Java 3D 1.3 // + @Override public void setGain(float scaleFactor) { float oldDeviceGain = deviceGain; float gainFactor = scaleFactor/oldDeviceGain; @@ -925,6 +949,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Set sample specific sample rate scale factor gain * @since Java 3D 1.3 */ + @Override public void setRateScaleFactor(int index, float rateScaleFactor) { JSSample sample = null; if ((sample = (JSSample)getSample(index)) == null) @@ -939,6 +964,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Causes all cached sounds to be paused and all streaming sounds to be * stopped. */ + @Override public void pause() { pause = PAUSE_PENDING; // TODO: pause all sounds @@ -949,6 +975,7 @@ public class JavaSoundMixer extends AudioEngine3DL2 { * Causes all paused cached sounds to be resumed and all streaming sounds * restarted. */ + @Override public void resume() { pause = RESUME_PENDING; // TODO: unpause all sounds diff --git a/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java b/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java index 06c8473..c3301a9 100644 --- a/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java +++ b/src/classes/share/com/sun/j3d/exp/swing/JCanvas3D.java @@ -237,6 +237,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param event {@inheritDoc} */ + @Override public void ancestorAdded(javax.swing.event.AncestorEvent event) { // if ( true == isVisible( ) ) // check if the component itself is visible. { @@ -262,6 +263,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param event {@inheritDoc} */ + @Override public void ancestorMoved(javax.swing.event.AncestorEvent event) { } @@ -270,6 +272,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param event {@inheritDoc} */ + @Override public void ancestorRemoved(javax.swing.event.AncestorEvent event) { hasBeenAdded = false; canvas.removeNotify(); @@ -394,6 +397,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param g {@inheritDoc} */ + @Override public void paintComponent(java.awt.Graphics g) { super.paintComponent(g); //paint background @@ -420,6 +424,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processComponentKeyEvent(java.awt.event.KeyEvent e) { super.processComponentKeyEvent(e); @@ -434,6 +439,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processFocusEvent(java.awt.event.FocusEvent e) { super.processFocusEvent(e); @@ -448,6 +454,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processInputMethodEvent(java.awt.event.InputMethodEvent e) { super.processInputMethodEvent(e); @@ -462,6 +469,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processKeyEvent(java.awt.event.KeyEvent e) { super.processKeyEvent(e); @@ -476,6 +484,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processMouseEvent(java.awt.event.MouseEvent e) { super.processMouseEvent(e); @@ -490,6 +499,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processMouseMotionEvent(java.awt.event.MouseEvent e) { super.processMouseMotionEvent(e); @@ -504,6 +514,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent e) { super.processMouseWheelEvent(e); @@ -521,6 +532,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * @param width {@inheritDoc} * @param height {@inheritDoc} */ + @Override public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); @@ -667,6 +679,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { /** * {@inheritDoc} */ + @Override public void addNotify() { if (false == addNotifyFlag) { throw new UnsupportedOperationException("CHANGE ME"); @@ -686,6 +699,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * null if the component is not created or if it has no * parent. */ + @Override public java.awt.Container getParent() { if (null == this.lwCanvas) { return null; @@ -697,6 +711,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { /** * Blocks the retrieval of the render buffer. */ + @Override public void postRender() { imageReadyBis = false; } @@ -705,6 +720,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * Retrieves the buffer from canvas, if possible, and * calls/notifies component to be repainted, if necessary. */ + @Override synchronized public void postSwap() { if (true == isRendererRunning()) { // as weird as it can look, there can be postswaps without rendered running. (?!!) Anyway, in that case we should not refresh. bi = getOffScreenBuffer().getImage(); @@ -726,6 +742,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processComponentEvent(java.awt.event.ComponentEvent e) { super.processComponentEvent(e); } @@ -735,6 +752,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processFocusEvent(java.awt.event.FocusEvent e) { super.processFocusEvent(e); } @@ -744,6 +762,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processInputMethodEvent( java.awt.event.InputMethodEvent e) { super.processInputMethodEvent(e); @@ -754,6 +773,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processKeyEvent(java.awt.event.KeyEvent e) { super.processKeyEvent(e); } @@ -763,6 +783,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processMouseEvent(java.awt.event.MouseEvent e) { super.processMouseEvent(e); } @@ -772,6 +793,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processMouseMotionEvent(java.awt.event.MouseEvent e) { super.processMouseMotionEvent(e); } @@ -781,6 +803,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { * * @param e {@inheritDoc} */ + @Override protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent e) { super.processMouseWheelEvent(e); } @@ -847,6 +870,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { /** * {@inheritDoc} */ + @Override public void run() { canvas.createCanvas(width, height); } @@ -916,6 +940,7 @@ public class JCanvas3D extends JPanel implements AncestorListener { /** * {@inheritDoc} */ + @Override public void run() { try { while (true == sizeChanged) // the double loop is made so that if a change of size arrives while the canvas is already resizing, the same thread can keep up with subsequent resizes. diff --git a/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java b/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java index a45de9f..9d30fa9 100644 --- a/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java +++ b/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java @@ -89,6 +89,7 @@ public class ByteBufferWrapper extends BufferWrapper { * Returns the java.nio.Buffer contained within this * ByteBufferWrapper. */ + @Override public java.nio.Buffer getBuffer() { return this.buffer; } diff --git a/src/classes/share/com/sun/j3d/internal/DoubleBufferWrapper.java b/src/classes/share/com/sun/j3d/internal/DoubleBufferWrapper.java index 4d0d1fd..0ef14f0 100644 --- a/src/classes/share/com/sun/j3d/internal/DoubleBufferWrapper.java +++ b/src/classes/share/com/sun/j3d/internal/DoubleBufferWrapper.java @@ -78,6 +78,7 @@ public class DoubleBufferWrapper extends BufferWrapper { * Returns the java.nio.Buffer contained within this * DoubleBufferWrapper. */ + @Override public java.nio.Buffer getBuffer() { return this.buffer; } diff --git a/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java b/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java index 0595ac1..6c7badf 100644 --- a/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java +++ b/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java @@ -78,6 +78,7 @@ public class FloatBufferWrapper extends BufferWrapper { * Returns the java.nio.Buffer contained within this * FloatBufferWrapper. */ + @Override public java.nio.Buffer getBuffer() { return this.buffer; } diff --git a/src/classes/share/com/sun/j3d/loaders/LoaderBase.java b/src/classes/share/com/sun/j3d/loaders/LoaderBase.java index 100b0ab..ec12cb4 100644 --- a/src/classes/share/com/sun/j3d/loaders/LoaderBase.java +++ b/src/classes/share/com/sun/j3d/loaders/LoaderBase.java @@ -84,6 +84,7 @@ public abstract class LoaderBase implements Loader { * Note: Users of setBaseUrl() would then use load(URL) * as opposed to load(String). */ + @Override public void setBaseUrl(URL url) { baseUrl = url; } @@ -97,6 +98,7 @@ public abstract class LoaderBase implements Loader { * Note: Users of setBasePath() would then use load(String) * as opposed to load(URL). */ + @Override public void setBasePath(String pathName) { basePath = pathName; } @@ -104,6 +106,7 @@ public abstract class LoaderBase implements Loader { /** * Returns the current base URL setting. */ + @Override public URL getBaseUrl() { return baseUrl; } @@ -111,6 +114,7 @@ public abstract class LoaderBase implements Loader { /** * Returns the current base path setting. */ + @Override public String getBasePath() { return basePath; } @@ -119,6 +123,7 @@ public abstract class LoaderBase implements Loader { * This method sets the load flags for the file. The flags should * equal 0 by default (which tells the loader to only load geometry). */ + @Override public void setFlags(int flags) { loadFlags = flags; } @@ -126,6 +131,7 @@ public abstract class LoaderBase implements Loader { /** * Returns the current loading flags setting. */ + @Override public int getFlags() { return loadFlags; } diff --git a/src/classes/share/com/sun/j3d/loaders/SceneBase.java b/src/classes/share/com/sun/j3d/loaders/SceneBase.java index 8f5885d..bb3794d 100644 --- a/src/classes/share/com/sun/j3d/loaders/SceneBase.java +++ b/src/classes/share/com/sun/j3d/loaders/SceneBase.java @@ -167,6 +167,7 @@ public class SceneBase implements Scene { * This method returns the BranchGroup containing the overall * scene loaded by the loader. */ + @Override public BranchGroup getSceneGroup() { return sceneGroup; } @@ -179,6 +180,7 @@ public class SceneBase implements Scene { * information for the given ViewPlatform and the ViewPlatform * holds an view-specific information, such as Field of View. */ + @Override public TransformGroup[] getViewGroups() { if (viewVector.isEmpty()) return null; @@ -192,6 +194,7 @@ public class SceneBase implements Scene { * field of view values for each corresponding entry in the array of * view groups returned by the method getViewGroups. */ + @Override public float[] getHorizontalFOVs() { if (hfovVector.isEmpty()) return null; @@ -213,6 +216,7 @@ public class SceneBase implements Scene { /** * This method returns an array of all Lights defined in the file. */ + @Override public Light[] getLightNodes() { if (lightVector.isEmpty()) return null; @@ -229,6 +233,7 @@ public class SceneBase implements Scene { * such names as the DEF names of Vrml or filenames of subjects (as * in Lightwave 3D). */ + @Override public Hashtable getNamedObjects() { return namedObjects; } @@ -238,6 +243,7 @@ public class SceneBase implements Scene { * This method returns an array of all Background nodes defined in the * file. */ + @Override public Background[] getBackgroundNodes() { if (backgroundVector.isEmpty()) return null; @@ -251,6 +257,7 @@ public class SceneBase implements Scene { * This method returns an array of all Fog nodes defined in the * file. */ + @Override public Fog[] getFogNodes() { if (fogVector.isEmpty()) return null; @@ -264,6 +271,7 @@ public class SceneBase implements Scene { * This method returns a group containing all of the Behavior nodes * in the scene. */ + @Override public Behavior[] getBehaviorNodes() { if (behaviorVector.isEmpty()) return null; @@ -278,6 +286,7 @@ public class SceneBase implements Scene { * This method returns an array of all of the Sound nodes defined * in the file. */ + @Override public Sound[] getSoundNodes() { if (soundVector.isEmpty()) return null; @@ -291,6 +300,7 @@ public class SceneBase implements Scene { * This method returns the text description of the file. If no * such description exists, this method should return null. */ + @Override public String getDescription() { return description; } diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/J3dLwoParser.java b/src/classes/share/com/sun/j3d/loaders/lw3d/J3dLwoParser.java index b4d328c..ea8e048 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/J3dLwoParser.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/J3dLwoParser.java @@ -98,6 +98,7 @@ class J3dLwoParser extends LwoParser { super(url, debugVals); } + @Override void getSurf(int length) throws FileNotFoundException { super.getSurf(length); } diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/LWOBFileReader.java b/src/classes/share/com/sun/j3d/loaders/lw3d/LWOBFileReader.java index 6c640b5..dd3a755 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/LWOBFileReader.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/LWOBFileReader.java @@ -222,6 +222,7 @@ class LWOBFileReader extends BufferedInputStream { + @Override public int read() throws IOException { marker++; return super.read(); @@ -229,6 +230,7 @@ class LWOBFileReader extends BufferedInputStream { + @Override public int read(byte[] buffer, int offset, int count) throws IOException { int ret = super.read(buffer, offset, count); if (ret != -1) marker += ret; diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/LightIntensityPathInterpolator.java b/src/classes/share/com/sun/j3d/loaders/lw3d/LightIntensityPathInterpolator.java index 6bc7855..aa5a4ff 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/LightIntensityPathInterpolator.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/LightIntensityPathInterpolator.java @@ -69,6 +69,7 @@ class LightIntensityPathInterpolator extends FloatValueInterpolator { * @param criteria enumeration of criteria that have triggered this wakeup */ + @Override public void processStimulus(Enumeration criteria) { // Handle stimulus diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/Lw3dLoader.java b/src/classes/share/com/sun/j3d/loaders/lw3d/Lw3dLoader.java index cacd1c9..300e0e2 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/Lw3dLoader.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/Lw3dLoader.java @@ -133,6 +133,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { * users should specify an alternate base path with the setBaseUrl(URL) * method. */ + @Override public Scene load(URL url) throws FileNotFoundException, IncorrectFormatException, ParsingErrorException { @@ -158,6 +159,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { * otherwise users should specify an alternate base path with * the setBasePath(String) method. */ + @Override public Scene load(String fileName) throws FileNotFoundException, IncorrectFormatException, ParsingErrorException { @@ -174,6 +176,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { * containing the scene. Any data files referenced by the Reader should * be located in the user's current working directory. */ + @Override public Scene load(Reader reader) throws FileNotFoundException, IncorrectFormatException, ParsingErrorException { @@ -455,6 +458,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { * associated files starting from the same directory as the * file passed into the load(URL) method. */ + @Override public void setBaseUrl(URL url) { baseUrl = url; } @@ -463,6 +467,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { * This method sets the base path to be used when searching for all * data files within a Lightwave scene. */ + @Override public void setBasePath(String pathName) { // This routine standardizes path names so that all pathnames // will have standard file separators, they'll end in a separator @@ -481,6 +486,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { /** * Returns the current base URL setting. */ + @Override public URL getBaseUrl() { return baseUrl; } @@ -488,6 +494,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { /** * Returns the current base path setting. */ + @Override public String getBasePath() { return basePath; } @@ -496,6 +503,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { * This method sets the load flags for the file. The flags should * equal 0 by default (which tells the loader to only load geometry). */ + @Override public void setFlags(int flags) { loadFlags = flags; } @@ -503,6 +511,7 @@ public class Lw3dLoader extends TextfileParser implements Loader { /** * Returns the current loading flags setting. */ + @Override public int getFlags() { return loadFlags; } diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsCamera.java b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsCamera.java index 26cfa17..bef9f5d 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsCamera.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsCamera.java @@ -151,6 +151,7 @@ class LwsCamera extends TextfileParser implements LwsPrimitive { /** * Returns TransformGroup of camera */ + @Override public TransformGroup getObjectNode() { return objectTransform; @@ -159,6 +160,7 @@ class LwsCamera extends TextfileParser implements LwsPrimitive { /** * Returns animation behaviors for camera */ + @Override public Vector getObjectBehaviors() { debugOutputLn(TRACE, "getObjectBehaviors()"); diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsEnvelopeLightIntensity.java b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsEnvelopeLightIntensity.java index b7c29a0..b8ff1b8 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsEnvelopeLightIntensity.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsEnvelopeLightIntensity.java @@ -124,11 +124,13 @@ class LwsEnvelopeLightIntensity extends LwsEnvelope { } + @Override Behavior getBehaviors() { return behaviors; } + @Override LwsEnvelopeFrame getFirstFrame() { if (numFrames > 0) return frames[0]; @@ -137,6 +139,7 @@ class LwsEnvelopeLightIntensity extends LwsEnvelope { } + @Override void printVals() { debugOutputLn(VALUES, " name = " + name); debugOutputLn(VALUES, " numChannels = " + numChannels); diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsLight.java b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsLight.java index 2316c2f..bd800dd 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsLight.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsLight.java @@ -250,6 +250,7 @@ class LwsLight extends TextfileParser implements LwsPrimitive { } } + @Override public TransformGroup getObjectNode() { return objectTransform; @@ -259,6 +260,7 @@ class LwsLight extends TextfileParser implements LwsPrimitive { return light; } + @Override public Vector getObjectBehaviors() { debugOutputLn(TRACE, "getObjectBehaviors()"); diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsObject.java b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsObject.java index da640ec..555655e 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/LwsObject.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/LwsObject.java @@ -541,6 +541,7 @@ class LwsObject extends TextfileParser implements LwsPrimitive { /** * Return the TransformGroup that holds this object file */ + @Override public TransformGroup getObjectNode() { return objectTransform; } @@ -550,6 +551,7 @@ class LwsObject extends TextfileParser implements LwsPrimitive { * are grouped separately from the geometry so that they can be handled * differently by the parent application. */ + @Override public Vector getObjectBehaviors() { debugOutputLn(TRACE, "getObjectBehaviors()"); diff --git a/src/classes/share/com/sun/j3d/loaders/lw3d/SwitchPathInterpolator.java b/src/classes/share/com/sun/j3d/loaders/lw3d/SwitchPathInterpolator.java index 380bcc7..b52e1bf 100644 --- a/src/classes/share/com/sun/j3d/loaders/lw3d/SwitchPathInterpolator.java +++ b/src/classes/share/com/sun/j3d/loaders/lw3d/SwitchPathInterpolator.java @@ -90,6 +90,7 @@ class SwitchPathInterpolator extends FloatValueInterpolator { * @param criteria enumeration of criteria that have triggered this wakeup */ + @Override public void processStimulus(Enumeration criteria) { int child; diff --git a/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFile.java b/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFile.java index c4fea01..98f7fb5 100644 --- a/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFile.java +++ b/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFile.java @@ -658,6 +658,7 @@ public class ObjectFile implements Loader { * BranchGroup to your scene graph. For an example, see * j3d-examples/ObjLoad/ObjLoad.java. */ + @Override public Scene load(String filename) throws FileNotFoundException, IncorrectFormatException, ParsingErrorException { @@ -693,6 +694,7 @@ public class ObjectFile implements Loader { * BranchGroup to your scene graph. For an example, see * j3d-examples/ObjLoad/ObjLoad.java. */ + @Override public Scene load(URL url) throws FileNotFoundException, IncorrectFormatException, ParsingErrorException { @@ -1211,6 +1213,7 @@ public class ObjectFile implements Loader { * BranchGroup to your scene graph. For an example, see * j3d-examples/ObjLoad/ObjLoad.java. */ + @Override public Scene load(Reader reader) throws FileNotFoundException, IncorrectFormatException, ParsingErrorException { @@ -1257,6 +1260,7 @@ public class ObjectFile implements Loader { * Only needs to be called to set it to a different URL * from that containing the .obj file. */ + @Override public void setBaseUrl(URL url) { baseUrl = url; } // End of setBaseUrl @@ -1266,6 +1270,7 @@ public class ObjectFile implements Loader { * Return the URL where files associated with this .obj file (like * material properties files) will be found. */ + @Override public URL getBaseUrl() { return baseUrl; } // End of getBaseUrl @@ -1277,6 +1282,7 @@ public class ObjectFile implements Loader { * Only needs to be called to set it to a different directory * from that containing the .obj file. */ + @Override public void setBasePath(String pathName) { basePath = pathName; if (basePath == null || basePath == "") @@ -1292,6 +1298,7 @@ public class ObjectFile implements Loader { * Return the path where files associated with this .obj file (like material * files) are located. */ + @Override public String getBasePath() { return basePath; } // End of getBasePath @@ -1304,6 +1311,7 @@ public class ObjectFile implements Loader { * behaviors, views, or sounds. However, several flags are defined * specifically for use with the ObjectFile Loader (see above). */ + @Override public void setFlags(int flags) { this.flags = flags; if ((DEBUG & 4) != 0) System.out.println("Flags = " + flags); @@ -1317,6 +1325,7 @@ public class ObjectFile implements Loader { * behaviors, views, or sounds. However, several flags are defined * specifically for use with the ObjectFile Loader (see above). */ + @Override public int getFlags() { return flags; } // End of getFlags diff --git a/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFileMaterials.java b/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFileMaterials.java index bc13a06..d294795 100644 --- a/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFileMaterials.java +++ b/src/classes/share/com/sun/j3d/loaders/objectfile/ObjectFileMaterials.java @@ -407,6 +407,7 @@ class ObjectFileMaterials implements ImageObserver { * Implement the ImageObserver interface. Needed to load jpeg and gif * files using the Toolkit. */ + @Override public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) { diff --git a/src/classes/share/com/sun/j3d/utils/applet/JMainFrame.java b/src/classes/share/com/sun/j3d/utils/applet/JMainFrame.java index dbb4c5d..62541fd 100644 --- a/src/classes/share/com/sun/j3d/utils/applet/JMainFrame.java +++ b/src/classes/share/com/sun/j3d/utils/applet/JMainFrame.java @@ -179,6 +179,7 @@ public class JMainFrame extends JFrame // WindowListener inner class to detect close events. addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent winEvent) { if (JMainFrame.this.applet != null) { @@ -220,6 +221,7 @@ public class JMainFrame extends JFrame // Methods from Runnable. /// Separate thread to call the applet's init() and start() methods. + @Override public void run() { showStatus( name + " initializing..." ); applet.init(); @@ -232,10 +234,12 @@ public class JMainFrame extends JFrame // Methods from AppletStub. + @Override public boolean isActive() { return true; } + @Override public URL getDocumentBase() { // Returns the current directory. String dir = System.getProperty( "user.dir" ); @@ -248,6 +252,7 @@ public class JMainFrame extends JFrame } } + @Override public URL getCodeBase() { // Hack: loop through each item in CLASSPATH, checking if // the appropriately named .class file exists there. But @@ -271,11 +276,13 @@ public class JMainFrame extends JFrame return null; } + @Override public String getParameter( String name ) { // Return a parameter via the munged names in the properties list. return System.getProperty( PARAM_PROP_PREFIX + name.toLowerCase() ); } + @Override public void appletResize( int width, int height ) { // Change the frame's size by the same amount that the applet's // size is changing. @@ -286,6 +293,7 @@ public class JMainFrame extends JFrame appletSize = applet.getSize(); } + @Override public AppletContext getAppletContext() { return this; } @@ -293,6 +301,7 @@ public class JMainFrame extends JFrame // Methods from AppletContext. + @Override public AudioClip getAudioClip( URL url ) { // This is an internal undocumented routine. However, it // also provides needed functionality not otherwise available. @@ -302,6 +311,7 @@ public class JMainFrame extends JFrame return new sun.applet.AppletAudioClip( url ); } + @Override public Image getImage( URL url ) { Toolkit tk = Toolkit.getDefaultToolkit(); try { @@ -313,6 +323,7 @@ public class JMainFrame extends JFrame } } + @Override public Applet getApplet( String name ) { // Returns this Applet or nothing. if ( name.equals( this.name ) ) @@ -320,6 +331,7 @@ public class JMainFrame extends JFrame return null; } + @Override public Enumeration getApplets() { // Just yields this applet. Vector v = new Vector(); @@ -327,29 +339,35 @@ public class JMainFrame extends JFrame return v.elements(); } + @Override public void showDocument( URL url ) { // Ignore. } + @Override public void showDocument( URL url, String target ) { // Ignore. } + @Override public void showStatus( String status ) { if ( label != null ) label.setText( status ); } + @Override public void setStream( String key, java.io.InputStream stream ) { throw new RuntimeException("Not Implemented"); // TODO implement setStream method } + @Override public java.io.InputStream getStream( String key ) { throw new RuntimeException("Not Implemented"); // TODO implement getStream method } + @Override public java.util.Iterator getStreamKeys() { throw new RuntimeException("Not Implemented"); // TODO implement getStreamKeys method diff --git a/src/classes/share/com/sun/j3d/utils/applet/MainFrame.java b/src/classes/share/com/sun/j3d/utils/applet/MainFrame.java index f709639..3415bc2 100644 --- a/src/classes/share/com/sun/j3d/utils/applet/MainFrame.java +++ b/src/classes/share/com/sun/j3d/utils/applet/MainFrame.java @@ -231,6 +231,7 @@ public class MainFrame extends Frame implements final boolean _doExit = doExit; addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent winEvent) { if (MainFrame.this.applet != null) { MainFrame.this.applet.destroy(); @@ -272,6 +273,7 @@ public class MainFrame extends Frame implements // Methods from Runnable. /// Separate thread to call the applet's init() and start() methods. + @Override public void run() { showStatus( name + " initializing..." ); applet.init(); @@ -284,10 +286,12 @@ public class MainFrame extends Frame implements // Methods from AppletStub. + @Override public boolean isActive() { return true; } + @Override public URL getDocumentBase() { // Returns the current directory. String dir = System.getProperty( "user.dir" ); @@ -299,6 +303,7 @@ public class MainFrame extends Frame implements } } + @Override public URL getCodeBase() { // Hack: loop through each item in CLASSPATH, checking if // the appropriately named .class file exists there. But @@ -321,11 +326,13 @@ public class MainFrame extends Frame implements return null; } + @Override public String getParameter(String name) { // Return a parameter via the munged names in the properties list. return System.getProperty( PARAM_PROP_PREFIX + name.toLowerCase() ); } + @Override public void appletResize(int width, int height) { // Change the frame's size by the same amount that the applet's // size is changing. @@ -336,12 +343,14 @@ public class MainFrame extends Frame implements appletSize = applet.getSize(); } + @Override public AppletContext getAppletContext() { return this; } // Methods from AppletContext. + @Override public AudioClip getAudioClip( URL url ) { // This is an internal undocumented routine. However, it // also provides needed functionality not otherwise available. @@ -351,6 +360,7 @@ public class MainFrame extends Frame implements return new sun.applet.AppletAudioClip( url ); } + @Override public Image getImage( URL url ) { Toolkit tk = Toolkit.getDefaultToolkit(); try { @@ -361,6 +371,7 @@ public class MainFrame extends Frame implements } } + @Override public Applet getApplet(String name) { // Returns this Applet or nothing. if (name.equals( this.name )) { @@ -369,6 +380,7 @@ public class MainFrame extends Frame implements return null; } + @Override public Enumeration getApplets() { // Just yields this applet. Vector v = new Vector(); @@ -376,30 +388,36 @@ public class MainFrame extends Frame implements return v.elements(); } + @Override public void showDocument( URL url ) { // Ignore. } + @Override public void showDocument( URL url, String target ) { // Ignore. } + @Override public void showStatus( String status ) { if (label != null) { label.setText(status); } } + @Override public void setStream( String key, java.io.InputStream stream ) { throw new RuntimeException("Not Implemented"); // TODO implement setStream method } + @Override public java.io.InputStream getStream( String key ) { throw new RuntimeException("Not Implemented"); // TODO implement getStream method } + @Override public java.util.Iterator getStreamKeys() { throw new RuntimeException("Not Implemented"); // TODO implement getStreamKeys method diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolator.java b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolator.java index aedc03f..457a2ef 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolator.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolator.java @@ -141,6 +141,7 @@ public class KBRotPosScaleSplinePathInterpolator * @param index Index of the key frame to change * @param keyFrame The new key frame */ + @Override public void setKeyFrame( int index, KBKeyFrame keyFrame ) { super.setKeyFrame( index, keyFrame ); @@ -154,6 +155,7 @@ public class KBRotPosScaleSplinePathInterpolator * Set all the key frames * @param keyFrame The new key frames */ + @Override public void setKeyFrames( KBKeyFrame[] keyFrame ) { super.setKeyFrames( keyFrame ); @@ -172,6 +174,7 @@ public class KBRotPosScaleSplinePathInterpolator * * @since Java 3D 1.3 */ + @Override public void computeTransform(float alphaValue, Transform3D transform) { // compute the current value of u from alpha and the // determine lower and upper knot points @@ -270,6 +273,7 @@ public class KBRotPosScaleSplinePathInterpolator * @see Node#cloneTree * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public Node cloneNode(boolean forceDuplicate) { KBRotPosScaleSplinePathInterpolator spline = new KBRotPosScaleSplinePathInterpolator(); @@ -299,6 +303,7 @@ public class KBRotPosScaleSplinePathInterpolator * @see Node#cloneTree * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBSplinePathInterpolator.java b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBSplinePathInterpolator.java index da8f427..5782a41 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBSplinePathInterpolator.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/KBSplinePathInterpolator.java @@ -287,6 +287,7 @@ public abstract class KBSplinePathInterpolator extends TransformInterpolator { * @see Node#cloneTree * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); KBSplinePathInterpolator originalSpline = diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolator.java b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolator.java index 3d2591e..ab856b2 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolator.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolator.java @@ -137,6 +137,7 @@ extends TCBSplinePathInterpolator { * * @since Java 3D 1.3 */ + @Override public void computeTransform(float alphaValue, Transform3D transform) { // compute the current value of u from alpha and the @@ -211,6 +212,7 @@ extends TCBSplinePathInterpolator { * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public Node cloneNode(boolean forceDuplicate) { RotPosScaleTCBSplinePathInterpolator spline = new RotPosScaleTCBSplinePathInterpolator(); @@ -239,6 +241,7 @@ extends TCBSplinePathInterpolator { * @see Node#cloneTree * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); RotPosScaleTCBSplinePathInterpolator interpolator = diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/TCBSplinePathInterpolator.java b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/TCBSplinePathInterpolator.java index f668f56..b8fe090 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/TCBSplinePathInterpolator.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/interpolators/TCBSplinePathInterpolator.java @@ -266,6 +266,7 @@ public abstract class TCBSplinePathInterpolator extends TransformInterpolator { * @see Node#cloneTree * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); TCBSplinePathInterpolator originalSpline = (TCBSplinePathInterpolator) originalNode; diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/keyboard/KeyNavigatorBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/keyboard/KeyNavigatorBehavior.java index e59dfb5..4d38238 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/keyboard/KeyNavigatorBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/keyboard/KeyNavigatorBehavior.java @@ -77,6 +77,7 @@ public class KeyNavigatorBehavior extends Behavior implements KeyListener { /** * Override Behavior's initialize method to setup wakeup criteria. */ + @Override public void initialize() { // Establish initial wakeup criteria if (listener) { @@ -93,6 +94,7 @@ public class KeyNavigatorBehavior extends Behavior implements KeyListener { /** * Override Behavior's stimulus method to handle the event. */ + @Override public void processStimulus(Enumeration criteria) { WakeupOnAWTEvent ev; WakeupCriterion genericEvt; @@ -191,6 +193,7 @@ public class KeyNavigatorBehavior extends Behavior implements KeyListener { listener = true; } + @Override public void keyPressed(KeyEvent evt) { // System.out.println("keyPressed"); @@ -203,6 +206,7 @@ public class KeyNavigatorBehavior extends Behavior implements KeyListener { } } + @Override public void keyReleased(KeyEvent evt) { // System.out.println("keyReleased"); @@ -215,6 +219,7 @@ public class KeyNavigatorBehavior extends Behavior implements KeyListener { } } + @Override public void keyTyped(KeyEvent evt) {} } diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseBehavior.java index 6f432f3..3a72fd9 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseBehavior.java @@ -200,6 +200,7 @@ public abstract class MouseBehavior extends Behavior /** Initializes the behavior. */ + @Override public void initialize() { mouseEvents = new WakeupCriterion[4]; @@ -263,6 +264,7 @@ public abstract class MouseBehavior extends Behavior /** * All mouse manipulators must implement this. */ + @Override public abstract void processStimulus (Enumeration criteria); /** @@ -285,10 +287,14 @@ public abstract class MouseBehavior extends Behavior c.addMouseWheelListener(this); } + @Override public void mouseClicked(MouseEvent e) {} + @Override public void mouseEntered(MouseEvent e) {} + @Override public void mouseExited(MouseEvent e) {} + @Override public void mousePressed(MouseEvent e) { // System.out.println("mousePressed"); @@ -304,6 +310,7 @@ public abstract class MouseBehavior extends Behavior } } + @Override public void mouseReleased(MouseEvent e) { // System.out.println("mouseReleased"); @@ -319,6 +326,7 @@ public abstract class MouseBehavior extends Behavior } } + @Override public void mouseDragged(MouseEvent e) { // System.out.println("mouseDragged"); @@ -334,8 +342,10 @@ public abstract class MouseBehavior extends Behavior } } + @Override public void mouseMoved(MouseEvent e) {} + @Override public void setEnable(boolean state) { super.setEnable(state); this.enable = state; @@ -344,6 +354,7 @@ public abstract class MouseBehavior extends Behavior } } + @Override public void mouseWheelMoved(MouseWheelEvent e){ System.out.println("MouseBehavior : mouseWheel enable = " + enable ); diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseRotate.java b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseRotate.java index 30beb51..33aaba8 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseRotate.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseRotate.java @@ -149,6 +149,7 @@ public class MouseRotate extends MouseBehavior { super(c, flags); } + @Override public void initialize() { super.initialize(); x_angle = 0; @@ -191,6 +192,7 @@ public class MouseRotate extends MouseBehavior { y_factor = yFactor; } + @Override public void processStimulus (Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] events; diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseTranslate.java b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseTranslate.java index f5e0b53..f81366a 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseTranslate.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseTranslate.java @@ -137,6 +137,7 @@ public class MouseTranslate extends MouseBehavior { super(c, flags); } + @Override public void initialize() { super.initialize(); if ((flags & INVERT_INPUT) == INVERT_INPUT) { @@ -176,6 +177,7 @@ public class MouseTranslate extends MouseBehavior { y_factor = yFactor; } + @Override public void processStimulus (Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] events; diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseWheelZoom.java b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseWheelZoom.java index 05d358f..8d360b2 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseWheelZoom.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseWheelZoom.java @@ -137,6 +137,7 @@ public class MouseWheelZoom extends MouseBehavior { super(c, flags); } + @Override public void initialize() { super.initialize(); if ((flags & INVERT_INPUT) == INVERT_INPUT) { @@ -160,6 +161,7 @@ public class MouseWheelZoom extends MouseBehavior { } + @Override public void processStimulus(Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] events; diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseZoom.java b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseZoom.java index fb29a3c..86471a5 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseZoom.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/mouse/MouseZoom.java @@ -136,6 +136,7 @@ public class MouseZoom extends MouseBehavior { super(c, flags); } + @Override public void initialize() { super.initialize(); if ((flags & INVERT_INPUT) == INVERT_INPUT) { @@ -159,6 +160,7 @@ public class MouseZoom extends MouseBehavior { } + @Override public void processStimulus (Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] events; diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickMouseBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickMouseBehavior.java index 813c47f..c64f731 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickMouseBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickMouseBehavior.java @@ -95,6 +95,7 @@ public abstract class PickMouseBehavior extends Behavior { pickScene = new PickObject(canvas, root); } + @Override public void initialize() { conditions = new WakeupCriterion[2]; @@ -118,6 +119,7 @@ public abstract class PickMouseBehavior extends Behavior { } } + @Override public void processStimulus (Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] evt = null; diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickRotateBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickRotateBehavior.java index d876c9d..7e491e0 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickRotateBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickRotateBehavior.java @@ -146,6 +146,7 @@ public class PickRotateBehavior extends PickMouseBehavior implements MouseBehavi * @param xpos Current mouse X pos. * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -172,6 +173,7 @@ public class PickRotateBehavior extends PickMouseBehavior implements MouseBehavi * Callback method from MouseRotate * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.ROTATE, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickTranslateBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickTranslateBehavior.java index c79c58f..89b307a 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickTranslateBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickTranslateBehavior.java @@ -131,6 +131,7 @@ public class PickTranslateBehavior extends PickMouseBehavior implements MouseBeh * @param xpos Current mouse X pos. * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -156,6 +157,7 @@ public class PickTranslateBehavior extends PickMouseBehavior implements MouseBeh * Callback method from MouseTranslate * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.TRANSLATE, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickZoomBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickZoomBehavior.java index 296ff14..c405451 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickZoomBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/picking/PickZoomBehavior.java @@ -135,6 +135,7 @@ public class PickZoomBehavior extends PickMouseBehavior implements MouseBehavior * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -159,6 +160,7 @@ public class PickZoomBehavior extends PickMouseBehavior implements MouseBehavior * Callback method from MouseZoom * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.ZOOM, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/sensor/Mouse6DPointerBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/sensor/Mouse6DPointerBehavior.java index 4c583ae..188840a 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/sensor/Mouse6DPointerBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/sensor/Mouse6DPointerBehavior.java @@ -157,6 +157,7 @@ public class Mouse6DPointerBehavior extends Behavior { * NOTE: Applications should not call this method. It is called by the * Java 3D behavior scheduler. */ + @Override public void initialize() { wakeupOn(conditions) ; } @@ -166,6 +167,7 @@ public class Mouse6DPointerBehavior extends Behavior { * NOTE: Applications should not call this method. It is called by the * Java 3D behavior scheduler. */ + @Override public void processStimulus(Enumeration criteria) { eventAgent.dispatchEvents() ; wakeupOn(conditions) ; @@ -178,6 +180,7 @@ public class Mouse6DPointerBehavior extends Behavior { public class EchoReadListener implements SensorReadListener { private Transform3D t3d = new Transform3D() ; + @Override public void read(SensorEvent e) { // Get the Transform3D that transforms points from local sensor // coordinates to virtual world coordinates, based on the primary diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.java b/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.java index b973b8c..dac15e3 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorEventAgent.java @@ -172,6 +172,7 @@ public class SensorEventAgent { (new SensorReadListener[readBindingsList.size()]) ; } + @Override public String toString() { String s = new String() ; s = "sensor " + sensor + "\nbutton listener arrays:\n" ; @@ -211,6 +212,7 @@ public class SensorEventAgent { this.multiButton = multiButtonEnable ; } + @Override public String toString() { String s = new String() ; s = " length " + listeners.length + @@ -700,6 +702,7 @@ public class SensorEventAgent { } } + @Override public String toString() { String s = "SensorEventAgent@" + Integer.toHexString(hashCode()) ; s += "\nsensor bindings:\n\n" ; diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorInputAdaptor.java b/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorInputAdaptor.java index 69e6cba..cee6c02 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorInputAdaptor.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/sensor/SensorInputAdaptor.java @@ -49,18 +49,23 @@ package com.sun.j3d.utils.behaviors.sensor ; public class SensorInputAdaptor implements SensorButtonListener, SensorReadListener { + @Override public void pressed(SensorEvent e) { } + @Override public void released(SensorEvent e) { } + @Override public void dragged(SensorEvent e) { } + @Override public void clicked(SensorEvent e) { } + @Override public void read(SensorEvent e) { } } diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/vp/OrbitBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/vp/OrbitBehavior.java index 1791324..b046096 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/vp/OrbitBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/vp/OrbitBehavior.java @@ -283,6 +283,7 @@ public class OrbitBehavior extends ViewPlatformAWTBehavior { } } + @Override protected synchronized void processAWTEvents( final AWTEvent[] events ) { motion = false; for(int i=0; i<events.length; i++) @@ -460,6 +461,7 @@ public class OrbitBehavior extends ViewPlatformAWTBehavior { rotateTransform.set( rotMatrix ); } + @Override protected synchronized void integrateTransforms() { // Check if the transform has been changed by another // behavior diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.java index 3bbe949..5c2a5e1 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.java @@ -185,6 +185,7 @@ implements MouseListener, MouseMotionListener, KeyListener, MouseWheelListener { * NOTE: Applications should not call this method. It is called by the * Java 3D behavior scheduler. */ + @Override public void initialize() { frameWakeup = new WakeupOnElapsedFrames( 0 ); postWakeup = new WakeupOnBehaviorPost( this, POST_ID ); @@ -197,6 +198,7 @@ implements MouseListener, MouseMotionListener, KeyListener, MouseWheelListener { * NOTE: Applications should not call this method. It is called by the * Java 3D behavior scheduler. */ + @Override public void processStimulus( java.util.Enumeration behEnum ) { boolean hadPost = false; @@ -233,6 +235,7 @@ implements MouseListener, MouseMotionListener, KeyListener, MouseWheelListener { * Adds/Removes the AWT listeners depending on the requested * state. */ + @Override public void setEnable( boolean state ) { if (state==getEnable()) return; @@ -288,6 +291,7 @@ implements MouseListener, MouseMotionListener, KeyListener, MouseWheelListener { * super.setViewingPlatform(vp). * NOTE: Applications should <i>not</i> call this method. */ + @Override public void setViewingPlatform(ViewingPlatform vp) { super.setViewingPlatform( vp ); @@ -356,46 +360,57 @@ implements MouseListener, MouseMotionListener, KeyListener, MouseWheelListener { } } + @Override public void mouseClicked(final MouseEvent e) { queueAWTEvent( e ); } + @Override public void mouseEntered(final MouseEvent e) { queueAWTEvent( e ); } + @Override public void mouseExited(final MouseEvent e) { queueAWTEvent( e ); } + @Override public void mousePressed(final MouseEvent e) { queueAWTEvent( e ); } + @Override public void mouseReleased(final MouseEvent e) { queueAWTEvent( e ); } + @Override public void mouseDragged(final MouseEvent e) { queueAWTEvent( e ); } + @Override public void mouseMoved(final MouseEvent e) { queueAWTEvent( e ); } + @Override public void keyReleased(final java.awt.event.KeyEvent e) { queueAWTEvent( e ); } + @Override public void keyPressed(final java.awt.event.KeyEvent e) { queueAWTEvent( e ); } + @Override public void keyTyped(final java.awt.event.KeyEvent e) { queueAWTEvent( e ); } + @Override public void mouseWheelMoved( final java.awt.event.MouseWheelEvent e) { queueAWTEvent( e ); } diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java index fff83b0..c84ab0c 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java @@ -581,6 +581,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { * NOTE: Applications should <i>not</i> call this method. It is called by * the Java 3D behavior scheduler. */ + @Override public void initialize() { // Don't configure the sensors and echo after the first time. if (!configured) { @@ -616,6 +617,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { * NOTE: Applications should <i>not</i> call this method. It is called by * the Java 3D behavior scheduler. */ + @Override public void processStimulus(Enumeration criteria) { // Invoke the sensor event dispatcher. eventAgent.dispatchEvents() ; @@ -628,6 +630,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { * Enables or disables this behavior. The default state is enabled. * @param enable true or false to enable or disable this behavior */ + @Override public void setEnable(boolean enable) { if (enable == getEnable()) { return ; @@ -648,6 +651,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { * <i>not</i> call this method. It is called by the * <code>ViewingPlatform</code>. */ + @Override public void setViewingPlatform(ViewingPlatform vp) { super.setViewingPlatform(vp) ; if (vp == null) { @@ -1014,10 +1018,12 @@ public class WandViewBehavior extends ViewPlatformBehavior { return active ; } + @Override public void pressed(SensorEvent e) { initAction(e.getSensor()) ; } + @Override public void released(SensorEvent e) { endAction(e.getSensor()) ; } @@ -1148,6 +1154,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { private Transform3D t3d = new Transform3D() ; private Transform3D initialVworldToSensor = new Transform3D() ; + @Override public void pressed(SensorEvent e) { initAction(e.getSensor()) ; @@ -1155,6 +1162,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { initialVworldToSensor.invert(sensorToVworld) ; } + @Override public void dragged(SensorEvent e) { // Get sensor read relative to the static view at the time of the // button-down. @@ -1213,11 +1221,13 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override public void pressed(SensorEvent e) { initAction(e.getSensor()) ; buttonDownTime = e.getTime() ; } + @Override public void dragged(SensorEvent e) { long time = e.getTime() ; long lastTime = e.getLastTime() ; @@ -1295,6 +1305,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { private Transform3D headToVworld = new Transform3D() ; private double speedScaled ; + @Override protected void initAction(Sensor s) { super.initAction(s) ; if (rotationCoords == HEAD) { @@ -1302,6 +1313,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override protected void endAction(Sensor s) { super.endAction(s) ; viewPlatformToVworld.normalize() ; @@ -1325,11 +1337,13 @@ public class WandViewBehavior extends ViewPlatformBehavior { speedScaled = rotationSpeed ; } + @Override public void pressed(SensorEvent e) { initAction(e.getSensor()) ; buttonDownTime = e.getTime() ; } + @Override public void dragged(SensorEvent e) { long time = e.getTime() ; long lastTime = e.getLastTime() ; @@ -1421,6 +1435,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { private Point3d center = new Point3d() ; private Transform3D t3d = new Transform3D() ; + @Override protected void endAction(Sensor s) { super.endAction(s) ; conditionViewScale(viewPlatformToVworld) ; @@ -1439,11 +1454,13 @@ public class WandViewBehavior extends ViewPlatformBehavior { direction = 1.0 ; } + @Override public void pressed(SensorEvent e) { initAction(e.getSensor()) ; buttonDownTime = e.getTime() ; } + @Override public void dragged(SensorEvent e) { long time = e.getTime() ; long lastTime = e.getLastTime() ; @@ -1519,6 +1536,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { public class EchoReadListener6D implements SensorReadListener { private Transform3D sensorToVworld = new Transform3D() ; + @Override public void read(SensorEvent e) { Sensor s = e.getSensor() ; view.getSensorToVworld(s, sensorToVworld) ; @@ -1569,6 +1587,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { private Transform3D headToVworld = new Transform3D() ; private double speedScaled ; + @Override protected void initAction(Sensor s) { super.initAction(s) ; if (rotationCoords == HEAD) { @@ -1580,6 +1599,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override protected void endAction(Sensor s) { super.endAction(s) ; viewPlatformToVworld.normalize() ; @@ -1611,6 +1631,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { speedScaled = rotationSpeed ; } + @Override public void read(SensorEvent e) { sensor2D.getRead(sensor2DRead) ; sensor2DRead.get(m) ; @@ -1688,14 +1709,17 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override public void pressed(SensorEvent e) { initAction(sensor6D) ; } + @Override public void released(SensorEvent e) { if (isActive()) endAction(sensor6D) ; } + @Override public void dragged(SensorEvent e) { read(e) ; } @@ -1733,6 +1757,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { private Transform3D sensor2DRead = new Transform3D() ; private double speedScaled ; + @Override protected void initAction(Sensor s) { super.initAction(s) ; if (s != null && readAction6D == ECHO) { @@ -1741,6 +1766,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override protected void endAction(Sensor s) { super.endAction(s) ; if (s != null && readAction6D == ECHO) { @@ -1772,6 +1798,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { speedScaled *= getPhysicalToViewPlatformScale() ; } + @Override public void read(SensorEvent e) { sensor2D.getRead(sensor2DRead) ; sensor2DRead.get(m) ; @@ -1831,14 +1858,17 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override public void pressed(SensorEvent e) { initAction(sensor6D) ; } + @Override public void released(SensorEvent e) { if (isActive()) endAction(sensor6D) ; } + @Override public void dragged(SensorEvent e) { read(e) ; } @@ -1872,6 +1902,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { private Transform3D t3d = new Transform3D() ; private Transform3D sensor2DRead = new Transform3D() ; + @Override protected void initAction(Sensor s) { super.initAction(s) ; if (s != null && readAction6D == ECHO) { @@ -1880,6 +1911,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override protected void endAction(Sensor s) { super.endAction(s) ; conditionViewScale(viewPlatformToVworld) ; @@ -1901,6 +1933,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { this.sensor6D = sensor6D ; } + @Override public void read(SensorEvent e) { sensor2D.getRead(sensor2DRead) ; sensor2DRead.get(m) ; @@ -1970,14 +2003,17 @@ public class WandViewBehavior extends ViewPlatformBehavior { } } + @Override public void pressed(SensorEvent e) { initAction(sensor6D) ; } + @Override public void released(SensorEvent e) { if (isActive()) endAction(sensor6D) ; } + @Override public void dragged(SensorEvent e) { read(e) ; } @@ -2008,6 +2044,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { buttonState = new int[s.getSensorButtonCount()] ; } + @Override public void pressed(SensorEvent e) { int count = 0 ; e.getButtonState(buttonState) ; @@ -2020,6 +2057,7 @@ public class WandViewBehavior extends ViewPlatformBehavior { goHomeNextRead = true ; } + @Override public void read(SensorEvent e) { if (goHomeNextRead) { goHome() ; diff --git a/src/classes/share/com/sun/j3d/utils/compression/CompressedGeometryFile.java b/src/classes/share/com/sun/j3d/utils/compression/CompressedGeometryFile.java index 564f8c6..87d0d75 100644 --- a/src/classes/share/com/sun/j3d/utils/compression/CompressedGeometryFile.java +++ b/src/classes/share/com/sun/j3d/utils/compression/CompressedGeometryFile.java @@ -1004,6 +1004,7 @@ public class CompressedGeometryFile { /** * Release file resources when this object is garbage collected. */ + @Override protected void finalize() { close() ; } diff --git a/src/classes/share/com/sun/j3d/utils/compression/CompressionStream.java b/src/classes/share/com/sun/j3d/utils/compression/CompressionStream.java index 3a6b8af..10e12ba 100644 --- a/src/classes/share/com/sun/j3d/utils/compression/CompressionStream.java +++ b/src/classes/share/com/sun/j3d/utils/compression/CompressionStream.java @@ -716,6 +716,7 @@ public class CompressionStream { this.value = value ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { positionQuant = value ; positionQuantChanged = true ; @@ -725,6 +726,7 @@ public class CompressionStream { (((double)((1 << (value-1)) - 1))/((double)(1 << (value-1)))) ; } + @Override public String toString() { return "positionQuant: " + value ; } @@ -740,11 +742,13 @@ public class CompressionStream { this.value = value ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { normalQuant = value ; normalQuantChanged = true ; } + @Override public String toString() { return "normalQuant: " + value ; } @@ -760,11 +764,13 @@ public class CompressionStream { this.value = value ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { colorQuant = value ; colorQuantChanged = true ; } + @Override public String toString() { return "colorQuant: " + value ; } @@ -782,6 +788,7 @@ public class CompressionStream { meshReferenceCount++ ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { // Retrieve the vertex from the mesh buffer mirror and set up the // data needed for the next stream element to compute its deltas. @@ -812,6 +819,7 @@ public class CompressionStream { } } + @Override void outputCommand(HuffmanTable t, CommandStream outputBuffer) { int command = CommandStream.MESH_B_R ; long data = stripFlag & 0x1 ; @@ -820,6 +828,7 @@ public class CompressionStream { outputBuffer.addCommand(command, 8, data, 1) ; } + @Override public String toString() { return "meshReference: stripFlag " + stripFlag + @@ -1148,6 +1157,7 @@ public class CompressionStream { } } + @Override public void processVertex(int v, int stripFlag) { Point3f p = positions[v] ; int r = meshBuffer.getMeshReference(p) ; @@ -1263,6 +1273,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; int r = meshBuffer.getMeshReference(vi.pi) ; @@ -1402,6 +1413,7 @@ public class CompressionStream { abstract void copyVertex(int pi, int ni, int ci, VertexCopy vc) ; + @Override public void processVertex(int v, int stripFlag) { copyVertex(v, v, v, vc) ; processVertexCopy(vc, stripFlag) ; @@ -1420,6 +1432,7 @@ public class CompressionStream { vdata = ga.getInterleavedVertices() ; } + @Override void copyVertex(int pi, int ni, int ci, VertexCopy vc) { int voffset ; voffset = pi * vstride ; @@ -1466,6 +1479,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; @@ -1493,6 +1507,7 @@ public class CompressionStream { } } + @Override void copyVertex(int pi, int ni, int ci, VertexCopy vc) { int voffset ; voffset = pi * vstride ; @@ -1537,6 +1552,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; @@ -1659,6 +1675,7 @@ public class CompressionStream { } } + @Override public void processVertex(int v, int stripFlag) { copyVertex(v + initialPositionIndex, v + initialNormalIndex, @@ -1681,6 +1698,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; @@ -1813,6 +1831,7 @@ public class CompressionStream { } } + @Override public void processVertex(int v, int stripFlag) { copyVertex(v + initialPositionIndex, v + initialNormalIndex, @@ -1835,6 +1854,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; diff --git a/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamColor.java b/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamColor.java index 0740b0d..674eb96 100644 --- a/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamColor.java +++ b/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamColor.java @@ -102,6 +102,7 @@ class CompressionStreamColor extends CompressionStreamElement { * @param table HuffmanTable for collecting data about the quantized * representation of this element */ + @Override void quantize(CompressionStream stream, HuffmanTable huffmanTable) { // Clamp quantization. int quant = @@ -184,6 +185,7 @@ class CompressionStreamColor extends CompressionStreamElement { * compressed encodings * @param output CommandStream for collecting compressed output */ + @Override void outputCommand(HuffmanTable table, CommandStream output) { outputColor(table, output, CommandStream.SET_COLOR, 8) ; } @@ -253,6 +255,7 @@ class CompressionStreamColor extends CompressionStreamElement { colorSubcommand, subcommandLength) ; } + @Override public String toString() { String d = absolute? "" : "delta " ; String c = (colorR + " " + colorG + " " + colorB + diff --git a/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamNormal.java b/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamNormal.java index 00c4a9b..b43939a 100644 --- a/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamNormal.java +++ b/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamNormal.java @@ -326,6 +326,7 @@ class CompressionStreamNormal extends CompressionStreamElement { * @param table HuffmanTable for collecting data about the quantized * representation of this element */ + @Override void quantize(CompressionStream stream, HuffmanTable huffmanTable) { double nx, ny, nz, t ; @@ -571,6 +572,7 @@ class CompressionStreamNormal extends CompressionStreamElement { * compressed encodings * @param output CommandStream for collecting compressed output */ + @Override void outputCommand(HuffmanTable table, CommandStream output) { outputNormal(table, output, CommandStream.SET_NORM, 8) ; } @@ -648,6 +650,7 @@ class CompressionStreamNormal extends CompressionStreamElement { normalSubcommand, subcommandLength) ; } + @Override public String toString() { String fixed ; diff --git a/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamVertex.java b/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamVertex.java index df90d81..906c107 100644 --- a/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamVertex.java +++ b/src/classes/share/com/sun/j3d/utils/compression/CompressionStreamVertex.java @@ -149,6 +149,7 @@ class CompressionStreamVertex extends CompressionStreamElement { * @param table HuffmanTable for collecting data about the quantized * representation of this element */ + @Override void quantize(CompressionStream stream, HuffmanTable huffmanTable) { double px, py, pz ; @@ -247,6 +248,7 @@ class CompressionStreamVertex extends CompressionStreamElement { * compressed encodings * @param output CommandStream for collecting compressed output */ + @Override void outputCommand(HuffmanTable huffmanTable, CommandStream outputBuffer) { HuffmanNode t ; @@ -301,6 +303,7 @@ class CompressionStreamVertex extends CompressionStreamElement { color.outputSubcommand(huffmanTable, outputBuffer) ; } + @Override public String toString() { String d = absolute? "" : "delta " ; String c = (color == null? "": "\n\n " + color.toString()) ; diff --git a/src/classes/share/com/sun/j3d/utils/compression/HuffmanNode.java b/src/classes/share/com/sun/j3d/utils/compression/HuffmanNode.java index c6d6834..a89eec8 100644 --- a/src/classes/share/com/sun/j3d/utils/compression/HuffmanNode.java +++ b/src/classes/share/com/sun/j3d/utils/compression/HuffmanNode.java @@ -189,6 +189,7 @@ class HuffmanNode { return unmergeable ; } + @Override public String toString() { return "shift " + shift + " data length " + dataLength + @@ -201,6 +202,7 @@ class HuffmanNode { * Sorts nodes in ascending order by frequency. */ static class FrequencyComparator implements Comparator { + @Override public final int compare(Object o1, Object o2) { return ((HuffmanNode)o1).frequency - ((HuffmanNode)o2).frequency ; } @@ -210,6 +212,7 @@ class HuffmanNode { * Sorts nodes in descending order by tag bit length. */ static class TagLengthComparator implements Comparator { + @Override public final int compare(Object o1, Object o2) { return ((HuffmanNode)o2).tagLength - ((HuffmanNode)o1).tagLength ; } diff --git a/src/classes/share/com/sun/j3d/utils/geometry/Box.java b/src/classes/share/com/sun/j3d/utils/geometry/Box.java index cdda741..02124d7 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/Box.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/Box.java @@ -268,6 +268,7 @@ public class Box extends Primitive { * invalid partId is passed in, null is returned. */ + @Override public Shape3D getShape(int partId) { if ((partId >= FRONT) && (partId <= BOTTOM)) // return (Shape3D)(((Group)getChild(0)).getChild(partId)); @@ -282,6 +283,7 @@ public class Box extends Primitive { * individual shape and call shape.setAppearance(ap). */ + @Override public void setAppearance(Appearance ap){ // ((Shape3D)((Group)getChild(0)).getChild(TOP)).setAppearance(ap); // ((Shape3D)((Group)getChild(0)).getChild(LEFT)).setAppearance(ap); @@ -307,6 +309,7 @@ public class Box extends Primitive { * * @since Java 3D 1.2.1 */ + @Override public Appearance getAppearance(int partId) { if (partId > BOTTOM || partId < FRONT) return null; return getShape(partId).getAppearance(); @@ -413,6 +416,7 @@ public class Box extends Primitive { * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public Node cloneNode(boolean forceDuplicate) { Box b = new Box(xDim, yDim, zDim, flags, getAppearance()); b.duplicateNode(this, forceDuplicate); @@ -445,6 +449,7 @@ public class Box extends Primitive { * @see Node#cloneNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); } diff --git a/src/classes/share/com/sun/j3d/utils/geometry/Cone.java b/src/classes/share/com/sun/j3d/utils/geometry/Cone.java index 66c6b50..39d9729 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/Cone.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/Cone.java @@ -143,6 +143,7 @@ public class Cone extends Primitive { * @return The Shape3D object associated with the partId. If an * invalid partId is passed in, null is returned. */ + @Override public Shape3D getShape(int partId){ if (partId > CAP || partId < BODY) return null; return (Shape3D)getChild(partId); @@ -155,6 +156,7 @@ public class Cone extends Primitive { * part's appearance separately, use getShape(partId) to get the * individual shape and call shape.setAppearance(ap). */ + @Override public void setAppearance(Appearance ap){ ((Shape3D)getChild(BODY)).setAppearance(ap); ((Shape3D)getChild(CAP)).setAppearance(ap); @@ -170,6 +172,7 @@ public class Cone extends Primitive { * * @since Java 3D 1.2.1 */ + @Override public Appearance getAppearance(int partId) { if (partId > CAP || partId < BODY) return null; return getShape(partId).getAppearance(); @@ -347,6 +350,7 @@ public class Cone extends Primitive { * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public Node cloneNode(boolean forceDuplicate) { Cone c = new Cone(radius, height, flags, xdivisions, ydivisions, getAppearance()); @@ -380,6 +384,7 @@ public class Cone extends Primitive { * @see Node#cloneNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); } diff --git a/src/classes/share/com/sun/j3d/utils/geometry/Cylinder.java b/src/classes/share/com/sun/j3d/utils/geometry/Cylinder.java index fa6fdbb..b40b27b 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/Cylinder.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/Cylinder.java @@ -151,6 +151,7 @@ public class Cylinder extends Primitive{ * @return The Shape3D object associated with the partID. If an * invalid partId is passed in, null is returned. */ + @Override public Shape3D getShape(int partId){ if (partId > BOTTOM || partId < BODY) return null; return (Shape3D)getChild(partId); @@ -161,6 +162,7 @@ public class Cylinder extends Primitive{ * part's appearance separately, use getShape(partId) to get the * individual shape and call shape.setAppearance(ap). */ + @Override public void setAppearance(Appearance ap) { ((Shape3D)getChild(BODY)).setAppearance(ap); ((Shape3D)getChild(TOP)).setAppearance(ap); @@ -177,6 +179,7 @@ public class Cylinder extends Primitive{ * * @since Java 3D 1.2.1 */ + @Override public Appearance getAppearance(int partId) { if (partId > BOTTOM || partId < BODY) return null; return getShape(partId).getAppearance(); @@ -340,6 +343,7 @@ public class Cylinder extends Primitive{ * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public Node cloneNode(boolean forceDuplicate) { Cylinder c = new Cylinder(radius, height, flags, xdivisions, ydivisions, getAppearance()); @@ -373,6 +377,7 @@ public class Cylinder extends Primitive{ * @see Node#cloneNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); } diff --git a/src/classes/share/com/sun/j3d/utils/geometry/Edge.java b/src/classes/share/com/sun/j3d/utils/geometry/Edge.java index 547edc9..1841a0e 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/Edge.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/Edge.java @@ -47,11 +47,13 @@ class Edge { public int v2; private static final int HASHCONST = 0xEDCBA987; + @Override public int hashCode() { return ((v1 * HASHCONST) << 2) ^ (v2 * HASHCONST); } // end of Edge.hashCode + @Override public boolean equals(Object x) { if (!(x instanceof Edge)) return false; @@ -59,6 +61,7 @@ class Edge { return (v1 == e.v1) && (v2 == e.v2); } // End of Edge.equals + @Override public String toString() { return "(" + v1 + ", " + v2 + ")"; diff --git a/src/classes/share/com/sun/j3d/utils/geometry/GeometryInfo.java b/src/classes/share/com/sun/j3d/utils/geometry/GeometryInfo.java index f70c5c7..546aa8d 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/GeometryInfo.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/GeometryInfo.java @@ -1566,6 +1566,7 @@ public class GeometryInfo { int size; private static final int HASHCONST = 0xBABEFACE; + @Override public int hashCode() { int bits = 0; @@ -1575,6 +1576,7 @@ public class GeometryInfo { return bits; } // End of IndexRow.hashCode + @Override public boolean equals(Object obj) { for (int i = 0 ; i < size ; i++) { diff --git a/src/classes/share/com/sun/j3d/utils/geometry/Sphere.java b/src/classes/share/com/sun/j3d/utils/geometry/Sphere.java index 6decef8..98f56ec 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/Sphere.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/Sphere.java @@ -138,6 +138,7 @@ public class Sphere extends Primitive { * @return The Shape3D object associated with the partId. If an * invalid partId is passed in, null is returned. */ + @Override public Shape3D getShape(int partId) { if (partId != BODY) return null; // return (Shape3D)((Group)getChild(0)).getChild(BODY); @@ -153,6 +154,7 @@ public class Sphere extends Primitive { /** Sets appearance of the Sphere. */ + @Override public void setAppearance(Appearance ap) { // ((Shape3D)((Group)getChild(0)).getChild(BODY)).setAppearance(ap); ((Shape3D)getChild(BODY)).setAppearance(ap); @@ -168,6 +170,7 @@ public class Sphere extends Primitive { * * @since Java 3D 1.2.1 */ + @Override public Appearance getAppearance(int partId) { if (partId != BODY) return null; return getShape(partId).getAppearance(); @@ -306,6 +309,7 @@ public class Sphere extends Primitive { * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public Node cloneNode(boolean forceDuplicate) { Sphere s = new Sphere(radius, flags, divisions, getAppearance()); s.duplicateNode(this, forceDuplicate); @@ -339,6 +343,7 @@ public class Sphere extends Primitive { * @see Node#cloneNode * @see NodeComponent#setDuplicateOnCloneTree */ + @Override public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); } diff --git a/src/classes/share/com/sun/j3d/utils/geometry/StripifierStats.java b/src/classes/share/com/sun/j3d/utils/geometry/StripifierStats.java index f6c8983..5431473 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/StripifierStats.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/StripifierStats.java @@ -177,6 +177,7 @@ public class StripifierStats { * @since Java 3D 1.2.1 */ + @Override public String toString() { StringBuffer str = new StringBuffer( "num orig tris: " + numFaces + "\n" + diff --git a/src/classes/share/com/sun/j3d/utils/geometry/Text2D.java b/src/classes/share/com/sun/j3d/utils/geometry/Text2D.java index 421ef9c..77bb632 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/Text2D.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/Text2D.java @@ -135,6 +135,7 @@ public class Text2D extends Shape3D { } // issue 655 + @Override public Node cloneNode(boolean forceDuplicate) { Text2D t2d = new Text2D(); diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryData.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryData.java index 501c525..4c18434 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryData.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryData.java @@ -504,6 +504,7 @@ public class CompressedGeometryData extends Object { * * @return a String describing contents of the compressed geometry header */ + @Override public String toString() { String type = "UNKNOWN"; switch (bufferType) { diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryFile.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryFile.java index d0e66d8..797c9fc 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryFile.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressedGeometryFile.java @@ -1002,6 +1002,7 @@ public class CompressedGeometryFile { /** * Release file resources when this object is garbage collected. */ + @Override protected void finalize() { close() ; } diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStream.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStream.java index a444b81..f501db9 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStream.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStream.java @@ -712,6 +712,7 @@ public class CompressionStream { this.value = value ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { positionQuant = value ; positionQuantChanged = true ; @@ -721,6 +722,7 @@ public class CompressionStream { (((double)((1 << (value-1)) - 1))/((double)(1 << (value-1)))) ; } + @Override public String toString() { return "positionQuant: " + value ; } @@ -736,11 +738,13 @@ public class CompressionStream { this.value = value ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { normalQuant = value ; normalQuantChanged = true ; } + @Override public String toString() { return "normalQuant: " + value ; } @@ -756,11 +760,13 @@ public class CompressionStream { this.value = value ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { colorQuant = value ; colorQuantChanged = true ; } + @Override public String toString() { return "colorQuant: " + value ; } @@ -778,6 +784,7 @@ public class CompressionStream { meshReferenceCount++ ; } + @Override void quantize(CompressionStream s, HuffmanTable t) { // Retrieve the vertex from the mesh buffer mirror and set up the // data needed for the next stream element to compute its deltas. @@ -808,6 +815,7 @@ public class CompressionStream { } } + @Override void outputCommand(HuffmanTable t, CommandStream outputBuffer) { int command = CommandStream.MESH_B_R ; long data = stripFlag & 0x1 ; @@ -816,6 +824,7 @@ public class CompressionStream { outputBuffer.addCommand(command, 8, data, 1) ; } + @Override public String toString() { return "meshReference: stripFlag " + stripFlag + @@ -1144,6 +1153,7 @@ public class CompressionStream { } } + @Override public void processVertex(int v, int stripFlag) { Point3f p = positions[v] ; int r = meshBuffer.getMeshReference(p) ; @@ -1259,6 +1269,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; int r = meshBuffer.getMeshReference(vi.pi) ; @@ -1398,6 +1409,7 @@ public class CompressionStream { abstract void copyVertex(int pi, int ni, int ci, VertexCopy vc) ; + @Override public void processVertex(int v, int stripFlag) { copyVertex(v, v, v, vc) ; processVertexCopy(vc, stripFlag) ; @@ -1416,6 +1428,7 @@ public class CompressionStream { vdata = ga.getInterleavedVertices() ; } + @Override void copyVertex(int pi, int ni, int ci, VertexCopy vc) { int voffset ; voffset = pi * vstride ; @@ -1462,6 +1475,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; @@ -1489,6 +1503,7 @@ public class CompressionStream { } } + @Override void copyVertex(int pi, int ni, int ci, VertexCopy vc) { int voffset ; voffset = pi * vstride ; @@ -1533,6 +1548,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; @@ -1655,6 +1671,7 @@ public class CompressionStream { } } + @Override public void processVertex(int v, int stripFlag) { copyVertex(v + initialPositionIndex, v + initialNormalIndex, @@ -1677,6 +1694,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; @@ -1809,6 +1827,7 @@ public class CompressionStream { } } + @Override public void processVertex(int v, int stripFlag) { copyVertex(v + initialPositionIndex, v + initialNormalIndex, @@ -1831,6 +1850,7 @@ public class CompressionStream { getIndexArrays(ga, ia) ; } + @Override public void processVertex(int v, int stripFlag) { getVertexIndices(v, ia, vi) ; copyVertex(vi.pi, vi.ni, vi.ci, vc) ; diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamColor.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamColor.java index 62e063d..ad9263b 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamColor.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamColor.java @@ -102,6 +102,7 @@ class CompressionStreamColor extends CompressionStreamElement { * @param table HuffmanTable for collecting data about the quantized * representation of this element */ + @Override void quantize(CompressionStream stream, HuffmanTable huffmanTable) { // Clamp quantization. int quant = @@ -184,6 +185,7 @@ class CompressionStreamColor extends CompressionStreamElement { * compressed encodings * @param output CommandStream for collecting compressed output */ + @Override void outputCommand(HuffmanTable table, CommandStream output) { outputColor(table, output, CommandStream.SET_COLOR, 8) ; } @@ -253,6 +255,7 @@ class CompressionStreamColor extends CompressionStreamElement { colorSubcommand, subcommandLength) ; } + @Override public String toString() { String d = absolute? "" : "delta " ; String c = (colorR + " " + colorG + " " + colorB + diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamNormal.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamNormal.java index bfd53f9..10b8704 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamNormal.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamNormal.java @@ -326,6 +326,7 @@ class CompressionStreamNormal extends CompressionStreamElement { * @param table HuffmanTable for collecting data about the quantized * representation of this element */ + @Override void quantize(CompressionStream stream, HuffmanTable huffmanTable) { double nx, ny, nz, t ; @@ -571,6 +572,7 @@ class CompressionStreamNormal extends CompressionStreamElement { * compressed encodings * @param output CommandStream for collecting compressed output */ + @Override void outputCommand(HuffmanTable table, CommandStream output) { outputNormal(table, output, CommandStream.SET_NORM, 8) ; } @@ -648,6 +650,7 @@ class CompressionStreamNormal extends CompressionStreamElement { normalSubcommand, subcommandLength) ; } + @Override public String toString() { String fixed ; diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamVertex.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamVertex.java index b2d0bff..fb52482 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamVertex.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/CompressionStreamVertex.java @@ -149,6 +149,7 @@ class CompressionStreamVertex extends CompressionStreamElement { * @param table HuffmanTable for collecting data about the quantized * representation of this element */ + @Override void quantize(CompressionStream stream, HuffmanTable huffmanTable) { double px, py, pz ; @@ -247,6 +248,7 @@ class CompressionStreamVertex extends CompressionStreamElement { * compressed encodings * @param output CommandStream for collecting compressed output */ + @Override void outputCommand(HuffmanTable huffmanTable, CommandStream outputBuffer) { HuffmanNode t ; @@ -301,6 +303,7 @@ class CompressionStreamVertex extends CompressionStreamElement { color.outputSubcommand(huffmanTable, outputBuffer) ; } + @Override public String toString() { String d = absolute? "" : "delta " ; String c = (color == null? "": "\n\n " + color.toString()) ; diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedStrip.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedStrip.java index 9a55612..029fd0b 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedStrip.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedStrip.java @@ -144,6 +144,7 @@ class GeneralizedStrip { count = ints.length ; } + @Override public String toString() { String s = new String("[") ; for (int i = 0 ; i < count-1 ; i++) diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedVertexList.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedVertexList.java index 59aec6c..b5832af 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedVertexList.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeneralizedVertexList.java @@ -191,11 +191,13 @@ class GeneralizedVertexList implements GeneralizedStripFlags { } // GeneralizedStripFlags interface implementation + @Override public int getFlagCount() { return vertices.size() ; } // GeneralizedStripFlags interface implementation + @Override public int getFlag(int index) { return ((Vertex)vertices.get(index)).flag ; } diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressor.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressor.java index d2c5267..bbbaa94 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressor.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressor.java @@ -136,6 +136,7 @@ abstract class GeometryDecompressor { int tagLength, dataLength ; int rightShift, absolute ; + @Override public String toString() { return " tag length: " + tagLength + diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressorShape3D.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressorShape3D.java index 19bfa97..b412f9f 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressorShape3D.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/GeometryDecompressorShape3D.java @@ -213,6 +213,7 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { * Initialize the vertex output list based on the vertex format provided * by the SetState decompression command. */ + @Override void outputVertexFormat(boolean bundlingNorm, boolean bundlingColor, boolean doingAlpha) { @@ -240,6 +241,7 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { /** * Add a new decompressed vertex to the current list. */ + @Override void outputVertex(Point3f position, Vector3f normal, Color4f color, int vertexReplaceCode) { @@ -262,6 +264,7 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { * color. The outputColor() method is never called if colors are bundled * with each vertex in the compressed buffer. */ + @Override void outputColor(Color4f color) { if (debug) System.out.println(" outputColor: " + color.toString()) ; @@ -284,6 +287,7 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { * never called if normals are bundled with each vertex in the compressed * buffer. */ + @Override void outputNormal(Vector3f normal) { if (debug) System.out.println(" outputNormal: " + normal.toString()) ; diff --git a/src/classes/share/com/sun/j3d/utils/geometry/compression/HuffmanNode.java b/src/classes/share/com/sun/j3d/utils/geometry/compression/HuffmanNode.java index bad9f71..b0f16b5 100644 --- a/src/classes/share/com/sun/j3d/utils/geometry/compression/HuffmanNode.java +++ b/src/classes/share/com/sun/j3d/utils/geometry/compression/HuffmanNode.java @@ -189,6 +189,7 @@ class HuffmanNode { return unmergeable ; } + @Override public String toString() { return "shift " + shift + " data length " + dataLength + @@ -201,6 +202,7 @@ class HuffmanNode { * Sorts nodes in ascending order by frequency. */ static class FrequencyComparator implements Comparator { + @Override public final int compare(Object o1, Object o2) { return ((HuffmanNode)o1).frequency - ((HuffmanNode)o2).frequency ; } @@ -210,6 +212,7 @@ class HuffmanNode { * Sorts nodes in descending order by tag bit length. */ static class TagLengthComparator implements Comparator { + @Override public final int compare(Object o1, Object o2) { return ((HuffmanNode)o2).tagLength - ((HuffmanNode)o1).tagLength ; } diff --git a/src/classes/share/com/sun/j3d/utils/image/TextureLoader.java b/src/classes/share/com/sun/j3d/utils/image/TextureLoader.java index 08a1a93..09fd841 100644 --- a/src/classes/share/com/sun/j3d/utils/image/TextureLoader.java +++ b/src/classes/share/com/sun/j3d/utils/image/TextureLoader.java @@ -344,6 +344,7 @@ public class TextureLoader extends Object { bufferedImage = (BufferedImage) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public Object run() { try { return ImageIO.read(new File(fname)); @@ -432,6 +433,7 @@ public class TextureLoader extends Object { bufferedImage = (BufferedImage) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public Object run() { try { return ImageIO.read(url); diff --git a/src/classes/share/com/sun/j3d/utils/pickfast/PickIntersection.java b/src/classes/share/com/sun/j3d/utils/pickfast/PickIntersection.java index 49088c6..0020956 100644 --- a/src/classes/share/com/sun/j3d/utils/pickfast/PickIntersection.java +++ b/src/classes/share/com/sun/j3d/utils/pickfast/PickIntersection.java @@ -907,6 +907,7 @@ public class PickIntersection { /** * String representation of this object */ + @Override public String toString() { String rt = new String ("PickIntersection: "); rt += " IntersectionInfo = "+ iInfo + "\n"; diff --git a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickMouseBehavior.java b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickMouseBehavior.java index 2657896..4cfdaa8 100644 --- a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickMouseBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickMouseBehavior.java @@ -121,6 +121,7 @@ public abstract class PickMouseBehavior extends Behavior { return pickCanvas.getTolerance(); } + @Override public void initialize() { conditions = new WakeupCriterion[2]; @@ -144,6 +145,7 @@ public abstract class PickMouseBehavior extends Behavior { } } + @Override public void processStimulus (Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] evt = null; diff --git a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickRotateBehavior.java b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickRotateBehavior.java index cd006ee..62ad8e4 100644 --- a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickRotateBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickRotateBehavior.java @@ -121,6 +121,7 @@ public class PickRotateBehavior extends PickMouseBehavior implements MouseBehavi * @param xpos Current mouse X pos. * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos) { TransformGroup tg = null; @@ -150,6 +151,7 @@ public class PickRotateBehavior extends PickMouseBehavior implements MouseBehavi * Callback method from MouseRotate * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.ROTATE, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickTranslateBehavior.java b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickTranslateBehavior.java index a641487..23037b2 100644 --- a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickTranslateBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickTranslateBehavior.java @@ -108,6 +108,7 @@ public class PickTranslateBehavior extends PickMouseBehavior implements MouseBeh * @param xpos Current mouse X pos. * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -141,6 +142,7 @@ public class PickTranslateBehavior extends PickMouseBehavior implements MouseBeh * Callback method from MouseTranslate * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.TRANSLATE, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickZoomBehavior.java b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickZoomBehavior.java index b5ec888..a954aab 100644 --- a/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickZoomBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/pickfast/behaviors/PickZoomBehavior.java @@ -109,6 +109,7 @@ public class PickZoomBehavior extends PickMouseBehavior implements MouseBehavior * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -141,6 +142,7 @@ public class PickZoomBehavior extends PickMouseBehavior implements MouseBehavior * Callback method from MouseZoom * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.ZOOM, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/picking/PickIntersection.java b/src/classes/share/com/sun/j3d/utils/picking/PickIntersection.java index 6264d1e..df88c89 100644 --- a/src/classes/share/com/sun/j3d/utils/picking/PickIntersection.java +++ b/src/classes/share/com/sun/j3d/utils/picking/PickIntersection.java @@ -242,6 +242,7 @@ public class PickIntersection { /** String representation of this object */ + @Override public String toString () { String rt = new String ("PickIntersection: "); rt += " pickResult = "+pickResult + "\n"; diff --git a/src/classes/share/com/sun/j3d/utils/picking/PickResult.java b/src/classes/share/com/sun/j3d/utils/picking/PickResult.java index 472dd77..be7f290 100644 --- a/src/classes/share/com/sun/j3d/utils/picking/PickResult.java +++ b/src/classes/share/com/sun/j3d/utils/picking/PickResult.java @@ -493,6 +493,7 @@ public class PickResult { Returns String representation @return string representation of this object */ + @Override public String toString () { String rt = new String ("PickResult: sgp:"+pickedSceneGraphPath+"\n"); if (pickedNode != null) rt += " node:"+pickedNode; diff --git a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickMouseBehavior.java b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickMouseBehavior.java index 286c696..7aecb25 100644 --- a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickMouseBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickMouseBehavior.java @@ -121,6 +121,7 @@ public abstract class PickMouseBehavior extends Behavior { return pickCanvas.getTolerance(); } + @Override public void initialize() { conditions = new WakeupCriterion[2]; @@ -144,6 +145,7 @@ public abstract class PickMouseBehavior extends Behavior { } } + @Override public void processStimulus (Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] evt = null; diff --git a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickRotateBehavior.java b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickRotateBehavior.java index 24ad3b7..f28d436 100644 --- a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickRotateBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickRotateBehavior.java @@ -123,6 +123,7 @@ public class PickRotateBehavior extends PickMouseBehavior implements MouseBehavi * @param xpos Current mouse X pos. * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -150,6 +151,7 @@ public class PickRotateBehavior extends PickMouseBehavior implements MouseBehavi * Callback method from MouseRotate * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.ROTATE, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickTranslateBehavior.java b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickTranslateBehavior.java index 94dba3d..0768579 100644 --- a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickTranslateBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickTranslateBehavior.java @@ -109,6 +109,7 @@ public class PickTranslateBehavior extends PickMouseBehavior implements MouseBeh * @param xpos Current mouse X pos. * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -137,6 +138,7 @@ public class PickTranslateBehavior extends PickMouseBehavior implements MouseBeh * Callback method from MouseTranslate * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.TRANSLATE, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickZoomBehavior.java b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickZoomBehavior.java index ac2e9a5..9276560 100644 --- a/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickZoomBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/picking/behaviors/PickZoomBehavior.java @@ -110,6 +110,7 @@ public class PickZoomBehavior extends PickMouseBehavior implements MouseBehavior * @param ypos Current mouse Y pos. **/ + @Override public void updateScene(int xpos, int ypos){ TransformGroup tg = null; @@ -136,6 +137,7 @@ public class PickZoomBehavior extends PickMouseBehavior implements MouseBehavior * Callback method from MouseZoom * This is used when the Picking callback is enabled */ + @Override public void transformChanged( int type, Transform3D transform ) { callback.transformChanged( PickingCallback.ZOOM, currentTG ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/UnresolvedBehavior.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/UnresolvedBehavior.java index ab19b7b..1ad2553 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/UnresolvedBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/UnresolvedBehavior.java @@ -49,10 +49,12 @@ package com.sun.j3d.utils.scenegraph.io; */ public class UnresolvedBehavior extends javax.media.j3d.Behavior { + @Override public void initialize() { setEnable(false); } + @Override public void processStimulus(java.util.Enumeration enumeration) { } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/Controller.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/Controller.java index 5a52797..748cd65 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/Controller.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/Controller.java @@ -954,6 +954,7 @@ public abstract class Controller extends java.lang.Object { super(in); } + @Override protected Class resolveClass( java.io.ObjectStreamClass desc ) throws IOException, ClassNotFoundException { return getClass().forName( desc.getName(), true, classLoader ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fInputStream.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fInputStream.java index 763f53c..a05700b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fInputStream.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fInputStream.java @@ -68,62 +68,77 @@ public class J3fInputStream implements java.io.DataInput { return positionInputStream.getFilePointer(); } + @Override public int readUnsignedShort() throws java.io.IOException { return dataInputStream.readUnsignedShort(); } + @Override public void readFully(byte[] p1) throws java.io.IOException { dataInputStream.readFully(p1); } + @Override public char readChar() throws java.io.IOException { return dataInputStream.readChar(); } + @Override public int readUnsignedByte() throws java.io.IOException { return dataInputStream.readUnsignedByte(); } + @Override public int readInt() throws java.io.IOException { return dataInputStream.readInt(); } + @Override public short readShort() throws java.io.IOException { return dataInputStream.readShort(); } + @Override public float readFloat() throws java.io.IOException { return dataInputStream.readFloat(); } + @Override public void readFully(byte[] p1,int p2,int p3) throws java.io.IOException { dataInputStream.readFully( p1, p2, p3 ); } + @Override public boolean readBoolean() throws java.io.IOException { return dataInputStream.readBoolean(); } + @Override public int skipBytes(int p1) throws java.io.IOException { return dataInputStream.skipBytes(p1); } + @Override public double readDouble() throws java.io.IOException { return dataInputStream.readDouble(); } + @Override public long readLong() throws java.io.IOException { return dataInputStream.readLong(); } + @Override public java.lang.String readLine() throws java.io.IOException { return dataInputStream.readLine(); } + @Override public byte readByte() throws java.io.IOException { return dataInputStream.readByte(); } + @Override public java.lang.String readUTF() throws java.io.IOException { return dataInputStream.readUTF(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fOutputStream.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fOutputStream.java index a1067af..b25495c 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fOutputStream.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/J3fOutputStream.java @@ -68,58 +68,72 @@ public class J3fOutputStream implements java.io.DataOutput { return positionOutputStream.getFilePointer(); } + @Override public void write(byte[] p1,int p2,int p3) throws java.io.IOException { dataOutputStream.write( p1, p2, p3 ); } + @Override public void writeFloat(float p1) throws java.io.IOException { dataOutputStream.writeFloat(p1); } + @Override public void write(int p1) throws java.io.IOException { dataOutputStream.write(p1 ); } + @Override public void writeShort(int p1) throws java.io.IOException { dataOutputStream.writeShort( p1 ); } + @Override public void writeBytes(java.lang.String p1) throws java.io.IOException { dataOutputStream.writeBytes( p1 ); } + @Override public void writeChar(int p1) throws java.io.IOException { dataOutputStream.writeChar( p1 ); } + @Override public void writeByte(int p1) throws java.io.IOException { dataOutputStream.writeByte( p1 ); } + @Override public void writeLong(long p1) throws java.io.IOException { dataOutputStream.writeLong( p1 ); } + @Override public void writeBoolean(boolean p1) throws java.io.IOException { dataOutputStream.writeBoolean( p1 ); } + @Override public void writeUTF(java.lang.String p1) throws java.io.IOException { dataOutputStream.writeUTF( p1 ); } + @Override public void writeInt(int p1) throws java.io.IOException { dataOutputStream.writeInt( p1 ); } + @Override public void writeChars(java.lang.String p1) throws java.io.IOException { dataOutputStream.writeChars( p1 ); } + @Override public void write(byte[] p1) throws java.io.IOException { dataOutputStream.write( p1 ); } + @Override public void writeDouble(double p1) throws java.io.IOException { dataOutputStream.writeDouble( p1 ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionInputStream.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionInputStream.java index 24ebc6f..15479af 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionInputStream.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionInputStream.java @@ -50,23 +50,27 @@ class PositionInputStream extends java.io.InputStream { this.stream = stream; } + @Override public int read() throws IOException { pos++; return stream.read(); } + @Override public int read( byte[] b ) throws IOException { int s = stream.read( b ); pos += s; return s; } + @Override public int read( byte[] b, int off, int len ) throws IOException { int s = stream.read( b, off, len ); pos += s; return s; } + @Override public long skip( long n ) throws IOException { long s = stream.skip( n ); pos += s; diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionOutputStream.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionOutputStream.java index afc3bff..ae9b984 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionOutputStream.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/PositionOutputStream.java @@ -50,16 +50,19 @@ class PositionOutputStream extends java.io.OutputStream { this.stream = stream; } + @Override public void write(int p1) throws IOException { pos++; stream.write(p1); } + @Override public void write( byte[] b ) throws IOException { pos+= b.length; stream.write( b ); } + @Override public void write( byte[] b, int off, int len ) throws IOException { pos+= len; stream.write( b, off, len ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/RandomAccessFileControl.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/RandomAccessFileControl.java index ff1596d..5a7839c 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/RandomAccessFileControl.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/RandomAccessFileControl.java @@ -180,6 +180,7 @@ public class RandomAccessFileControl extends Controller { * RandomAccessFileControl will read the graphs in the array, * StreamControl will read all graphs in the stream */ + @Override protected void readBranchGraphs( int[] graphs ) throws IOException { for(int i=0; i<graphs.length; i++) { readBranchGraph( graphs[i] ); @@ -193,6 +194,7 @@ public class RandomAccessFileControl extends Controller { return symbolTable.getBranchGraphCount(); } + @Override public void writeBranchGraph( BranchGroup bg, java.io.Serializable userData ) throws IOException { long filePointer = raf.getFilePointer(); raf.writeInt( 0 ); // Node count @@ -340,6 +342,7 @@ public class RandomAccessFileControl extends Controller { * Write all the unsaved NodeComponents and SharedGroups to DataOutput. * Mark all the NodeComponents as saved. */ + @Override protected void writeNodeComponents( DataOutput out ) throws IOException { // The RandomAccessFileControl version sets throws the pointer to // the next NodeComponent correctly @@ -366,6 +369,7 @@ public class RandomAccessFileControl extends Controller { /** * Read in all the node components in this block */ + @Override protected void readNodeComponents( DataInput in ) throws IOException { int count = in.readInt(); @@ -384,6 +388,7 @@ public class RandomAccessFileControl extends Controller { //static java.util.LinkedList objSizeTracker = new java.util.LinkedList(); + @Override public void writeObject( DataOutput out, SceneGraphObjectState obj ) throws IOException { symbolTable.setFilePosition( raf.getFilePointer(), obj ); try { @@ -444,6 +449,7 @@ public class RandomAccessFileControl extends Controller { } } + @Override public void close() throws IOException { try { if (writeMode) @@ -475,6 +481,7 @@ public class RandomAccessFileControl extends Controller { raf.writeInt( symbolTable.getBranchGraphCount() ); } + @Override public long getFilePointer() { try { return raf.getFilePointer(); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/StreamControl.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/StreamControl.java index aa6da83..8b1dc00 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/StreamControl.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/StreamControl.java @@ -108,6 +108,7 @@ public class StreamControl extends Controller { * However the data in the userData field of the BranchGroup will be * stored in the stream */ + @Override public void writeBranchGraph( BranchGroup bg, java.io.Serializable userData ) throws IOException { try { SymbolTableData symbol = symbolTable.getSymbol( bg ); @@ -162,6 +163,7 @@ public class StreamControl extends Controller { * StreamControl expects the graphs to follow the universe in the * stream so it will read graphs.length branchgraphs. */ + @Override protected void readBranchGraphs( int[] graphs ) throws IOException { for(int i=0; i<graphs.length; i++) readBranchGraph( null ); @@ -175,6 +177,7 @@ public class StreamControl extends Controller { throw new java.io.IOException("Unable to load individual NodeComponents from Stream"); } + @Override public void close() throws IOException { super.reset(); } @@ -184,6 +187,7 @@ public class StreamControl extends Controller { * * Always returns 0 */ + @Override public long getFilePointer() { return 0L; } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTable.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTable.java index f6179b2..2eb441e 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTable.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTable.java @@ -493,6 +493,7 @@ public class SymbolTable extends java.lang.Object implements SceneGraphObjectRef * Add a refernce to the specified node * Also returns the nodes id */ + @Override public int addReference( SceneGraphObject node ) { if (node==null) return 0; @@ -727,6 +728,7 @@ public class SymbolTable extends java.lang.Object implements SceneGraphObjectRef map.putAll( namedObjects ); } + @Override public String toString() { StringBuffer buf = new StringBuffer(); @@ -837,6 +839,7 @@ public class SymbolTable extends java.lang.Object implements SceneGraphObjectRef * * Use only during the load cycle */ + @Override public javax.media.j3d.SceneGraphObject resolveReference(int nodeID) { return getJ3dNode( nodeID ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTableData.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTableData.java index e1f4d29..0122290 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTableData.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/retained/SymbolTableData.java @@ -125,6 +125,7 @@ public class SymbolTableData extends java.lang.Object { return isNodeComponent; } + @Override public String toString() { return new String(nodeID +" "+ filePosition+" "+j3dNode); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java index fadc5e3..047c125 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java @@ -62,6 +62,7 @@ public class KBRotPosScaleSplinePathInterpolatorState extends TransformInterpola super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -85,6 +86,7 @@ public class KBRotPosScaleSplinePathInterpolatorState extends TransformInterpola } } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -105,6 +107,7 @@ public class KBRotPosScaleSplinePathInterpolatorState extends TransformInterpola } } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class, @@ -117,6 +120,7 @@ public class KBRotPosScaleSplinePathInterpolatorState extends TransformInterpola } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new KBRotPosScaleSplinePathInterpolator( null, null, axisOfTranslation, keyFrames ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolatorState.java index efb692c..13679b2 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolatorState.java @@ -62,6 +62,7 @@ public class RotPosScaleTCBSplinePathInterpolatorState extends TransformInterpol super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -83,6 +84,7 @@ public class RotPosScaleTCBSplinePathInterpolatorState extends TransformInterpol } } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -101,6 +103,7 @@ public class RotPosScaleTCBSplinePathInterpolatorState extends TransformInterpol } } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class, @@ -113,6 +116,7 @@ public class RotPosScaleTCBSplinePathInterpolatorState extends TransformInterpol } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new RotPosScaleTCBSplinePathInterpolator( null, null, axisOfTranslation, keyFrames ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/mouse/MouseBehaviorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/mouse/MouseBehaviorState.java index 76c92db..bb00489 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/mouse/MouseBehaviorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/mouse/MouseBehaviorState.java @@ -58,18 +58,21 @@ public class MouseBehaviorState extends BehaviorState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( control.getSymbolTable().addReference( ((MouseBehavior)node).getTransformGroup() ) ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); target = in.readInt(); } + @Override public void buildGraph() { ((MouseBehavior)node).setTransformGroup( (TransformGroup)control.getSymbolTable().getJ3dNode( target ) ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/BoxState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/BoxState.java index dd21f32..bbbf25a 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/BoxState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/BoxState.java @@ -75,6 +75,7 @@ public class BoxState extends PrimitiveState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -86,6 +87,7 @@ public class BoxState extends PrimitiveState { out.writeInt( rightAppearance ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); @@ -97,6 +99,7 @@ public class BoxState extends PrimitiveState { rightAppearance = in.readInt(); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -105,6 +108,7 @@ public class BoxState extends PrimitiveState { out.writeFloat( ((Box)node).getZdimension() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams(in); @@ -113,6 +117,7 @@ public class BoxState extends PrimitiveState { zdim = in.readFloat(); } + @Override public void buildGraph() { if (frontAppearance == backAppearance && frontAppearance == topAppearance && @@ -132,6 +137,7 @@ public class BoxState extends PrimitiveState { super.buildGraph(); // This must be the last call in the method } + @Override public SceneGraphObject createNode( Class j3dClass ) { Box box = (Box)super.createNode( j3dClass, new Class[] { Float.TYPE, Float.TYPE, @@ -146,6 +152,7 @@ public class BoxState extends PrimitiveState { return box; } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Box( xdim, ydim, zdim, primflags, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ColorCubeState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ColorCubeState.java index 43516da..cc86626 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ColorCubeState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ColorCubeState.java @@ -60,6 +60,7 @@ public class ColorCubeState extends Shape3DState { } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -67,6 +68,7 @@ public class ColorCubeState extends Shape3DState { } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams(in); @@ -82,12 +84,14 @@ public class ColorCubeState extends Shape3DState { return false; } + @Override public SceneGraphObject createNode( Class j3dClass ) { Shape3D shape = (Shape3D) createNode( j3dClass, new Class[]{ Double.TYPE }, new Object[] { new Double(scale) } ); return shape; } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ColorCube( scale ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ConeState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ConeState.java index 18a3dc2..8cb3133 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ConeState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ConeState.java @@ -68,18 +68,21 @@ public class ConeState extends PrimitiveState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( bodyAppearance ); out.writeInt( capAppearance ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); bodyAppearance = in.readInt(); capAppearance = in.readInt(); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -89,6 +92,7 @@ public class ConeState extends PrimitiveState { out.writeInt( ((Cone)node).getYdivisions() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams(in); @@ -98,6 +102,7 @@ public class ConeState extends PrimitiveState { ydivision = in.readInt(); } + @Override public void buildGraph() { if (bodyAppearance == capAppearance ) { @@ -110,6 +115,7 @@ public class ConeState extends PrimitiveState { super.buildGraph(); // This must be the last call in the method } + @Override public SceneGraphObject createNode( Class j3dClass ) { // Create the node with a null appearance, we will add the appearance // during build graph @@ -131,6 +137,7 @@ public class ConeState extends PrimitiveState { return cone; } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Cone( radius, height, primflags, xdivision, ydivision, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/CylinderState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/CylinderState.java index add9864..0be313d 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/CylinderState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/CylinderState.java @@ -70,6 +70,7 @@ public class CylinderState extends PrimitiveState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( topAppearance ); @@ -77,6 +78,7 @@ public class CylinderState extends PrimitiveState { out.writeInt( bottomAppearance ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); topAppearance = in.readInt(); @@ -84,6 +86,7 @@ public class CylinderState extends PrimitiveState { bottomAppearance = in.readInt(); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -93,6 +96,7 @@ public class CylinderState extends PrimitiveState { out.writeInt( ((Cylinder)node).getYdivisions() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams(in); @@ -102,6 +106,7 @@ public class CylinderState extends PrimitiveState { ydivision = in.readInt(); } + @Override public void buildGraph() { if (bodyAppearance == topAppearance && bodyAppearance == bottomAppearance ) { ((Cylinder)node).setAppearance( (Appearance)control.getSymbolTable().getJ3dNode( bodyAppearance )); @@ -113,6 +118,7 @@ public class CylinderState extends PrimitiveState { super.buildGraph(); // This must be the last call in the method } + @Override public SceneGraphObject createNode( Class j3dClass ) { // Create the node with a null appearance, we will add the appearance // during build graph @@ -134,6 +140,7 @@ public class CylinderState extends PrimitiveState { return cylinder; } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Cylinder( radius, height, primflags, xdivision, ydivision, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/PrimitiveState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/PrimitiveState.java index 1ef58c9..2c70298 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/PrimitiveState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/PrimitiveState.java @@ -57,18 +57,21 @@ public class PrimitiveState extends GroupState { } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); out.writeInt( ((Primitive)node).getPrimitiveFlags() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams(in); primflags = in.readInt(); } + @Override public void buildGraph() { super.buildGraph(); // This must be the last call in the method } @@ -78,6 +81,7 @@ public class PrimitiveState extends GroupState { * * This is overridden by 'black box' groups such a geometry primitives */ + @Override protected boolean processChildren() { return false; } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/SphereState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/SphereState.java index 21bf01c..d6ebaf9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/SphereState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/SphereState.java @@ -64,18 +64,21 @@ public class SphereState extends PrimitiveState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( bodyAppearance ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); bodyAppearance = in.readInt(); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -83,6 +86,7 @@ public class SphereState extends PrimitiveState { out.writeInt( ((Sphere)node).getDivisions() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams(in); @@ -90,11 +94,13 @@ public class SphereState extends PrimitiveState { divisions = in.readInt(); } + @Override public void buildGraph() { ((Sphere)node).setAppearance( (Appearance)control.getSymbolTable().getJ3dNode( bodyAppearance )); super.buildGraph(); // This must be the last call in the method } + @Override public SceneGraphObject createNode( Class j3dClass ) { // Create the node with a null appearance, we will add the appearance // during build graph @@ -112,6 +118,7 @@ public class SphereState extends PrimitiveState { return sphere; } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Sphere( radius, primflags, divisions, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/Text2DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/Text2DState.java index e324215..41cff56 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/Text2DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/Text2DState.java @@ -78,16 +78,19 @@ public class Text2DState extends LeafState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); control.writeBounds( out, ((Shape3D)node).getCollisionBounds() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); ((Shape3D)node).setCollisionBounds( control.readBounds( in )); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -98,6 +101,7 @@ public class Text2DState extends LeafState { out.writeInt( fontStyle ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams(in); @@ -108,6 +112,7 @@ public class Text2DState extends LeafState { fontStyle = in.readInt(); } + @Override public SceneGraphObject createNode( Class j3dClass ) { // Create the node with a null appearance, we will add the appearance // during build graph @@ -128,6 +133,7 @@ public class Text2DState extends LeafState { return text2D; } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Text2D( text, color, fontName, fontSize, fontStyle ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/image/ImageComponent2DURLState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/image/ImageComponent2DURLState.java index b52c0e7..33b4c56 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/image/ImageComponent2DURLState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/image/ImageComponent2DURLState.java @@ -58,6 +58,7 @@ public class ImageComponent2DURLState extends ImageComponentState { super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -65,6 +66,7 @@ public class ImageComponent2DURLState extends ImageComponentState { out.writeUTF( ((ImageComponent2DURL)node).getURL().toExternalForm() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { @@ -79,6 +81,7 @@ public class ImageComponent2DURLState extends ImageComponentState { } } + @Override protected SceneGraphObject createNode( Class j3dClass ) { //System.out.println( "createNode 1" ); //Thread.dumpStack(); @@ -86,6 +89,7 @@ public class ImageComponent2DURLState extends ImageComponentState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return listener.createImageComponent( format, width, height, byReference, yUp, url ); } @@ -102,6 +106,7 @@ public class ImageComponent2DURLState extends ImageComponentState { } static class DefaultListener implements ImageComponent2DURLIOListener { + @Override public ImageComponent2DURL createImageComponent( int format, int width, int height, boolean byReference, boolean yUp, diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/PlatformGeometryState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/PlatformGeometryState.java index cd24a6e..fcd9000 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/PlatformGeometryState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/PlatformGeometryState.java @@ -51,6 +51,7 @@ public class PlatformGeometryState extends BranchGroupState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new PlatformGeometry(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/ViewerAvatarState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/ViewerAvatarState.java index 650c0a5..6a2123c 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/ViewerAvatarState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/ViewerAvatarState.java @@ -50,6 +50,7 @@ public class ViewerAvatarState extends BranchGroupState { super(symbol, control); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ViewerAvatar(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlphaState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlphaState.java index 1c78a9b..cb91547 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlphaState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlphaState.java @@ -55,6 +55,7 @@ public class AlphaState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Alpha alpha = (Alpha)node; @@ -72,6 +73,7 @@ public class AlphaState extends NodeComponentState { out.writeLong( alpha.getPauseTime() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); Alpha alpha = (Alpha)node; @@ -90,6 +92,7 @@ public class AlphaState extends NodeComponentState { if (x!=0L) alpha.pause(x); } + @Override protected SceneGraphObject createNode() { return new Alpha(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlternateAppearanceState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlternateAppearanceState.java index f969359..a383ea3 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlternateAppearanceState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AlternateAppearanceState.java @@ -71,6 +71,7 @@ public class AlternateAppearanceState extends LeafState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -83,6 +84,7 @@ public class AlternateAppearanceState extends LeafState { control.writeBounds( out, ((AlternateAppearance)node).getInfluencingBounds() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -106,6 +108,7 @@ public class AlternateAppearanceState extends LeafState { control.getSymbolTable().incNodeComponentRefCount( appearance ); } + @Override public void buildGraph() { for(int i=0; i<scopes.length; i++) ((AlternateAppearance)node).addScope( (Group)control.getSymbolTable().getJ3dNode( scopes[i] )); @@ -116,6 +119,7 @@ public class AlternateAppearanceState extends LeafState { } + @Override protected SceneGraphObject createNode() { return new AlternateAppearance(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AmbientLightState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AmbientLightState.java index 11bd80c..af1fd5d 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AmbientLightState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AmbientLightState.java @@ -49,6 +49,7 @@ public class AmbientLightState extends LightState { public AmbientLightState( SymbolTableData symbol, Controller control ) { super( symbol, control ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new AmbientLight(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AppearanceState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AppearanceState.java index c2be144..16679b9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AppearanceState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AppearanceState.java @@ -100,6 +100,7 @@ public class AppearanceState extends NodeComponentState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -118,6 +119,7 @@ public class AppearanceState extends NodeComponentState { out.writeInt( transparencyAttributes ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); polygonAttributes = in.readInt(); @@ -140,6 +142,7 @@ public class AppearanceState extends NodeComponentState { * Allows this component to update the reference count of any components * that it references. */ + @Override public void addSubReference() { control.getSymbolTable().incNodeComponentRefCount( polygonAttributes ); control.getSymbolTable().incNodeComponentRefCount( renderingAttributes ); @@ -155,6 +158,7 @@ public class AppearanceState extends NodeComponentState { control.getSymbolTable().incNodeComponentRefCount( transparencyAttributes ); } + @Override public void buildGraph() { Appearance app = (Appearance)node; app.setPolygonAttributes( (PolygonAttributes)control.getSymbolTable().getJ3dNode(polygonAttributes) ); @@ -179,6 +183,7 @@ public class AppearanceState extends NodeComponentState { super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Appearance(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java index 9f27c3f..1763b9e 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java @@ -56,6 +56,7 @@ public class AuralAttributesState extends NodeComponentState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -86,6 +87,7 @@ public class AuralAttributesState extends NodeComponentState { out.writeFloat( ((AuralAttributes)node).getDensity() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -114,6 +116,7 @@ public class AuralAttributesState extends NodeComponentState { ((AuralAttributes)node).setDensity( in.readFloat() ); } + @Override protected SceneGraphObject createNode() { return new AuralAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundSoundState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundSoundState.java index b390beb..c45d23d 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundSoundState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundSoundState.java @@ -56,14 +56,17 @@ public class BackgroundSoundState extends SoundState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override protected SceneGraphObject createNode() { return new BackgroundSound(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundState.java index a4f79e5..38eb163 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundState.java @@ -77,6 +77,7 @@ public class BackgroundState extends LeafState { } } + @Override public void writeObject(DataOutput out) throws IOException { super.writeObject(out); @@ -92,6 +93,7 @@ public class BackgroundState extends LeafState { .getGeometry())); } + @Override public void readObject(DataInput in) throws IOException { super.readObject(in); @@ -125,6 +127,7 @@ public class BackgroundState extends LeafState { control.getSymbolTable().incNodeComponentRefCount(image); } + @Override public void buildGraph() { ((Background) node).setApplicationBoundingLeaf((BoundingLeaf) control .getSymbolTable().getJ3dNode(boundingLeaf)); @@ -138,6 +141,7 @@ public class BackgroundState extends LeafState { } + @Override protected SceneGraphObject createNode() { return new Background(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BehaviorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BehaviorState.java index e0de744..6f1ed3c 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BehaviorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BehaviorState.java @@ -59,6 +59,7 @@ public class BehaviorState extends LeafState { } + @Override protected SceneGraphObject createNode( String className ) { SceneGraphObject ret; try { @@ -70,6 +71,7 @@ public class BehaviorState extends LeafState { return ret; } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Behavior beh = (Behavior)node; @@ -85,6 +87,7 @@ public class BehaviorState extends LeafState { out.writeInt( beh.getSchedulingInterval() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); Behavior beh = (Behavior)node; @@ -95,6 +98,7 @@ public class BehaviorState extends LeafState { beh.setSchedulingInterval( in.readInt() ); } + @Override public void buildGraph() { ((Behavior)node).setSchedulingBoundingLeaf( (BoundingLeaf)control.getSymbolTable().getJ3dNode( boundingLeaf )); super.buildGraph(); // Must be last call in method diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BillboardState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BillboardState.java index aa9d731..e568ed2 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BillboardState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BillboardState.java @@ -64,6 +64,7 @@ public class BillboardState extends BehaviorState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -81,6 +82,7 @@ public class BillboardState extends BehaviorState { out.writeInt( target ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -91,11 +93,13 @@ public class BillboardState extends BehaviorState { target = in.readInt(); } + @Override public void buildGraph() { ((Billboard)node).setTarget( (TransformGroup)control.getSymbolTable().getJ3dNode( target )); super.buildGraph(); // Must be last call in method } + @Override protected SceneGraphObject createNode() { return new Billboard(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BoundingLeafState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BoundingLeafState.java index 0194ea5..ca1ef6f 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BoundingLeafState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BoundingLeafState.java @@ -55,6 +55,7 @@ public abstract class BoundingLeafState extends SceneGraphObjectState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { @@ -63,6 +64,7 @@ public abstract class BoundingLeafState extends SceneGraphObjectState { control.writeBounds( out, ((BoundingLeaf)node).getRegion() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); @@ -70,6 +72,7 @@ public abstract class BoundingLeafState extends SceneGraphObjectState { ((BoundingLeaf)node).setRegion( control.readBounds(in) ); } + @Override protected SceneGraphObject createNode() { return new BoundingLeaf(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BranchGroupState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BranchGroupState.java index 7ecb754..619b6c2 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BranchGroupState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/BranchGroupState.java @@ -52,6 +52,7 @@ public class BranchGroupState extends GroupState { super( symbol, control ); } + @Override protected SceneGraphObject createNode() { return new BranchGroup(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ClipState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ClipState.java index 2b464ac..07a7c44 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ClipState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ClipState.java @@ -60,6 +60,7 @@ public abstract class ClipState extends LeafState { boundingLeaf = control.getSymbolTable().addReference( ((Clip)node).getApplicationBoundingLeaf() ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( boundingLeaf ); @@ -67,6 +68,7 @@ public abstract class ClipState extends LeafState { out.writeDouble( ((Clip)node).getBackDistance() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); boundingLeaf = in.readInt(); @@ -74,6 +76,7 @@ public abstract class ClipState extends LeafState { ((Clip)node).setBackDistance( in.readDouble() ); } + @Override public void buildGraph() { ((Clip)node).setApplicationBoundingLeaf( (BoundingLeaf)control.getSymbolTable().getJ3dNode( boundingLeaf )); super.buildGraph(); // Must be last call in method diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColorInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColorInterpolatorState.java index 897c143..28ebf36 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColorInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColorInterpolatorState.java @@ -62,6 +62,7 @@ public class ColorInterpolatorState extends InterpolatorState { target = control.getSymbolTable().addReference( ((ColorInterpolator)node).getTarget() ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -73,6 +74,7 @@ public class ColorInterpolatorState extends InterpolatorState { control.writeColor3f( out, clr ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -86,15 +88,18 @@ public class ColorInterpolatorState extends InterpolatorState { * Allows this component to update the reference count of any components * that it references. */ + @Override public void addSubReference() { control.getSymbolTable().incNodeComponentRefCount( target ); } + @Override public void buildGraph() { ((ColorInterpolator)node).setTarget( (Material)control.getSymbolTable().getJ3dNode( target )); super.buildGraph(); // Must be last call in method } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, javax.media.j3d.Material.class }, @@ -103,6 +108,7 @@ public class ColorInterpolatorState extends InterpolatorState { } + @Override protected SceneGraphObject createNode() { return new ColorInterpolator( null, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColoringAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColoringAttributesState.java index ca683af..c44e908 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColoringAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ColoringAttributesState.java @@ -56,6 +56,7 @@ public class ColoringAttributesState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); ColoringAttributes attr = (ColoringAttributes)node; @@ -65,6 +66,7 @@ public class ColoringAttributesState extends NodeComponentState { out.writeInt( attr.getShadeModel() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); ColoringAttributes attr = (ColoringAttributes)node; @@ -72,6 +74,7 @@ public class ColoringAttributesState extends NodeComponentState { attr.setShadeModel( in.readInt() ); } + @Override protected SceneGraphObject createNode() { return new ColoringAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/CompressedGeometryState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/CompressedGeometryState.java index 4dc9c9d..07641ca 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/CompressedGeometryState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/CompressedGeometryState.java @@ -62,6 +62,7 @@ public class CompressedGeometryState extends GeometryState { } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -78,6 +79,7 @@ public class CompressedGeometryState extends GeometryState { writeCompressedGeometryHeader( out ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -131,6 +133,7 @@ public class CompressedGeometryState extends GeometryState { } } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { CompressedGeometryHeader.class, @@ -141,6 +144,7 @@ public class CompressedGeometryState extends GeometryState { new Boolean(isByReference) } ); } + @Override protected SceneGraphObject createNode() { return new CompressedGeometry( header, bytes, isByReference ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ConeSoundState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ConeSoundState.java index 6ba4ab6..bd7658f 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ConeSoundState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ConeSoundState.java @@ -57,6 +57,7 @@ public class ConeSoundState extends PointSoundState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -88,6 +89,7 @@ public class ConeSoundState extends PointSoundState { control.writeVector3f( out, direction ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -111,6 +113,7 @@ public class ConeSoundState extends PointSoundState { ((ConeSound)node).setDirection( control.readVector3f( in )); } + @Override protected SceneGraphObject createNode() { return new ConeSound(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DecalGroupState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DecalGroupState.java index 71d8a52..7d63f01 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DecalGroupState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DecalGroupState.java @@ -52,6 +52,7 @@ public class DecalGroupState extends GroupState { super( symbol, control ); } + @Override protected SceneGraphObject createNode() { return new DecalGroup(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentFloatState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentFloatState.java index fc9e5bd..307a593 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentFloatState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentFloatState.java @@ -58,6 +58,7 @@ public class DepthComponentFloatState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -69,6 +70,7 @@ public class DepthComponentFloatState extends NodeComponentState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -80,12 +82,14 @@ public class DepthComponentFloatState extends NodeComponentState { ((DepthComponentFloat)node).setDepthData( buf ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); out.writeInt( width ); out.writeInt( height ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -93,6 +97,7 @@ public class DepthComponentFloatState extends NodeComponentState { height = in.readInt(); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE } , @@ -100,6 +105,7 @@ public class DepthComponentFloatState extends NodeComponentState { new Integer( height ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new DepthComponentFloat( width, height ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentIntState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentIntState.java index 5b97c2b..a263585 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentIntState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentIntState.java @@ -58,6 +58,7 @@ public class DepthComponentIntState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -69,6 +70,7 @@ public class DepthComponentIntState extends NodeComponentState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -80,12 +82,14 @@ public class DepthComponentIntState extends NodeComponentState { ((DepthComponentInt)node).setDepthData( buf ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); out.writeInt( width ); out.writeInt( height ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -93,6 +97,7 @@ public class DepthComponentIntState extends NodeComponentState { height = in.readInt(); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE } , @@ -100,6 +105,7 @@ public class DepthComponentIntState extends NodeComponentState { new Integer( height ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new DepthComponentInt( width, height ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentNativeState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentNativeState.java index 231ca17..94efc93 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentNativeState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentNativeState.java @@ -63,12 +63,14 @@ public class DepthComponentNativeState extends NodeComponentState { super(symbol, control); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); out.writeInt( width ); out.writeInt( height ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -76,6 +78,7 @@ public class DepthComponentNativeState extends NodeComponentState { height = in.readInt(); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE } , @@ -83,6 +86,7 @@ public class DepthComponentNativeState extends NodeComponentState { new Integer( height ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new DepthComponentNative( width, height ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DirectionalLightState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DirectionalLightState.java index cddd48e..0a314cd 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DirectionalLightState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DirectionalLightState.java @@ -56,6 +56,7 @@ public class DirectionalLightState extends LightState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Vector3f dir = new Vector3f(); @@ -64,11 +65,13 @@ public class DirectionalLightState extends LightState { control.writeVector3f( out, dir ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); ((DirectionalLight)node).setDirection( control.readVector3f(in) ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new DirectionalLight(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DistanceLODState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DistanceLODState.java index 41ba037..3b53b66 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DistanceLODState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/DistanceLODState.java @@ -58,6 +58,7 @@ public class DistanceLODState extends LODState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -69,6 +70,7 @@ public class DistanceLODState extends LODState { control.writePoint3f( out, pos ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -78,17 +80,20 @@ public class DistanceLODState extends LODState { ((DistanceLOD)node).setPosition( control.readPoint3f(in )); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); numDistances = ((DistanceLOD)node).numDistances(); out.writeInt( numDistances ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); numDistances = in.readInt(); } + @Override public SceneGraphObject createNode( Class j3dClass ) { float[] distances = new float[ numDistances ]; @@ -96,6 +101,7 @@ public class DistanceLODState extends LODState { new Object[] { distances } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new DistanceLOD( new float[ numDistances ] ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ExponentialFogState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ExponentialFogState.java index fa05708..ce29ba5 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ExponentialFogState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ExponentialFogState.java @@ -54,18 +54,21 @@ public class ExponentialFogState extends FogState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeFloat( ((ExponentialFog)node).getDensity() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); ((ExponentialFog)node).setDensity( in.readFloat() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ExponentialFog(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/FogState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/FogState.java index e508a21..2658f5d 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/FogState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/FogState.java @@ -60,6 +60,7 @@ public abstract class FogState extends SceneGraphObjectState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { @@ -79,6 +80,7 @@ public abstract class FogState extends SceneGraphObjectState { control.writeColor3f( out, clr ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); @@ -92,6 +94,7 @@ public abstract class FogState extends SceneGraphObjectState { ((Fog)node).setColor( control.readColor3f(in) ); } + @Override public void buildGraph() { for(int i=0; i<scopes.length; i++) ((Fog)node).addScope( (Group)control.getSymbolTable().getJ3dNode( scopes[i] ) ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Font3DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Font3DState.java index a78129f..13b3582 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Font3DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Font3DState.java @@ -63,6 +63,7 @@ public class Font3DState extends NodeComponentState { super(symbol, control); } + @Override public void writeConstructorParams(DataOutput out) throws IOException { super.writeConstructorParams(out); @@ -125,6 +126,7 @@ public class Font3DState extends NodeComponentState { } } + @Override public void readConstructorParams(DataInput in) throws IOException { super.readConstructorParams(in); @@ -163,12 +165,14 @@ public class Font3DState extends NodeComponentState { extrudePath = null; } + @Override public SceneGraphObject createNode(Class j3dClass) { return createNode(j3dClass, new Class[] { Font.class, Double.TYPE, FontExtrusion.class }, new Object[] { font, new Double(tesselationTolerance), extrudePath }); } + @Override protected SceneGraphObject createNode() { return new Font3D(font, tesselationTolerance, extrudePath); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryArrayState.java index 2adf3c5..6e13ba8 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryArrayState.java @@ -92,6 +92,7 @@ public abstract class GeometryArrayState extends GeometryState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -486,6 +487,7 @@ public abstract class GeometryArrayState extends GeometryState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -816,6 +818,7 @@ public abstract class GeometryArrayState extends GeometryState { } } + @Override protected void writeConstructorParams( DataOutput out ) throws IOException { vertexCount = ((GeometryArray)node).getVertexCount(); @@ -834,6 +837,7 @@ public abstract class GeometryArrayState extends GeometryState { super.writeConstructorParams( out ); } + @Override protected void readConstructorParams( DataInput in ) throws IOException { // Load VertexCount and format first beause diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryStripArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryStripArrayState.java index 31c2be5..71e09b3 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryStripArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GeometryStripArrayState.java @@ -56,6 +56,7 @@ public abstract class GeometryStripArrayState extends GeometryArrayState { super( symbol, control ); } + @Override protected void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -68,6 +69,7 @@ public abstract class GeometryStripArrayState extends GeometryArrayState { out.writeInt( stripVertexCounts[i] ); } + @Override protected void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GroupState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GroupState.java index 6e5409e..6d9c97f 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GroupState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/GroupState.java @@ -57,6 +57,7 @@ public class GroupState extends NodeState { super(symbol, control); } + @Override public void writeObject( DataOutput out) throws IOException { super.writeObject( out ); @@ -77,6 +78,7 @@ public class GroupState extends NodeState { out.writeBoolean( ((Group)node).getAlternateCollisionTarget() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -111,6 +113,7 @@ public class GroupState extends NodeState { return true; } + @Override public void buildGraph() { for(int i=0; i<groupChildren.length; i++) { if (!groupChildren[i].getSymbol().graphBuilt) { @@ -121,6 +124,7 @@ public class GroupState extends NodeState { super.buildGraph(); // Must be last call in method } + @Override public void cleanup() { for(int i=0; i<groupChildren.length; i++) { groupChildren[i].cleanup(); @@ -131,6 +135,7 @@ public class GroupState extends NodeState { super.cleanup(); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Group(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent2DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent2DState.java index 7b4e341..a5c654a 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent2DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent2DState.java @@ -58,6 +58,7 @@ public class ImageComponent2DState extends ImageComponentState { super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -76,6 +77,7 @@ public class ImageComponent2DState extends ImageComponentState { writeBufferedImage( out, bufferedImage ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { @@ -85,6 +87,7 @@ public class ImageComponent2DState extends ImageComponentState { } + @Override protected SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, bufferedImage.getClass(), @@ -96,6 +99,7 @@ public class ImageComponent2DState extends ImageComponentState { new Boolean( yUp ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ImageComponent2D( format, bufferedImage, byReference, yUp ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent3DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent3DState.java index 8a37261..25a68b1 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent3DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent3DState.java @@ -58,6 +58,7 @@ public class ImageComponent3DState extends ImageComponentState { super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -81,6 +82,7 @@ public class ImageComponent3DState extends ImageComponentState { } } + @Override public void readConstructorParams( DataInput in ) throws IOException { @@ -107,6 +109,7 @@ public class ImageComponent3DState extends ImageComponentState { **/ } + @Override protected SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, bufferedImages.getClass(), @@ -119,6 +122,7 @@ public class ImageComponent3DState extends ImageComponentState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ImageComponent3D( format, bufferedImages, byReference, yUp ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java index e54c95e..b55bccc 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java @@ -108,6 +108,7 @@ public abstract class ImageComponentState extends NodeComponentState { } + @Override protected void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -118,6 +119,7 @@ public abstract class ImageComponentState extends NodeComponentState { out.writeBoolean( ((ImageComponent)node).isYUp() ); } + @Override protected void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryArrayState.java index 0696848..8142739 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryArrayState.java @@ -62,6 +62,7 @@ public abstract class IndexedGeometryArrayState extends GeometryArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -100,6 +101,7 @@ public abstract class IndexedGeometryArrayState extends GeometryArrayState { out.writeInt( ((IndexedGeometryArray)node).getInitialIndexIndex() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -138,12 +140,14 @@ public abstract class IndexedGeometryArrayState extends GeometryArrayState { ((IndexedGeometryArray)node).setInitialIndexIndex( in.readInt() ); } + @Override protected void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); out.writeInt( ((IndexedGeometryArray)node).getIndexCount() ); } + @Override protected void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryStripArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryStripArrayState.java index 540b0e5..45692e8 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryStripArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryStripArrayState.java @@ -56,6 +56,7 @@ public abstract class IndexedGeometryStripArrayState extends IndexedGeometryArra super( symbol, control ); } + @Override protected void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -68,6 +69,7 @@ public abstract class IndexedGeometryStripArrayState extends IndexedGeometryArra out.writeInt( stripIndexCounts[i] ); } + @Override protected void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineArrayState.java index af90d22..f5ab90c 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineArrayState.java @@ -55,15 +55,18 @@ public class IndexedLineArrayState extends IndexedGeometryArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -77,6 +80,7 @@ public class IndexedLineArrayState extends IndexedGeometryArrayState { new Integer( indexCount ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new IndexedLineArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, indexCount ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineStripArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineStripArrayState.java index dac92be..bd906ba 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineStripArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineStripArrayState.java @@ -52,6 +52,7 @@ public class IndexedLineStripArrayState extends IndexedGeometryStripArrayState { super( symbol, control ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -67,6 +68,7 @@ public class IndexedLineStripArrayState extends IndexedGeometryStripArrayState { stripIndexCounts } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new IndexedLineStripArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, indexCount, stripIndexCounts ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedPointArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedPointArrayState.java index 33e91d8..767708c 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedPointArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedPointArrayState.java @@ -56,15 +56,18 @@ public class IndexedPointArrayState extends IndexedGeometryArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -78,6 +81,7 @@ public class IndexedPointArrayState extends IndexedGeometryArrayState { new Integer( indexCount ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new IndexedPointArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, indexCount ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedQuadArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedQuadArrayState.java index 8d69e34..fa4f2eb 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedQuadArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedQuadArrayState.java @@ -55,15 +55,18 @@ public class IndexedQuadArrayState extends IndexedGeometryArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -77,6 +80,7 @@ public class IndexedQuadArrayState extends IndexedGeometryArrayState { new Integer( indexCount ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new IndexedQuadArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, indexCount ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleArrayState.java index 0d574b1..b1b96dc 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleArrayState.java @@ -55,15 +55,18 @@ public class IndexedTriangleArrayState extends IndexedGeometryArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -77,6 +80,7 @@ public class IndexedTriangleArrayState extends IndexedGeometryArrayState { new Integer( indexCount ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new IndexedTriangleArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, indexCount ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleFanArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleFanArrayState.java index 2c8e6fb..1803ccb 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleFanArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleFanArrayState.java @@ -56,15 +56,18 @@ public class IndexedTriangleFanArrayState extends IndexedGeometryStripArrayState super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -80,6 +83,7 @@ public class IndexedTriangleFanArrayState extends IndexedGeometryStripArrayState stripIndexCounts } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new IndexedTriangleFanArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, indexCount, stripIndexCounts ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleStripArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleStripArrayState.java index 3066245..3377516 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleStripArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleStripArrayState.java @@ -56,15 +56,18 @@ public class IndexedTriangleStripArrayState extends IndexedGeometryStripArraySta super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return super.createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -80,6 +83,7 @@ public class IndexedTriangleStripArrayState extends IndexedGeometryStripArraySta stripIndexCounts } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new IndexedTriangleStripArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, indexCount, stripIndexCounts ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/InterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/InterpolatorState.java index a8c0de3..ad6d85a 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/InterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/InterpolatorState.java @@ -57,11 +57,13 @@ public abstract class InterpolatorState extends BehaviorState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( control.getSymbolTable().addReference( ((Interpolator)node).getAlpha() )); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); alpha = in.readInt(); @@ -76,6 +78,7 @@ public abstract class InterpolatorState extends BehaviorState { control.getSymbolTable().incNodeComponentRefCount( alpha ); } + @Override public void buildGraph() { ((Interpolator)node).setAlpha( (Alpha)control.getSymbolTable().getJ3dNode( alpha )); super.buildGraph(); // Must be last call in method diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LODState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LODState.java index c52cd6d..9c54cbb 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LODState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LODState.java @@ -63,6 +63,7 @@ public abstract class LODState extends BehaviorState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -71,6 +72,7 @@ public abstract class LODState extends BehaviorState { out.writeInt( switches[i] ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); LOD attr = (LOD)node; @@ -80,6 +82,7 @@ public abstract class LODState extends BehaviorState { switches[i] = in.readInt(); } + @Override public void buildGraph() { LOD attr = (LOD)node; for(int i=0; i<switches.length; i++) diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LightState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LightState.java index bf0277e..db2da52 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LightState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LightState.java @@ -61,6 +61,7 @@ public abstract class LightState extends LeafState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -85,6 +86,7 @@ public abstract class LightState extends LeafState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); ((Light)node).setColor( control.readColor3f(in) ); @@ -101,6 +103,7 @@ public abstract class LightState extends LeafState { } + @Override public void buildGraph() { ((Light)node).setInfluencingBoundingLeaf( (BoundingLeaf)control.getSymbolTable().getJ3dNode( boundingLeaf )); for(int i=0; i<scope.length; i++) { diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineArrayState.java index c91cf43..8d663fe 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineArrayState.java @@ -51,6 +51,7 @@ public class LineArrayState extends GeometryArrayState { super( symbol, control ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, @@ -65,6 +66,7 @@ public class LineArrayState extends GeometryArrayState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new LineArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineAttributesState.java index fd85623..14be6e3 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineAttributesState.java @@ -54,6 +54,7 @@ public class LineAttributesState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); LineAttributes attr = (LineAttributes)node; @@ -64,6 +65,7 @@ public class LineAttributesState extends NodeComponentState { out.writeInt( attr.getPatternScaleFactor() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); LineAttributes attr = (LineAttributes)node; @@ -74,6 +76,7 @@ public class LineAttributesState extends NodeComponentState { attr.setPatternScaleFactor( in.readInt() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new LineAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineStripArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineStripArrayState.java index bfc1905..546f293 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineStripArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LineStripArrayState.java @@ -51,6 +51,7 @@ public class LineStripArrayState extends GeometryStripArrayState { super( symbol, control ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, @@ -67,6 +68,7 @@ public class LineStripArrayState extends GeometryStripArrayState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new LineStripArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, stripVertexCounts ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinearFogState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinearFogState.java index a01744b..de9fa2a 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinearFogState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinearFogState.java @@ -54,6 +54,7 @@ public class LinearFogState extends FogState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -61,6 +62,7 @@ public class LinearFogState extends FogState { out.writeDouble( ((LinearFog)node).getFrontDistance() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -68,6 +70,7 @@ public class LinearFogState extends FogState { ((LinearFog)node).setFrontDistance( in.readDouble() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new LinearFog(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinkState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinkState.java index 349d42b..e64305f 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinkState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/LinkState.java @@ -64,6 +64,7 @@ public class LinkState extends LeafState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -76,6 +77,7 @@ public class LinkState extends LeafState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); sharedGroup = in.readInt(); @@ -85,6 +87,7 @@ public class LinkState extends LeafState { } } + @Override public void buildGraph() { sharedGroupSymbol = control.getSymbolTable().getSymbol( sharedGroup ); ((SharedGroupState)sharedGroupSymbol.nodeState).buildGraph(); @@ -92,6 +95,7 @@ public class LinkState extends LeafState { super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Link(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MaterialState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MaterialState.java index 5a05578..5981e87 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MaterialState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MaterialState.java @@ -55,6 +55,7 @@ public class MaterialState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Material attr = (Material)node; @@ -72,6 +73,7 @@ public class MaterialState extends NodeComponentState { out.writeInt( attr.getColorTarget() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); Material attr = (Material)node; @@ -83,6 +85,7 @@ public class MaterialState extends NodeComponentState { attr.setColorTarget( in.readInt() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Material(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MediaContainerState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MediaContainerState.java index 72715bc..5c8c42f 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MediaContainerState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MediaContainerState.java @@ -60,6 +60,7 @@ public class MediaContainerState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject(DataOutput out) throws IOException { super.writeObject(out); @@ -81,6 +82,7 @@ public class MediaContainerState extends NodeComponentState { out.writeInt(INPUT_STREAM); } + @Override public void readObject(DataInput in) throws IOException { super.readObject(in); @@ -106,6 +108,7 @@ public class MediaContainerState extends NodeComponentState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new MediaContainer(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ModelClipState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ModelClipState.java index a63a231..3d5c0e9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ModelClipState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ModelClipState.java @@ -68,6 +68,7 @@ public class ModelClipState extends LeafState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -90,6 +91,7 @@ public class ModelClipState extends LeafState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -112,6 +114,7 @@ public class ModelClipState extends LeafState { ((ModelClip)node).setPlanes( planes ); } + @Override public void buildGraph() { for(int i=0; i<scopes.length; i++) ((ModelClip)node).addScope( (Group)control.getSymbolTable().getJ3dNode( scopes[i] )); @@ -120,6 +123,7 @@ public class ModelClipState extends LeafState { super.buildGraph(); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ModelClip(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MorphState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MorphState.java index 5be6004..beff388 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MorphState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/MorphState.java @@ -68,6 +68,7 @@ public class MorphState extends LeafState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -83,6 +84,7 @@ public class MorphState extends LeafState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); ((Morph)node).setCollisionBounds( control.readBounds( in )); @@ -109,6 +111,7 @@ public class MorphState extends LeafState { control.getSymbolTable().incNodeComponentRefCount( geometry[ i ] ); } + @Override public void buildGraph() { ((Morph)node).setAppearance( (Appearance)control.getSymbolTable().getJ3dNode( appearance ) ); @@ -122,6 +125,7 @@ public class MorphState extends LeafState { super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Morph( null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeComponentState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeComponentState.java index 6ae0d70..96e2c7b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeComponentState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeComponentState.java @@ -54,6 +54,7 @@ public abstract class NodeComponentState extends SceneGraphObjectState { super(symbol, control); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -63,6 +64,7 @@ public abstract class NodeComponentState extends SceneGraphObjectState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject(out); out.writeBoolean(((NodeComponent)this.node).getDuplicateOnCloneTree()); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java index cf745c8..fc3fb84 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java @@ -54,6 +54,7 @@ public class NodeState extends SceneGraphObjectState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { @@ -67,6 +68,7 @@ public class NodeState extends SceneGraphObjectState { } + @Override public void readObject( DataInput in ) throws IOException { super.readObject(in); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java index cce04ed..bdab412 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java @@ -67,25 +67,31 @@ public class NullSceneGraphObjectState extends SceneGraphObjectState { * * All references should be created in the constructor */ + @Override public void writeObject( DataOutput out ) throws IOException { } + @Override public void readObject( DataInput in ) throws IOException { } + @Override public SceneGraphObject getNode() { return null; } + @Override public int getNodeID() { return -1; } + @Override public SymbolTableData getSymbol() { return symbolTableData; } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return null; } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java index c9646d1..49ee4b7 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java @@ -55,6 +55,7 @@ public class OrderedGroupState extends GroupState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -65,6 +66,7 @@ public class OrderedGroupState extends GroupState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -75,6 +77,7 @@ public class OrderedGroupState extends GroupState { ((OrderedGroup)node).setChildIndexOrder( childIndexOrder ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new OrderedGroup(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrientedShape3DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrientedShape3DState.java index 4519587..bb1685b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrientedShape3DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/OrientedShape3DState.java @@ -57,6 +57,7 @@ public class OrientedShape3DState extends Shape3DState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -74,6 +75,7 @@ public class OrientedShape3DState extends Shape3DState { out.writeDouble( ((OrientedShape3D)node).getScale() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -84,6 +86,7 @@ public class OrientedShape3DState extends Shape3DState { ((OrientedShape3D)node).setScale( in.readDouble() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new OrientedShape3D(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PathInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PathInterpolatorState.java index dfdaefb..42ccb01 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PathInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PathInterpolatorState.java @@ -59,6 +59,7 @@ public abstract class PathInterpolatorState extends TransformInterpolatorState { // PathInterpolator.setKnots(float[]) is protected so we can only set the // knots in the constructor + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); knots = new float[ ((PathInterpolator)node).getArrayLengths() ]; @@ -68,6 +69,7 @@ public abstract class PathInterpolatorState extends TransformInterpolatorState { out.writeFloat( knots[i] ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); knots = new float[ in.readInt() ]; diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointAttributesState.java index 485b3ba..c999a62 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointAttributesState.java @@ -54,6 +54,7 @@ public class PointAttributesState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); PointAttributes attr = (PointAttributes)node; @@ -61,6 +62,7 @@ public class PointAttributesState extends NodeComponentState { out.writeFloat( attr.getPointSize() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); PointAttributes attr = (PointAttributes)node; @@ -68,6 +70,7 @@ public class PointAttributesState extends NodeComponentState { attr.setPointSize( in.readFloat() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new PointAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointLightState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointLightState.java index fa25c5f..1d63077 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointLightState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointLightState.java @@ -56,6 +56,7 @@ public class PointLightState extends LightState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Point3f point = new Point3f(); @@ -65,12 +66,14 @@ public class PointLightState extends LightState { control.writePoint3f( out, point ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); ((PointLight)node).setAttenuation( control.readPoint3f(in) ); ((PointLight)node).setPosition( control.readPoint3f(in) ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new PointLight(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointSoundState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointSoundState.java index 43312d8..f34ea1b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointSoundState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PointSoundState.java @@ -56,6 +56,7 @@ public class PointSoundState extends SoundState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -75,6 +76,7 @@ public class PointSoundState extends SoundState { control.writePoint3f( out, pos ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -89,6 +91,7 @@ public class PointSoundState extends SoundState { ((PointSound)node).setPosition( control.readPoint3f( in )); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new PointSound(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PolygonAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PolygonAttributesState.java index b2d4d97..0d39fc9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PolygonAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PolygonAttributesState.java @@ -54,6 +54,7 @@ public class PolygonAttributesState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); PolygonAttributes polyAttr = (PolygonAttributes)node; @@ -64,6 +65,7 @@ public class PolygonAttributesState extends NodeComponentState { out.writeFloat( polyAttr.getPolygonOffsetFactor() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); PolygonAttributes polyAttr = (PolygonAttributes)node; @@ -74,6 +76,7 @@ public class PolygonAttributesState extends NodeComponentState { polyAttr.setPolygonOffsetFactor( in.readFloat() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new PolygonAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionInterpolatorState.java index f9dbc9e..c9d3de3 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionInterpolatorState.java @@ -56,6 +56,7 @@ public class PositionInterpolatorState extends TransformInterpolatorState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -63,6 +64,7 @@ public class PositionInterpolatorState extends TransformInterpolatorState { out.writeFloat( ((PositionInterpolator)node).getEndPosition() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -70,6 +72,7 @@ public class PositionInterpolatorState extends TransformInterpolatorState { ((PositionInterpolator)node).setEndPosition( in.readFloat() ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class }, @@ -77,6 +80,7 @@ public class PositionInterpolatorState extends TransformInterpolatorState { null } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new PositionInterpolator( null, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionPathInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionPathInterpolatorState.java index c0766f6..71fa5f6 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionPathInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/PositionPathInterpolatorState.java @@ -60,6 +60,7 @@ public class PositionPathInterpolatorState extends PathInterpolatorState { super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -72,6 +73,7 @@ public class PositionPathInterpolatorState extends PathInterpolatorState { control.writePoint3f( out, positions[i] ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -80,6 +82,7 @@ public class PositionPathInterpolatorState extends PathInterpolatorState { positions[i] = control.readPoint3f( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class, @@ -93,6 +96,7 @@ public class PositionPathInterpolatorState extends PathInterpolatorState { positions } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new PositionPathInterpolator( null, null, new Transform3D(), knots, positions ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/QuadArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/QuadArrayState.java index 47c6203..d3969dc 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/QuadArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/QuadArrayState.java @@ -55,15 +55,18 @@ public class QuadArrayState extends GeometryArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, @@ -77,6 +80,7 @@ public class QuadArrayState extends GeometryArrayState { texCoordSetMap } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new QuadArray(vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RasterState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RasterState.java index 90a825a..199acd3 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RasterState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RasterState.java @@ -69,6 +69,7 @@ public class RasterState extends GeometryState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -97,6 +98,7 @@ public class RasterState extends GeometryState { out.writeInt( offset.y ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -116,12 +118,14 @@ public class RasterState extends GeometryState { * Allows this component to update the reference count of any components * that it references. */ + @Override public void addSubReference() { control.getSymbolTable().incNodeComponentRefCount( image ); control.getSymbolTable().incNodeComponentRefCount( depthComponent ); } // Set up references during load + @Override public void buildGraph() { ((Raster)node).setImage( (ImageComponent2D)control.getSymbolTable().getJ3dNode( image ) ); ((Raster)node).setDepthComponent( @@ -129,6 +133,7 @@ public class RasterState extends GeometryState { super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Raster(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RenderingAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RenderingAttributesState.java index 9582bf2..89b262e 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RenderingAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RenderingAttributesState.java @@ -54,6 +54,7 @@ public class RenderingAttributesState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); RenderingAttributes attr = (RenderingAttributes)node; @@ -67,6 +68,7 @@ public class RenderingAttributesState extends NodeComponentState { out.writeBoolean( attr.getVisible() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); RenderingAttributes attr = (RenderingAttributes)node; @@ -80,6 +82,7 @@ public class RenderingAttributesState extends NodeComponentState { attr.setVisible( in.readBoolean() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new RenderingAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosPathInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosPathInterpolatorState.java index 4266d7b..cc05dba 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosPathInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosPathInterpolatorState.java @@ -62,6 +62,7 @@ public class RotPosPathInterpolatorState extends PathInterpolatorState { super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -80,6 +81,7 @@ public class RotPosPathInterpolatorState extends PathInterpolatorState { } } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -91,6 +93,7 @@ public class RotPosPathInterpolatorState extends PathInterpolatorState { } } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class, @@ -107,6 +110,7 @@ public class RotPosPathInterpolatorState extends PathInterpolatorState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new RotPosPathInterpolator( null, null, new Transform3D(), knots, quats, positions ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosScalePathInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosScalePathInterpolatorState.java index 98df76d..2a91071 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosScalePathInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotPosScalePathInterpolatorState.java @@ -63,6 +63,7 @@ public class RotPosScalePathInterpolatorState extends PathInterpolatorState { super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -84,6 +85,7 @@ public class RotPosScalePathInterpolatorState extends PathInterpolatorState { } } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -97,6 +99,7 @@ public class RotPosScalePathInterpolatorState extends PathInterpolatorState { } } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class, @@ -115,6 +118,7 @@ public class RotPosScalePathInterpolatorState extends PathInterpolatorState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new RotPosScalePathInterpolator( null, null, new Transform3D(), knots, quats, positions, scales ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationInterpolatorState.java index de8d254..6ca5e1b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationInterpolatorState.java @@ -58,6 +58,7 @@ public class RotationInterpolatorState extends TransformInterpolatorState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -66,6 +67,7 @@ public class RotationInterpolatorState extends TransformInterpolatorState { out.writeFloat( interp.getMaximumAngle() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -74,11 +76,13 @@ public class RotationInterpolatorState extends TransformInterpolatorState { interp.setMaximumAngle( in.readFloat() ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Alpha.class, TransformGroup.class }, new Object[] { null, null } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new RotationInterpolator( null, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationPathInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationPathInterpolatorState.java index 49a3706..be3ed34 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationPathInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/RotationPathInterpolatorState.java @@ -60,6 +60,7 @@ public class RotationPathInterpolatorState extends PathInterpolatorState { super( symbol, control ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); @@ -74,6 +75,7 @@ public class RotationPathInterpolatorState extends PathInterpolatorState { } } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -83,6 +85,7 @@ public class RotationPathInterpolatorState extends PathInterpolatorState { } } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class, @@ -97,6 +100,7 @@ public class RotationPathInterpolatorState extends PathInterpolatorState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new RotationPathInterpolator( null, null, new Transform3D(), knots, quats ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ScaleInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ScaleInterpolatorState.java index 7a942a5..1dfb902 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ScaleInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ScaleInterpolatorState.java @@ -56,6 +56,7 @@ public class ScaleInterpolatorState extends TransformInterpolatorState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -63,6 +64,7 @@ public class ScaleInterpolatorState extends TransformInterpolatorState { out.writeFloat( ((ScaleInterpolator)node).getMaximumScale() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -70,6 +72,7 @@ public class ScaleInterpolatorState extends TransformInterpolatorState { ((ScaleInterpolator)node).setMaximumScale( in.readFloat() ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, TransformGroup.class }, @@ -78,6 +81,7 @@ public class ScaleInterpolatorState extends TransformInterpolatorState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ScaleInterpolator( null, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Shape3DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Shape3DState.java index 92c8077..abd22a9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Shape3DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Shape3DState.java @@ -67,6 +67,7 @@ public class Shape3DState extends LeafState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -79,6 +80,7 @@ public class Shape3DState extends LeafState { out.writeInt( geometry[i] ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); ((Shape3D)node).setCollisionBounds( control.readBounds( in )); @@ -99,6 +101,7 @@ public class Shape3DState extends LeafState { control.getSymbolTable().incNodeComponentRefCount( appearance ); } + @Override public void buildGraph() { ((Shape3D)node).setAppearance( (Appearance)control.getSymbolTable().getJ3dNode( appearance ) ); @@ -109,6 +112,7 @@ public class Shape3DState extends LeafState { super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Shape3D(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SharedGroupState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SharedGroupState.java index 2e8c0b5..bcc95e9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SharedGroupState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SharedGroupState.java @@ -51,6 +51,7 @@ public class SharedGroupState extends GroupState { super( symbol, control ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new SharedGroup(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundState.java index 2dd91ba..79545be 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundState.java @@ -64,6 +64,7 @@ public abstract class SoundState extends LeafState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -83,6 +84,7 @@ public abstract class SoundState extends LeafState { out.writeFloat( sound.getRateScaleFactor() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -111,6 +113,7 @@ public abstract class SoundState extends LeafState { control.getSymbolTable().incNodeComponentRefCount( mediaContainer ); } + @Override public void buildGraph() { ((Sound)node).setSchedulingBoundingLeaf( (BoundingLeaf)control.getSymbolTable().getJ3dNode( boundingLeaf )); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundscapeState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundscapeState.java index 5784187..396b997 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundscapeState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SoundscapeState.java @@ -60,6 +60,7 @@ public class SoundscapeState extends LeafState { } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -68,6 +69,7 @@ public class SoundscapeState extends LeafState { out.writeInt( control.getSymbolTable().addReference( ((Soundscape)node).getAuralAttributes() )); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -85,12 +87,14 @@ public class SoundscapeState extends LeafState { control.getSymbolTable().incNodeComponentRefCount( auralAttributes ); } + @Override public void buildGraph() { ((Soundscape)node).setApplicationBoundingLeaf( (BoundingLeaf)control.getSymbolTable().getJ3dNode( boundingLeaf )); ((Soundscape)node).setAuralAttributes( (AuralAttributes)control.getSymbolTable().getJ3dNode( auralAttributes )); super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Soundscape(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SpotLightState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SpotLightState.java index d4409e4..31d5f9f 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SpotLightState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SpotLightState.java @@ -59,6 +59,7 @@ public class SpotLightState extends LightState { } + @Override public void writeObject(DataOutput out) throws IOException { super.writeObject(out); @@ -78,6 +79,7 @@ public class SpotLightState extends LightState { out.writeFloat(((SpotLight) node).getConcentration()); } + @Override public void readObject(DataInput in) throws IOException { super.readObject(in); @@ -94,6 +96,7 @@ public class SpotLightState extends LightState { ((SpotLight) node).setConcentration(in.readFloat()); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new SpotLight(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java index 29e69ec..e828f17 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java @@ -54,6 +54,7 @@ public class SwitchState extends GroupState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Switch attr = (Switch)node; @@ -61,6 +62,7 @@ public class SwitchState extends GroupState { out.writeInt( attr.getWhichChild() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); Switch attr = (Switch)node; @@ -69,6 +71,7 @@ public class SwitchState extends GroupState { attr.setWhichChild( in.readInt() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Switch(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java index 35d93b6..9150bb9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java @@ -61,6 +61,7 @@ public class SwitchValueInterpolatorState extends InterpolatorState { target = control.getSymbolTable().addReference( ((SwitchValueInterpolator)node).getTarget() ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -69,6 +70,7 @@ public class SwitchValueInterpolatorState extends InterpolatorState { out.writeInt( ((SwitchValueInterpolator)node).getLastChildIndex() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -78,11 +80,13 @@ public class SwitchValueInterpolatorState extends InterpolatorState { } + @Override public void buildGraph() { ((SwitchValueInterpolator)node).setTarget( (Switch)control.getSymbolTable().getJ3dNode( target )); super.buildGraph(); // Must be last call in method } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, javax.media.j3d.Switch.class }, @@ -90,6 +94,7 @@ public class SwitchValueInterpolatorState extends InterpolatorState { null } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new SwitchValueInterpolator( null, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java index 784b36c..43262e9 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java @@ -55,6 +55,7 @@ public class TexCoordGenerationState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); TexCoordGeneration attr = (TexCoordGeneration)node; @@ -72,6 +73,7 @@ public class TexCoordGenerationState extends NodeComponentState { control.writeVector4f( out, vec ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); TexCoordGeneration attr = (TexCoordGeneration)node; @@ -84,6 +86,7 @@ public class TexCoordGenerationState extends NodeComponentState { attr.setPlaneQ( control.readVector4f( in )); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TexCoordGeneration(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java index 1046aa0..493fd7b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java @@ -64,6 +64,7 @@ public class Text3DState extends GeometryState { } } + @Override public void writeObject(DataOutput out) throws IOException { super.writeObject(out); @@ -80,6 +81,7 @@ public class Text3DState extends GeometryState { out.writeUTF(((Text3D) node).getString()); } + @Override public void readObject(DataInput in) throws IOException { super.readObject(in); @@ -98,10 +100,12 @@ public class Text3DState extends GeometryState { * component to update the reference count of any components that it * references. */ + @Override public void addSubReference() { control.getSymbolTable().incNodeComponentRefCount(font3d); } + @Override public void buildGraph() { ((Text3D) node).setFont3D(((Font3D) control.getSymbolTable() .getJ3dNode(font3d))); @@ -111,6 +115,7 @@ public class Text3DState extends GeometryState { super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Text3D(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java index f68fc13..de146ea 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java @@ -64,6 +64,7 @@ public class Texture2DState extends TextureState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -83,6 +84,7 @@ public class Texture2DState extends TextureState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -105,17 +107,20 @@ public class Texture2DState extends TextureState { * Allows this component to update the reference count of any components * that it references. */ + @Override public void addSubReference() { control.getSymbolTable().incNodeComponentRefCount( detailImage ); } // Set up references during load + @Override public void buildGraph() { Texture2D t = (Texture2D)node; t.setDetailImage( (ImageComponent2D)control.getSymbolTable().getJ3dNode( detailImage ) ); super.buildGraph(); // Must be last call in method } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -129,6 +134,7 @@ public class Texture2DState extends TextureState { new Integer( boundaryWidth ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Texture2D( mipMapMode, format, width, height, boundaryWidth ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java index 726d931..30b025a 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java @@ -57,26 +57,31 @@ public class Texture3DState extends TextureState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( ((Texture3D)node).getBoundaryModeR() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); ((Texture3D)node).setBoundaryModeR( in.readInt() ); } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); out.writeInt( ((Texture3D)node).getDepth() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); depth = in.readInt(); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -92,6 +97,7 @@ public class Texture3DState extends TextureState { new Integer( boundaryWidth ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new Texture3D( mipMapMode, format, width, height, depth, boundaryWidth ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java index 5e544cc..3ed92e6 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java @@ -59,6 +59,7 @@ public class TextureAttributesState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); TextureAttributes attr = (TextureAttributes)node; @@ -96,6 +97,7 @@ public class TextureAttributesState extends NodeComponentState { out.writeInt( attr.getCombineAlphaScale() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); TextureAttributes attr = (TextureAttributes)node; @@ -126,6 +128,7 @@ public class TextureAttributesState extends NodeComponentState { attr.setCombineAlphaScale( in.readInt() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TextureAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureCubeMapState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureCubeMapState.java index b973716..9c45b7b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureCubeMapState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureCubeMapState.java @@ -73,6 +73,7 @@ public class TextureCubeMapState extends TextureState { * Allows this component to update the reference count of any components * that it references. */ + @Override public void addSubReference() { for ( int face=0; face<6; face++ ) { for( int i=0; i<ic[ face ].length; i++) @@ -81,6 +82,7 @@ public class TextureCubeMapState extends TextureState { } // Set up references during load + @Override public void buildGraph() { TextureCubeMap tcm = (TextureCubeMap)node; @@ -93,6 +95,7 @@ public class TextureCubeMapState extends TextureState { super.buildGraph(); // Must be last call in method } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, @@ -104,6 +107,7 @@ public class TextureCubeMapState extends TextureState { new Integer( boundaryWidth ) } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TextureCubeMap( mipMapMode, format, width, boundaryWidth ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureState.java index 9e2b03e..eae418b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureState.java @@ -77,6 +77,7 @@ public abstract class TextureState extends NodeComponentState { } + @Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); out.writeInt( ((Texture)node).getMipMapMode() ); @@ -86,6 +87,7 @@ public abstract class TextureState extends NodeComponentState { out.writeInt( ((Texture)node).getBoundaryWidth() ); } + @Override public void readConstructorParams( DataInput in ) throws IOException { super.readConstructorParams( in ); @@ -96,6 +98,7 @@ public abstract class TextureState extends NodeComponentState { boundaryWidth = in.readInt(); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Texture attr = (Texture)node; @@ -147,6 +150,7 @@ public abstract class TextureState extends NodeComponentState { } } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); Texture attr = (Texture)node; @@ -205,6 +209,7 @@ public abstract class TextureState extends NodeComponentState { } } + @Override public void addSubReference() { if ( !(node instanceof TextureCubeMap) ) { for( int i=0; i<imageComponents.length; i++) @@ -212,6 +217,7 @@ public abstract class TextureState extends NodeComponentState { } } + @Override public void buildGraph() { if ( !(node instanceof TextureCubeMap) ) { for(int i=0; i<imageComponents.length; i++) { diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureUnitStateState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureUnitStateState.java index 1bf0fe3..4fd7862 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureUnitStateState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TextureUnitStateState.java @@ -68,6 +68,7 @@ public class TextureUnitStateState extends NodeComponentState { } } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); out.writeInt( texCoordGeneration ); @@ -75,6 +76,7 @@ public class TextureUnitStateState extends NodeComponentState { out.writeInt( textureAttributes ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); TextureUnitState attr = (TextureUnitState)node; @@ -83,12 +85,14 @@ public class TextureUnitStateState extends NodeComponentState { textureAttributes = in.readInt(); } + @Override public void addSubReference() { control.getSymbolTable().incNodeComponentRefCount( texCoordGeneration ); control.getSymbolTable().incNodeComponentRefCount( texture ); control.getSymbolTable().incNodeComponentRefCount( textureAttributes ); } + @Override public void buildGraph() { TextureUnitState attr = (TextureUnitState)node; attr.setTexCoordGeneration( (TexCoordGeneration)control.getSymbolTable().getJ3dNode( texCoordGeneration )); @@ -97,6 +101,7 @@ public class TextureUnitStateState extends NodeComponentState { super.buildGraph(); // Must be last call in method } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TextureUnitState(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformGroupState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformGroupState.java index 799b142..02c3615 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformGroupState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformGroupState.java @@ -56,6 +56,7 @@ public class TransformGroupState extends GroupState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); Transform3D trans = new Transform3D(); @@ -68,6 +69,7 @@ public class TransformGroupState extends GroupState { } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); Transform3D trans = new Transform3D(); @@ -80,6 +82,7 @@ public class TransformGroupState extends GroupState { ((TransformGroup)node).setTransform( trans ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TransformGroup(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformInterpolatorState.java index 2eff263..20b1758 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransformInterpolatorState.java @@ -57,6 +57,7 @@ public abstract class TransformInterpolatorState extends InterpolatorState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -66,6 +67,7 @@ public abstract class TransformInterpolatorState extends InterpolatorState { out.writeInt( control.getSymbolTable().addReference( ti.getTarget() ) ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -74,6 +76,7 @@ public abstract class TransformInterpolatorState extends InterpolatorState { target = in.readInt(); } + @Override public void buildGraph() { ((TransformInterpolator)node).setTarget( (TransformGroup)control.getSymbolTable().getJ3dNode( target ) ); diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyAttributesState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyAttributesState.java index 4f67340..0c45116 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyAttributesState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyAttributesState.java @@ -54,6 +54,7 @@ public class TransparencyAttributesState extends NodeComponentState { super(symbol, control); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); TransparencyAttributes attr = (TransparencyAttributes)node; @@ -63,6 +64,7 @@ public class TransparencyAttributesState extends NodeComponentState { out.writeInt( attr.getTransparencyMode() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); TransparencyAttributes attr = (TransparencyAttributes)node; @@ -72,6 +74,7 @@ public class TransparencyAttributesState extends NodeComponentState { attr.setTransparencyMode( in.readInt() ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TransparencyAttributes(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyInterpolatorState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyInterpolatorState.java index 9b48320..99d67eb 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyInterpolatorState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyInterpolatorState.java @@ -61,6 +61,7 @@ public class TransparencyInterpolatorState extends InterpolatorState { target = control.getSymbolTable().addReference( ((TransparencyInterpolator)node).getTarget() ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -69,6 +70,7 @@ public class TransparencyInterpolatorState extends InterpolatorState { out.writeFloat( ((TransparencyInterpolator)node).getMaximumTransparency() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -82,15 +84,18 @@ public class TransparencyInterpolatorState extends InterpolatorState { * Allows this component to update the reference count of any components * that it references. */ + @Override public void addSubReference() { control.getSymbolTable().incNodeComponentRefCount( target ); } + @Override public void buildGraph() { ((TransparencyInterpolator)node).setTarget( (TransparencyAttributes)control.getSymbolTable().getJ3dNode( target )); super.buildGraph(); // Must be last call in method } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { javax.media.j3d.Alpha.class, javax.media.j3d.TransparencyAttributes.class }, @@ -98,6 +103,7 @@ public class TransparencyInterpolatorState extends InterpolatorState { null } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TransparencyInterpolator( null, null ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleArrayState.java index b903b9f..858e02b 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleArrayState.java @@ -55,15 +55,18 @@ public class TriangleArrayState extends GeometryArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, @@ -77,6 +80,7 @@ public class TriangleArrayState extends GeometryArrayState { texCoordSetMap } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TriangleArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleFanArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleFanArrayState.java index 9c3aa2c..7489c8a 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleFanArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleFanArrayState.java @@ -55,15 +55,18 @@ public class TriangleFanArrayState extends GeometryStripArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, @@ -79,6 +82,7 @@ public class TriangleFanArrayState extends GeometryStripArrayState { stripVertexCounts } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TriangleFanArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, stripVertexCounts ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleStripArrayState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleStripArrayState.java index da4e8b1..d732071 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleStripArrayState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/TriangleStripArrayState.java @@ -55,16 +55,19 @@ public class TriangleStripArrayState extends GeometryStripArrayState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); } + @Override public SceneGraphObject createNode( Class j3dClass ) { return createNode( j3dClass, new Class[] { Integer.TYPE, @@ -80,6 +83,7 @@ public class TriangleStripArrayState extends GeometryStripArrayState { stripVertexCounts } ); } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new TriangleStripArray( vertexCount, vertexFormat, texCoordSetCount, texCoordSetMap, stripVertexCounts ); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ViewPlatformState.java b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ViewPlatformState.java index ab91e93..201c87e 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ViewPlatformState.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ViewPlatformState.java @@ -57,6 +57,7 @@ public class ViewPlatformState extends LeafState { super( symbol, control ); } + @Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); @@ -64,6 +65,7 @@ public class ViewPlatformState extends LeafState { out.writeInt( ((ViewPlatform)node).getViewAttachPolicy() ); } + @Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); @@ -72,6 +74,7 @@ public class ViewPlatformState extends LeafState { } + @Override protected javax.media.j3d.SceneGraphObject createNode() { return new ViewPlatform(); } diff --git a/src/classes/share/com/sun/j3d/utils/scenegraph/transparency/SimpleDistanceComparator.java b/src/classes/share/com/sun/j3d/utils/scenegraph/transparency/SimpleDistanceComparator.java index 1628165..efc1b52 100644 --- a/src/classes/share/com/sun/j3d/utils/scenegraph/transparency/SimpleDistanceComparator.java +++ b/src/classes/share/com/sun/j3d/utils/scenegraph/transparency/SimpleDistanceComparator.java @@ -67,6 +67,7 @@ public class SimpleDistanceComparator implements Comparator { * @param o2 TransparencySortGeom object 2 * */ + @Override public int compare(Object o1, Object o2) { TransparencySortGeom t1 = (TransparencySortGeom)o1; TransparencySortGeom t2 = (TransparencySortGeom)o2; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigCommand.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigCommand.java index 231d1fc..a7ae5af 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigCommand.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigCommand.java @@ -272,6 +272,7 @@ class ConfigCommand { static String setJavaProperty(final String key, final String value) { return (String)java.security.AccessController.doPrivileged (new java.security.PrivilegedAction() { + @Override public Object run() { return System.setProperty(key, value) ; } @@ -288,6 +289,7 @@ class ConfigCommand { static String evaluateJavaProperty(final String key) { return (String)java.security.AccessController.doPrivileged (new java.security.PrivilegedAction() { + @Override public Object run() { return System.getProperty(key) ; } @@ -381,6 +383,7 @@ class ConfigCommand { * * @return string representing this command */ + @Override public String toString() { String[] lines = null ; StringBuffer sb = new StringBuffer("(") ; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigContainer.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigContainer.java index 0235a55..7e61bfa 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigContainer.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigContainer.java @@ -1443,6 +1443,7 @@ public class ConfigContainer { urlString = (String)java.security.AccessController.doPrivileged (new java.security.PrivilegedAction() { + @Override public Object run() { return System.getProperty("j3d.configURL", defProp) ; } @@ -1471,20 +1472,24 @@ public class ConfigContainer { } // overridden for efficiency + @Override public Object get(Object key) { return map.get(key) ; } // overridden for efficiency + @Override public boolean containsKey(Object key) { return map.containsKey(key) ; } // overridden for efficiency + @Override public boolean containsValue(Object value) { return map.containsValue(value) ; } + @Override public Set entrySet() { if (entrySet == null) entrySet = new ReadOnlySet(map.entrySet()) ; @@ -1502,10 +1507,12 @@ public class ConfigContainer { this.collection = c ; } + @Override public int size() { return collection.size() ; } + @Override public Iterator iterator() { return new ReadOnlyIterator(collection.iterator()) ; } @@ -1519,14 +1526,17 @@ public class ConfigContainer { this.i = i ; } + @Override public boolean hasNext() { return i.hasNext() ; } + @Override public Object next() { return i.next() ; } + @Override public void remove() { throw new UnsupportedOperationException() ; } diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalBody.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalBody.java index d53b9a9..cd76a71 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalBody.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalBody.java @@ -65,9 +65,11 @@ class ConfigPhysicalBody extends ConfigObject { PhysicalBody j3dPhysicalBody; // Overridden to do nothing. + @Override protected void initialize(ConfigCommand command) { } + @Override protected void setProperty(ConfigCommand command) { int argc = command.argc; Object[] argv = command.argv; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalEnvironment.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalEnvironment.java index 9a03b6f..b9144ab 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalEnvironment.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigPhysicalEnvironment.java @@ -67,6 +67,7 @@ class ConfigPhysicalEnvironment extends ConfigObject { /** * Overrides initialize() to do nothing. */ + @Override protected void initialize(ConfigCommand command) { } @@ -77,6 +78,7 @@ class ConfigPhysicalEnvironment extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void setProperty(ConfigCommand command) { Object val ; Object[] argv = command.argv ; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigScreen.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigScreen.java index 6dbc4ba..4748675 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigScreen.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigScreen.java @@ -166,6 +166,7 @@ class ConfigScreen extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void setProperty(ConfigCommand command) { String attr = null ; @@ -287,6 +288,7 @@ class ConfigScreen extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void initialize(ConfigCommand command) { if (command.argc != 3) { syntaxError("Incorrect number of arguments to " + diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigSensor.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigSensor.java index 8b59e3f..ba3a407 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigSensor.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigSensor.java @@ -68,6 +68,7 @@ class ConfigSensor extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void initialize(ConfigCommand command) { int argc = command.argc ; @@ -101,6 +102,7 @@ class ConfigSensor extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void setProperty(ConfigCommand command) { int argc = command.argc ; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigView.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigView.java index a64a70c..00a3c0b 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigView.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigView.java @@ -111,6 +111,7 @@ class ConfigView extends ConfigObject { /** * Overrides initialize() to do nothing. */ + @Override protected void initialize(ConfigCommand command) { } @@ -120,6 +121,7 @@ class ConfigView extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void setProperty(ConfigCommand command) { int argc = command.argc ; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatform.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatform.java index 5a4aaae..69320fb 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatform.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatform.java @@ -76,6 +76,7 @@ class ConfigViewPlatform extends ConfigObject { /** * Overrides initialize() to do nothing. */ + @Override protected void initialize(ConfigCommand command) { } @@ -86,6 +87,7 @@ class ConfigViewPlatform extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void setProperty(ConfigCommand command) { int argc = command.argc ; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatformBehavior.java b/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatformBehavior.java index 19576c8..2b0d10b 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatformBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfigViewPlatformBehavior.java @@ -63,6 +63,7 @@ class ConfigViewPlatformBehavior extends ConfigObject { * * @param command the command that invoked this method */ + @Override protected void setProperty(ConfigCommand cmd) { int argc = cmd.argc ; diff --git a/src/classes/share/com/sun/j3d/utils/universe/ConfiguredUniverse.java b/src/classes/share/com/sun/j3d/utils/universe/ConfiguredUniverse.java index 9168d8e..7b84b25 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/ConfiguredUniverse.java +++ b/src/classes/share/com/sun/j3d/utils/universe/ConfiguredUniverse.java @@ -770,6 +770,7 @@ public class ConfiguredUniverse extends SimpleUniverse { * Cleanup memory references used by ConfiguredUniverse. * @since Java 3D 1.3.1 */ + @Override public void cleanup() { if (viewer != null) { for (int i = 0 ; i < viewer.length ; i++) { diff --git a/src/classes/share/com/sun/j3d/utils/universe/SimpleUniverse.java b/src/classes/share/com/sun/j3d/utils/universe/SimpleUniverse.java index 15554da..761ac2e 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/SimpleUniverse.java +++ b/src/classes/share/com/sun/j3d/utils/universe/SimpleUniverse.java @@ -406,6 +406,7 @@ public class SimpleUniverse extends VirtualUniverse { // security exception without a try/catch. String stereo = java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<String>() { + @Override public String run() { return System.getProperty("j3d.stereo"); } diff --git a/src/classes/share/com/sun/j3d/utils/universe/Viewer.java b/src/classes/share/com/sun/j3d/utils/universe/Viewer.java index 0de79d7..7553622 100644 --- a/src/classes/share/com/sun/j3d/utils/universe/Viewer.java +++ b/src/classes/share/com/sun/j3d/utils/universe/Viewer.java @@ -791,6 +791,7 @@ public class Viewer { String audioDeviceClassName = (String) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public Object run() { return System.getProperty("j3d.audiodevice"); } @@ -813,6 +814,7 @@ public class Viewer { ClassLoader audioDeviceClassLoader = (ClassLoader) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public Object run() { return ClassLoader.getSystemClassLoader(); } @@ -870,6 +872,7 @@ public class Viewer { final boolean _doExit = doExit; win.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent winEvent) { Window w = winEvent.getWindow(); w.setVisible(false); |