Class Plane
- java.lang.Object
-
- com.avaya.clientservices.media.gui.Plane
-
- All Implemented Interfaces:
Positionable
,Renderable
,Touchable
- Direct Known Subclasses:
BitmapPlane
,PipPlane
,VideoPlaneRemote
public abstract class Plane extends java.lang.Object implements Positionable, Renderable, Touchable
Abstract class for all things being rendered by an instance ofGLSurfaceView.Renderer
. This class manages the bounds of aRenderable
andTouchable
object. All coordinates are relative to theGLSurfaceView
; with the origin in the bottom-left corner.- See Also:
PlaneRenderer
-
-
Constructor Summary
Constructors Constructor Description Plane()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsPoint(float x, float y)
Tests the bounds to see if they contain a specified point.void
setBounds(int boundsX, int boundsY, int boundsWidth, int boundsHeight)
Sets the boundaries of the plane.void
setPosition(int boundsX, int boundsY)
Sets the position of the plane.void
setRenderer(PlaneRenderer renderer)
Sets thePlaneRenderer
for this plane.void
setVisibility(boolean visible)
Deprecated.static double
time()
Returns the current timestamp of the most precise timer available on the local system.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.avaya.clientservices.media.gui.Renderable
onDrawFrame, onSurfaceChanged, onSurfaceCreated
-
Methods inherited from interface com.avaya.clientservices.media.gui.Touchable
onTouchEvent
-
-
-
-
Method Detail
-
containsPoint
public boolean containsPoint(float x, float y)
Tests the bounds to see if they contain a specified point.- Parameters:
x
- the x-coordinate of the point.y
- the y-coordinate of the point.- Returns:
- true if the point lies within the bounds; otherwise false.
-
setBounds
public void setBounds(int boundsX, int boundsY, int boundsWidth, int boundsHeight)
Sets the boundaries of the plane.- Specified by:
setBounds
in interfacePositionable
- Parameters:
boundsX
- x-coordinate of the planeboundsY
- y-coordinate of the planeboundsWidth
- width of the planeboundsHeight
- height of the plane
-
setPosition
public void setPosition(int boundsX, int boundsY)
Sets the position of the plane.- Specified by:
setPosition
in interfacePositionable
- Parameters:
boundsX
- x-coordinate of the planeboundsY
- y-coordinate of the plane
-
setRenderer
public void setRenderer(PlaneRenderer renderer)
Sets thePlaneRenderer
for this plane.Renderable
objects that need to be notified of surface changes should implementonRendererChanged()
and callPlaneRenderer.addRenderable(Renderable)
.- Parameters:
renderer
-PlaneRenderer
for this plane.
-
setVisibility
@Deprecated public void setVisibility(boolean visible)
Deprecated.Deprecated method to be removed when no longer called publicly.- Parameters:
visible
- boolean
-
time
public static double time()
Returns the current timestamp of the most precise timer available on the local system. This timestamp can only be used to measure an elapsed period by comparing it against another timestamp. It cannot be used as a very exact system time expression.- Returns:
- the current timestamp in seconds.
-
-