public class

LLPreference

extends Object
java.lang.Object
   ↳ net.pierrox.lightning_launcher.prefs.LLPreference
Known Direct Subclasses

Class Overview

The base class for all other preferences. It offers a set of common features shared with other specialized preferences. Although this preference only displays a title and a summary, it can nevertheless be used to manage complex settings by using the onLLPreferenceClicked(LLPreference) event to catch clicks. This preference holds an arbitrary value (an object).

Summary

Public Constructors
LLPreference(int id, String title, String summary, Object value, Object defaultValue)
Create a new preference.
Public Methods
int getId()
Return the unique identifier.
String getSummary()
Return the summary, if any.
String getTitle()
Return the title.
boolean isDisabled()
Return true if the preference is currently disabled.
boolean isOverriding()
Return true if the value is different from the default value
boolean isShowingOverride()
Return true if this preference is showing the override checkbox.
boolean isVisible()
Return true is the preference is currently visible.
void reset()
Set the value of this preference with the default value.
void setDisabled(boolean disabled)
Disable or enable the preference (it will be grayed out and not clickable when disabled)
void setSummary(String summary)
Set a new summary.
void setTitle(String title)
Set a new title.
void setValue(Object value, Object defaultValue)
Set the value and optionally a default value.
void setVisible(boolean visible)
Show or hide this preference.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LLPreference (int id, String title, String summary, Object value, Object defaultValue)

Create a new preference.

Parameters
id a unique number to identify the preference, use 0 if unused.
title Displayed title.
summary Displayed summary, use null for none.
value Value for the preference.
defaultValue Default value if displaying the override checkbox. Use null if unused.

Public Methods

public int getId ()

Return the unique identifier.

public String getSummary ()

Return the summary, if any.

public String getTitle ()

Return the title.

public boolean isDisabled ()

Return true if the preference is currently disabled.

public boolean isOverriding ()

Return true if the value is different from the default value

public boolean isShowingOverride ()

Return true if this preference is showing the override checkbox.

public boolean isVisible ()

Return true is the preference is currently visible.

public void reset ()

Set the value of this preference with the default value.

public void setDisabled (boolean disabled)

Disable or enable the preference (it will be grayed out and not clickable when disabled)

public void setSummary (String summary)

Set a new summary.

public void setTitle (String title)

Set a new title.

public void setValue (Object value, Object defaultValue)

Set the value and optionally a default value.

Parameters
value the value stored by this preference
defaultValue use null if unused

public void setVisible (boolean visible)

Show or hide this preference.