|
The main screen is invoked from the Map at run time. It contains a split pane with Scalar Set Refresh Screen on the left-side and Columnar Set Refresh Screen on the right-side. It also contains a ImageLabel at the top and a JPanel holding the Close button at the bottom. Follow the steps given below to design the Main Screen.
Creating Main Screen
Create a new screen using the menu command File-->New-->Screen. This invokes the Screen Builder wizard.
Select the 'Build Type' as 'NMSFrame' and click Next to proceed to next screen.
Select the 'Screen Template' as 'Blank Screen' and click Next to proceed to next screen.
Provide the screen name as 'eBonConfigScreen' and title as 'e-Bon Configuration Screen'.
Click Finish to create the screen. A new node called 'eBonConfigScreen' is created in the project tree.
Integrating the Screens into Main Screen
Click on the eBonConfigScreen node. Right-click on the screen's draw area and select Layout -> Border Layout.
Click and drop ImageLabel bean on the draw area from AdventNetUI.jar tab of Beans Palette.
Change the image icon property by replacing the image 'ebon_config.jpg' from <Client Builder Home> /images directory using the Property Form.
Click and drop JSplitPane bean on the draw area from SwingBeans.list tab of Beans Palette.
Click and drop JPanel bean on the draw area from SwingBeans.list tab of Beans Palette.
Arrange the components in the screen using the Layout Properties dialog invoked by right-clicking the draw area and select Layout Properties. Provide the following values for each component in the dialog as given in the table below.
|
Component |
Position |
|
ImageLabel1 |
North |
|
JPanel1 |
South |
|
JSplitPane1 |
Center |
Right-click the draw area and choose Cascade -> Lock All Components.
Switch to "Project Classes" of Bean Palette and select com.adventnet.ebon.ems.ScalarSetScreen from the "Enter the Class Name" editable combo box. Click and drop the bean on the left side of the JSplitPane bean. Similarly, select com.adventnet.ebon.ems.ColumnarSetScreen from the "Enter the Class Name" field and drop it on the right side of the JSplitPane bean.
Click and drop JButton bean in the JPanel1 bean from SwingBeans.list tab of Beans Palette.
Change the following properties of the JButton using the Property Form.
|
Property |
Value |
|
InstanceName |
Refreshbtn |
|
horizontalAlignment |
CENTER |
|
icon |
refresh.png under <Client Builder Home>/images |
|
mnemonic |
67 |
|
text |
Refresh |
Right-click Refresh button. Select InteractionWizard-->action-->actionPerformed from the menu displayed. Drop the rubber band line in the Refresh button itself to invoke the Interaction Wizard.
Click Next thrice to proceed to last screen of the wizard.
Provide the following user code under actionPerformed() method and click Finish to close the wizard.
ColumnarSetScreen1.VirtualTableModel11.refresh();
ScalarSetScreen1.refresh();
Click and drop JButton bean in the JPanel1 bean from SwingBeans.list tab of Beans Palette.
Change the following properties of the JButton using the Property Form.
|
Property |
Value |
|
InstanceName |
Closebtn |
|
horizontalAlignment |
CENTER |
|
icon |
close.png under <Client Builder Home>/images |
|
mnemonic |
67 |
|
text |
Close |
Right-click Close button. Select InteractionWizard-->action-->actionPerformed from the menu displayed. Drop the rubber band line in the Close button itself to invoke the Interaction Wizard.
Click Next thrice to proceed to last screen of the wizard.
Provide the following user code under actionPerformed() method and click Finish to close the wizard.
setVisible(false);
Compile the screen using the menu command Build-->Compile. This completes the designing of Main Screen.
This completes the designing of Main Screen.
|