org.formaria.editor.project
Class EditorProject

java.lang.Object
  extended by org.formaria.aria.Project
      extended by org.formaria.editor.project.EditorProject
All Implemented Interfaces:
java.io.Serializable

public class EditorProject
extends Project
implements java.io.Serializable

An extension of the project to provide access to additional properties and facilities used while editing a project

Copyright (c) Formaria Ltd., 2002-2004

$Revision: 1.54 $

License: see License.txt

See Also:
Serialized Form

Field Summary
protected  java.lang.String appStyle
           
protected  java.lang.String appTitle
           
protected  boolean centerWindow
           
static int DEVELOPER_MODE
           
static int EXPERT_MODE
           
protected  java.lang.String firstPage
           
protected  boolean fixProject
           
protected  java.lang.String frameFile
           
protected  java.lang.String[] frameFiles
           
protected  java.lang.String framesetName
           
protected  int[] frameSizes
           
protected  int height
           
protected  java.lang.String iconFileName
           
protected  java.lang.String lafName
           
protected  int logLevel
           
protected  java.lang.String modelFile
           
static int NOVICE_MODE
           
protected  boolean openInFrames
           
protected  java.lang.String packageName
           
protected  java.lang.String path
           
protected  java.lang.String projectTitle
           
protected  EditorRegisteredComponentFactory registeredComponentFactory
           
protected  java.lang.String styleFile
           
protected  boolean swingClient
           
protected  java.lang.String toolbarFile
           
protected  boolean useFrames
           
protected  boolean useToolbar
           
protected  boolean useWindow
           
protected  java.lang.String widgetSet
           
protected  int width
           
 
Fields inherited from class org.formaria.aria.Project
basePackageName, CLOSING, CREATED, customClassLoaders, defaultEncoding, defaultFile, defaultModelClass, documentBase, eventHandlerClassName, exceptionHandler, imageCache, INITIALIZED, managerObjects, messageHelper, modelRoot, pageManager, resourceBundleLoader, RESTARTING, STARTED, startSettings, startupFile, startupObject, status, styleManager, TERMINATED, UNKNOWN, widgetPackageName, xmlParserFactory
 
Method Summary
 boolean addComponentEntry(XmlElement xml)
          Add to the components.xml file of this project
 void addComponentSelectionListener(ComponentSelectListener listener)
           
 void addCustomManagerObject(java.lang.Object key, java.lang.Object value)
           
 void addModelListener(ModelListener listener)
           
 void addPage(java.lang.String name, java.lang.String ext)
          Add a new Screen to the Hashtable with the key of the name parameter
 PageResource addPage(java.lang.String newPageName, java.lang.String ext, java.lang.String className)
          Add a new page to the project
 boolean canAccessDefaultPackage(java.lang.ClassLoader cl, java.lang.String path)
          Can the project access the default package.
protected  void changePropertiesFile()
          Change the necessary values of the properties file.
protected  void checkExtraProperties()
          Check that all the extra properties are configured
protected  void checkProject()
          Check that the necessary data sources are setup
 void componentSelected(PagePanel ownerPage, java.util.Vector selectedComponents, boolean contentsChanged)
          Triggered when components are selected in the pagePanel
 void createProjectFile()
          Called when the create button on the NewProject dialog is clicked.
 void generate(java.io.Writer w)
          Write a project to a stream.
protected  void generateFrameFile()
          Write the frame file
 java.util.HashMap getAllPageResources()
          Get the pages Hashtable
 java.lang.String getAppStyle()
           
 java.lang.String getAppTitle()
           
 java.lang.Object[] getBindingFactories()
          Get the class names of the binding factory classes
 boolean getCenterWindow()
           
 java.lang.String getClassPath()
          Get the path for compiled classes
 java.lang.Object[] getComponentFactories()
          Set the class names of the component factory classes
 java.util.Hashtable getCustomManagerObjects()
           
 EditorValidationFactory getDefaultValidationFactory()
           
