public class Main
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Config |
config |
static javax.swing.JFrame |
rscFrame |
static javax.swing.JButton |
startStopButton |
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
static void |
clearLog()
Clears the log window.
|
static java.awt.Color |
getColorCode(int x,
int y) |
static Controller |
getController()
Returns the global Controller instance.
|
static java.lang.Object |
getCurrentRunningScript() |
static Debugger |
getDebugger()
Returns the debugger.
|
static java.awt.Point |
getRscFrameCenter()
Method to get the point to place Frame components at to center in rscFrame (client window)
* Note the actual point returned is actually to the top left of true center. |
static java.awt.Color |
getThemeBackColor() |
static java.awt.Color[] |
getThemeElements(java.lang.String theme)
Get the Color[] for the Theme name entered
|
static java.lang.String |
getThemeName() |
static java.lang.String[] |
getThemeNames() |
static java.awt.Color |
getThemeTextColor() |
static java.lang.String |
getUsername() |
static boolean |
isAutoLogin()
Returns whether or not auto-login is enabled.
|
static boolean |
isCustomUiSelected()
Used by login listener to set
|
static boolean |
isDebug()
Returns whether or not debug is enabled.
|
static boolean |
isDrawEnabled() |
static boolean |
isLogWindowOpen()
Used by the WindowListener for tracking the log window.
|
static boolean |
isRunning()
Returns whether or not a script is running.
|
static boolean |
isSideWindowOpen()
Used by the WindowListener for tracking the side window.
|
static boolean |
loadAndRunScript(java.lang.String scriptName,
PackageInfo scriptType)
This function will go ahead and find the location of the `scriptName` and try to load the class
file.
|
static void |
log(java.lang.String text)
Add a line to the log window.
|
static void |
logMethod(java.lang.String method,
java.lang.Object... params)
For logging function calls in an easy manner.
|
static void |
main(java.lang.String[] args)
The initial program entrypoint for IdleRSC.
|
static ParseResult |
parseArgs(ParseResult parseResult,
CLIParser parser,
java.lang.String[] args) |
static void |
setAutoLogin(boolean b)
A function for controlling the autologin functionality.
|
static void |
setRunning(boolean _isRunning)
A function for controlling whether or not scripts are running.
|
static void |
setThemeBackColor(java.awt.Color backColor) |
static void |
setThemeElements(java.lang.String theme)
Set the Color elements for the Theme name entered Changes themeColorBack and themeTextColor
|
static void |
setThemeName(java.lang.String name) |
static void |
setThemeTextColor(java.awt.Color textColor) |
static void |
setUsername(java.lang.String name) |
static void |
showLoadScript() |
public static Config config
public static javax.swing.JFrame rscFrame
public static javax.swing.JButton startStopButton
public static java.awt.Color getThemeTextColor()
public static void setThemeTextColor(java.awt.Color textColor)
public static java.awt.Color getThemeBackColor()
public static void setThemeBackColor(java.awt.Color backColor)
public static java.awt.Color getColorCode(int x, int y)
public static void setThemeElements(java.lang.String theme)
theme
- String -- name of the "Theme"public static java.awt.Point getRscFrameCenter()
public static java.awt.Color[] getThemeElements(java.lang.String theme)
theme
- String -- name of the "Theme"public static java.lang.Object getCurrentRunningScript()
public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.InterruptedException
public static ParseResult parseArgs(ParseResult parseResult, CLIParser parser, java.lang.String[] args) throws java.lang.InterruptedException
java.lang.InterruptedException
public static void clearLog()
public static void log(java.lang.String text)
text
- public static void logMethod(java.lang.String method, java.lang.Object... params)
method
- -- the method called.params
- -- the object(s) which were sent to the function. You may put in any object.public static boolean loadAndRunScript(java.lang.String scriptName, PackageInfo scriptType)
scriptName
- -- the name of the script (without .class at the end.)scriptType
- -- the name of the package for the scriptpublic static boolean isDrawEnabled()
public static void showLoadScript()
public static Controller getController()
public static java.lang.String[] getThemeNames()
public static void setUsername(java.lang.String name)
public static java.lang.String getUsername()
public static void setThemeName(java.lang.String name)
public static java.lang.String getThemeName()
public static boolean isCustomUiSelected()
public static boolean isLogWindowOpen()
public static boolean isSideWindowOpen()
public static boolean isRunning()
public static boolean isAutoLogin()
public static boolean isDebug()
public static void setRunning(boolean _isRunning)
_isRunning
- public static void setAutoLogin(boolean b)
b
- public static Debugger getDebugger()