java.lang.Object | |
↳ | net.pierrox.lightning_launcher.script.api.Box |
The Box object allows access to the corresponding item and folder window box properties. A box is made of several areas: margins, borders, padding, content. Size of margins, borders and padding is configurable, not content (this is the remaining space). Colors of borders, and content is configurable, not margins and padding (always transparent). Methods of the box object use a code to identify each area:
var color = 0xff00ff00; // pure green var editor = item.getProperties().edit(); var box = editor.getBox("i.box"); box.setColor("c", "ns", color); // set background color, for normal and selected states box.setColor("bl,br,bt,bb", "ns", color); // set all borders color for normal and selected states. editor.getBox("f.box").setColor("c", "n", color); // set folder background color editor.commit();
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getAlignmentH()
Returns the box horizontal alignment.
| ||||||||||
String |
getAlignmentV()
Returns the box vertical alignment.
| ||||||||||
Object |
getBox()
Access to the internal box data.
| ||||||||||
int |
getColor(String area, String mode)
Returns the color of one area.
| ||||||||||
int |
getSize(String area)
Returns the size of one area.
| ||||||||||
void |
setAlignment(String h, String v)
Set the horizontal and vertical box alignment.
| ||||||||||
void |
setColor(String areas, String modes, long color)
Set the color of a given list of areas.
| ||||||||||
void |
setSize(String areas, int size)
Set the size of a given list of areas.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Access to the internal box data. To be used with LLPreferenceBox.
Returns the color of one area.
area | |
---|---|
mode | one of "n" for normal, "s" for selected, or "f" for focused |
Returns the size of one area.
area |
---|
Set the horizontal and vertical box alignment.
h | horizontal alignment, one of LEFT, CENTER, RIGHT |
---|---|
v | vertical alignment, one of TOP, MIDDLE, BOTTOM |
Set the color of a given list of areas.
areas | one or more areas as a list of comma separated area codes. @see Box for areas color codes. |
---|---|
modes | a combination of "n" for normal, "s" for selected, and "f" for focused. |
color | argb color value |
Set the size of a given list of areas.
areas | one or more areas as a list of comma separated area codes. @see Box for areas color codes. |
---|---|
size | in pixel |