|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.Component sky.monome.Analog
public class Analog
Analog input soldered into the Monome device. An analog can be a potentiometer, an accelerometer, a gyrometer, a thermometer, an altimeter, a barometer or any device that can give output signal in the range specified by the Monome microcontroller (0V to 5V, powered by a 5V DC voltage). Analogs are usually contained by the logical Monome device directly for convenience, but you can build the Monome assembling tree of your choice. By example, you can add an analog in a page, and this analog will be active only when the page will be visible.
Field Summary | |
---|---|
protected float |
value
Current value of this analog. |
Fields inherited from class sky.monome.Component |
---|
container, eventListenerList, lockObject, name, x, y |
Constructor Summary | |
---|---|
Analog(java.lang.String name,
Container container,
int rank)
Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor. |
|
Analog(java.lang.String name,
int rank)
Constructs an analog with the specified name and the specified rank. |
Method Summary | |
---|---|
void |
addAnalogListener(AnalogListener analogListener)
Adds the specified listener to the listeners list of this analog. |
boolean |
canHaveParentContainer()
Indicates whether this analog can have a parent container in the Monome assembling tree. |
void |
fireAnalogMoved(float value)
Notifies all the listeners that a new analog move occured. |
int |
getAbsoluteX()
Returns the absolute X-coordinate of this analog. |
int |
getAbsoluteY()
Returns the absolute Y-coordinate of this analog. |
AnalogListener[] |
getAnalogListeners()
Returns an array of all listeners contained in the listeners list of this analog. |
java.awt.Rectangle |
getBounds()
Returns the bounds of this analog in the local context of its container. |
Monome |
getMonome()
Returns the logical Monome device that contains this analog. |
float |
getValue()
Returns the current value of this analog. |
boolean |
isVisible()
Indicates whether this analog is actually visible. |
void |
notify(OSCMessageDigester messageDigester)
Notifies this analog that a message comes from the Monome device. |
void |
removeAnalogListener(AnalogListener analogListener)
Removes the specified listener from the listeners list of this analog. |
protected void |
setValue(float value)
Modifies the current value of this analog. |
java.lang.String |
toString()
Returns a string representation of this analog. |
void |
writeOn(Frame frame)
Writes this analog on the specified frame in order to refresh the Monome device. |
Methods inherited from class sky.monome.Component |
---|
getContainer, getLockObject, getName, getX, getY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected float value
Constructor Detail |
---|
@Deprecated public Analog(java.lang.String name, Container container, int rank)
name
- Name of this analog.container
- Container that contains this analog.rank
- Rank of the analog. The rank is the physical rank on the Monome device. For compatibility with other components,
the rank is also named X-coordinate. This rank MUST follow this rule : the first analog have a rank of 0, the second is 1, and so on.
If you do not respect that rule, you should meet event problems.public Analog(java.lang.String name, int rank)
name
- Name of this analog.rank
- Rank of the analog. The rank is the physical rank on the Monome device. For compatibility with other components,
the rank is also named X-coordinate. This rank MUST follow this rule : the first analog have a rank of 0, the second is 1, and so on.
If you do not respect that rule, you should meet event problems.Method Detail |
---|
public float getValue()
protected void setValue(float value)
value
- New value to give to this analog.public void addAnalogListener(AnalogListener analogListener)
analogListener
- Listener to add to the listeners list of this analog.public void removeAnalogListener(AnalogListener analogListener)
analogListener
- Listener to remove from the listeners list of this analog.public AnalogListener[] getAnalogListeners()
public void fireAnalogMoved(float value)
value
- New value given to this analog.public Monome getMonome()
getMonome
in class Component
public void notify(OSCMessageDigester messageDigester)
notify
in class Component
messageDigester
- Message digester that prepares and encapsulates the message for an easy access of informations contained in the message.public void writeOn(Frame frame)
writeOn
in class Component
frame
- Frame in which this analog must write its led state.Monome.refresh()
public int getAbsoluteX()
getAbsoluteX
in class Component
public int getAbsoluteY()
getAbsoluteY
in class Component
public boolean isVisible()
isVisible
in class Component
true
if this analog is actually visible, false
otherwise.public java.lang.String toString()
toString
in class Component
public boolean canHaveParentContainer()
canHaveParentContainer
in class Component
true
.public java.awt.Rectangle getBounds()
getBounds
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |