/** * Initializes implementation details post setup, * invoked at {@link #add(GLAutoDrawable)}, {@link #start()}, .. * <p> * Operation is a NOP if <code>force</code> is <code>false</code> * and this instance is already initialized. * </p> * * @throws GLException if Animator is {@link #isStarted()} */ protected final synchronized void initImpl(final boolean force) { if( force || null == impl ) { final String seqSuffix = String.format("#%02d", seqInstanceNumber++); if( useAWTAnimatorImpl( modeBits ) ) { try { impl = (AnimatorImpl) awtAnimatorImplClazz.newInstance(); baseName = getBaseName("AWT")+seqSuffix; } catch (final Exception e) { e.printStackTrace(); } } if( null == impl ) { impl = new DefaultAnimatorImpl(); baseName = getBaseName("")+seqSuffix; } if(DEBUG) { System.err.println("Animator.initImpl: baseName "+baseName+", implClazz "+impl.getClass().getName()+" - "+toString()+" - "+getThreadName()); } } } protected abstract String getBaseName(String prefix);
/** * Initializes implementation details post setup, * invoked at {@link #add(GLAutoDrawable)}, {@link #start()}, .. * <p> * Operation is a NOP if <code>force</code> is <code>false</code> * and this instance is already initialized. * </p> * * @throws GLException if Animator is {@link #isStarted()} */ protected final synchronized void initImpl(final boolean force) { if( force || null == impl ) { final String seqSuffix = String.format("#%02d", seqInstanceNumber++); if( useAWTAnimatorImpl( modeBits ) ) { try { impl = (AnimatorImpl) awtAnimatorImplClazz.newInstance(); baseName = getBaseName("AWT")+seqSuffix; } catch (final Exception e) { e.printStackTrace(); } } if( null == impl ) { impl = new DefaultAnimatorImpl(); baseName = getBaseName("")+seqSuffix; } if(DEBUG) { System.err.println("Animator.initImpl: baseName "+baseName+", implClazz "+impl.getClass().getName()+" - "+toString()+" - "+getThreadName()); } } } protected abstract String getBaseName(String prefix);
/** * Initializes implementation details post setup, * invoked at {@link #add(GLAutoDrawable)}, {@link #start()}, .. * <p> * Operation is a NOP if <code>force</code> is <code>false</code> * and this instance is already initialized. * </p> * * @throws GLException if Animator is {@link #isStarted()} */ protected final synchronized void initImpl(final boolean force) { if( force || null == impl ) { final String seqSuffix = String.format("#%02d", seqInstanceNumber++); if( useAWTAnimatorImpl( modeBits ) ) { try { impl = (AnimatorImpl) awtAnimatorImplClazz.newInstance(); baseName = getBaseName("AWT")+seqSuffix; } catch (final Exception e) { e.printStackTrace(); } } if( null == impl ) { impl = new DefaultAnimatorImpl(); baseName = getBaseName("")+seqSuffix; } if(DEBUG) { System.err.println("Animator.initImpl: baseName "+baseName+", implClazz "+impl.getClass().getName()+" - "+toString()+" - "+getThreadName()); } } } protected abstract String getBaseName(String prefix);