Changes in Version 1.2
Changes to the Bean Wizard
Fixes in the Network Beans
Changes in Version 1.1
Changes to the Bean Works class framework
Changes to Bean Wizard
Changes to DPM Sample
Changes
in Version 1.0
Known
Problems
Note: WebRunner Bean Tools requires a JDK 1.1.1-compliant Java
virtual machine.
The Version 1.2 Bean Tools package does not include the JDK1.1.1..This JDK can be obtained from the JavaSoft web site.
The Bean Works class framework now allows you to localize the user-interface
of your application, applet or bean. You can provide versions of
the application's resources for specific locales, and change the locale
of the application by invoking the new setLocale() method defined
by the GUIHandler class.
In order to have the locale specific resources to be set for your application,
you would need to override the setLocale() method in the subclassed
GUIHandler class for your application. In this overridden method, you would
need to do the following:
The problem with the CLASSPATH in the Makefile and the build.bat files provided with the DPM Sample, documented as a known problem in Version 1.0, has been fixed.
The framework is now called "Bean Works."
The mechanism for constructing a program has changed:
ComponentController.setup methods have been removed. Instead, you should create any model, GUI handler, resource bundle, model selection,or view in the constructor of the component controller through the setModel, setGUIHandler, setResourceBundle, and setModelSelection methods. The typical call sequence within the constructor of your program's controller is:The following classes and methods have been added, removed, or changed:public class Foo extends ComponentController { public Foo() { setModel(new FooModel()); setGUIHandler(new FooGUIHandler(this)); try { setResourceBundle(ResourceBundle.getBundle("foo.FooResources")); } catch (MissingResourceException e) { new ExceptionDialog(null, "Can't find resource file", e); } setModelSelection(new FooSelection(this, (FooModel)getModel())); // The setView method must be called last setView(new FooView()); } }Note: You MUST call the setView method last.
The model is now persisted by serializing the whole model instead of externalizing the model data. IModel no longer implements the java.io.Externalizable interface. You should remove any implementation of readExternal and writeExternal in your model classes. By default, all the data members in the model are serialized except for those data fields marked with the transient keyword. If you need to override the default object serialization mechanism, implement these methods:
private void writeObject(ObjectOutputStream) throws IOException
private void readObject(ObjectInputStream) throws IOException, ClassNotFoundException
The file extension string is no longer read from the resource file. You must implement the getFileExtension method in your model to return the file extension.
This method lets you create programs that bring up a special dialog if the current date is later than the program's expiration date.
This method lets you create programs that display a custom splash screen when they launch.
ComponentController.setModel lets you change the application's model. The old model will notify its listeners of the new model.
If your view or model selection maintains a local reference to the model, you must override IView.setModel and ModelSelection.setModel to change the model accordingly.
It is no longer necessary to propagate mouse events up the hierarchy.You should remove the call to enableEvents in your view's initialize method, and remove the processMouseEvent method.
The setView method allows you to change the application view by removing the current view in the frame and adding a new one.When invoked during program initialization, this method creates the application frame, adds the view to the frame, and shows the frame. This method should be called after any model, GUI handler, resource bundle, or model selection has been created. In the second form of setView, the application frame is shown only if the boolean parameter is true. You can show the frame later by calling getComponentFrame().show().
These methods provide access to the component's resource bundle, which includes resource strings such as the application name, version, and copyright.
You should always call setApplicationMain(true) in your main() method before creating the component controller.
This method is no longer invoked by the framework and has been removed from ComponentController. You can simply invoke this method at the end of the component controller's constructor.
The framework does not define any activation policy.
These methods enable you to override the actual streaming of the model object.
This method opens an existing document.
All GUI-related code in ComponentController has been moved to the new class GUIHandler. This includes creation of menu bar, tool bar, and status bar, and all event listeners. If you need to create your own menus or override any of the event listeners, you should subclass GUIHandler. In particular, please note the following new methods and name changes:The handleCreateFileMenu, handleCreateEditMenu, and handleCreateViewMenu
Old Name New Name handleAboutBox handleAbout handleAttachMenu handleCreateMenus handleAddToolButtons handleCreateToolButtons handleCreateFileMenu handleCreateEditMenu handleCreateViewMenu
methods allow customization of the default menus.The following GUIHandle methods allow the File->New menu item to create a new model instance instead of a new application instance in a separate frame:
The default implementation of handleNew invokes handleNewInstance, which provides the existing behavior. If you want to create a new model instead, override handleNew and call handleConfirmNewModel, which displays a confirmation dialog to give the user a chance to save changes if the model is changed, and then creates a new model.
- protected void handleNewInstance();
- protected void handleConfirmNewModel();
- protected void handleNewModel();
These GUIHandler methods are provided for convenience:
- public IModel getModel();
- public IView getView();
- public void addAndDo(Command);
Old Name New Name ToolButton TToolButton ToolBar TToolBar StatusBar TStatusBar MenuBar TMenuBar
TToolButton now has only two constructors, with the second form for constructing toggle buttons:public ToolButton(Class refClass, String filename, String tip, String text) public ToolButton(Class refClass, String filename, String tip, String text, boolean toggle)
TMenuBar adds accessor methods to the File, Edit and View menus (examples are getFileMenu and setFileMenu) to provide easy access to the default menus.
The abstract class CommandProcessor is now the interface class ICommandProcessor, and SimpleCommandProcessor has been renamed to CommandProcessor.For more information please see the Bean Works class documentation.
In this mode, you can assemble beans and establish the layout, as well as create property or event bindings using the Connect menu items.
In this mode, you see a non-visual representation each bean along with wire that show any property or event bindings. You can create new connections using a wiring metaphor, and move beans within the assembly area without affecting their actual physical layout within the composite bean.The Bean Tester now supports custom palette creation. You can build your own palettes or extend existing palettes.
For more information, please read the Bean
Tester documentation.
The wizard now lets you generate basic code for clipboard and custom menu support.
You can also specify a graphic (gif) file to be associated with any bean you create. This graphic will be used to represent the bean in any visual bean development tool such as the WebRunner Bean Tester.
The wizard generates the following new java files:
The WebRunner Bean Wizard no longer works with JDK 1.0.2. It has been upgraded to JDK 1.1.1.
- xxxBeanInfo.java:
- Lets you customize the bean information to be displayed for your bean.
- xxxModelSelection.java:
- Supports the data exchange mechanism and includes methods supporting clipboard operations.
- xxxGUIHandler.java:
- Manages all the user interface resources and events.
You can now compile code and run a component directory from the wizard.
For more information, please see the Bean
Wizard documentation.
Copyright
© Taligent, Inc. 1996 - 1997.
Copyright © IBM Corporation 1996 - 1997.
All Rights Reserved.