java.lang.Object
Create a new instance of the SoftButtonObject with multiple states
public SoftButtonObject(String name,java.util.List<com.smartdevicelink.managers.screen.SoftButtonState> states,String initialStateName,SoftButtonObject.OnEventListener onEventListener)
Create a new instance of the SoftButtonObject with one state
public SoftButtonObject(String name,SoftButtonState state,SoftButtonObject.OnEventListener onEventListener)
Create a new instance of the SoftButtonObject with one state
public SoftButtonObject(String name,String text,SdlArtwork artwork,SoftButtonObject.OnEventListener onEventListener)
Transition the SoftButtonObject to a specific state
public boolean transitionToStateByName(String newStateName)
Transition the SoftButtonObject to the next state
public void transitionToNextState()
Get the current state for the SoftButtonObject
public com.smartdevicelink.managers.screen.SoftButtonState getCurrentState()
Get the SoftButton object for the current state
public com.smartdevicelink.proxy.rpc.SoftButton getCurrentStateSoftButton()
Set the SoftButtonManager's update listener
protected void setUpdateListener(SoftButtonObject.UpdateListener updateListener)
Get the name of the SoftButtonObject
public java.lang.String getName()
Set the name of the SoftButtonObject
public void setName(String name)
Get the SoftButtonState list
public java.util.List getStates()
Set the SoftButtonState list
public void setStates(java.util.List<com.smartdevicelink.managers.screen.SoftButtonState> states)
Get the name of the current state
public java.lang.String getCurrentStateName()
Set the name of the current state
public void setCurrentStateName(String currentStateName)
Get the id of the SoftButtonObject
public int getButtonId()
Deprecated
DO NOT USE! let the managers assign ID's. In next major version change this will be restricted to the library
Sets the id of the SoftButtonObject
Note: If the developer did not set buttonId, the manager will automatically assign an id before the SoftButtons are sent to the head unit.
Please note that the manager may reuse ids from previous batch of SoftButtons that were already sent to the head unit
public void setButtonId(int buttonId)
Get the event listener for the SoftButtonObject
public com.smartdevicelink.managers.screen.SoftButtonObject.OnEventListener getOnEventListener()
Set the event listener for the SoftButtonObject
public void setOnEventListener(SoftButtonObject.OnEventListener onEventListener)
Used to compile hashcode for SoftButtonsObjects for use to compare in equals method
public int hashCode()
Uses our custom hashCode for SoftButtonObject objects
public boolean equals(Object o)
Creates a deep copy of the object
public com.smartdevicelink.managers.screen.SoftButtonObject clone()
From Class | Methods |
---|---|
java.lang.Object | getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize |