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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionFocusedDevice(LX lx, FocusedDevice.Listener listener) FocusedDevice(LX lx, LXMidiSurface surface, FocusedDevice.Listener listener) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Returns the device presently focused, if anyReturns the currently focused busbooleanisAux()booleanvoidvoidnextChannel(int delta) voidShift focus to the next device on the channel, if there is onevoidvoidpreviousChannel(int delta) voidShift focus to the previous device on the channel, if there is onevoidregister()Register the focused device listener, which will result in a listener callback to the presently focused device.setAux(boolean isAux) setAuxSticky(boolean isAuxSticky) voidUnregister 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() -
previousChannel
public void previousChannel(int delta) -
nextChannel
public void nextChannel() -
nextChannel
public void nextChannel(int delta) -
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()
-