static IEditorUtility getEditorUtility()
           
 java.lang.String getFirstPage()
           
 java.lang.String getFrameFile()
           
 java.lang.String[] getFrameFiles()
           
 int[] getFrameSizes()
           
 int getHeight()
           
 java.awt.Image getImage(java.lang.Class clazz, java.lang.String name)
          Loads an image resource
 java.awt.Image getImage(java.lang.String name)
          Loads an image resource
 java.awt.Image getImage(java.net.URL url)
          Loads an image resource
 java.io.InputStream getInputStream(java.lang.String fileName)
          Gets a stream for a resource
 java.lang.String getLafName()
          Get the name of the applications's LAF
 int getLogLevel()
           
 java.util.Hashtable getManagerObjects()
          Get the hashtable of manager objects
 int getMode()
          Gets the editor mode.
 java.lang.String getModelFile()
           
 boolean getOpenInFrames()
          Get the open in framse flag
 java.lang.String getPackageName()
          Get the default package name
 PageResource getPage(int pos)
           
 PageResource getPageResource(java.lang.String name, java.lang.String ext)
          Gets the Screen object stored in the Hashtable under the 'name' parameter
 java.util.HashMap getPageResources()
          Get the pages Hashtable
 java.lang.String getPath()
          Get the Project path
 ProjectClassLoader getProjectClassLoader()
          Gets the ProjectClassLoader object.
 java.lang.String getProjectName()
           
 java.lang.String getProjectTitle()
           
 int getSize()
           
 java.lang.String getStartupFilePath()
          Returns the path to the startup file so that plugins can set project info
static java.lang.String getStrippedFileName(java.lang.String projectPath)
          Get the basic file name from the argument e.g.
static java.lang.String getStrippedPath(java.lang.String projectPath)
          Get the basic path from the argument e.g.
 StyleFactory getStyleFactory()
           
 java.lang.String getStyleFile()
           
static java.lang.String getSubPath(java.lang.String path)
          Get the subpath regardless of how the file name is formatted, i.e.
 java.lang.String getToolbarFile()
          Get the toolbar file name
 Translator getTranslator(java.lang.String name)
          Get the translation object for the named bundle.
 boolean getUseFrames()
           
 boolean getUseToolbar()
           
 boolean getUseWindow()
           
 XmlElement getValidation(java.lang.String validationName)
           
 boolean getValidationExists(java.lang.String validationName)
           
 java.lang.String getValidationFactory()
          Get the name of the validation factory class
 java.lang.String[] getValidations()
           
 java.lang.String getValidationsFile()
          Get the name of the validation rules file
 java.lang.String getWidgetSet()
           
 int getWidth()
           
 boolean hasFrames()
          Has the project got a frameset
 boolean hasProject()
           
 void initialise(java.lang.String projectPath, java.lang.String startupFile)
          Setup the project, this method should not be called from client code
 boolean isModified()
           
 boolean isSwingClient()
           
 void modelChanged()
          Triggered when the data model is changed
 EditorProject parse(java.lang.String filePath, java.lang.String startupFile, java.io.Reader r)
          Read a project from a stream
protected  void readOtherProperties(XmlElement otherProperties)
          Load any extra project proerties from the config
 java.lang.Object readResolve()
          Resolve to singleton instance
protected  void registerHelpers()
           
 void reloadFramesFile(java.io.InputStream is)
          Reload the frames file
 void reloadStartupFile(java.io.InputStream is)
          Reload the project settings file
 void removeAllPages()
          Remove all page resources from the project
 void removeComponentSelectionListener(ComponentSelectListener listener)
           
 void removeModelListener(ModelListener listener)
           
 void removePage(java.lang.String pageName, java.lang.String ext)
          Remove a page resource from the project
 void replacePage(java.lang.String pageName, java.lang.String ext, Page updatedPage)
          Replace a page resource from the project with an updated version
 void save()
          Save the current project.
