if (search) {
buttonSave = new JButton(new SearchAction(window));
buttonSave.setIcon(IconEnum.ICON_SEARCH.getIcon());
buttonSave.setName("EditSearch" + viewHandler.getClassName());
buttonSave.setEnabled(false);
buttonCancel = new CancelButton(window, this, false, Util
.getGuiProperty("button.cancel.text"),
IconEnum.ICON_CANCEL, this, true);
} else {
buttonSave = new SaveButton(this, window);
buttonSave.setName("Save" + viewHandler.getClassName());
buttonSave.setEnabled(false);
buttonCancel = new CancelButton(window, this, true);
}
buttonCancel.setName("EditCancel" + viewHandler.getClassName());
buttonRefresh = new RefreshButton(this, window);
buttonOk = new CancelButton(window, new OkAction(), true, "Ok",
IconEnum.ICON_OK, null, true);
buttonOk.setName("ButtonOk");
initEditComponents(window);
}