sky.monome
Class HookAnalog


java.lang.Object

  extended by sky.monome.Component

      extended by sky.monome.Analog

          extended by sky.monome.HookAnalog


public class HookAnalog
extends Analog

Warning, this class has not been tested ! Use it at your own risks !

Analog input soldered into the Monome device that have a "hook behavior". The user must go very close to the actual value to change the value. 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), but hook analogs are more suitable for potentiometers only. 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.

Since:
SkyMonome v1.1
Author:
PJ Skyman
See Also:
Analog

Field Summary
protected  boolean hook
          Indicates if this hook analog is currently in hook mode or not.
protected static float HOOK_THRESHOLD
          Threshold to activate the hook mode.
 
Fields inherited from class sky.monome.Analog
value
 
Fields inherited from class sky.monome.Component
container, eventListenerList, lockObject, name, x, y
 
Constructor Summary
HookAnalog(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.
HookAnalog(java.lang.String name, int rank)
          Constructs an analog with the specified name and the specified rank.
 
Method Summary
 void notify(OSCMessageDigester messageDigester)
          Notifies this hook analog that a message comes from the Monome device.
 
Methods inherited from class sky.monome.Analog
addAnalogListener, canHaveParentContainer, fireAnalogMoved, getAbsoluteX, getAbsoluteY, getAnalogListeners, getBounds, getMonome, getValue, isVisible, removeAnalogListener, setValue, toString, writeOn
 
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

hook


protected boolean hook
Indicates if this hook analog is currently in hook mode or not.


HOOK_THRESHOLD


protected static final float HOOK_THRESHOLD
Threshold to activate the hook mode.

See Also:
Constant Field Values
Constructor Detail

HookAnalog


@Deprecated

public HookAnalog(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.

Constructs an analog with the specified name and the specified rank and contained by the specified container.

Parameters:
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.

HookAnalog


public HookAnalog(java.lang.String name,

                  int rank)
Constructs an analog with the specified name and the specified rank.

Parameters:
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.
Since:
SkyMonome v1.2
Method Detail

notify


public void notify(OSCMessageDigester messageDigester)
Notifies this hook analog that a message comes from the Monome device.

Overrides:
notify in class Analog
Parameters:
messageDigester - Message digester that prepares and encapsulates the message for an easy access of informations contained in the message.