All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class uk.co.demon.sspl.jforge.BuilderAPI

java.lang.Object
   |
   +----uk.co.demon.sspl.jforge.BuilderAPI

public final class BuilderAPI
extends Object
Provides an Application Programmer Interface to JForge. This API allows external BeanInfo and Customizer classes to interact with JForge. It also provides the methods needed by user-defined menus and methods that need to be called by AWT support code. You could also use it to write external code to extend JForge's capabilities. Note that if you use any of the methods in this API, your BeanInfo or Customizer will become JForge specific.

JForge v2.5

Copyright (c)1998 by Tek-Tools Inc. & Cameron Newham.


Variable Index

 o ADD_FAILED
Return value for the addComponent() method.
 o ADD_SPECIAL_SUCCEEDED
Return value for the addComponent() method.
 o ADD_SUCCEEDED
Return value for the addComponent() method.
 o FILE_BLANK
A file save state indicating that there is nothing on the Work Bench.
 o FILE_NEW_NOT_SAVED
A file save state of a new GUI that has not been saved before.
 o FILE_NOT_SAVED
A file save state of "not saved".
 o FILE_SAVED
A file save state of "saved".
 o VERSION_HIGH
The most significant part of the JForge version number.
 o VERSION_LOW
The least significant part of the JForge version number.
 o VERSION_NAME
The JForge version name.

Constructor Index

 o BuilderAPI()

Method Index

 o addAdditionalJavaSource(String[])
Adds additional lines of code after the constructor body in the generated code.
 o addComponent(Component, Component)
Adds a child component to the given component.
 o addIdentifier(String)
Adds the name to JForge's internal list of identifiers.
 o addIdentifierDeclaration(String, String)
Adds an additional identifier declaration to the class.
 o addImportStatements(String[])
Adds additional import lines to the source code during code generation.
 o addJavaSourceLine(String)
Adds a line of source directly into the code generation.
 o addSharedColor(Color)
Adds a colour to the end of the shared colour list.
 o changeColor(Color, int, int, int)
Changes the R/G/B values of the given Color object.
 o createAndDisplaySplashScreen()
Creates and displays the JForge Splash Screen.
 o deleteComponent(Component)
Deletes the given component.
 o editSelected()
Edits the selected component.
 o findSharedColorIndex(Color)
Returns the index of a shared colour.
 o generateBorder(Border, Component, String)
Generates an appropriate line of code representing the given Border.
 o generateColor(Color)
Generates an appropriate line of code for Color.
 o generateComponent(Component)
Generates source code for the given component.
 o generateIdentifier(String)
Returns a unique identifier based on the given class name.
 o generateLayout(Component, Container, Component[], String)
Generate source code for the layout and sub-components of the given component.
 o generatePartComponent(Component, BeanInfo[], String, int)
Generates source code for the given component using the BeanInfo provided and starting at the level specified.
 o generateUniqueIdentifier(String)
Returns a unique identifier based on the given identifier.
 o getBaseColor()
The base colour for JForge.
 o getBeanInfo(Component)
Obtain bean information for the specified component.
 o getCodeGenMarker(Object)
Gets a general purpose "marker" during code generation.
 o getColorTool()
Gets the colour tool.
 o getContainer(Component)
Obtains the container for the specified component.
 o getCopiedComponent()
Gets the component currently in the copy buffer.
 o getCurrentClassName()
Gets the name of the class that will be written out during code generation.
 o getCurrentCodeGenComponent()
Gets the component that source is currently being generated for.
 o getCurrentCodeGenMethod()
Gets the set method name that source is currently being generated for.
 o getCurrentDirectory()
Gets the name of the current directory that files are being loaded from and saved into.
 o getCurrentFileName()
Gets the name of the current file that has been loaded or is being saved.
 o getCurrentProperties()
Returns the current properties for the JForge application in a BuilderProperties object.
 o getCurrentSelectedComponents()
Gets the components that are currently selected.
 o getCurrentTopLevelComponent()
Gets the current Work Bench top level component.
 o getDebugLevel()
The current debug level.
 o getDefaultLayout(Container)
Returns the default layout manager (the original layout manager object that was generated for) the given component.
 o getEntryColor()
The colour for entry text in JForge.
 o getHighColor()
The high colour for JForge.
 o getIconPath()
The relative path from uk\co\demon\sspl\jforge to the Toolbar icons and logos.
 o getIconPathForComponent(Component)
Returns the URL path for the given component and the "current method".
 o getIconPathsForComponent(Component)
Returns a Vector of URL paths for the given component.
 o getMediumColor()
The medium colour for JForge.
 o getPropertyDisplay(Component, Container, BeanInfo[])
Obtain a property sheet for the specified component.
 o getReadoutColor()
The colour for readout type text in JForge.
 o getSaveState()
Returns the current save state of the current Work Bench.
 o getSharedColorAtIndex(int)
Returns the Color object for a given index.
 o getSharedColors()
Returns the current set of Shared colours in an array.
 o getStandardBorder()
The current border that is being used by the JForge user interface.
 o getStandardFont()
The current font that is being used by the JForge user interface.
 o getTextColor()
The colour for text in JForge.
 o getTopFrame()
Gets the top level frame of JForge.
 o getUniqueColorAtIndex(int)
Returns the Color object for a given index.
 o getUniqueColors()
Returns the current set of Unique colours in an array.
 o getWorkBench()
Gets the work bench container.
 o getWorkBenchGlassPane()
Gets the glass pane that covers the Work Bench.
 o insertSharedColor(Color, int)
Inserts a colour into the shared colour list at the specified index.
 o isDebugOn()
True if debug is switched on.
 o isIdentifierUsed(String)
Returns true if the given name is already used as an identifier.
 o isSharedColor(Color)
Returns true if the given colour is a shared colour.
 o loadComponentIntoBuilder(Component)
Loads the specified component into JForge.
 o menuColourTool()
Displays the Colour dialogue.
 o menuCompilationStatus()
Displays the Compilation Status dialogue.
 o menuCopySelected()
Performs a copy.
 o menuCutSelected()
Performs a cut.
 o menuDeleteSelected()
Performs a delete.
 o menuEditSelected()
Performs an Edit.
 o menuExit()
Performs an exit.
 o menuLoadSerial()
Performs a load serial.
 o menuNew()
Performs a new.
 o menuOpen()
Performs an open.
 o menuPasteBuffer()
Performs a paste.
 o menuPreferences()
Displays the preferences dialogue.
 o menuSave()
Performs a save.
 o menuSaveAs()
Performs a save as.
 o menuSaveCompile()
Performs a save and compile.
 o menuSaveSerial()
Performs a save serial.
 o menuShowAbout()
Shows the "About" dialogue.
 o menuTreeTool()
Displays the Tree dialogue.
 o mouseDragged(MouseEvent)
Executes a programmatic "mouse drag".
 o mousePressed(MouseEvent, Component)
Executes a programmatic "mouse press".
 o mouseReleased(MouseEvent)
Executes a programmatic "mouse release".
 o removeIdentifier(String)
Removes the given name from JForge's internal list of identifier names.
 o removeSharedColor(int)
Removes the specified colour from the shared colour list.
 o setCodeGenMarker(Object, Object)
Sets a general purpose "marker" during code generation.
 o setCurrentProperties(BuilderProperties)
Sets the current properties for the JForge application.
 o setIconPathForComponent(Component, String)
Sets the URL of the icon for the given component.
 o setSaveState(int)
Sets the current save state of the current Work Bench.
 o setURLMethodName(String)
Sets the method name to which Icons are are associated.
 o showErrorDialog(String)
A convenience method for poping up an error dialog associated with the Builder's main window.
 o updatePropertiesDialog()
Updates the Preferences (properties) dialog with the current values.
 o updatePropertySheet(BuilderPropertySheet)
Updates the property sheet with the latest values from the component.

Variables

 o ADD_FAILED
 public static final int ADD_FAILED
Return value for the addComponent() method. This indicates that the add failed.

 o ADD_SUCCEEDED
 public static final int ADD_SUCCEEDED
Return value for the addComponent() method. This indicates that the add succeeded.

 o ADD_SPECIAL_SUCCEEDED
 public static final int ADD_SPECIAL_SUCCEEDED
Return value for the addComponent() method. This indicates that the add succeeded and was to a "special" component - one that has a valid addComponent() method in its BuilderBeanInfo. This distinction is needed for the internal workings of JForge and may or may not be of use for external code.

 o FILE_BLANK
 public static final int FILE_BLANK
A file save state indicating that there is nothing on the Work Bench.

 o FILE_SAVED
 public static final int FILE_SAVED
A file save state of "saved".

 o FILE_NOT_SAVED
 public static final int FILE_NOT_SAVED
A file save state of "not saved".

 o FILE_NEW_NOT_SAVED
 public static final int FILE_NEW_NOT_SAVED
A file save state of a new GUI that has not been saved before.

 o VERSION_HIGH
 public static final int VERSION_HIGH
The most significant part of the JForge version number.

 o VERSION_LOW
 public static final int VERSION_LOW
The least significant part of the JForge version number.

 o VERSION_NAME
 public static final String VERSION_NAME
The JForge version name.

Constructors

 o BuilderAPI
 public BuilderAPI()

Methods

 o getStandardBorder
 public static Border getStandardBorder()
The current border that is being used by the JForge user interface. This will either be the default border or the one the user has set through the Preferences menu option.

 o getStandardFont
 public static Font getStandardFont()
The current font that is being used by the JForge user interface. This will either be the default font or the one the user has set through the Preferences menu option.

 o getIconPath
 public static String getIconPath()
The relative path from uk\co\demon\sspl\jforge to the Toolbar icons and logos.

 o getBaseColor
 public static Color getBaseColor()
The base colour for JForge. Usually used for major component backgrounds.

 o getMediumColor
 public static Color getMediumColor()
The medium colour for JForge. Usually used for sub-component backgrounds.

 o getHighColor
 public static Color getHighColor()
The high colour for JForge. Usually used for control backgrounds.

 o getEntryColor
 public static Color getEntryColor()
The colour for entry text in JForge.

 o getTextColor
 public static Color getTextColor()
The colour for text in JForge.

 o getReadoutColor
 public static Color getReadoutColor()
The colour for readout type text in JForge.

 o isDebugOn
 public static boolean isDebugOn()
True if debug is switched on.

 o getDebugLevel
 public static int getDebugLevel()
The current debug level.

 o getSaveState
 public static int getSaveState()
Returns the current save state of the current Work Bench. Can be one of FILE_BLANK, FILE_SAVED, FILE_NOT_SAVED, FILE_NEW_NOT_SAVED.

Returns:
the save state.
 o setSaveState
 public static void setSaveState(int state)
Sets the current save state of the current Work Bench. Should be one of FILE_BLANK, FILE_SAVED, FILE_NOT_SAVED, FILE_NEW_NOT_SAVED.

Parameters:
state - the save state to set.
 o loadComponentIntoBuilder
 public static void loadComponentIntoBuilder(Component component)
Loads the specified component into JForge. Any components already on the current Work Bench will be removed and the Builder will be reset.

Parameters:
component - the component to load into the Work Bench.
 o getCurrentProperties
 public static BuilderProperties getCurrentProperties()
Returns the current properties for the JForge application in a BuilderProperties object.

Returns:
the current properties.
 o setCurrentProperties
 public static void setCurrentProperties(BuilderProperties properties)
Sets the current properties for the JForge application. After calling this method you should call updatePropertiesDialog() to keep things in sync.

Parameters:
properties - a Properties object with values to make current.
 o updatePropertiesDialog
 public static void updatePropertiesDialog()
Updates the Preferences (properties) dialog with the current values.

 o createAndDisplaySplashScreen
 public static void createAndDisplaySplashScreen()
Creates and displays the JForge Splash Screen. This method should only be called from the PublicStartStopJForge constructor.

 o showErrorDialog
 public static void showErrorDialog(String message)
A convenience method for poping up an error dialog associated with the Builder's main window.

Parameters:
message - the String to display in the dialogue.
 o generateComponent
 public static void generateComponent(Component component)
Generates source code for the given component. The source code is stored in an internal buffer and written to a file during a Save. This method should be used by BeanInfos that need to generate code for standard JFC or AWT sub-components.

Parameters:
component - the component for which source generation is required.
 o generatePartComponent
 public static void generatePartComponent(Component component,
                                          BeanInfo beanInfo[],
                                          String identName,
                                          int beanInfoNum)
Generates source code for the given component using the BeanInfo provided and starting at the level specified. The source code is stored in an internal buffer and written to a file during a Save. This method should be used by BeanInfos that need to generate code for standard JFC or AWT super classes. For example, a sub-classed component of JComponent could write out its specific properties and then call this method to write out the properties for JComponent, Container, Component, etc. The first beanInfo in the array (0), as obtained from getBeanInfo, would be for the component and successive array elements for the subclasses. In this case, setting beanInfoNum to 1 would ignore array element (beanInfo) 0 and only generate code for the subclasses. If beanInfoNum is outside the range of the given beanInfo array (0 > beanInfoNum >= beanInfo.length), this method does nothing.

This method also serves as a more flexible version of generateComponent().

Parameters:
component - the component for which source generation is required.
beanInfo - an array of bean infos for the component.
identName - a String representing the identifier name of this instance.
beanInfoNum - the array element to start generating from.
 o getCurrentCodeGenComponent
 public static Component getCurrentCodeGenComponent()
Gets the component that source is currently being generated for. This is only valid during code generation.

Returns:
the component.
 o getCurrentCodeGenMethod
 public static String getCurrentCodeGenMethod()
Gets the set method name that source is currently being generated for. This is only valid during code generation.

Returns:
the method name.
 o getCurrentSelectedComponents
 public static Component[] getCurrentSelectedComponents()
Gets the components that are currently selected.

Returns:
the components in an array.
 o getCurrentClassName
 public static String getCurrentClassName()
Gets the name of the class that will be written out during code generation.

Returns:
the name of the class.
 o getCurrentDirectory
 public static String getCurrentDirectory()
Gets the name of the current directory that files are being loaded from and saved into.

Returns:
the load/save directory name.
 o getCurrentFileName
 public static String getCurrentFileName()
Gets the name of the current file that has been loaded or is being saved.

Returns:
the load/save file name.
 o getTopFrame
 public static JFrame getTopFrame()
Gets the top level frame of JForge.

Returns:
the top level frame.
 o getWorkBenchGlassPane
 public static Component getWorkBenchGlassPane()
Gets the glass pane that covers the Work Bench.

Returns:
the glass pane.
 o getWorkBench
 public static Container getWorkBench()
Gets the work bench container.

Returns:
the work bench.
 o getColorTool
 public static BuilderColorTool getColorTool()
Gets the colour tool.

 o getCurrentTopLevelComponent
 public static Component getCurrentTopLevelComponent()
Gets the current Work Bench top level component. Returns null if there is nothing on the current work bench.

Returns:
the top level component.
 o generateIdentifier
 public static String generateIdentifier(String className)
Returns a unique identifier based on the given class name. The resulting identifier is all in lowercase. The identifier is not added to the internal list.

Parameters:
className - a class name.
Returns:
a unique identifier based on the class name.
 o generateUniqueIdentifier
 public static String generateUniqueIdentifier(String identifier)