protected  void saveOtherProperties(XmlElement otherProperties)
          Save any extra project proerties from the config
protected  void saveStartupFile()
           
 void setAppStyle(java.lang.String style)
           
 void setAppTitle(java.lang.String newTitle)
           
 void setBindingFactories(java.lang.Object[] factories)
          Set the class names of the binding factory classes
 void setCenterWindow(boolean state)
           
 void setComponentFactories(java.lang.Object[] factories)
          Set the class names of the component factory classes
 void setDataObject(Modifiable pdo)
           
static void setEditorUtility(IEditorUtility eu, boolean isEclipse)
           
 void setFirstPage(java.lang.String first)
           
 void setFixProject(boolean fixProject)
           
 void setFrameFile(java.lang.String newFile)
           
 void setFrameFiles(java.lang.String[] files)
           
 void setFrameset(java.lang.String framesSet)
          Set the frameset name for the project
 void setFrameSizes(int[] sizes)
           
 void setHeight(int h)
           
 void setJavaSource(java.lang.String screenName, java.lang.String src)
           
 void setLafName(java.lang.String laf)
          Set the name of the applications's LAF
 void setLogLevel(int level)
           
 void setMode(int newMode)
          Sets the editor mode.
 void setModelFile(java.lang.String newFile)
           
 void setModified(boolean newState)
           
 void setOpenInFrames()
          Open the next page in a frameset
 void setPackageName(java.lang.String newPackage)
          Set the default package name.
 void setPath(java.lang.String p)
          Set the path of the Project
 void setProjectClassLoader(ProjectClassLoader cl)
           
 void setProjectTitle(java.lang.String newTitle)
           
 boolean setStartupParam(java.lang.String key, java.lang.String value)
          Change or add a startup property
 boolean setStartupProperty(java.lang.String fieldName, java.lang.String fieldValue)
          Change the startup property, the associated properties file is saved on each change
 void setStyleFile(java.lang.String newFile)
           
 void setSwingClient(boolean state)
           
 void setToolbarFile(java.lang.String fn)
          Set the toolbar file name
protected  void setupProjectClassLoader()
          Sets the class loader for the current project
 void setUseFrames(boolean state)
           
 void setUseToolbar(boolean state)
          Set the flag to use a toolbar
 void setUseWindow(boolean state)
           
 void setValidationFactory(java.lang.String factoryName)
          Set the name of the validation factory class
 void setValidationsFile(java.lang.String rulesFile)
          Set the name of the validation rules file
 void setWidgetSet(java.lang.String set)
           
 void setWidth(int w)
           
 
Methods inherited from class org.formaria.aria.Project
addCustomClassLoader, createEventHandler, createImage, findResource, findResourceAsString, fixError, fixError, getAppFrame, getApplet, getApplicationContext, getAppWindow, getBindingsFactories, getBufferedInputStream, getBufferedInputStream, getBufferedOutputStream, getBufferedOutputStream, getBufferedReader, getBufferedReader, getBufferedReader, getComponentFactory, getCustomerClassLoaders, getDefaultEncoding, getDocumentBase, getExceptionHandler, getIcon, getImage, getInputStream, getMessageHelper, getModel, getObject, getOutputStream, getOutputStream, getPageManager, getResourceBundle, getResourceBundleLoader, getStartupFile, getStartupObject, getStartupParam, getStartupParamAsInt, getStatus, getStyleManager, getTranslator, getUrl, getWidgetPackageName, getXmlParserFactory, initialise, registerBindingFactory, registerBindingFactory, removeObject, resetModel, setAppFrame, setApplet, setAppWindow, setComponentFactory, setDefaultEncoding, setDefaultFile, setDefaultModel, setDocumentBase, setEventHandlerClass, setExceptionHandler, setObject, setResourceBundleLoader, setStartupFile, setStartupObject, setStatus, setWidgetPackageName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registeredComponentFactory

protected EditorRegisteredComponentFactory registeredComponentFactory

packageName

protected java.lang.String packageName

path

protected java.lang.String path

framesetName

protected java.lang.String framesetName

projectTitle

protected java.lang.String projectTitle

appTitle

protected java.lang.String appTitle

firstPage

protected java.lang.String firstPage

styleFile

protected java.lang.String styleFile

modelFile

protected java.lang.String modelFile

frameFile

protected java.lang.String frameFile

lafName

protected java.lang.String lafName

iconFileName

protected java.lang.String iconFileName

width

protected int width

height

protected int height

swingClient

protected boolean swingClient

widgetSet

protected java.lang.String widgetSet

appStyle

protected java.lang.String appStyle

useWindow

protected boolean useWindow

centerWindow

protected boolean centerWindow

useFrames

protected boolean useFrames

useToolbar

protected boolean useToolbar

openInFrames

protected boolean openInFrames

fixProject

protected boolean fixProject

logLevel

protected int logLevel

frameFiles

protected java.lang.String[] frameFiles

frameSizes

protected int[] frameSizes

toolbarFile

protected java.lang.String toolbarFile

NOVICE_MODE

public static final int NOVICE_MODE
See Also:
Constant Field Values

EXPERT_MODE

public static final int EXPERT_MODE
See Also:
Constant Field Values

DEVELOPER_MODE

public static final int DEVELOPER_MODE
See Also:
Constant Field Values
Method Detail

setEditorUtility

public static void setEditorUtility(IEditorUtility eu,
                                    boolean isEclipse)

getEditorUtility

public static IEditorUtility getEditorUtility()

getProjectClassLoader

public ProjectClassLoader getProjectClassLoader()
Description copied from class: Project
Gets the ProjectClassLoader object. If any instance of ProjectClassLoader class was created, it is registered in this Project object.

Overrides:
getProjectClassLoader in class Project
Returns:
ProjectClassLoader object.

setProjectClassLoader

public void setProjectClassLoader(ProjectClassLoader cl)

setupProjectClassLoader

protected void setupProjectClassLoader()
Sets the class loader for the current project


getProjectName

public java.lang.String getProjectName()

initialise

public void initialise(java.lang.String projectPath,
                       java.lang.String startupFile)
Setup the project, this method should not be called from client code

Parameters:
path - the path to the new project's root directory
startupFile - the name of the startup file

reloadStartupFile

public void reloadStartupFile(java.io.InputStream is)
Reload the project settings file

Parameters:
fo -

getStrippedPath

public static java.lang.String getStrippedPath(java.lang.String projectPath)
Get the basic path from the argument e.g. c:\myproject\project.aria

Parameters:
projectPath - the path where the project file is saved
Returns:
the path e.g. c:\myproject

getStrippedFileName

public static java.lang.String getStrippedFileName(java.lang.String projectPath)
Get the basic file name from the argument e.g. c:\myproject\project.aria

Parameters:
projectPath - the path where the project file is saved
Returns:
the file name e.g. project.aria

getSubPath

public static java.lang.String getSubPath(java.lang.String path)
Get the subpath regardless of how the file name is formatted, i.e. with '/' or '\\'

Parameters:
projectPath - the path where the project file is saved
Returns:
the path e.g. c:\myproject or null if there is no subpath

getStartupFilePath

public java.lang.String getStartupFilePath()
Returns the path to the startup file so that plugins can set project info

Returns:
String containing the path to the project file

readResolve

public java.lang.Object readResolve()
                             throws java.io.ObjectStreamException
Resolve to singleton instance

Throws:
java.io.ObjectStreamException

componentSelected

public void componentSelected(PagePanel ownerPage,
                              java.util.Vector selectedComponents,
                              boolean contentsChanged)
Triggered when components are selected in the pagePanel


modelChanged

public void modelChanged()
Triggered when the data model is changed


addComponentSelectionListener

public void addComponentSelectionListener(ComponentSelectListener listener)

removeComponentSelectionListener

public void removeComponentSelectionListener(ComponentSelectListener listener)

addModelListener

public void addModelListener(ModelListener listener)

removeModelListener

public void removeModelListener(ModelListener listener)

parse

public EditorProject parse(java.lang.String filePath,
                           java.lang.String startupFile,
                           java.io.Reader r)
                    throws java.io.IOException
Read a project from a stream

Parameters:
startupFile - the name of the startup file
Throws:
java.io.IOException

generate

public void generate(java.io.Writer w)
              throws java.io.IOException
Write a project to a stream. The project object is maintained internally by NetBeans and does not correspond directly with the file on disk. Therefore after the project UI element is closed a modified copy of the file may be maintained in memory, this object will then be used rather than rereading the file from disk if the project UI is reopened in the same session. This method therefore regenerates the internal object.

Throws:
java.io.IOException

generateFrameFile

protected void generateFrameFile()
Write the frame file


reloadFramesFile

public void reloadFramesFile(java.io.InputStream is)
Reload the frames file

Parameters:
fo - the frames file

saveStartupFile

protected void saveStartupFile()

checkExtraProperties

protected void checkExtraProperties()
Check that all the extra properties are configured


checkProject

protected void checkProject()
Check that the necessary data sources are setup


addCustomManagerObject

public void addCustomManagerObject(java.lang.Object key,
                                   java.lang.Object value)

getCustomManagerObjects

public java.util.Hashtable getCustomManagerObjects()

readOtherProperties

protected void readOtherProperties(XmlElement otherProperties)
Load any extra project proerties from the config


saveOtherProperties

protected void saveOtherProperties(XmlElement otherProperties)
Save any extra project proerties from the config


getSize

public int getSize()

getPage

public PageResource getPage(int pos)
                     throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

getPageResource

public PageResource getPageResource(java.lang.String name,
                                    java.lang.String ext)
Gets the Screen object stored in the Hashtable under the 'name' parameter

Parameters:
name - the name of the screen we're looking up
ext - the file extension
Returns:
the Screen associated with the 'name' parameter

hasFrames

public boolean hasFrames()
Has the project got a frameset

Returns:
true if frames are in use, otherwise returns false

setFrameset

public void setFrameset(java.lang.String framesSet)
Set the frameset name for the project

Parameters:
framesSet -

addPage

public void addPage(java.lang.String name,
                    java.lang.String ext)
Add a new Screen to the Hashtable with the key of the name parameter

Parameters:
name -
ext - the file extension

getPageResources

public java.util.HashMap getPageResources()
Get the pages Hashtable

Returns:
the pages Hashtable

getAllPageResources

public java.util.HashMap getAllPageResources()
Get the pages Hashtable

Returns:
the pages Hashtable

removePage

public void removePage(java.lang.String pageName,
                       java.lang.String ext)
Remove a page resource from the project

Parameters:
pageName -
ext - the file extension

replacePage

public void replacePage(java.lang.String pageName,
                        java.lang.String ext,
                        Page updatedPage)
Replace a page resource from the project with an updated version

Parameters:
pageName - the page name
ext - the file extension
updatedPage - the updated version of this page

removeAllPages

public void removeAllPages()
Remove all page resources from the project


setPath

public void setPath(java.lang.String p)
Set the path of the Project

Parameters:
p - the path of the Project

createProjectFile

public void createProjectFile()
Called when the create button on the NewProject dialog is clicked. A file with the extension '.aria' is written to the project path.


hasProject

public boolean hasProject()

addPage

public PageResource addPage(java.lang.String newPageName,
                            java.lang.String ext,
                            java.lang.String className)
Add a new page to the project

Parameters:
newPageName - the new page name
ext - the file extension
className - the base class name or null if the default is to be used
Returns:
the new page

getDefaultValidationFactory

public EditorValidationFactory getDefaultValidationFactory()

getValidations

public java.lang.String[] getValidations()

getValidationExists

public boolean getValidationExists(java.lang.String validationName)

getValidation

public XmlElement getValidation(java.lang.String validationName)

changePropertiesFile

protected void changePropertiesFile()
Change the necessary values of the properties file.

Parameters:
path - The path to the properties file.

setStartupProperty

public boolean setStartupProperty(java.lang.String fieldName,
                                  java.lang.String fieldValue)
Change the startup property, the associated properties file is saved on each change

Parameters:
fieldName - the name or key of the property to change.
fieldValue - the value to place in the file.

getPath

public java.lang.String getPath()
Get the Project path

Returns:
the Project path

getClassPath

public java.lang.String getClassPath()
Get the path for compiled classes

Returns:

save

public void save()
Save the current project.


setJavaSource

public void setJavaSource(java.lang.String screenName,
                          java.lang.String src)

getStyleFactory

public StyleFactory getStyleFactory()

getMode

public int getMode()
Gets the editor mode. The mode controls what features are available in the editor

Returns:
a constant value indicating the mode

setMode

public void setMode(int newMode)
Sets the editor mode. The mode controls what features are available in the editor

Parameters:
newMode - this can be one of the following values
  • NOVICE_MODE - for a minimal user interface and only simple operations
  • EXPERT_MODE - for a fulll user interface and all operations
  • DEVELOPER_MODE - for the expert interface plus experimental options and possibly unstable features

registerHelpers

protected void registerHelpers()

setStartupParam

public boolean setStartupParam(java.lang.String key,
                               java.lang.String value)
Change or add a startup property

Overrides:
setStartupParam in class Project
Parameters:
key - the object key
value - the object value
Returns:
true if the value is new or different from the old value

getPackageName

public java.lang.String getPackageName()
Get the default package name

Overrides:
getPackageName in class Project
Returns:
the package name

setPackageName

public void setPackageName(java.lang.String newPackage)
Description copied from class: Project
Set the default package name. The default package when accessing user event handlers.

Overrides:
setPackageName in class Project
Parameters:
newPackage - The name of the package to be used

getAppTitle

public java.lang.String getAppTitle()

setAppTitle

public void setAppTitle(java.lang.String newTitle)

getProjectTitle

public java.lang.String getProjectTitle()

setProjectTitle

public void setProjectTitle(java.lang.String newTitle)

getFirstPage

public java.lang.String getFirstPage()

setFirstPage

public void setFirstPage(java.lang.String first)

isSwingClient

public boolean isSwingClient()

getWidgetSet

public java.lang.String getWidgetSet()

setWidgetSet

public void setWidgetSet(java.lang.String set)

getAppStyle

public java.lang.String getAppStyle()

setAppStyle

public void setAppStyle(java.lang.String style)

setSwingClient

public void setSwingClient(boolean state)

getUseWindow

public boolean getUseWindow()

setUseWindow

public void setUseWindow(boolean state)

getCenterWindow

public boolean getCenterWindow()

setCenterWindow

public void setCenterWindow(boolean state)

getUseFrames

public boolean getUseFrames()

getUseToolbar

public boolean getUseToolbar()

getOpenInFrames

public boolean getOpenInFrames()
Get the open in framse flag

Returns:
true to open the next page in a frameset (if one is in use).

setOpenInFrames

public void setOpenInFrames()
Open the next page in a frameset


setUseFrames

public void setUseFrames(boolean state)

setUseToolbar

public void setUseToolbar(boolean state)
Set the flag to use a toolbar

Parameters:
state - true to use a toolbar

setToolbarFile

public void setToolbarFile(java.lang.String fn)
Set the toolbar file name


getToolbarFile

public java.lang.String getToolbarFile()
Get the toolbar file name

Returns:
the file name

isModified

public boolean isModified()

setModified

public void setModified(boolean newState)

