Package com.thecoderscorner.menu.remote
Interface RemoteControllerListener
-
public interface RemoteControllerListenerThis interface is implemented when you wish to receive update events from a RemoteMenuController. It gets called back when menu items are changed, the tree is fully populated or if the connectivity state changes. The implementation is then passed to the appropriate instance of RemoteMenuConnector via its addListener method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidackReceived(CorrelationId key, MenuItem item, AckStatus status)Indicates that an acknowledgment has been received from the embedded device.voidconnectionState(RemoteInformation remoteInformation, AuthStatus connected)Indicates a change in connectivityvoiddialogUpdate(DialogMode mode, java.lang.String header, java.lang.String buffer, MenuButtonType btn1, MenuButtonType btn2)Called when a dialog event occurs on the remote, be it to show or hide a dialogvoidmenuItemChanged(MenuItem item, boolean valueOnly)Called when a menu item has either been added or changed, the valueOnly indicates if the change is just in the latest value, or also in the MenuItem structure too.voidtreeFullyPopulated()Indicates that the tree is now fully populated, and therefore all menus that exist on the Arduino also exist locally in the MenuTree.
-
-
-
Method Detail
-
menuItemChanged
void menuItemChanged(MenuItem item, boolean valueOnly)
Called when a menu item has either been added or changed, the valueOnly indicates if the change is just in the latest value, or also in the MenuItem structure too.- Parameters:
item- the item that has changedvalueOnly- true if only the current value has changed, false if the MenuItem has changed too
-
treeFullyPopulated
void treeFullyPopulated()
Indicates that the tree is now fully populated, and therefore all menus that exist on the Arduino also exist locally in the MenuTree.
-
connectionState
void connectionState(RemoteInformation remoteInformation, AuthStatus connected)
Indicates a change in connectivity- Parameters:
remoteInformation- the new connection informationconnected- true if connected, otherwise false.
-
ackReceived
void ackReceived(CorrelationId key, MenuItem item, AckStatus status)
Indicates that an acknowledgment has been received from the embedded device.- Parameters:
key- the correlation ID of the acknowledgementitem- the item it corresponds to (may be null)status- the status associated with the ack.
-
dialogUpdate
void dialogUpdate(DialogMode mode, java.lang.String header, java.lang.String buffer, MenuButtonType btn1, MenuButtonType btn2)
Called when a dialog event occurs on the remote, be it to show or hide a dialog- Parameters:
mode- the mode of the dialog updateheader- the text for the headerbuffer- the text for the bufferbtn1- the first button typebtn2- the second button type
-
-