|
The System Configuration Panel is to show the Device Details such as Name, Description, Physical Location, and User/Contact Name and configure them at run time. This Panel is the default tab in the Switch Configuration Application at run time. This topic explains the step-by-step procedure to build this panel screen.
Steps Involved
Initial Settings
Create a new screen under the "EMS_Configuration" project and rename it as "SystemConfig".
Change the build type of the Screen to "Panel" using the menu command Build > Type > Panel.
Change the layout of the Screen to "Border Layout" by right-clicking the Draw Area to invoke the screen pop-up menu, select Layouts > Border.
Dropping and Laying Out Components
Ensure that the "SwingBeans.list" tab of Beans Palette is selected.
Click and drop a JPanel bean in the "Center" position of the Draw Area and change its instance name as "Sys_Details_Panel".
Change the layout of the "Sys_Details_Panel" to "GridBag Layout" by right-clicking the Draw Area to invoke the screen pop-up menu, select Layouts > GridBag Layout.
Drop a JLabel from the SwingBeans.list tab of BeansPalette and change its instance name as "nameL" and provide "text" property value "Name" in the Property Form. Similarly drop three more JLabel and change their properties in Property Form as given in the table below
|
Instance Name |
Text Property |
|
descL |
Description |
|
phys_locL |
Physical Location |
|
cont_nameL |
User/Control Name |
Expand the RFC1213-MIB node in the XML tree and scroll down to RFC1213-MIB > org > dod > internet > mgmt > mib-2 > system.
Click and drop the "sysName" representation (View1 node under this node) and change the instance name as nameTF. Similarly drop the representation for the nodes given in the table below and change the their respective instance name.
|
Representation for the Node |
Instance Name |
|
sysDescr |
descTF |
|
sysLocation |
phy_locTF |
|
sysContact |
cont_nameTF |
Invoke the "GridBag Layout Customizer" window for the "Sys_Details_Panel" by right-clicking the screen and select "Layout Properties".
In the GridBag Layout Customizer, set the following properties for all the components:
|
Property |
Value |
|
Fill |
Horizontal |
|
Anchor |
Center |
|
Insets |
5,5,5,5 |
9. Arrange the components in the "GridBag Layout Customizer" window as given below
|
Component (Identified with Instance Name) |
Grid |
Anchor |
IPadX |
WeightX | |
|
GridX |
GridY |
||||
|
nameL |
0 |
0 |
EAST |
4 |
0.0 |
|
descL |
1 |
||||
|
phys_locL |
2 |
||||
|
cont_nameL |
3 |
||||
|
nameTF |
1 |
0 |
WEST |
0 |
0.1 |
|
descTF |
1 |
||||
|
phy_locTF |
2 |
||||
|
cont_nameTF |
3 |
||||
This design of "System Configuration Panel" screen is complete.
Save the "SystemConfig" screen using the menu command File > Save > Screen.
Compile the "SystemConfig" screen using the menu command Build > Compile.
|