Returns a unique identifier based on the given identifier. If the identifier is not already in use, the identifier is returned. If it is already in use, a number is appended to it. The identifier is not added to the internal list.

Parameters:
identifier - an identifier name.
Returns:
a unique identifier based on the given identifier.
 o addIdentifier
 public static void addIdentifier(String name)
Adds the name to JForge's internal list of identifiers.

Parameters:
name - the name to add.
 o isIdentifierUsed
 public static boolean isIdentifierUsed(String name)
Returns true if the given name is already used as an identifier.

Parameters:
name - the name to check.
Returns:
true if the name is in use.
 o removeIdentifier
 public static void removeIdentifier(String name)
Removes the given name from JForge's internal list of identifier names.

Parameters:
name - the name to remove.
 o getCopiedComponent
 public static Component getCopiedComponent()
Gets the component currently in the copy buffer. If there is no component, it returns null.

Returns:
the component in the copy buffer.
 o addComponent
 public static int addComponent(Component component,
                                Component child)
Adds a child component to the given component. The add occurs through the appropriate mechanism for the parent component (directly through a BuilderBeanInfo addComponent(), through the content, or by the normal add provided by the Container class). If the add fails for any reason (eg: adding to a non-container) a dialogue box pops up informing the user and the method returns ADD_FAILED. If the add succeeds, the method returns ADD_SUCCEEDED (if the add occured through a BuilderBeanInfo getContent() or by a straight add()) or ADD_SPECIAL_SUCCEEDED (if the add occured through a BuilderBeanInfo addComponent()).

Parameters:
component - the parent component that is added to.
child - the component that is to be added to the parent component.
Returns:
whether the add succeeded or failed.
 o deleteComponent
 public static void deleteComponent(Component component)
Deletes the given component. The delete occurs through the appropriate mechanism for the parent component (directly through a BuilderBeanInfo removeComponent(), through the content, or by the normal remove provided by the Container class). Once the deletion has taken place a COMPONENT_DESTROYED event is fired for all sub-components and the component itself (starting with the leaf nodes of the component hierarchy).

BuilderBeanInfo remove is currently not supported. This is JForge Bug Number 98100004.

Parameters:
component - the component to be deleted.
 o generateLayout
 public static void generateLayout(Component component,
                                   Container content,
                                   Component components[],
                                   String name)
Generate source code for the layout and sub-components of the given component. This call avoids full generation of the attributes of the given component. It is intended as a convenience routine for BeanInfos and customizers. If the layout in the content is the default layout it won't be explicitely generated.

Parameters:
component - the component that has the layout.
content - the container for the component.
components - the components in the container.
name - the component name used for generation.
 o getDefaultLayout
 public static Object getDefaultLayout(Container container)
Returns the default layout manager (the original layout manager object that was generated for) the given component. If the current layout and the default layout are the same object, then code generation for the layout manager may be dispensed with. If the default was null then a null string ("") is returned. If the container is not in the internal list of created components, null is returned.

Parameters:
container - the container to find the default layout manager for.
Returns:
the layout manager object that was originally created.
 o setCodeGenMarker
 public static void setCodeGenMarker(Object key,
                                     Object value)
Sets a general purpose "marker" during code generation. The marker is valid throughout the context of the current code generation and is removed once generation is complete. If either the key or value is null no marker is set.

Parameters:
key - a Key for refering to the marker.
value - the value of the marker.
 o getCodeGenMarker
 public static Object getCodeGenMarker(Object key)
Gets a general purpose "marker" during code generation. The marker is valid throughout the context of the current code generation and is removed once generation is complete. If the key is null or there is no value for the specified key the returned value is null.

Parameters:
key - a Key for refering to the marker.
Returns:
the value of the marker.
 o addJavaSourceLine
 public static void addJavaSourceLine(String line)
Adds a line of source directly into the code generation. This is provided as an alternative for Customizer and BeanInfo source generators that want source to be inserted at a particular point rather than having it inserted later, which is what occurs when the source is returned as an array of strings via getJavaInitializationStrings(). Note that using this method will make the Customizer or BeanInfo JForge specific.

Parameters:
line - the line of source to be added.
 o addAdditionalJavaSource
 public static void addAdditionalJavaSource(String lines[])
Adds additional lines of code after the constructor body in the generated code. This method could be used, for example, to add additional methods that simplify code generation for components or layouts.

Note: JForge will not recognise additional methods when the class is loaded back into the builder and hence will not generate the additional source lines unless this method is once again used to add them during code generation. Also note that material added via this method outside the context of code generation will be lost when the code generator is called.

Parameters:
lines - additional lines of source code to be added.
 o addImportStatements
 public static void addImportStatements(String packageNames[])
Adds additional import lines to the source code during code generation. If the array contains more than one instance of a name, only one import line with that package name will be generated. If an entry in the array is null or the empty string ("") it is ignored.

Note: Material added outside the context of code generation will be lost when the code generator is called.

Parameters:
packageNames - an array of Java package names.
 o addIdentifierDeclaration
 public static void addIdentifierDeclaration(String type,
                                             String name)
Adds an additional identifier declaration to the class. Note: Material added outside the context of code generation will be lost when the code generator is called.

Parameters:
type - the type of object to declare.
name - the identifier name.
 o generateColor
 public static String generateColor(Color color)
Generates an appropriate line of code for Color. JForge examines its internal shared colour table and returns a line of code that corresponds to the shared colour. If the colour is not shared, this method returns a line of code that creates the colour. This method should be used by any source generating code that needs to write out a colour.

Parameters:
color - the specified colour for which source code is needed.
Returns:
the line of source code that represents the colour.
 o getUniqueColors
 public static Color[] getUniqueColors()
Returns the current set of Unique colours in an array. Unique colours are colours that are not shared across multiple components (each component that uses a certain colour gets a new instance of that Color).

Returns:
an array of the current unique colours.
 o getSharedColors
 public static Color[] getSharedColors()
Returns the current set of Shared colours in an array. Shared colours are colours that are shared across multiple components (each component that uses a certain colour gets a a shared instance of that Color). Changes in the Color instance will therefore occur across all components that use that colour.

Returns:
an array of the current shared colours.
 o findSharedColorIndex
 public static int findSharedColorIndex(Color color)
Returns the index of a shared colour. The index can be used to access the colour in the array returned by getSharedColors(). A return value of -1 indicates that the given colour could not be found in the list of shared colours.

Parameters:
color - the color to find the index of.
Returns:
an index for the colour.
 o getUniqueColorAtIndex
 public static Color getUniqueColorAtIndex(int index)
Returns the Color object for a given index. If the index is outside the range of valid indexes, null is returned.

Parameters:
index - the index of the colour.
Returns:
the Color object for the given index.
 o getSharedColorAtIndex
 public static Color getSharedColorAtIndex(int index)
Returns the Color object for a given index. If the index is outside the range of valid indexes, null is returned.

Parameters:
index - the index of the colour.
Returns:
the Color object for the given index.
 o changeColor
 public static Color changeColor(Color color,
                                 int red,
                                 int green,
                                 int blue)
Changes the R/G/B values of the given Color object. If the colour is Unique, a new instance is returned. If the colour is Shared, the colour values of the instance are changed. NOTE: shared and unique attributes are internal to JForge.

Parameters:
color - the Color to change.
red - the red value.
green - the green value.
blue - the blue value.
Returns:
a Color object with the given R/G/B values.
 o insertSharedColor
 public static Color insertSharedColor(Color color,
                                       int index)
Inserts a colour into the shared colour list at the specified index. If the colour is a Unique colour, then it is changed to a Shared colour. The returned colour is a new Shared instance if the original colour was a Unique color.

Parameters:
color - the colour to insert.
index - the index to insert the colour at.
Returns:
the shared colour that was inserted.
 o addSharedColor
 public static Color addSharedColor(Color color)
