public static class

SoftSpot.WorkingArea

extends Object
java.lang.Object
   ↳ com.datalogic.softspot.SoftSpot.WorkingArea

Class Overview

Constraints defining the frame to restrict SoftSpot's movement. Constraints can be specified using pixel values or as proportions of the screen. For the latter, 0.0 refers to the far left/top, while 1.0 refers to the very bottom/right.

Summary

Nested Classes
enum SoftSpot.WorkingArea.RotationBehavior RotationBehavior is an enumeration defining constants for different ways the WorkingArea can behave when rotating the device. 
Fields
public float bottom Lower bound, proportional to the screen.
public int bottomPixels Lower bound, in pixels.
public float left Left bound, proportional to the screen.
public int leftPixels Left bound, in pixels.
public float right Right bound, proportional to the screen.
public int rightPixels Right bound, in pixels.
public SoftSpot.WorkingArea.RotationBehavior rotationBehavior Determines how the working area reacts to screen rotations.
public float top Upper bound, proportional to the screen.
public int topPixels Upper bound, in pixels
Public Constructors
WorkingArea(int leftPixels, int topPixels, int rightPixels, int bottomPixels)
Create a WorkingArea specifying pixels values.
WorkingArea(float left, float top, float right, float bottom)
Create a WorkingArea specifying proportions on the screen.
WorkingArea(int leftPixels, int topPixels, int rightPixels, int bottomPixels, float left, float top, float right, float bottom, SoftSpot.WorkingArea.RotationBehavior rotationBehavior)
Public Methods
float height()
Height of the WorkingArea.
float heightPixels()
Height of the WorkingArea.
float width()
Width of the WorkingArea.
float widthPixels()
Width of the WorkingArea.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public float bottom

Added in revision 15

Lower bound, proportional to the screen. 0 = far top, 1 = far bottom. Must be >= top.

public int bottomPixels

Added in revision 15

Lower bound, in pixels. Must be >= topPixels.

public float left

Added in revision 15

Left bound, proportional to the screen. 0 = far left, 1 = far right.

public int leftPixels

Added in revision 15

Left bound, in pixels.

public float right

Added in revision 15

Right bound, proportional to the screen. 0 = far left, 1 = far right. Must be >= left.

public int rightPixels

Added in revision 15

Right bound, in pixels. Must be >= leftPixels.

public SoftSpot.WorkingArea.RotationBehavior rotationBehavior

Added in revision 15

Determines how the working area reacts to screen rotations.

public float top

Added in revision 15

Upper bound, proportional to the screen. 0 = far top, 1 = far bottom.

public int topPixels

Added in revision 15

Upper bound, in pixels

Public Constructors

public WorkingArea (int leftPixels, int topPixels, int rightPixels, int bottomPixels)

Added in revision 15

Create a WorkingArea specifying pixels values.

Parameters
leftPixels Left bound, in pixels.
topPixels Upper bound, in pixels.
rightPixels Right bound, in pixels. Must be >= leftPixels.
bottomPixels Lower bound, in pixels. Must be >= topPixels.

public WorkingArea (float left, float top, float right, float bottom)

Added in revision 15

Create a WorkingArea specifying proportions on the screen.

Parameters
left Left bound, proportional to the screen. 0 = far left, 1 = far right.
top Upper bound, proportional to the screen. 0 = far top, 1 = far bottom.
right Right bound, proportional to the screen. 0 = far left, 1 = far right. Must be >= left.
bottom Lower bound, proportional to the screen. 0 = far top, 1 = far bottom. Must be >= top.

public WorkingArea (int leftPixels, int topPixels, int rightPixels, int bottomPixels, float left, float top, float right, float bottom, SoftSpot.WorkingArea.RotationBehavior rotationBehavior)

Added in revision 15

Public Methods

public float height ()

Added in revision 15

Height of the WorkingArea.

Returns
  • The height of the WorkingArea, relative to the screen.

public float heightPixels ()

Added in revision 15

Height of the WorkingArea.

Returns
  • The height of the WorkingArea, in pixels.

public float width ()

Added in revision 15

Width of the WorkingArea.

Returns
  • The width of the WorkingArea, relative to the screen.

public float widthPixels ()

Added in revision 15

Width of the WorkingArea.

Returns
  • The width of the WorkingArea, in pixels.