i-net Crystal-Clear

com.inet.designer
Class EmbeddedUtils

java.lang.Object
  extended by com.inet.designer.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
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.
 
Method Summary
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 boolean addToClasspath(java.lang.String urlOrPath)
          This will add a jar file specified by an URL or a path to the classpath of i-net Designer.
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 void refreshObject(Element element)
          Refreshes the given element in the i-net Designer.
static void setDefaultPageLayout(Engine engine)
          This method loads the default page layout from the local registry.
 

Field Detail

MENU_FILE

public static final int MENU_FILE
Static variable to return the file menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_INSERT

public static final int MENU_INSERT
Static variable to return the insert menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_EDIT

public static final int MENU_EDIT
Static variable to return the edit menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_HELP

public static final int MENU_HELP
Static variable to return the help menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_DATABASE

public static final int MENU_DATABASE
Static variable to return the database menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_REPORT

public static final int MENU_REPORT
Static variable to return the report menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_VIEW

public static final int MENU_VIEW
Static variable to return the viev menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_WINDOW

public static final int MENU_WINDOW
Static variable to return the window menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values

MENU_OPTION

public static final int MENU_OPTION
Static variable to return the window menu node.

Since:
6.5
See Also:
getMenu(int menu), Constant Field Values
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

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

getMenu

public static javax.swing.JMenu getMenu(int menu)
Returns the i-net Designer menu item which corresponds to the menu id.

Parameters:
menu - The id of the menu
Returns:
The menu item or null if the id is invalid.
Since:
6.1
See Also:
MENU_FILE, MENU_INSERT, MENU_EDIT, MENU_HELP, MENU_DATABASE, MENU_REPORT, MENU_VIEW, MENU_WINDOW

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

addToClasspath

public static boolean addToClasspath(java.lang.String urlOrPath)
This will add a jar file specified by an URL or a path to the classpath of i-net Designer. This method will first try to create an URL from the passed string and open an stream to this file. If this fails a file object will be generated assuming the given string is a path to the jar file. If again no InputStream can be opened to this file false will be returned. If an InputStream could be opened the url created will be added to the classpath of i-net Designer.

Parameters:
urlOrPath - A string containing an URL (e.g. "file:c:/libraries/additional.jar") or an path (e.g. "C:\libraries.jar") to a jar file which should be added to the classpath of i-net Designer.
Returns:
True if the jar file could be found and was added to the classpath, otherwise false.False will also be returned if no UpdateableClassLoader from i-net Crystal-Clear is available. This is the case if i-net Designer is started as a Webstart application.
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

i-net Crystal-Clear

Copyright © 1999-2010 by i-net software GmbH