Class DbxPlugin

java.lang.Object
de.julianweinelt.datacat.dbx.api.plugins.DbxPlugin
Direct Known Subclasses:
SystemPlugin, SystemPlugin

public abstract class DbxPlugin extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected File
    Get the data folder of the plugin.
    protected org.slf4j.Logger
    Get the logger implementing class to log data to console/debug protocol
    protected JFrame
    Get the main frame of the editor window
    protected Registry
    Get the registry of the system
    abstract void
    Called when the plugin is enabled.
    abstract void
    Called to define events in Registry.
    abstract void
    Called when plugin is being disabled
    abstract void
    Called when plugin is loaded.
    protected void
    Loads themes from classpath, reading the content of src/main/resources/themes/themes.json
    protected void
    Deprecated.
    In favor of the new yarn theme system since v1.0.1-beta.1
    protected void
    Deprecated.
    In favor of the new yarn theme system since v1.0.1-beta.1
    boolean
    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
    protected void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DbxPlugin

      public DbxPlugin()
  • Method Details

    • setLangData

      protected void setLangData(HashMap<String,HashMap<String,String>> languageData)
    • getDataFolder

      protected File getDataFolder()
      Get the data folder of the plugin. Typically, the path is ~/data/[ModuleName].
      Returns:
      File object of the data folder
    • getRegistry

      protected Registry getRegistry()
      Get the registry of the system
      Returns:
      A Registry object representing the API registry
    • getMainFrame

      protected JFrame getMainFrame()
      Get the main frame of the editor window
      Returns:
      The JFrame object 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 in Registry.
    • getLogger

      protected org.slf4j.Logger getLogger()
      Get the logger implementing class to log data to console/debug protocol
      Returns:
      A Logger instance
    • 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:
    • registerTheme

      protected void registerTheme(String name)
      Deprecated.
      In favor of the new yarn theme system since v1.0.1-beta.1
      Register a theme that is located in the classpath in resources folder.
      Parameters:
      name - Name of theme, the file must have the same name under src/main/resources/[name].theme.json
    • registerTheme

      protected void registerTheme(String name, BasicLookAndFeel laf)
      Deprecated.
      In favor of the new yarn theme system since v1.0.1-beta.1
      Register a theme using an internal name and a BasicLookAndFeel instance
      Parameters:
      name - The internal name of the theme. Should only be lower case letters and underscores.
      laf - An instance of BasicLookAndFeel
    • preloadThemes

      protected void preloadThemes()
      Loads themes from classpath, reading the content of src/main/resources/themes/themes.json