Added descriptions for some classes and methods. Fixed small typos in some of them.

This commit is contained in:
TrianguloY 2019-03-16 11:31:49 +01:00
parent 5242393ff7
commit bd6b001a57
7 changed files with 38 additions and 15 deletions

View file

@ -6,6 +6,9 @@ import net.pierrox.lightning_launcher.script.api.screen.Screen;
import net.pierrox.lightning_launcher.views.item.CustomViewView;
import net.pierrox.lightning_launcher.views.item.ItemView;
/**
* A CustomView is an advance special item that can display any Android View.
*/
public class CustomView extends Item {
/**
* @hide

View file

@ -62,6 +62,10 @@ public class Item {
return object;
}
/**
* Return the Screen where this item is placed.
* @return the screen containing this item
*/
public Screen getScreen() {
return mLightning.createScreen(mItemView.getParentItemLayout().getScreen());
}

View file

@ -514,7 +514,7 @@ public class LL {
* @return an animation or null in case of error (most likely out of memory)
*
* @deprecated use {@link Image#createAnimation(int, int, int, int, int)} instead
* <br><code>LL.createAnimation(width, height, count, duration, loopCount) -> Image.createImage(width, height, count, duration, loopCount)</code>
* <br><code>LL.createAnimation(width, height, count, duration, loopCount) -> Image.createAnimation(width, height, count, duration, loopCount)</code>
*/
public ImageAnimation createAnimation(int width, int height, int count, int duration, int loopCount) {
return Image.createAnimation(width, height, count, duration, loopCount);

View file

@ -2,6 +2,9 @@ package net.pierrox.lightning_launcher.script.api;
import net.pierrox.lightning_launcher.views.item.ItemView;
/**
* Represents a Page Indicator Item. No extra methods available.
*/
public class PageIndicator extends Item {
/**
* @hide

View file

@ -7,6 +7,9 @@ import net.pierrox.lightning_launcher.R;
import java.util.LinkedHashMap;
/**
* Enumeration class. Represents a Property object {@see PropertySet} {@see PropertyEditor}.
*/
public class Property {
public static final int TYPE_UNKNOWN = -1;
public static final int TYPE_BOOLEAN = 0;

View file

@ -14,8 +14,8 @@ import android.util.Pair;
/**
* 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 {@link #edit()}.
* Properties are accessed through their named. There are different property classes:
* This object provides a way to query for configuration options as well as a mean to update them (see {@link #edit()}).
* Properties are accessed through their name. There are different property classes:
* <ul>
* <li>container properties: options that can be seen in the desktop, folder and panel settings screen</li>
* <li>item properties: options available to all objects (such as box properties or pin mode)</li>

View file

@ -2,7 +2,9 @@ package net.pierrox.lightning_launcher.script.api;
import android.graphics.Rect;
/** A rectangle class. */
/**
* A rectangle class in the format left-top-rigth-bottom.
*/
public class RectL {
private int l, t, r, b;
@ -13,6 +15,10 @@ public class RectL {
this.b = b;
}
/**
* Copy constructor. Creates a copy of the RectL
* @param r the rectL which will be copied.
*/
public RectL(android.graphics.Rect r) {
this(r.left, r.top, r.right, r.bottom);
}
@ -29,6 +35,10 @@ public class RectL {
return "["+l+","+t+","+r+","+b+"]";
}
/**
* Returns a java Rect with the same values.
* @return Java Rect object with the same values.
*/
public Rect toRect() {
return new Rect(l, t, r, b);
}