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

@ -61,7 +61,11 @@ public class Item {
object.setPrototype(new NativeJavaObject(scope, this, null));
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,14 +14,14 @@ 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>
* <li>shortcut properties: options related to text/icon objects (including apps, shortcuts, folders and dynamic texts)</li>
* <li>folder properties: options related to folder window (hence only for folder objects)</li>
* </ul>
* <li>folder properties: options related to folder window (hence only for folder objects)</li>
* </ul>
* Available properties depends on the object from which this PropertySet is retrieved:
* <ul>
* <li>Container: contains properties for the container and default properties for items, shortcuts and folders.</li>
@ -32,7 +32,7 @@ import android.util.Pair;
* </ul>
* 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.
*
*
* <br><br><b>Container properties:</b>
* <table>
* <thead><tr><td>Name</td><td>Type</td><td>Access</td><td>Admissible values</td></tr></thead>
@ -57,7 +57,7 @@ import android.util.Pair;
* <tr><td><a href="/help/app/topic.php?id=61">gridLayoutModeVerticalLineColor</a></td><td>int</td><td>Read/Write</td><td>argb color</td></tr>
* <tr><td><a href="/help/app/topic.php?id=62">gridLayoutModeVerticalLineThickness</a></td><td>float</td><td>Read/Write</td><td>&gt;=0</td></tr>
* <tr><td><a href="/help/app/topic.php?id=63">gridAbove</a></td><td>boolean</td><td>Read/Write</td><td>true/false</td></tr>
*
*
* <tr><td><a href="/help/app/topic.php?id=53">bgSystemWPScroll</a></td><td>boolean</td><td>Read/Write</td><td>true/false</td></tr>
* <tr><td><a href="/help/app/topic.php?id=54">bgSystemWPWidth</a></td><td>int</td><td>Read/Write</td><td>&gt;0</td></tr>
* <tr><td><a href="/help/app/topic.php?id=55">bgSystemWPHeight</a></td><td>int</td><td>Read/Write</td><td>&gt;0</td></tr>
@ -118,7 +118,7 @@ import android.util.Pair;
* <tr><td><a href="/help/app/topic.php?id=194">adActionBarTextColor</a></td><td>int</td><td>Read/Write</td><td>argb color</td></tr>
* </tbody>
* </table>
*
*
* <br><br><b>Item properties:</b>
* <table>
* <thead><tr><td>Name</td><td>Type</td><td>Access</td><td>Admissible values</td></tr></thead>
@ -148,7 +148,7 @@ import android.util.Pair;
* </tbody>
* </table>
*
*
* <br><br><b>Shortcut properties:</b>
* <table>
* <thead><tr><td>Name</td><td>Type</td><td>Access</td><td>Admissible values</td></tr></thead>
@ -180,7 +180,7 @@ import android.util.Pair;
* <tr><td><a href="/help/app/topic.php?id=162">s.iconColorFilter</a></td> <td>int</td> <td>Read/Write</td> <td>argb color</td></tr>
* </tbody>
* </table>
*
*
* <br><br><b>Folder properties:</b>
* <table>
* <thead><tr><td>Name</td><td>Type</td><td>Access</td><td>Admissible values</td></tr></thead>
@ -412,7 +412,7 @@ public class PropertySet {
}
break;
case 's':
case 's':
if(page != null) {
config = page.config.defaultShortcutConfig;
} else if(item instanceof ShortcutConfigStylable) {

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;
@ -12,7 +14,11 @@ public class RectL {
this.r = r;
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);
}
@ -28,7 +34,11 @@ public class RectL {
public String toString() {
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);
}