Class UI
java.lang.Object
com.biglybt.ui.common.UITemplate
com.biglybt.ui.swt.UI
- All Implemented Interfaces:
IUserInterface
Created by TuxPaper on 7/4/2017.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanprivate static final LogIDsprotected Listprotected booleanprotected final AEMonitorprivate static booleanFields inherited from class UITemplate
core -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildCommandLine(org.apache.commons.cli.Options options) static booleanvoidcoreCreated(Core core) Core has been created, but not fully initialize (No GlobalManager, etc)protected voidhandleFile(String file_name, boolean open, String save_path) voidinit(boolean first, boolean others) Initializes the UI.static booleanprotected static booleanprotected voidString[]processArgs(org.apache.commons.cli.CommandLine commands, String[] args) Process arguments coming either from command line, or from startservervoidTake control of the main thread, if you need to.static booleanMethods inherited from class UITemplate
hasOthers, isFirst
-
Field Details
-
LOGID
-
useSystemTheme
private static volatile boolean useSystemTheme -
isFirstUI
private static boolean isFirstUI -
this_mon
-
queued_torrents
-
queueTorrents
protected boolean queueTorrents
-
-
Constructor Details
-
UI
public UI()
-
-
Method Details
-
canUseSystemTheme
public static boolean canUseSystemTheme() -
useSystemTheme
public static boolean useSystemTheme() -
isURI
-
init
public void init(boolean first, boolean others) Description copied from interface:IUserInterfaceInitializes the UI. The UI should not be started at this stage.- Specified by:
initin interfaceIUserInterface- Overrides:
initin 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
Description copied from interface:IUserInterfaceCore has been created, but not fully initialize (No GlobalManager, etc) Add yourCore.addLifecycleListener(CoreLifecycleListener)to get your GlobalManager reference- Specified by:
coreCreatedin interfaceIUserInterface- Overrides:
coreCreatedin classUITemplate
-
takeMainThread
public void takeMainThread()Description copied from interface:IUserInterfaceTake 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:
takeMainThreadin interfaceIUserInterface- Overrides:
takeMainThreadin classUITemplate
-
buildCommandLine
public void buildCommandLine(org.apache.commons.cli.Options options) -
processArgs
Description copied from interface:IUserInterfaceProcess arguments coming either from command line, or from startserver may be called before core is started- Specified by:
processArgsin interfaceIUserInterface- Specified by:
processArgsin 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
-
openQueuedTorrents
protected void openQueuedTorrents() -
isFirstUI
public static boolean isFirstUI()
-