Top Fields Constructors Methods
jogamp.newt

public Class PointerIconImpl

extends Object
implements PointerIcon
Class Inheritance
All Implemented Interfaces
com.jogamp.newt.Display.PointerIcon, com.jogamp.nativewindow.util.PixelRectangle
Imports
java.nio.ByteBuffer, com.jogamp.nativewindow.util.DimensionImmutable, .PixelFormat, .PixelRectangle, .PointImmutable, com.jogamp.newt.Display, .Display.PointerIcon

Field Summary

Modifier and TypeField and Description
private final DisplayImpl
private long
private int
private volatile boolean
private final PointImmutable
private final PixelFormat
private final ByteBuffer
private final DimensionImmutable

Constructor Summary

AccessConstructor and Description
public
PointerIconImpl(final DisplayImpl display, final PixelFormat pixelformat, final DimensionImmutable size, final ByteBuffer pixels, final PointImmutable hotspot, final long handle)

public
PointerIconImpl(final DisplayImpl display, final PixelRectangle pixelrect, final PointImmutable hotspot, final long handle)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
destroy()

Implements com.jogamp.newt.Display.PointerIcon.destroy.

Destroys this instance.
pack-priv synchronized void
destroyOnEDT(final long dpy)

No checks, assume execution on EDT

public final Display
public final synchronized long
public final PointImmutable
public final PixelFormat
public final ByteBuffer
public final DimensionImmutable
getSize()

Implements com.jogamp.nativewindow.util.PixelRectangle.getSize.

Returns the size, i.e. width and height.
public final int
getStride()

Implements com.jogamp.newt.Display.PointerIcon.getStride.

Always neatly packed, i.e. width * bytes_per_pixel.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements com.jogamp.newt.Display.PointerIcon.hashCode.

Computes a hash code over:
  • display
  • pixelformat
  • size
  • stride
  • isGLOriented
  • pixels
  • hotspot
public final boolean
isGLOriented()

Implements com.jogamp.newt.Display.PointerIcon.isGLOriented.

Always false, i.e. origin is TOP-LEFT.
public final synchronized boolean
isValid()

Implements com.jogamp.newt.Display.PointerIcon.isValid.

Returns true if valid, otherwise false.
public final String
toString()

Overrides java.lang.Object.toString.

Implements com.jogamp.nativewindow.util.PixelRectangle.toString.

Returns a string representation of the object.
public final synchronized boolean
validate()

Implements com.jogamp.newt.Display.PointerIcon.validate.

Returns true if instance isValid() or validation was successful, otherwise false.
public final synchronized long
Inherited from java.lang.Object:
cloneequalsfinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

displayback to summary
private final DisplayImpl display
handleback to summary
private long handle
hashCodeback to summary
private int hashCode
hashCodeComputedback to summary
private volatile boolean hashCodeComputed
hotspotback to summary
private final PointImmutable hotspot
pixelformatback to summary
private final PixelFormat pixelformat
pixelsback to summary
private final ByteBuffer pixels
sizeback to summary
private final DimensionImmutable size

Constructor Detail

PointerIconImplback to summary
public PointerIconImpl(final DisplayImpl display, final PixelFormat pixelformat, final DimensionImmutable size, final ByteBuffer pixels, final PointImmutable hotspot, final long handle)
PointerIconImplback to summary
public PointerIconImpl(final DisplayImpl display, final PixelRectangle pixelrect, final PointImmutable hotspot, final long handle)

Method Detail

destroyback to summary
public synchronized void destroy()

Implements com.jogamp.newt.Display.PointerIcon.destroy.

Doc from com.jogamp.newt.Display.PointerIcon.destroy.

Destroys this instance.

Will be called automatically if it's associated Display is destroyed.

Annotations
@Override
destroyOnEDTback to summary
pack-priv synchronized void destroyOnEDT(final long dpy)

No checks, assume execution on EDT

getDisplayback to summary
public final Display getDisplay()

Implements com.jogamp.newt.Display.PointerIcon.getDisplay.

Returns:Display

Doc from com.jogamp.newt.Display.PointerIcon.getDisplay.

the associated Display

Annotations
@Override
getHandleback to summary
public final synchronized long getHandle()
getHotspotback to summary
public final PointImmutable getHotspot()

Implements com.jogamp.newt.Display.PointerIcon.getHotspot.

Doc from com.jogamp.newt.Display.PointerIcon.getHotspot.

Returns the hotspot.

Annotations
@Override
getPixelformatback to summary
public final PixelFormat getPixelformat()

Implements com.jogamp.nativewindow.util.PixelRectangle.getPixelformat.

Doc from com.jogamp.nativewindow.util.PixelRectangle.getPixelformat.

Returns the PixelFormat.

Annotations
@Override
getPixelsback to summary
public final ByteBuffer getPixels()

Implements com.jogamp.nativewindow.util.PixelRectangle.getPixels.

Doc from com.jogamp.nativewindow.util.PixelRectangle.getPixels.

Returns the pixels.

Annotations
@Override
getSizeback to summary
public final DimensionImmutable getSize()

Implements com.jogamp.nativewindow.util.PixelRectangle.getSize.

Doc from com.jogamp.nativewindow.util.PixelRectangle.getSize.

Returns the size, i.e. width and height.

Annotations
@Override
getStrideback to summary
public final int getStride()

Implements com.jogamp.newt.Display.PointerIcon.getStride.

Doc from com.jogamp.newt.Display.PointerIcon.getStride.

Always neatly packed, i.e. width * bytes_per_pixel.

Returns stride in byte-size, i.e. byte count from one line to the next.

Must be >= getPixelformat().bytesPerPixel() * getSize().getWidth().

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements com.jogamp.newt.Display.PointerIcon.hashCode.

Doc from com.jogamp.newt.Display.PointerIcon.hashCode.

Computes a hash code over:

  • display
  • pixelformat
  • size
  • stride
  • isGLOriented
  • pixels
  • hotspot
Dismissing the native handle!

The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.

Computes a hash code over:

  • pixelformat
  • size
  • stride
  • isGLOriented
  • pixels

The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object

Annotations
@Override
isGLOrientedback to summary
public final boolean isGLOriented()

Implements com.jogamp.newt.Display.PointerIcon.isGLOriented.

Doc from com.jogamp.newt.Display.PointerIcon.isGLOriented.

Always false, i.e. origin is TOP-LEFT.

Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left. Otherwise returns false, i.e. origin at top left.

Annotations
@Override
isValidback to summary
public final synchronized boolean isValid()

Implements com.jogamp.newt.Display.PointerIcon.isValid.

Doc from com.jogamp.newt.Display.PointerIcon.isValid.

Returns true if valid, otherwise false.

A PointerIcon instance becomes invalid if it's associated Display is destroyed.

Annotations
@Override
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Implements com.jogamp.nativewindow.util.PixelRectangle.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
validateback to summary
public final synchronized boolean validate()

Implements com.jogamp.newt.Display.PointerIcon.validate.

Doc from com.jogamp.newt.Display.PointerIcon.validate.

Returns true if instance isValid() or validation was successful, otherwise false.

Validation, i.e. recreation, is required if instance became invalid, see isValid().

Annotations
@Override
validatedHandleback to summary
public final synchronized long validatedHandle()