setDataObject

public void setDataObject(Modifiable pdo)

setWidth

public void setWidth(int w)

setHeight

public void setHeight(int h)

getHeight

public int getHeight()

getWidth

public int getWidth()

getLogLevel

public int getLogLevel()

setLogLevel

public void setLogLevel(int level)

getStyleFile

public java.lang.String getStyleFile()

setStyleFile

public void setStyleFile(java.lang.String newFile)

getFrameFile

public java.lang.String getFrameFile()

setFrameFile

public void setFrameFile(java.lang.String newFile)

getModelFile

public java.lang.String getModelFile()

setModelFile

public void setModelFile(java.lang.String newFile)

setFrameFiles

public void setFrameFiles(java.lang.String[] files)

getFrameFiles

public java.lang.String[] getFrameFiles()

setFrameSizes

public void setFrameSizes(int[] sizes)

getFrameSizes

public int[] getFrameSizes()

getLafName

public java.lang.String getLafName()
Get the name of the applications's LAF


setLafName

public void setLafName(java.lang.String laf)
Set the name of the applications's LAF


getComponentFactories

public java.lang.Object[] getComponentFactories()
Set the class names of the component factory classes

Returns:
the class names as an array of String objects

getBindingFactories

public java.lang.Object[] getBindingFactories()
Get the class names of the binding factory classes

Returns:
factories the class names as an array of String objects

setComponentFactories

public void setComponentFactories(java.lang.Object[] factories)
Set the class names of the component factory classes

Parameters:
factories - the class names as an array of String objects

setBindingFactories

public void setBindingFactories(java.lang.Object[] factories)
Set the class names of the binding factory classes

Parameters:
factories - the class names as an array of String objects

setValidationFactory

public void setValidationFactory(java.lang.String factoryName)
Set the name of the validation factory class

Parameters:
factoryName - the class name

getValidationFactory

public java.lang.String getValidationFactory()
Get the name of the validation factory class

Parameters:
the - class name

setValidationsFile

public void setValidationsFile(java.lang.String rulesFile)
Set the name of the validation rules file

Parameters:
rulesFile - the class name

getValidationsFile

public java.lang.String getValidationsFile()
Get the name of the validation rules file

Returns:
the file name

getManagerObjects

public java.util.Hashtable getManagerObjects()
Get the hashtable of manager objects

Parameters:
return - the hashtable

getInputStream

public java.io.InputStream getInputStream(java.lang.String fileName)
Gets a stream for a resource

Overrides:
getInputStream in class Project
Parameters:
fileName - the resource file name
Returns:
the InputStream

getImage

public java.awt.Image getImage(java.lang.String name)
Loads an image resource

Overrides:
getImage in class Project
Parameters:
name - the image resource name
Returns:
the image

getImage

public java.awt.Image getImage(java.net.URL url)
Loads an image resource

Parameters:
url - the image resource url
Returns:
the image

getImage

public java.awt.Image getImage(java.lang.Class clazz,
                               java.lang.String name)
Loads an image resource

Parameters:
clazz - the class whos classloader will be used while attempting to load the image
name - the image resource name
Returns:
the image

getTranslator

public Translator getTranslator(java.lang.String name)
Get the translation object for the named bundle.

Overrides:
getTranslator in class Project
Parameters:
name - the name of the resource used for translation
Returns:
the translation object that operates on the resource bundle

addComponentEntry

public boolean addComponentEntry(XmlElement xml)
Add to the components.xml file of this project

Parameters:
xml - the new element to add if it is not already present

canAccessDefaultPackage

public boolean canAccessDefaultPackage(java.lang.ClassLoader cl,
                                       java.lang.String path)
Can the project access the default package. Within the editor the NetBeans classloader causes problems if the default package is accessed!

Overrides:
canAccessDefaultPackage in class Project

setFixProject

public void setFixProject(boolean fixProject)
Parameters:
fixProject - the fixProject to set