Class EmbeddedUtils


  • public class EmbeddedUtils
    extends java.lang.Object
    This class is a useful one when you want to use i-net Designer embedded in your application. It provides methods which will help you to get information about the report templates opened and which allow to manipulate the look and feel of i-net Designer.
    Since:
    6.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MENU_DATABASE
      Static variable to return the database menu node.
      static int MENU_EDIT
      Static variable to return the edit menu node.
      static int MENU_FILE
      Static variable to return the file menu node.
      static int MENU_HELP
      Static variable to return the help menu node.
      static int MENU_INSERT
      Static variable to return the insert menu node.
      static int MENU_OPTION
      Static variable to return the window menu node.
      static int MENU_REPORT
      Static variable to return the report menu node.
      static int MENU_VIEW
      Static variable to return the viev menu node.
      static int MENU_WINDOW
      Static variable to return the window menu node.
    • Constructor Summary

      Constructors 
      Constructor Description
      EmbeddedUtils()
      FOR INTERNAL USE ONLY
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addFileToLastOpened​(java.io.File file)
      adds a file name to the list of last opened files
      static void addMenuToMenubar​(javax.swing.JMenu menu)
      Adds a menu to the i-net Designer´s main menubar.
      static Engine getCurrentEngine()
      Returns the engine of the report that is currently opened.
      static Engine[] getLoadedEngines()
      Returns the engines of all reports which are currently opened.
      static javax.swing.JMenu getMenu​(int menu)
      Returns the i-net Designer menu item which corresponds to the menu id.
      static javax.swing.JFrame getParentComponent()
      Returns the parent i-net Designer frame.
      static Engine getSelectedEngine()
      Returns the current selected engine of the report.
      static void refreshObject​(Element element)
      Refreshes the given element in the i-net Designer.
      If you have changed one or more properties of an element call this method to update the element shown in the i-net Designer.
      static void setDefaultPageLayout​(Engine engine)
      This method loads the default page layout from the local registry.
      It can be called for example to initialize the page layout for a new engine with the default layout.
      • Methods inherited from class java.lang.Object

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

      • EmbeddedUtils

        public EmbeddedUtils()
        FOR INTERNAL USE ONLY
    • Method Detail

      • getCurrentEngine

        public static Engine getCurrentEngine()
        Returns the engine of the report that is currently opened.
        Returns:
        The engine or null if no report is opened.
        Since:
        6.1
      • getSelectedEngine

        public static Engine getSelectedEngine()
        Returns the current selected engine of the report. The selected engine may differ from getCurrentEngine, if a subreport is selected.
        Returns:
        The engine or null if no report is opened.
        Since:
        14.1
      • getLoadedEngines

        public static Engine[] getLoadedEngines()
        Returns the engines of all reports which are currently opened.
        Returns:
        The engine or null if no report is opened.
        Since:
        6.1
      • refreshObject

        public static void refreshObject​(Element element)
        Refreshes the given element in the i-net Designer.
        If you have changed one or more properties of an element call this method to update the element shown in the i-net Designer.
        Parameters:
        element - The Element whose visual representation is to be refreshed
        Since:
        6.1
      • getParentComponent

        public static javax.swing.JFrame getParentComponent()
        Returns the parent i-net Designer frame.
        You can use this frame as parent for dialog- and messageboxes.
        Returns:
        The i-net Designer main frame.
        Since:
        6.1
      • addMenuToMenubar

        public static void addMenuToMenubar​(javax.swing.JMenu menu)
        Adds a menu to the i-net Designer´s main menubar.
        Parameters:
        menu - A JMenu to add to the menu bar of i-net Designer.
        Since:
        6.1
      • addFileToLastOpened

        public static void addFileToLastOpened​(java.io.File file)
        adds a file name to the list of last opened files
        Parameters:
        file - The file to be added to the list of last opened files.
        Since:
        6.5
      • setDefaultPageLayout

        public static void setDefaultPageLayout​(Engine engine)
        This method loads the default page layout from the local registry.
        It can be called for example to initialize the page layout for a new engine with the default layout.
        Parameters:
        engine - The page layout will be set for the given engine.
        Since:
        6.5