protected void buttonPressed(int arg0) {
if(arg0 == IDialogConstants.OK_ID) {
try {
TypeOfPaper typeOfPaper = (TypeOfPaper) system.query(new GetTypeOfPaper(paperCombo.getText().split(" ")[0]));
if(labelPage != null){
system.executeAndQuery(new EditLabelPage(labelPage.getId(), codeText.getText(), labelWidthSpinner.getSelection()/10, labelHeigthSpinner.getSelection()/10, horizontalSpaceSpinner.getSelection()/10, verticalSpaceSpinner.getSelection()/10, leftEdgeSpinner.getSelection()/10, leftEdgeSpinner.getSelection()/10, topEdgeSpinner.getSelection()/10, topEdgeSpinner.getSelection()/10, numberOfLinesSpinner.getSelection(), numberOfColumnsSpinner.getSelection(), typeOfPaper, "Personalizada"));
} else {
system.executeAndQuery(new AddLabelPage(codeText.getText(), labelWidthSpinner.getSelection()/10, labelHeigthSpinner.getSelection()/10, horizontalSpaceSpinner.getSelection()/10, verticalSpaceSpinner.getSelection()/10, leftEdgeSpinner.getSelection()/10, leftEdgeSpinner.getSelection()/10, topEdgeSpinner.getSelection()/10, topEdgeSpinner.getSelection()/10, numberOfLinesSpinner.getSelection(), numberOfColumnsSpinner.getSelection(), typeOfPaper, "Personalizada"));
}
close();
}catch (TransactionDateException e) {