|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmlib.PMLMatrix
public class PMLMatrix
PMLMatrix Class
The PMLMatrix object allows multiple PMLInput objects to be attached. Values may be routed to each attached object using the relevant tag.
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Constructor Summary | |
---|---|
PMLMatrix()
Create a new object instance with the default size |
Method Summary | |
---|---|
void |
addInput(java.lang.String t)
Add an input to the matrix with the specified tag and default limits (0, 1) |
void |
addInput(java.lang.String t,
float min,
float max)
Add an input to the matrix with the specified tag and limits |
boolean |
addOutput(java.lang.String[] t_in,
java.lang.String t_out)
Add an output to multiple input channels with default limits (0, 1) and no value ramping |
boolean |
addOutput(java.lang.String[] t_in,
java.lang.String t_out,
float min,
float max)
Add an output to the multiple input channels with the specified limits and no value ramping |
boolean |
addOutput(java.lang.String[] t_in,
java.lang.String t_out,
float min,
float max,
int rmp)
Add an an output to multiple input channels the specified limits and ramp duration |
boolean |
addOutput(java.lang.String t_in,
java.lang.String t_out)
Add an output to the matrix with default limits (0, 1) and no value ramping |
boolean |
addOutput(java.lang.String t_in,
java.lang.String t_out,
float min,
float max)
Add an output to the matrix with the specified limits and no value ramping |
boolean |
addOutput(java.lang.String t_in,
java.lang.String t_out,
float min,
float max,
int rmp)
Add an an output to the matrix with the specified limits and ramp duration |
void |
clear()
Clear the matrix |
PMLFloat |
get(java.lang.String t)
Return a reference to the output PMLFloat object with the specified tag |
PMLFloat[] |
getAll()
Return references to all output PMLFloat objects as an array |
boolean |
hasInput(java.lang.String t)
Return true if an input with the specified tag is attached |
boolean |
hasOutput(java.lang.String t)
Return true if an output with the specified tag is attached |
int |
removeInput(java.lang.String t)
Remove any inputs with the specified tag |
int |
removeOutput(java.lang.String t)
Remove any outputs with the specified tag |
void |
route(PMLFloat f)
Route the specified PMLFloat to any applicable inputs |
void |
route(java.lang.String t,
float v)
Route the specified value to any applicable inputs |
void |
setEventHandler(PMLEventHandler h)
Set the matrix event handler |
int |
size()
Return the total input and output channels |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PMLMatrix()
Method Detail |
---|
public void addInput(java.lang.String t)
t
- tagpublic void addInput(java.lang.String t, float min, float max)
t
- tagmin
- minimummax
- maximumpublic boolean addOutput(java.lang.String t_in, java.lang.String t_out)
t_in
- input channel to attach the output tot_out
- output channel tag
public boolean addOutput(java.lang.String t_in, java.lang.String t_out, float min, float max)
t_in
- input channel to attach the output tot_out
- output channel tagmin
- minimummax
- maximum
public boolean addOutput(java.lang.String t_in, java.lang.String t_out, float min, float max, int rmp)
t_in
- input channel to attach the output tot_out
- output channel tagmin
- minimummax
- maximumrmp
- ramp duration (ms)
public boolean addOutput(java.lang.String[] t_in, java.lang.String t_out)
t_in
- input channels to attach the output tot_out
- output channel tag
public boolean addOutput(java.lang.String[] t_in, java.lang.String t_out, float min, float max)
t_in
- input channels to attach the output tot_out
- output channel tagmin
- minimummax
- maximum
public boolean addOutput(java.lang.String[] t_in, java.lang.String t_out, float min, float max, int rmp)
t_in
- input channels to attach the output tot_out
- output channel tagmin
- minimummax
- maximumrmp
- ramp duration (ms)
public int removeInput(java.lang.String t)
t
- tag
public int removeOutput(java.lang.String t)
t
- tag
public PMLFloat get(java.lang.String t)
t
- tag
public PMLFloat[] getAll()
public void clear()
public int size()
public boolean hasInput(java.lang.String t)
t
- tag
public boolean hasOutput(java.lang.String t)
t
- tag
public void route(PMLFloat f)
If a valid input channel exists the mapped value will be routed
to the relevant output, a reference to which may be obtained using the
get()
method. If an event handler is specified, the mapped
value will also be routed to any specified object methods.
f
- PMLFloatpublic void route(java.lang.String t, float v)
If a valid input channel exists the mapped value will be routed
to the relevant output, a reference to which may be obtained using the
get()
method. If an event handler is specified, the mapped
value will also be routed to any specified object methods.
t
- tagv
- valuepublic void setEventHandler(PMLEventHandler h)
If the event handler is not null, matrix values will be routed to valid
object methods specified within the event handler upon calling route()
.
h
- event handler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |