All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.smartdevicelink.proxy.rpc.TemplateConfiguration Maven / Gradle / Ivy

Go to download

The app library component of SDL is meant to run on the end user’s smart-device from within SDL enabled apps, as an embedded app, or connected to the cloud. App libraries allow the apps to connect to SDL enabled head-units and hardware through bluetooth, USB, and TCP for Android, and cloud and embedded apps can connect through web sockets, Java Beans, and other custom transports. Once the library establishes a connection between the smart device and head-unit through the preferred method of transport, the two components are able to communicate using the SDL defined protocol. The app integrating this library project is then able to expose its functionality to the head-unit through text, media, and other interactive elements.

There is a newer version: 5.7.0
Show newest version
package com.smartdevicelink.proxy.rpc;

import androidx.annotation.NonNull;

import com.smartdevicelink.proxy.RPCStruct;

import java.util.Hashtable;

/**
 * Used to set an alternate template layout to a window.
 *
 * @since 6.0
 */
public class TemplateConfiguration extends RPCStruct {
    public static final String KEY_TEMPLATE = "template";
    public static final String KEY_DAY_COLOR_SCHEME = "dayColorScheme";
    public static final String KEY_NIGHT_COLOR_SCHEME = "nightColorScheme";

    /**
     * Constructs a new TemplateConfiguration object
     *
     * @param template Predefined or dynamically created window template.
     *                 Currently only predefined window template layouts are defined.
     */
    public TemplateConfiguration(@NonNull String template) {
        this();
        setTemplate(template);
    }

    /**
     * Constructs a new TemplateConfiguration object indicated by the Hashtable
     * parameter
     *
     * @param hash The Hashtable to use
     */
    public TemplateConfiguration(Hashtable hash) {
        super(hash);
    }

    /**
     * Constructs a new TemplateConfiguration object
     */
    public TemplateConfiguration() {
    }

    /**
     * Gets the template.
     *
     * @return String -an Predefined or dynamically created window template. Currently only predefined window template layouts are defined.
     */
    public String getTemplate() {
        return getString(KEY_TEMPLATE);
    }

    /**
     * Sets the template. It can be Predefined or dynamically created window template. Currently only predefined window template layouts are defined.
     *
     * @param template Predefined or dynamically created window template. Currently only predefined window template layouts are defined.
     */
    public TemplateConfiguration setTemplate(@NonNull String template) {
        setValue(KEY_TEMPLATE, template);
        return this;
    }

    /**
     * Gets the dayColorScheme.
     *
     * @return TemplateColorScheme
     */
    public TemplateColorScheme getDayColorScheme() {
        return (TemplateColorScheme) getObject(TemplateColorScheme.class, KEY_DAY_COLOR_SCHEME);
    }

    /**
     * Sets the dayColorScheme.
     *
     * @param dayColorScheme TemplateColorScheme for the day
     */
    public TemplateConfiguration setDayColorScheme(TemplateColorScheme dayColorScheme) {
        setValue(KEY_DAY_COLOR_SCHEME, dayColorScheme);
        return this;
    }

    /**
     * Gets the nightColorScheme.
     *
     * @return TemplateColorScheme
     */
    public TemplateColorScheme getNightColorScheme() {
        return (TemplateColorScheme) getObject(TemplateColorScheme.class, KEY_NIGHT_COLOR_SCHEME);
    }

    /**
     * Sets the nightColorScheme.
     *
     * @param nightColorScheme TemplateColorScheme for the night
     */
    public TemplateConfiguration setNightColorScheme(TemplateColorScheme nightColorScheme) {
        setValue(KEY_NIGHT_COLOR_SCHEME, nightColorScheme);
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy