-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleJavaPlugin.java
More file actions
57 lines (52 loc) · 1.88 KB
/
ExampleJavaPlugin.java
File metadata and controls
57 lines (52 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import Launcher.*;
import Launcher.base.*;
import UIL.UI;
import UIL.base.IImage;
public class ExampleJavaPlugin extends Plugin {
public ExampleJavaPlugin(final PluginContext context) {
super(context);
for (int i = 0; i < 1; i++)
addAccount(new IAccount() {
@Override
public String toString() {
return "ExampleAccount";
}
@Override
public IImage getIcon() {
return FlashLauncher.ICON_SETTINGS;
}
@Override
public void open(final IEditorContext context) {
context.add(
UI.panel().size(context.width(), 48).add(
UI.button(LANG_REMOVE).size(context.width() - 16, 32).pos(8, 8).onAction((s, e) -> {
removeAccount(this);
context.close();
})
)
);
}
});
addProfile(new IProfile() {
@Override
public String toString() {
return "ExampleProfile";
}
@Override
public IImage getIcon() {
return FlashLauncher.ICON_SETTINGS;
}
@Override
public void open(final IEditorContext context) {
context.add(
UI.panel().size(context.width(), 48).add(
UI.button(LANG_REMOVE).size(context.width() - 16, 32).pos(8, 8).onAction((s, e) -> {
removeProfile(this);
context.close();
})
)
);
}
});
}
}