Klasse PThemeMainContext

java.lang.Object
com.processing.mnse.themetools.common.PThemeMainContext

public final class PThemeMainContext extends Object
The PThemeMainContext class. context holds main objects and grants access to it.
  • Methodendetails

    • instance

      public static PThemeMainContext instance()
      Instance.
      Gibt zurück:
      the main context instance
    • init

      public void init(Base base, String themeFile) throws Exception
      Inits the.
      Parameter:
      base - the base
      themeFile - the theme file
      Löst aus:
      Exception - the exception
    • getGlobalFont

      public Font getGlobalFont()
      Gets the global font.
      Gibt zurück:
      the global font
    • getFontHeight

      public int getFontHeight(Component c, Font font)
      Gets the font height.
      Parameter:
      c - the c
      font - the font
      Gibt zurück:
      the font height
    • startFileWatcher

      public void startFileWatcher()
      Start file watcher.
    • getFileWatcher

      public PThemeFileWatcher getFileWatcher()
      Gets the file watcher.
      Gibt zurück:
      the file watcher
    • setFileWatcher

      public void setFileWatcher(PThemeFileWatcher fileWatcher)
      Sets the file watcher.
      Parameter:
      fileWatcher - the new file watcher
    • getIsDirty

      public boolean getIsDirty()
      Gets the is dirty flag.
      Gibt zurück:
      the is dirty flag
    • setIsDirty

      public void setIsDirty(boolean isdirty)
      Sets the is dirty flag.
      Parameter:
      isdirty - the new is dirty state
    • getProperties

      public PThemeProperties getProperties()
      Gets the properties.
      Gibt zurück:
      the theme properties
    • setProperties

      public void setProperties(PThemeProperties properties)
      Sets the properties.
      Parameter:
      properties - the new properties
    • getBase

      public Base getBase()
      Gets the base.
      Gibt zurück:
      the processing base object
    • setBase

      public void setBase(Base base)
      Sets the base.
      Parameter:
      base - the new processing base object
    • getSettings

      public Settings getSettings()
      Get the processing theme settings
      Gibt zurück:
      the current theme settings
    • getEditor

      public Editor getEditor()
      Gets the current editor.
      Gibt zurück:
      the current editor
    • setEditor

      public void setEditor(Editor editor)
      Sets the editor.
      Parameter:
      editor - the new editor
    • getTable

      public PThemeTable getTable(String name)
      Gets the main table.
      Parameter:
      name - of the table
      Gibt zurück:
      the table for corresponding name
    • addTable

      public void addTable(PThemeTable table)
      adds a table from table name.
      Parameter:
      table - to be added
    • getMainPanel

      public PThemePanel getMainPanel()
      Gets the main panel.
      Gibt zurück:
      the main panel
    • setMainPanel

      public void setMainPanel(PThemePanel mainpanel)
      Sets the main panel.
      Parameter:
      mainpanel - the new main panel
    • getThemeFile

      public String getThemeFile()
      Gets the theme file.
      Gibt zurück:
      the theme file
    • getCurrentMode

      public Mode getCurrentMode()
      Gets the current mode.
      Gibt zurück:
      the current mode
    • reloadFile

      public void reloadFile() throws Exception
      Reload file.
      Löst aus:
      Exception - the exception
    • updateTables

      public void updateTables() throws Exception
      updates tables by corresponding properties.
      Löst aus:
      Exception - the exception
    • loadKeyWords

      public void loadKeyWords()
      Load key words.
    • loadHelp

      public void loadHelp()
      Load key words.
    • hasInfo

      public boolean hasInfo(String v)
      Checks for info.
      Parameter:
      v - the v
      Gibt zurück:
      true, if successful
    • findToolTip

      public String findToolTip(String v)
      Find tool tip.
      Parameter:
      v - the v
      Gibt zurück:
      the string
    • isActive

      public static boolean isActive()
      Checks if is active.
      Gibt zurück:
      true, if is active
    • destroy

      public static void destroy()
      Destroy.