Adds a colour to the end of the shared colour list. If the colour is a Unique colour, then it is changed to a Shared colour. The returned colour is a new Shared instance if the original colour was a Unique color.

Parameters:
color - the colour to insert.
Returns:
the shared colour that was inserted.
 o removeSharedColor
 public static void removeSharedColor(int index)
Removes the specified colour from the shared colour list.

Parameters:
index - the index of the colour to remove.
 o isSharedColor
 public static boolean isSharedColor(Color color)
Returns true if the given colour is a shared colour. Sharedness is an internal JForge distinction and this method should not have to be used. This method does not determine if the colour is currently in the Shared colour list; use findSharedColorIndex instead.

Parameters:
the - color to test for sharedness.
Returns:
true if the colour is a shared colour.
 o generateBorder
 public static String generateBorder(Border border,
                                     Component component,
                                     String name)
Generates an appropriate line of code representing the given Border. This method is a convenience method for BeanInfos that need to write out source code for a Border.

Parameters:
border - the Border for which code generation is needed.
component - the component that uses the Border.
name - the source code identifier name of the component.
Returns:
a string that sets the Components Border to the specified Border.
 o getIconPathsForComponent
 public static Vector getIconPathsForComponent(Component component)
Returns a Vector of URL paths for the given component. An empty Vector is returned if there is no URL. The Vector consists of two element arrays. The first element in each array is the setter method name for the URL and the second element is the URL path.

Parameters:
component - the Component to find the icon paths for.
Returns:
a Vector of two elemnt arrays representing the methods and URLs.
 o getIconPathForComponent
 public static String getIconPathForComponent(Component component)
Returns the URL path for the given component and the "current method". A value of null is returned if there is no URL. The "current method" is a set method determined automatically by the JForge property sheet mechanism. The method for the association may also be set through setURLMethodName.

Parameters:
component - the Component to find the icon path for.
Returns:
a String representing the URL.
 o setIconPathForComponent
 public static void setIconPathForComponent(Component component,
                                            String URL)
Sets the URL of the icon for the given component. Some components may have multiple icons; the URL is associated with a set method for the given component, the set method being determined by the JForge property sheet mechanism. The set method for the association may also be set through setURLMethodName.

Parameters:
component - the Component to set the icon path for.
URL - the URL to set it to.
 o setURLMethodName
 public static void setURLMethodName(String name)
Sets the method name to which Icons are are associated. Normally this method should not be used; the property sheet mechanism sets this value automatically when a value is edited (for displayable type properties only).

Parameters:
name - the name to set the "current method" to.
 o getBeanInfo
 public static BeanInfo[] getBeanInfo(Component component)
Obtain bean information for the specified component. An array of BeanInfos is returned. The first BeanInfo in the array is the BeanInfo for the components' class. Subsequent BeanInfos are for each successive superclass, all the way up to class java.awt.Component.

Parameters:
component - the component to find the BeanInfos for.
Returns:
an array of BeanInfo representing this component.
 o getContainer
 public static Container getContainer(Component component)
Obtains the container for the specified component. For components that have no container, null is returned. For simple components (eg: JPanel), the component itself is returned. For complex components (ie: those that have a BuilderBeanInfo) the bean info is consulted and the appropriate content is returned.

Parameters:
component - the component to find the content for.
Returns:
the content component for the given component.
 o getPropertyDisplay
 public static BuilderPropertyDisplay getPropertyDisplay(Component component,
                                                         Container container,
                                                         BeanInfo beanInfo[])
Obtain a property sheet for the specified component. A Property Display component is returned for the specified component and its beaninfo array. Each element in the array ia a BeanInfo in the components' superclass hierarchy. Once the sheet is finished with, you must call shutdown() in the PropertyDisplay. If you want to generate a Property Sheet for a Layout, you should also supply the container that is the subject of the layout so that it can be properly validated.

