Package heronarts.lx.midi.surface
Class FocusedDevice
java.lang.Object
heronarts.lx.midi.surface.FocusedDevice
Utility class for a control surface to subscribe to notifications about which
device is focused in the UI. This needs to be registered and unregistered as
appropriate to enable/disable notifications. And the listener interface is invoked
whenever there is a device focus change.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionFocusedDevice
(LX lx, FocusedDevice.Listener listener) FocusedDevice
(LX lx, LXMidiSurface surface, FocusedDevice.Listener listener) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Returns the device presently focused, if anyReturns the currently focused busboolean
isAux()
boolean
void
void
Shift focus to the next device on the channel, if there is onevoid
void
Shift focus to the previous device on the channel, if there is onevoid
register()
Register the focused device listener, which will result in a listener callback to the presently focused device.setAux
(boolean isAux) setAuxSticky
(boolean isAuxSticky) void
Unregister the focus listener.void
-
Constructor Details
-
FocusedDevice
-
FocusedDevice
-
-
Method Details
-
isAux
public boolean isAux() -
toggleAux
-
setAux
-
setAuxSticky
-
register
public void register()Register the focused device listener, which will result in a listener callback to the presently focused device. -
unregister
public void unregister()Unregister the focus listener. Will clear the focused device and alert the listener to null focus before clearing all internal listeners. -
getFocusedChannel
Returns the currently focused bus- Returns:
- Current bus focus
-
isAuxActive
public boolean isAuxActive() -
getFocusedChannelTarget
-
previousChannel
public void previousChannel() -
nextChannel
public void nextChannel() -
previousDevice
public void previousDevice()Shift focus to the previous device on the channel, if there is one -
nextDevice
public void nextDevice()Shift focus to the next device on the channel, if there is one -
getDevice
Returns the device presently focused, if any- Returns:
- Focused device, or
null
-
updateRemoteControlFocus
public void updateRemoteControlFocus() -
dispose
public void dispose()
-