GView API
Handling Events
Although this class receives mouse events from Processing it does not have publically available event handlers. Instead it converts the event to a 'view local' event and forwards it to the listener.
The GView can be used without a listener but then it will not respond to mouse events.
Constructors
Constructor | Description |
---|---|
|
In most sketches the first parameter will have the value this to represent the main sketch
widow. The 4 float parameters will be the [x, y, width, height] of the view area. The last will be the renderer to use i.e. JAVA2D, P2D or P3D> |
Listeners
A GView control can only have one listener and a listener can only hear one view.
Mthod | Description |
---|---|
|
Add the listener to this view |
|
Remove the current listener from this view |
|
Returns the listener for this view or null if no listener is currently attached. |
Public methods
Method | Description |
---|---|
|
Returns true if the mouse is over the view else returns false |
|
returns the width and height of the view. |
|
Returns true if using the P3D renderer else returns false. |
|
Returns the graphics object associated with this view. |