Class DbxPlugin
java.lang.Object
de.julianweinelt.datacat.dbx.api.plugins.DbxPlugin
- Direct Known Subclasses:
SystemPlugin,SystemPlugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FileGet the data folder of the plugin.protected org.slf4j.LoggerGet the logger implementing class to log data to console/debug protocolprotected JFrameGet the main frame of the editor windowprotected RegistryGet the registry of the systemabstract voidinit()Called when the plugin is enabled.abstract voidCalled to define events inRegistry.abstract voidCalled when plugin is being disabledabstract voidpreInit()Called when plugin is loaded.protected voidLoads themes from classpath, reading the content ofsrc/main/resources/themes/themes.jsonprotected voidregisterTheme(String name) Deprecated.In favor of the new yarn theme system since v1.0.1-beta.1protected voidregisterTheme(String name, BasicLookAndFeel laf) Deprecated.In favor of the new yarn theme system since v1.0.1-beta.1booleanDefines if this plugin is required on both client (editor) and server (flow).
Example how it is handled:
Server:true+ Client:true=> Plugin can be used Server:false+ Client:true=> Plugin cannot be used Server:true+ Client:false=> Client will be forced to download pluginprotected void
-
Constructor Details
-
DbxPlugin
public DbxPlugin()
-
-
Method Details
-
setLangData
-
getDataFolder
Get the data folder of the plugin. Typically, the path is ~/data/[ModuleName].- Returns:
Fileobject of the data folder
-
getRegistry
Get the registry of the system- Returns:
- A
Registryobject representing the API registry
-
getMainFrame
Get the main frame of the editor window- Returns:
- The
JFrameobject of the editor window
-
preInit
public abstract void preInit()Called when plugin is loaded. API calls should not be done here, as dependencies may not be loaded at this time. -
init
public abstract void init()Called when the plugin is enabled. All dependencies are loaded. -
onDisable
public abstract void onDisable()Called when plugin is being disabled -
onDefineEvents
public abstract void onDefineEvents()Called to define events inRegistry. -
getLogger
protected org.slf4j.Logger getLogger()Get the logger implementing class to log data to console/debug protocol- Returns:
- A
Loggerinstance
-
requiredOnClientAndServer
public boolean requiredOnClientAndServer()Defines if this plugin is required on both client (editor) and server (flow).
Example how it is handled:
- Server:
true+ Client:true=> Plugin can be used - Server:
false+ Client:true=> Plugin cannot be used - Server:
true+ Client:false=> Client will be forced to download plugin
- Returns:
- Server:
-
registerTheme
Deprecated.In favor of the new yarn theme system since v1.0.1-beta.1Register a theme that is located in the classpath in resources folder.- Parameters:
name- Name of theme, the file must have the same name undersrc/main/resources/[name].theme.json
-
registerTheme
Deprecated.In favor of the new yarn theme system since v1.0.1-beta.1Register a theme using an internal name and aBasicLookAndFeelinstance- Parameters:
name- The internal name of the theme. Should only be lower case letters and underscores.laf- An instance ofBasicLookAndFeel
-
preloadThemes
protected void preloadThemes()Loads themes from classpath, reading the content ofsrc/main/resources/themes/themes.json
-