- Common ways to obtain GLEventListenerState
private void myMethod () {GLEventListenerState g =
GLAutoDrawableBase gLAutoDrawableBase;GLEventListenerState.moveFrom(gLAutoDrawableBase)
- Smart code suggestions by Codota
}
/** * Moves all GLEventListenerState components from the given {@link GLAutoDrawable} * to a newly created instance. * <p> * Note that all components are removed from the {@link GLAutoDrawable}, * i.e. the {@link GLContext}, all {@link GLEventListener}. * </p> * <p> * If the {@link GLAutoDrawable} was added to a {@link GLAnimatorControl}, it is removed * and the {@link GLAnimatorControl} added to the GLEventListenerState. * </p> * <p> * The returned GLEventListenerState instance is the {@link #isOwner() owner of the components}. * </p> * <p> * Locking is performed on the {@link GLAutoDrawable auto-drawable's} * {@link GLAutoDrawable#getUpstreamLock() upstream-lock} and {@link GLAutoDrawable#getNativeSurface() surface}. * See <a href="../../../javax/media/opengl/GLAutoDrawable.html#locking">GLAutoDrawable Locking</a>.</li> * </p> * * @param src {@link GLAutoDrawable} source to move components from * @return new GLEventListenerState instance {@link #isOwner() owning} moved components. * * @see #moveTo(GLAutoDrawable) */ public static GLEventListenerState moveFrom(final GLAutoDrawable src) { return GLEventListenerState.moveFrom(src, false); }
/** * Moves all GLEventListenerState components from the given {@link GLAutoDrawable} * to a newly created instance. * <p> * Note that all components are removed from the {@link GLAutoDrawable}, * i.e. the {@link GLContext}, all {@link GLEventListener}. * </p> * <p> * If the {@link GLAutoDrawable} was added to a {@link GLAnimatorControl}, it is removed * and the {@link GLAnimatorControl} added to the GLEventListenerState. * </p> * <p> * The returned GLEventListenerState instance is the {@link #isOwner() owner of the components}. * </p> * <p> * Locking is performed on the {@link GLAutoDrawable auto-drawable's} * {@link GLAutoDrawable#getUpstreamLock() upstream-lock} and {@link GLAutoDrawable#getNativeSurface() surface}. * See <a href="../../../com/jogamp/opengl/GLAutoDrawable.html#locking">GLAutoDrawable Locking</a>.</li> * </p> * * @param src {@link GLAutoDrawable} source to move components from * @return new GLEventListenerState instance {@link #isOwner() owning} moved components. * * @see #moveTo(GLAutoDrawable) */ public static GLEventListenerState moveFrom(final GLAutoDrawable src) { return GLEventListenerState.moveFrom(src, false); }
/** * Moves all GLEventListenerState components from the given {@link GLAutoDrawable} * to a newly created instance. * <p> * Note that all components are removed from the {@link GLAutoDrawable}, * i.e. the {@link GLContext}, all {@link GLEventListener}. * </p> * <p> * If the {@link GLAutoDrawable} was added to a {@link GLAnimatorControl}, it is removed * and the {@link GLAnimatorControl} added to the GLEventListenerState. * </p> * <p> * The returned GLEventListenerState instance is the {@link #isOwner() owner of the components}. * </p> * <p> * Locking is performed on the {@link GLAutoDrawable auto-drawable's} * {@link GLAutoDrawable#getUpstreamLock() upstream-lock} and {@link GLAutoDrawable#getNativeSurface() surface}. * See <a href="../../../com/jogamp/opengl/GLAutoDrawable.html#locking">GLAutoDrawable Locking</a>.</li> * </p> * * @param src {@link GLAutoDrawable} source to move components from * @return new GLEventListenerState instance {@link #isOwner() owning} moved components. * * @see #moveTo(GLAutoDrawable) */ public static GLEventListenerState moveFrom(final GLAutoDrawable src) { return GLEventListenerState.moveFrom(src, false); }
/** * Preserves the {@link GLEventListenerState} from this {@link GLAutoDrawable}. * * @return <code>true</code> if the {@link GLEventListenerState} is preserved successfully from this {@link GLAutoDrawable}, * otherwise <code>false</code>. * * @throws IllegalStateException if the {@link GLEventListenerState} is already preserved * * @see #restoreGLEventListenerState() */ protected final boolean preserveGLEventListenerState() throws IllegalStateException { if( null != glels ) { throw new IllegalStateException("GLEventListenerState already pulled"); } if( null != context && context.isCreated() ) { if( null!= glStateKeeperListener) { glStateKeeperListener.glStatePreserveNotify(this); } glels = GLEventListenerState.moveFrom(this); return null != glels; } return false; }
/** * Preserves the {@link GLEventListenerState} from this {@link GLAutoDrawable}. * * @return <code>true</code> if the {@link GLEventListenerState} is preserved successfully from this {@link GLAutoDrawable}, * otherwise <code>false</code>. * * @throws IllegalStateException if the {@link GLEventListenerState} is already preserved * * @see #restoreGLEventListenerState() */ protected final boolean preserveGLEventListenerState() throws IllegalStateException { if( null != glels ) { throw new IllegalStateException("GLEventListenerState already pulled"); } if( null != context && context.isCreated() ) { if( null!= glStateKeeperListener) { glStateKeeperListener.glStatePreserveNotify(this); } glels = GLEventListenerState.moveFrom(this); return null != glels; } return false; }
/** * Preserves the {@link GLEventListenerState} from this {@link GLAutoDrawable}. * * @return <code>true</code> if the {@link GLEventListenerState} is preserved successfully from this {@link GLAutoDrawable}, * otherwise <code>false</code>. * * @throws IllegalStateException if the {@link GLEventListenerState} is already preserved * * @see #restoreGLEventListenerState() */ protected final boolean preserveGLEventListenerState() throws IllegalStateException { if( null != glels ) { throw new IllegalStateException("GLEventListenerState already pulled"); } if( null != context && context.isCreated() ) { if( null!= glStateKeeperListener) { glStateKeeperListener.glStatePreserveNotify(this); } glels = GLEventListenerState.moveFrom(this); return null != glels; } return false; }