public class

PropertySet

extends Object
java.lang.Object
   ↳ net.pierrox.lightning_launcher.script.api.PropertySet

Class Overview

Access to container and item properties (aka settings). This object provides a way to query for configuration options as well as a mean to update them (see edit(). Properties are accessed through their named. There are different property classes:

  • container properties: options that can be seen in the desktop, folder and panel settings screen
  • item properties: options available to all objects (such as box properties or pin mode)
  • shortcut properties: options related to text/icon objects (including apps, shortcuts, folders and dynamic texts)
  • folder properties: options related to folder window (hence only for folder objects)
Available properties depends on the object from which this PropertySet is retrieved:
  • Container: contains properties for the container and default properties for items, shortcuts and folders.
  • Shortcuts, DynamicText: contains item and shortcut properties
  • Folder: contains item, shortcut and folder properties
  • Page Indicator: item, shortcut and page indicator properties
  • Other objects: contains item properties only
The list of supported properties can be found below. Behavior when setting a value for a property marked as read only is unspecified and can lead to data loss. The same may appear when setting a value out of its bounds. These cases are currently not checked.

Container properties:
NameTypeAccessAdmissible values
newOnGridbooleanRead/Writetrue/false
allowDualPositionbooleanRead/Writetrue/false
gridPColumnModestringRead/WriteAUTO|NUM|SIZE
gridPColumnNumintRead/Write>0
gridPColumnSizeintRead/Write>0
gridPRowModestringRead/WriteAUTO|NUM|SIZE
gridPRowNumintRead/Write>0
gridPRowSizeintRead/Write>0
gridLColumnModestringRead/WriteAUTO|NUM|SIZE
gridLColumnNumintRead/Write>0
gridLColumnSizeintRead/Write>0
gridLRowModestringRead/WriteAUTO|NUM|SIZE
gridLRowNumintRead/Write>0
gridLRowSizeintRead/Write>0
gridPLbooleanRead/Writetrue/false
gridLayoutModeHorizontalLineColorintRead/Writeargb color
gridLayoutModeHorizontalLineThicknessfloatRead/Write>=0
gridLayoutModeVerticalLineColorintRead/Writeargb color
gridLayoutModeVerticalLineThicknessfloatRead/Write>=0
gridAbovebooleanRead/Writetrue/false
bgSystemWPScrollbooleanRead/Writetrue/false
bgSystemWPWidthintRead/Write>0
bgSystemWPHeightintRead/Write>0
bgColorintRead/Writeargb color
statusBarHidebooleanRead/Writetrue/false
statusBarColorintRead/Writeargb color
navigationBarColorintRead/Writeargb color
statusBarOverlapbooleanRead/Writetrue/false
navigationBarOverlapbooleanRead/Writetrue/false
screenOrientationstringRead/WriteAUTO|PORTRAIT|LANDSCAPE|SYSTEM
scrollingDirectionstringRead/WriteAUTO|X|Y|XY|NONE
overScrollModestringRead/WriteDECELERATE|BOUNCE|NONE
noDiagonalScrollingbooleanRead/Writetrue/false
pinchZoomEnablebooleanRead/Writetrue/false
snapToPagesbooleanRead/Writetrue/false
fitDesktopToItemsbooleanRead/Writetrue/false
autoExitbooleanRead/Writetrue/false
rearrangeItemsbooleanRead/Writetrue/false
swapItemsbooleanRead/Writetrue/false
freeModeSnapstringRead/WriteNONE|CENTER|EDGE|CENTER_EDGE
useDesktopSizebooleanRead/Writetrue/false
noScrollLimitbooleanRead/Writetrue/false
wrapXbooleanRead/Writetrue/false
wrapYbooleanRead/Writetrue/false
iconPackstringRead/Writepackage name or null (see applyIconPack(boolean))
lwpStdEventsbooleanRead/Writetrue/false
Event handlers:
homeKeyEventHandlerRead/Write
menuKeyEventHandlerRead/Write
longMenuKeyEventHandlerRead/Write
backKeyEventHandlerRead/Write
longBackKeyEventHandlerRead/Write
searchKeyEventHandlerRead/Write
bgTapEventHandlerRead/Write
bgDoubleTapEventHandlerRead/Write
bgLongTapEventHandlerRead/Write
swipeLeftEventHandlerRead/Write
swipeRightEventHandlerRead/Write
swipeUpEventHandlerRead/Write
swipeDownEventHandlerRead/Write
swipe2LeftEventHandlerRead/Write
swipe2RightEventHandlerRead/Write
swipe2UpEventHandlerRead/Write
swipe2DownEventHandlerRead/Write
orientationPortraitEventHandlerRead/Write
orientationLandscapeEventHandlerRead/Write
posChangedEventHandlerRead/Write
loadEventHandlerRead/Write
pausedEventHandlerRead/Write
resumedEventHandlerRead/Write
itemAddedEventHandlerRead/Write
itemRemovedEventHandlerRead/Write
menuEventHandlerRead/Write
App Drawer only:
adHideActionBarbooleanRead/Writetrue/false
adDisplayABOnScrollbooleanRead/Writetrue/false
adDisplayedModesintRead/Writebitfield
adActionBarTextColorintRead/Writeargb color


Item properties:
NameTypeAccessAdmissible values
i.box Box Read/Write through getBox(String)
i.rotate boolean Read/Write true/false
i.selectionEffect string Read/Write PLAIN|HOLO|MATERIAL
i.selectionEffectMask boolean Read/Write true/false
i.enabled boolean Read/Write true/false
i.alpha int Read/Write 0..255
i.pinMode string Read/Write NONE|XY|X|Y
i.filterTransformed boolean Read/Write true/false
i.onGrid boolean Read/Write true/false
i.hardwareAccelerated boolean Read/Write true/false
i.launchAnimation string Read/Write NONE|FADE|SYSTEM|SLIDE_UP|SLIDE_DOWN|SLIDE_LEFT|SLIDE_RIGHT|SCALE_CENTER
Event handlers:
i.tapEventHandlerRead/Write
i.longTapEventHandlerRead/Write
i.swipeLeftEventHandlerRead/Write
i.swipeRightEventHandlerRead/Write
i.swipeUpEventHandlerRead/Write
i.swipeDownEventHandlerRead/Write
i.touchEventHandlerRead/Write
i.pausedEventHandlerRead/Write
i.resumedEventHandlerRead/Write
i.menuEventHandlerRead/Write


Shortcut properties:
NameTypeAccessAdmissible values
s.labelVisibility boolean Read/Write true/false
s.labelFontColor int Read/Write argb color
s.selectionColorLabel int Read/Write argb color
s.focusColorLabel int Read/Write argb color
s.labelFontSize float Read/Write >0
s.labelFontTypeFace string Read/Write
s.labelFontStyle string Read/Write NORMAL|ITALIC|BOLD|BOLD_ITALIC
s.labelMaxLines int Read/Write >0
s.iconVisibility boolean Read/Write
s.iconSizeMode string Read/WriteSTANDARD|REAL|FULL_SCALE
s.iconScale float Read/Write
s.iconReflection boolean Read/Write true/false
s.iconReflectionOverlap float Read/Write
s.iconReflectionSize float Read/Write
s.iconReflectionScale float Read/Write
s.iconFilter boolean Read/Write true/false
s.labelVsIconPosition string Read/Write LEFT|TOP|RIGHT|BOTTOM
s.labelVsIconMargin int Read/Write
s.labelShadow boolean Read/Write true/false
s.labelShadowRadius float Read/Write >=0
s.labelShadowOffsetX float Read/Write
s.labelShadowOffsetY float Read/Write
s.labelShadowColor int Read/Write argb color
s.iconEffectScale float Read/Write
s.iconColorFilter int Read/Write argb color


Folder properties:
NameTypeAccessAdmissible values
f.titleVisibility boolean Read/Write true/false
f.titleFontColor int Read/Write argb color
f.titleFontSize float Read/Write >0
f.animationIn string Read/Write NONE|OPEN_CLOSE|SLIDE_FROM_LEFT|SLIDE_FROM_RIGHT|SLIDE_FROM_TOP|SLIDE_FROM_BOTTOM
f.animationOut string Read/Write NONE|OPEN_CLOSE|SLIDE_FROM_LEFT|SLIDE_FROM_RIGHT|SLIDE_FROM_TOP|SLIDE_FROM_BOTTOM
f.animFade boolean Read/Write true/false
f.iconStyle string Read/Write NORMAL|GRID_2_2|STACK
f.autoClose boolean Read/Write true/false
f.closeOther boolean Read/Write true/false
f.wAH string Read/Write LEFT|CENTER|RIGHT|CUSTOM
f.wAV string Read/Write TOP|CENTER|BOTTOM|CUSTOM
f.wX int Read/Write
f.wY int Read/Write
f.wW int Read/Write
f.wH int Read/Write
f.box Box Read/Write through getBox(String)
f.autoFindOrigin boolean Read/Write true/false


Page Indicator properties:
NameTypeAccessAdmissible values
p.style string Read/Write DOTS|RAW|MINIMAP|LINE_X|LINE_Y
p.rawFormat string Read/Write
p.dotsMarginX int Read/Write
p.dotsMarginY int Read/Write
p.dotsOuterRadius int Read/Write >=0
p.dotsInnerRadius int Read/Write >=0
p.dotsOuterStrokeWidth int Read/Write >=0
p.dotsOuterColor int Read/Write argb color
p.dotsInnerColor int Read/Write argb color
p.miniMapOutStrokeColor int Read/Write argb color
p.miniMapOutFillColor int Read/Write argb color
p.miniMapOutStrokeWidth int Read/Write >=0
p.miniMapInStrokeColor int Read/Write argb color
p.miniMapInFillColor int Read/Write argb color
p.miniMapInStrokeWidth int Read/Write >=0
p.lineBgWidth int Read/Write >=0
p.lineBgColor int Read/Write argb color
p.lineFgWidth int Read/Write >=0
p.lineFgColor int Read/Write argb color
p.lineGravity string Read/Write CENTER|LEFT_TOP|RIGHT_BOTTOM


Custom view properties:
NameTypeAccessAdmissible values
v.onCreate string Read/Write id/data, where /data is optional
v.onDestroy string Read/Write id/data, where /data is optional


General configuration properties:
NameTypeAccessAdmissible values
homeKeyEventHandlerRead/Write
menuKeyEventHandlerRead/Write
longMenuKeyEventHandlerRead/Write
backKeyEventHandlerRead/Write
longBackKeyEventHandlerRead/Write
searchKeyEventHandlerRead/Write
itemTapEventHandlerRead/Write
itemLongTapEventHandlerRead/Write
bgTapEventHandlerRead/Write
bgDoubleTapEventHandlerRead/Write
bgLongTapEventHandlerRead/Write
swipeLeftEventHandlerRead/Write
swipeRightEventHandlerRead/Write
swipeUpEventHandlerRead/Write
swipeDownEventHandlerRead/Write
swipe2LeftEventHandlerRead/Write
swipe2RightEventHandlerRead/Write
swipe2UpEventHandlerRead/Write
swipe2DownEventHandlerRead/Write
screenOnEventHandlerRead/Write
screenOffEventHandlerRead/Write
orientationPortraitEventHandlerRead/Write
orientationLandscapeEventHandlerRead/Write
itemAddedEventHandlerRead/Write
itemRemovedEventHandlerRead/Write
menuEventHandlerRead/Write
startupEventHandlerRead/Write

Summary

Public Constructors
PropertySet(Lightning lightning, Object script_object)
Public Methods
PropertyEditor edit()
Start to modify settings.
boolean getBoolean(String name)
Box getBox(String name)
Returns a box object allowing access to the box properties.
EventHandler getEventHandler(String name)
float getFloat(String name)
int getInteger(String name)
String getString(String name)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PropertySet (Lightning lightning, Object script_object)

Public Methods

public PropertyEditor edit ()

Start to modify settings. Once all changes are made, don't forget to call commit() to validate changes.

Returns
  • a PropertyEditor

public boolean getBoolean (String name)

public Box getBox (String name)

Returns a box object allowing access to the box properties. This object does not allow modifications. Use the box object acquired through getBox(String) to alter values.

public EventHandler getEventHandler (String name)

public float getFloat (String name)

public int getInteger (String name)

public String getString (String name)