Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaSE Documentation
SoftButtonState

Class SoftButtonState

Hierarchy

java.lang.Object

Package
com.smartdevicelink.managers.screen

Overview

SoftButtonState
Defines an individual state for SoftButtonObject.
The states of SoftButtonObject allow the developer to not have to manage multiple SoftButtons that have very similar functionality.
For example, a repeat button in a music app can be thought of as one SoftButtonObject with three typical states: repeat off, repeat 1, and repeat on.

Constructors

SoftButtonState( String name, String text, SdlArtwork artwork )

Creates a new instance of SoftButtonState Note: state names should be different for each SoftButtonObject

public SoftButtonState(String name,String text,SdlArtwork artwork)

Constructor Parameters

name
a String value represents name of the state
text
a String represents the text for the state
artwork
an SdlArtwork represents the artwork for the state

Methods

getName()

Get the state name

public java.lang.String getName()

setName( String name )

Set the state name

public void setName(String name)

Method Parameters

name
a String value represents the name of the state

getHighlighted()

Get whether or not the button should be highlighted on the UI

public boolean getHighlighted()

setHighlighted( boolean highlighted )

Set whether or not the button should be highlighted on the UI

public void setHighlighted(boolean highlighted)

Method Parameters

highlighted
boolean representing whether or not the button should be highlighted

getSystemAction()

Get whether selecting a SoftButton shall call a specific system action See SystemAction

public com.smartdevicelink.proxy.rpc.enums.SystemAction getSystemAction()

setSystemAction( SystemAction systemAction )

Set whether selecting a SoftButton shall call a specific system action See SystemAction

public void setSystemAction(SystemAction systemAction)

Method Parameters

systemAction
SystemAction value representing whether selecting a SoftButton shall call a specific action

getSoftButton()

Get the SoftButton for the state

public com.smartdevicelink.proxy.rpc.SoftButton getSoftButton()

getArtwork()

Get the Artwork for the state

public SdlArtwork getArtwork()

hashCode()

Used to compile hashcode for SoftButtonState for use to compare in equals method

public int hashCode()

equals( Object o )

Uses our custom hashCode for SoftButtonState objects

public boolean equals(Object o)

Method Parameters

o
- The object to compare

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section