spMain.add(pnMain);
}
protected JbsContentPane initPnButtons() {
pnButtons = new JbsContentPane();
Row mainRow = new Row();
mainRow.setAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
mainRow.setInsets(new Insets(new JbsExtent(5), new JbsExtent(5)));
btnOK = new JbsButton(JbsL10N.getString("Generic.ok"));
btnOK.setAlignmentHorizontal(Alignment.CENTER);
btnOK.setWidth(new JbsExtent(80));
btnOK.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent arg0) {
postDialog();
}
});
mainRow.add(btnOK);
btnCancel = new JbsButton(JbsL10N.getString("Generic.cancel"));
btnCancel.setAlignmentHorizontal(Alignment.CENTER);
btnCancel.setWidth(new JbsExtent(80));
btnCancel.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent arg0) {
cancelDialog();
}
});
mainRow.add(btnCancel);
/*
KeyStrokeListener ks = new KeyStrokeListener();
ks.addKeyCombination(KeyStrokeListener.VK_RETURN,"OK");
ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE,"CANCEL");
ks.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent arg0) {
if (arg0.getActionCommand().equals("OK"))
postDialog();
else if (arg0.getActionCommand().equals("CANCEL"))
cancelDialog();
}
});
mainRow.add(ks);
mainRow.add(this.createKeyStrokeListener());
*/
mainRow.add(this.getKeystrokeListener());
pnButtons.add(mainRow);
return pnButtons;
}