| javax.swing.JPanel net.xoetrope.builder.editor.XPageResource
XPageResource | public class XPageResource extends JPanel (Code) | | A holder for a page's resources on behalf of the editor.
Copyright (c) Xoetrope Ltd., 1998-2003
$Revision: 1.19 $
License: see license.txt
|
addCtlEvent | public void addCtlEvent(Component c, long eventMask, String methodName)(Code) | | Store the name of an event in the ctlEvents Hashtable. The entry itself is
another Hashtable as controls will potentially have multiple event. The key
into the main Hashtable is the component while the key into the second one
is a Long constructed from the event mask we are interested in.
Parameters: c - the component we are adding the event reference for. Used as thelookup for the main Hashtable Parameters: eventMask - the event mask which is being dealt with. Used as thelookup for the sub Hashtable Parameters: methodName - the name of the method which is called when the event istriggered |
changeClassName | public void changeClassName()(Code) | | When a template file is created we need to change the class name and the
ctor. These are specified in the source by 'NEW_CLASS_NAME', 'PROJECT_PACKAGE_NAME'
|
getCtlEvent | public String getCtlEvent(Component c, long eventMask)(Code) | | Get the name of the event associated with the component parameter with the
eventmask corresponding to the eventMask parameter
Parameters: c - the component we are looking up Parameters: eventMask - the event mask for the component null if none found otherwise the name of the method which is to becalled when the event is triggered. |
getEditorEventHandler | public XEditorEventHandler getEditorEventHandler()(Code) | | Get the editor's event handler for this page
the handler |
getIsModified | public boolean getIsModified()(Code) | | Returns the modification state of this page
true if the page has been modified |
getJavaSource | public String getJavaSource()(Code) | | Get the Java source for this screen.
the source for the file |
getJavaSourceFile | public File getJavaSourceFile()(Code) | | |
getJavaSourceFileName | public String getJavaSourceFileName()(Code) | | |
getName | public String getName()(Code) | | Get the name of the managed page
|
getPackageName | public String getPackageName()(Code) | | Get the package to which the page belongs
the package name, usingthe '.' notation |
getPage | public XPage getPage()(Code) | | Get the current page.
the page or null if it hasn't been loaded yet |
getPageAttribute | public String getPageAttribute(String attribName)(Code) | | Get an attribute of the page
Parameters: attribName - the attribute name the attribute value or null if it is not present |
openSourceFile | public String openSourceFile(boolean create)(Code) | | Open the Java source file for the screen specified by pageName and return
it's contents. If the source file doesn't currently exist and the create
flag is true then create a template file.
Parameters: create - Create a template file if it doesn't already exist the contents of the file |
reloadPage | public void reloadPage()(Code) | | |
removeCtlEvent | public void removeCtlEvent(Component c, long eventMask)(Code) | | Remove the components event handler. This is for the situation where a
handler exists for a component and the user sets it to blank in the property
editor.
Parameters: c - the component we are adding the event reference for. Used as thelookup for the main Hashtable Parameters: eventMask - the event mask which is being dealt with. Used as thelookup for the sub Hashtable |
resetStyles | public void resetStyles()(Code) | | Iterate through all the componet-style references and refresh the components
so that the reflect the current set of styles.
|
save | public void save(XEditorProject currentProject, String path)(Code) | | Saves the XML which defines a screen and any associated source files.
Parameters: path - the file path to use in saving Parameters: packageName - the package to which this page belongs |
saveSource | protected void saveSource()(Code) | | Save the Java source associated with the screen.
|
setBaseClassName | public void setBaseClassName(String className)(Code) | | |
setEditorEventHandler | public void setEditorEventHandler(XEditorEventHandler eh)(Code) | | Set/store the editor event handler. The handler is swapped by preview mode
Parameters: eh - the handler |
setIsModified | public void setIsModified()(Code) | | Marks this page as being modified
|
setJavaSource | public void setJavaSource(String src)(Code) | | Sets the Java source for this screen.
Parameters: src - the source for the file |
setPage | public void setPage(XPage newPage)(Code) | | Set the current page
Parameters: newPage - the page |
setPageAttribute | public void setPageAttribute(String attribName, String value)(Code) | | Set an attribute of the page
Parameters: attribName - the attribute name Parameters: value - the new value |
sourceFileExists | protected boolean sourceFileExists()(Code) | | Check to see if the Java source file exists for the specified screen
Parameters: packagePath - the path to the source files true if it exists otherwise false. |
|
|