protected void init() {
setLayout(new BorderLayout());
JToolBar toolBar = new JToolBar();
Application app = Application.getInstance();
toolBar.add(app.getAction(CreateProcedureParameterAction.getActionName()).buildButton());
removeParameterButton = app.getAction(RemoveProcedureParameterAction.getActionName()).buildButton();
toolBar.add(removeParameterButton);
toolBar.addSeparator();
Icon up = ModelerUtil.buildIcon("icon-move_up.gif");
Icon down = ModelerUtil.buildIcon("icon-move_down.gif");
moveUp = new JButton();
moveUp.setIcon(up);
moveUp.setToolTipText("Move Parameter Up");
toolBar.add(moveUp);
moveDown = new JButton();
moveDown.setIcon(down);
moveDown.setToolTipText("Move Parameter Down");
toolBar.add(moveDown);
toolBar.addSeparator();
toolBar.add(app.getAction(CutProcedureParameterAction.getActionName()).buildButton());
toolBar.add(app.getAction(CopyProcedureParameterAction.getActionName()).buildButton());
toolBar.add(app.getAction(PasteAction.getActionName()).buildButton());
add(toolBar, BorderLayout.NORTH);
// Create table with two columns and no rows.
table = new CayenneTable();
/**
* Create and install a popup
*/
JPopupMenu popup = new JPopupMenu();
removeParameterMenu = app.getAction(RemoveProcedureParameterAction.getActionName()).buildMenu();
popup.add(removeParameterMenu);
popup.addSeparator();
moveUpMenu = new JMenuItem("Move Parameter Up", up);
moveDownMenu = new JMenuItem("Move Parameter Down", down);
popup.add(moveUpMenu);
popup.add(moveDownMenu);
popup.addSeparator();
popup.add(app.getAction(CutProcedureParameterAction.getActionName()).buildMenu());
popup.add(app.getAction(CopyProcedureParameterAction.getActionName()).buildMenu());
popup.add(app.getAction(PasteAction.getActionName()).buildMenu());
TablePopupHandler.install(table, popup);
add(PanelFactory.createTablePanel(table, null), BorderLayout.CENTER);