Parameters:
component - the component to create a Property Sheet for.
container - the container if this is a Layout, otherwise null.
beanInfo - an array of BeanInfos for the component.
Returns:
a property sheet component.
 o updatePropertySheet
 public static void updatePropertySheet(BuilderPropertySheet sheet)
Updates the property sheet with the latest values from the component.

Parameters:
sheet - the property sheet to update.
 o editSelected
 public static void editSelected()
Edits the selected component. This method should be called by anything that needs to switch editing to the selected component. It is designed to be called by the BeanInfo handlers provided for AWT-based components.

 o mousePressed
 public static void mousePressed(MouseEvent source,
                                 Component comp)
Executes a programmatic "mouse press". This method should be called by anything that needs to perform a mouse press. It is designed to be called by the BeanInfo handlers provided for AWT-based components.

Parameters:
source - the MouseEvent source passed to the handler.
comp - the component that requires the mouse press.
 o mouseReleased
 public static void mouseReleased(MouseEvent source)
Executes a programmatic "mouse release". This method should be called by anything that needs to perform a mouse release. It is designed to be called by the BeanInfo handlers provided for AWT-based components.

Parameters:
source - the MouseEvent source passed to the handler.
 o mouseDragged
 public static void mouseDragged(MouseEvent source)
Executes a programmatic "mouse drag". This method should be called by anything that needs to perform a mouse drag. It is designed to be called by the BeanInfo handlers provided for AWT-based components.

Parameters:
source - the MouseEvent source passed to the handler.
 o menuShowAbout
 public static void menuShowAbout()
Shows the "About" dialogue. This method should be called by menus that provide the appropriate menu component.

 o menuDeleteSelected
 public static void menuDeleteSelected()
Performs a delete. This method should be called by menus that provide the appropriate menu component.

 o menuCutSelected
 public static void menuCutSelected()
Performs a cut. This method should be called by menus that provide the appropriate menu component.

 o menuEditSelected
 public static void menuEditSelected()
Performs an Edit. This method should be called by menus that provide the appropriate menu component.

 o menuCopySelected
 public static void menuCopySelected()
Performs a copy. This method should be called by menus that provide the appropriate menu component.

 o menuPasteBuffer
 public static void menuPasteBuffer()
Performs a paste. This method should be called by menus that provide the appropriate menu component.

 o menuPreferences
 public static void menuPreferences()
Displays the preferences dialogue. This method should be called by menus that provide the appropriate menu component.

 o menuSave
 public static void menuSave()
Performs a save. This method should be called by menus that provide the appropriate menu component.

 o menuSaveCompile
 public static void menuSaveCompile()
Performs a save and compile. This method should be called by menus that provide the appropriate menu component.

 o menuSaveAs
 public static void menuSaveAs()
Performs a save as. This method should be called by menus that provide the appropriate menu component.

 o menuSaveSerial
 public static void menuSaveSerial()
Performs a save serial. This method should be called by menus that provide the appropriate menu component.

 o menuLoadSerial
 public static void menuLoadSerial()
Performs a load serial. This method should be called by menus that provide the appropriate menu component.

 o menuOpen
 public static void menuOpen()
Performs an open. This method should be called by menus that provide the appropriate menu component.

 o menuNew
 public static void menuNew()
Performs a new. This method should be called by menus that provide the appropriate menu component.

 o menuColourTool
 public static void menuColourTool()
Displays the Colour dialogue. This method should be called by menus that provide the appropriate menu component.

 o menuCompilationStatus
 public static void menuCompilationStatus()
Displays the Compilation Status dialogue. This method should be called by menus that provide the appropriate menu component.

 o menuTreeTool
 public static void menuTreeTool()
Displays the Tree dialogue. This method should be called by menus that provide the appropriate menu component.

 o menuExit
 public static void menuExit()
Performs an exit. This method should be called by menus that provide the appropriate menu component.


All Packages  Class Hierarchy  This Package  Previous  Next  Index