* @param evt parameter
*/
private void showDialogButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_showDialogButtonActionPerformed
// get the message
String message = messageTextField.getText();
NotificationDialog dlg = NotificationFactory.createStandardNotification(message, this);
dlg.addNotificationListener(this);
dlg.setFadeInTime(0);
dlg.setFadeOutTime(0);
dlg.setOnTime(0);
// get the decoration
int decorationIndex = decorationComboBox.getSelectedIndex();
if (fadeInToggleButton.isSelected()) {
int fadeInTime = Integer.parseInt(fadeInTextField.getText()) * 1000; // conversion seconds to ms
dlg.setFadeInTime(fadeInTime);
}
if (fadeOutToggleButton.isSelected()) {
int fadeOutTime = Integer.parseInt(fadeOutTextField.getText()) * 1000;
dlg.setFadeOutTime(fadeOutTime);
}
int onTime = Integer.parseInt(onTimeTextField.getText()) * 1000;
if (onTime > 0) {
dlg.setOnTime(onTime);
}
// get the position handling
if (framePositionRadioButton.isSelected()) {
WindowCorner corner = WindowCorner.NorthWest;
switch (frameOrientationComboBox.getSelectedIndex()) {
case 1:
corner = WindowCorner.NorthEast;
break;
case 2:
corner = WindowCorner.SouthWest;
break;
case 3:
corner = WindowCorner.SouthEast;
break;
}
dlg.setLocationRelativeTo(this, RelativeLayoutConstraint.corner(corner, 5, 5));
} else if (desktopPositionRadioButton.isSelected()) {
WindowCorner corner = WindowCorner.NorthWest;
switch (desktopOrientationComboBox.getSelectedIndex()) {
case 1:
corner = WindowCorner.NorthEast;
break;
case 2:
corner = WindowCorner.SouthWest;
break;
case 3:
corner = WindowCorner.SouthEast;
break;
}
dlg.setLocationRelativeToDesktop(corner, 5, 5);
}
dlg.setVisible();
}//GEN-LAST:event_showDialogButtonActionPerformed