public interface IFactory
Used to create new instances of certain API interfaces.
IGuiFactory
Modifier and Type | Method and Description |
---|---|
IVersionBean |
getRepSearchEngineVersionBean()
Returns the version of the replay search engine.
|
IVersionBean |
getTemplateEngineVersionBean()
Returns the version bean of the template engine.
|
IControlledThread |
newControlledThread(java.lang.String name,
java.lang.Runnable runnable)
Creates a new
IControlledThread with the specified name which executes the specified runnable. |
IDateValue |
newDateValue(java.util.Date value)
Creates a new IMMUTABLE
IDateValue with IDateFormat.DATE_TIME format hint. |
IDateValue |
newDateValue(java.util.Date value,
IDateFormat dateFormat)
Creates a new IMMUTABLE
IDateValue . |
IDurationValue |
newDurationValue(long value)
Creates a new IMMUTABLE
IDurationValue with IDurationFormat.AUTO format hint. |
IDurationValue |
newDurationValue(long value,
IDurationFormat durationFormat)
Creates a new IMMUTABLE
IDurationValue . |
<T> IHolder<T> |
newHolder()
Returns a new
IHolder |
<T> IHolder<T> |
newHolder(T value)
Returns a new
IHolder |
IHttpPost |
newHttpPost(java.net.URL url,
java.util.Map<java.lang.String,java.lang.String> paramsMap)
Creates a new
IHttpPost . |
IJob |
newJob(java.lang.String name,
IRIcon ricon,
java.lang.Runnable runnable)
|
INormalThread |
newNormalThread(java.lang.String name,
java.lang.Runnable runnable)
Creates and a new
INormalThread with the specified name which executes the specified runnable. |
<T1,T2> IPair<T1,T2> |
newPair(T1 value1,
T2 value2)
Creates a new IMMUTABLE
IPair . |
IProgressJob |
newProgressJob(java.lang.String name,
IRIcon ricon,
java.lang.Runnable runnable)
Creates a new
IProgressJob with the specified name, IRIcon and which executes the specified runnable. |
IRelativeDate |
newRelativeDate(java.util.Date date)
Creates a new IMMUTABLE
IRelativeDate . |
IRelativeDate |
newRelativeDate(java.util.Date date,
boolean longForm,
int tokens,
boolean appendEra)
Creates a new IMMUTABLE
IRelativeDate . |
IRelativeDate |
newRelativeDate(long date)
Creates a new IMMUTABLE
IRelativeDate . |
IRelativeDate |
newRelativeDate(long date,
boolean longForm,
int tokens,
boolean appendEra)
Creates a new IMMUTABLE
IRelativeDate . |
IRepFilterBean |
newRepFilterBean()
Creates a new
IRepFilterBean and initializes it with default values. |
IRepFiltersBean |
newRepFiltersBean()
Creates a new
IRepFiltersBean . |
IRepFiltersEditorDialog |
newRepFiltersEditorDialog(IRepFiltersBean repFiltersBean)
Creates a new
IRepFiltersEditorDialog . |
IRepSearchEngine |
newRepSearchEngine(IRepFiltersBean repFiltersBean)
Creates a new
IRepSearchEngine . |
ISelectionTracker |
newSelectionTracker()
Creates a new
ISelectionTracker . |
IFileProvider |
newSimpleFileProvider(java.nio.file.Path file,
java.lang.Long lastModified)
Creates a new
IFileProvider which always returns the specified file and last modified time. |
ISizeValue |
newSizeValue(long value)
Creates a new IMMUTABLE
ISizeValue with ISizeFormat.AUTO format hint. |
ISizeValue |
newSizeValue(long value,
ISizeFormat sizeFormat)
Creates a new IMMUTABLE
ISizeValue . |
ITemplateEngine |
newTemplateEngine(java.lang.String template)
Creates a new
ITemplateEngine . |
IToon |
newToon(java.lang.String toon)
Creates a new
IToon from the specified toon string. |
IToon |
newToon(java.lang.String toon,
boolean parsePlayerName)
Creates a new
IToon from the specified toon string. |
IUrlBuilder |
newUrlBuilder(java.net.URL url)
Creates a new
IUrlBuilder from the specified base URL . |
IVersionView |
newVersionView(int... parts)
Creates a new
IVersionView from the specified parts. |
IVersionView |
newVersionView(java.lang.String version)
Creates a new
IVersionView from the specified version string. |
IUrlBuilder newUrlBuilder(java.net.URL url) throws java.lang.IllegalArgumentException
IUrlBuilder
from the specified base URL
.url
- base URL to extend, may contain a query part but must not contain a reference partIUrlBuilder
java.lang.IllegalArgumentException
- if the specified URL contains a reference partnewHttpPost(URL, Map)
IHttpPost newHttpPost(java.net.URL url, java.util.Map<java.lang.String,java.lang.String> paramsMap)
IHttpPost
.url
- URL
to post toparamsMap
- map of parameters to be sentIHttpPost
to interact with the HTTP POST requestIHttpPost
,
newUrlBuilder(URL)
IFileProvider newSimpleFileProvider(java.nio.file.Path file, java.lang.Long lastModified)
IFileProvider
which always returns the specified file and last modified time.file
- the provided filelastModified
- last modified date of the provided fileIFileProvider
which always returns the specified file and last modified timeIHttpPost
IVersionView newVersionView(int... parts)
IVersionView
from the specified parts.parts
- parts of the versionIVersionView
from the specified partsIVersionView
,
newVersionView(String)
IVersionView newVersionView(java.lang.String version)
IVersionView
from the specified version string.version
- version string to create a version view fromIVersionView
from the specified version string, or null
if the specified string is not a valid version stringIVersionView
,
newVersionView(int...)
IToon newToon(java.lang.String toon) throws java.lang.IllegalArgumentException
IToon
from the specified toon string.
The format of the toon string is exactly as specified by IToon.toString()
.
toon
- toon string to create the IToon
fromIToon
from the specified toon stringjava.lang.IllegalArgumentException
- if the specified toon string is invalidIToon
,
newToon(String, boolean)
IToon newToon(java.lang.String toon, boolean parsePlayerName) throws java.lang.IllegalArgumentException
IToon
from the specified toon string.
The format of the toon string is exactly as specified by IToon.toString()
.
toon
- toon string to create the IToon
fromparsePlayerName
- tells if player name is to be parsed from the toon string if presentIToon
from the specified toon stringjava.lang.IllegalArgumentException
- if the specified toon string is invalidIToon
,
newToon(String)
INormalThread newNormalThread(java.lang.String name, java.lang.Runnable runnable)
INormalThread
with the specified name which executes the specified runnable.
The returned normal thread is not started. It has to be started with the INormalThread.start()
method.
name
- name of the threadrunnable
- runnable to execute in the returned normal threadINormalThread
INormalThread
,
newControlledThread(String, Runnable)
IControlledThread newControlledThread(java.lang.String name, java.lang.Runnable runnable)
IControlledThread
with the specified name which executes the specified runnable.
The returned controlled thread is not started. It has to be started with the INormalThread.start()
method.
name
- name of the threadrunnable
- runnable to execute in the returned controlled threadIControlledThread
IControlledThread
,
newNormalThread(String, Runnable)
IJob newJob(java.lang.String name, IRIcon ricon, java.lang.Runnable runnable)
IJob
with the specified name, IRIcon
and which executes the specified runnable.
The returned job is not started. It has to be started with the INormalThread.start()
method.
name
- name of the jobricon
- ricon of the jobrunnable
- runnable to execute in the returned jobIJob
IJob
,
newProgressJob(String, IRIcon, Runnable)
,
IGuiFactory.newRIcon(URL)
IProgressJob newProgressJob(java.lang.String name, IRIcon ricon, java.lang.Runnable runnable)
IProgressJob
with the specified name, IRIcon
and which executes the specified runnable.
The returned progress job is not started. It has to be started with the INormalThread.start()
method.
name
- name of the progress jobricon
- ricon of the progress jobrunnable
- runnable to execute in the returned progress jobIProgressJob
IProgressJob
,
newJob(String, IRIcon, Runnable)
,
IGuiFactory.newRIcon(URL)
IVersionBean getTemplateEngineVersionBean()
ITemplateEngine newTemplateEngine(java.lang.String template) throws IInvalidTemplateException
ITemplateEngine
.
This method can also be used to validate a template string. If no exception is thrown, the template is valid.
template
- template stringITemplateEngine
IInvalidTemplateException
- if the specified template is invalidITemplateEngine
IRepFiltersBean newRepFiltersBean()
IRepFiltersBean
.IRepFiltersBean
IRepFiltersBean
,
IRepFiltersEditorDialog
,
newRepFilterBean()
IRepFilterBean newRepFilterBean()
IRepFilterBean
and initializes it with default values.IRepFilterBean
IRepFilterBean
,
IRepFiltersEditorDialog
,
newRepFiltersBean()
IRepFiltersEditorDialog newRepFiltersEditorDialog(IRepFiltersBean repFiltersBean)
IRepFiltersEditorDialog
.
The dialog is made visible immediately and this method only returns when the dialog is already closed. Whether filters were edited can be checked with
the IRepFiltersEditorDialog.isOk()
method, and the edited filters can be retrieved with the IRepFiltersEditorDialog.getRepFiltersBean()
(which may or may not be the same as the passed filters even if you specified it).
repFiltersBean
- optional replay filters to be viewed / edited in the dialog; if null
, a new IRepFiltersBean
will be createdIRepFiltersEditorDialog
IRepFiltersEditorDialog
,
IRepFiltersBean
,
IRepFilterBean
IVersionBean getRepSearchEngineVersionBean()
IRepSearchEngine newRepSearchEngine(IRepFiltersBean repFiltersBean)
IRepSearchEngine
.repFiltersBean
- replay filters bean to search / filter byIRepSearchEngine
IRepSearchEngine
,
IRepFiltersEditorDialog
,
newRepFiltersBean()
,
newRepFilterBean()
IDurationValue newDurationValue(long value)
IDurationValue
with IDurationFormat.AUTO
format hint.value
- time duration value in millisecondsIDurationValue
IDurationValue
,
newDurationValue(long, IDurationFormat)
IDurationValue newDurationValue(long value, IDurationFormat durationFormat)
IDurationValue
.value
- time duration value in millisecondsdurationFormat
- duration format hint for renderersIDurationValue
IDurationValue
,
IDurationFormat
ISizeValue newSizeValue(long value)
ISizeValue
with ISizeFormat.AUTO
format hint.value
- size value in bytesISizeValue
ISizeValue
,
newSizeValue(long, ISizeFormat)
ISizeValue newSizeValue(long value, ISizeFormat sizeFormat)
ISizeValue
.value
- size value in bytessizeFormat
- size format hint for renderersISizeValue
ISizeValue
,
ISizeFormat
IDateValue newDateValue(java.util.Date value)
IDateValue
with IDateFormat.DATE_TIME
format hint.value
- date valueIDateValue
IDateValue
,
newDateValue(Date, IDateFormat)
IDateValue newDateValue(java.util.Date value, IDateFormat dateFormat)
IDateValue
.value
- date valuedateFormat
- date format hint for renderersIDateValue
IDateValue
,
IDateFormat
IRelativeDate newRelativeDate(java.util.Date date)
IRelativeDate
.date
- absolute date to be represented relatively to the current timeIRelativeDate
IRelativeDate
,
newRelativeDate(long)
,
newRelativeDate(Date, boolean, int, boolean)
,
newRelativeDate(long, boolean, int, boolean)
IRelativeDate newRelativeDate(long date)
IRelativeDate
.date
- absolute date to be represented relatively to the current timeIRelativeDate
IRelativeDate
,
newRelativeDate(Date)
,
newRelativeDate(Date, boolean, int, boolean)
,
newRelativeDate(long, boolean, int, boolean)
IRelativeDate newRelativeDate(java.util.Date date, boolean longForm, int tokens, boolean appendEra)
IRelativeDate
.
See IRelativeDate.toString(boolean, int, boolean)
for details.date
- absolute date to be represented relatively to the current timelongForm
- tells if long form is to be used for time unitstokens
- tells how many tokens to includeappendEra
- tells if era is to be appended; era is "ago"
for past times and "from now"
for future timesIRelativeDate
IRelativeDate
,
newRelativeDate(long, boolean, int, boolean)
,
IRelativeDate.toString(boolean, int, boolean)
IRelativeDate newRelativeDate(long date, boolean longForm, int tokens, boolean appendEra)
IRelativeDate
.
See IRelativeDate.toString(boolean, int, boolean)
for details.date
- absolute date to be represented relatively to the current timelongForm
- tells if long form is to be used for time unitstokens
- tells how many tokens to includeappendEra
- tells if era is to be appended; era is "ago"
for past times and "from now"
for future timesIRelativeDate
IRelativeDate
,
newRelativeDate(Date, boolean, int, boolean)
,
IRelativeDate.toString(boolean, int, boolean)
ISelectionTracker newSelectionTracker()
ISelectionTracker
.ISelectionTracker
ISelectionTracker
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.