Package com.biglybt.ui.swt
Class UI
- java.lang.Object
-
- com.biglybt.ui.common.UITemplate
-
- com.biglybt.ui.swt.UI
-
- All Implemented Interfaces:
IUserInterface
public class UI extends UITemplate
Created by TuxPaper on 7/4/2017.
-
-
Field Summary
Fields Modifier and Type Field Description private static boolean
isFirstUI
private static LogIDs
LOGID
protected java.util.List
queued_torrents
protected boolean
queueTorrents
protected AEMonitor
this_mon
-
Fields inherited from class com.biglybt.ui.common.UITemplate
core
-
-
Constructor Summary
Constructors Constructor Description UI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildCommandLine(org.apache.commons.cli.Options options)
void
coreCreated(Core core)
Core has been created, but not fully initialize (No GlobalManager, etc)protected void
handleFile(java.lang.String file_name, boolean open, java.lang.String save_path)
void
init(boolean first, boolean others)
Initializes the UI.static boolean
isFirstUI()
protected static boolean
isURI(java.lang.String file_name)
protected void
openQueuedTorrents()
java.lang.String[]
processArgs(org.apache.commons.cli.CommandLine commands, java.lang.String[] args)
Process arguments coming either from command line, or from startserverprotected void
showMainWindow()
void
takeMainThread()
Take control of the main thread, if you need to.-
Methods inherited from class com.biglybt.ui.common.UITemplate
hasOthers, isFirst
-
-
-
-
Method Detail
-
isURI
protected static boolean isURI(java.lang.String file_name)
-
init
public void init(boolean first, boolean others)
Description copied from interface:IUserInterface
Initializes the UI. The UI should not be started at this stage.- Specified by:
init
in interfaceIUserInterface
- Overrides:
init
in classUITemplate
- Parameters:
first
- This UI Instance is the first on the command line and should take control of singular stuff (LocaleUtil and torrents added via Command Line).others
- Indicates whether other UIs run along.
-
coreCreated
public void coreCreated(Core core)
Description copied from interface:IUserInterface
Core has been created, but not fully initialize (No GlobalManager, etc) Add yourCore.addLifecycleListener(CoreLifecycleListener)
to get your GlobalManager reference- Specified by:
coreCreated
in interfaceIUserInterface
- Overrides:
coreCreated
in classUITemplate
-
takeMainThread
public void takeMainThread()
Description copied from interface:IUserInterface
Take control of the main thread, if you need to. This is primarily for UIs that want to start core themselves, or need their UI on the main thread.
If you don't need to take control of the main thread, don't, so that another potential UI can (SWT) This method may never be triggered if an earlier UI took control of the main thread.- Specified by:
takeMainThread
in interfaceIUserInterface
- Overrides:
takeMainThread
in classUITemplate
-
buildCommandLine
public void buildCommandLine(org.apache.commons.cli.Options options)
-
processArgs
public java.lang.String[] processArgs(org.apache.commons.cli.CommandLine commands, java.lang.String[] args)
Description copied from interface:IUserInterface
Process arguments coming either from command line, or from startserver may be called before core is started- Specified by:
processArgs
in interfaceIUserInterface
- Specified by:
processArgs
in classUITemplate
- Parameters:
commands
- query-able list of command line optionsargs
- all the arguments- Returns:
- Unhandled arguments, or null you don't want any other UIs to be triggered
-
handleFile
protected void handleFile(java.lang.String file_name, boolean open, java.lang.String save_path)
-
openQueuedTorrents
protected void openQueuedTorrents()
-
showMainWindow
protected void showMainWindow()
-
isFirstUI
public static boolean isFirstUI()
-
-