protected void initPane() {
Column colMain = new Column();
colMain.add(this.getLbUserGroups());
Row rowButtons = new Row();
rowButtons.setAlignment(new Alignment(Alignment.RIGHT, Alignment.TOP));
rowButtons.add(this.getBtnAdd());
rowButtons.add(this.getBtnDelete());
colMain.add(rowButtons);
KeyStrokeListener ks = new KeyStrokeListener();
ks.addKeyCombination(KeyStrokeListener.VK_INSERT, "INSERT");
ks.addKeyCombination(KeyStrokeListener.VK_DELETE, "DELETE");
ks.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent arg0) {
if (arg0.getActionCommand().equals("INSERT")) {
addGroup();
} else if (arg0.getActionCommand().equals("DELETE")) {
deleteGroup();
}
}
});
rowButtons.add(ks);
this.add(colMain);
}