LoadingProgress.java
1.93 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
58
59
60
61
62
63
64
65
66
package com.mumfrey.liteloader.common;
/**
* @author Adam Mummery-Smith
*/
public abstract class LoadingProgress
{
private static LoadingProgress instance;
protected LoadingProgress()
{
LoadingProgress.instance = this;
}
public static void setEnabled(boolean enabled)
{
if (LoadingProgress.instance != null) LoadingProgress.instance._setEnabled(enabled);
}
public static void dispose()
{
if (LoadingProgress.instance != null) LoadingProgress.instance._dispose();
}
public static void incLiteLoaderProgress()
{
if (LoadingProgress.instance != null) LoadingProgress.instance._incLiteLoaderProgress();
}
public static void setMessage(String format, String... args)
{
if (LoadingProgress.instance != null) LoadingProgress.instance._setMessage(String.format(format, (Object[])args));
}
public static void setMessage(String message)
{
if (LoadingProgress.instance != null) LoadingProgress.instance._setMessage(message);
}
public static void incLiteLoaderProgress(String format, String... args)
{
if (LoadingProgress.instance != null) LoadingProgress.instance._incLiteLoaderProgress(String.format(format, (Object[])args));
}
public static void incLiteLoaderProgress(String message)
{
if (LoadingProgress.instance != null) LoadingProgress.instance._incLiteLoaderProgress(message);
}
public static void incTotalLiteLoaderProgress(int by)
{
if (LoadingProgress.instance != null) LoadingProgress.instance._incTotalLiteLoaderProgress(by);
}
protected abstract void _setEnabled(boolean enabled);
protected abstract void _dispose();
protected abstract void _incLiteLoaderProgress();
protected abstract void _setMessage(String message);
protected abstract void _incLiteLoaderProgress(String message);
protected abstract void _incTotalLiteLoaderProgress(int by);
}