[Schmitzm-commits] r2312 - in trunk: schmitzm-core/src/main/java/de/schmitzm/swing schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Thu May 23 15:40:30 CEST 2013


Author: mojays
Date: 2013-05-23 15:40:29 +0200 (Thu, 23 May 2013)
New Revision: 2312

Added:
   trunk/schmitzm-core/src/main/java/de/schmitzm/swing/OkCancelApplyDialog.java
   trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form.png
   trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_add.png
   trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_delete.png
   trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_edit.png
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/DatabaseEntityEditorFrame.java
Modified:
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/GUIUtil.java
   trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle.properties
   trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle_de.properties
Log:
- New generic super-class for OK/Cancel/Apply dialogs
- New generic super-class for editing frame for database entry

Added: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/OkCancelApplyDialog.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/OkCancelApplyDialog.java	                        (rev 0)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/OkCancelApplyDialog.java	2013-05-23 13:40:29 UTC (rev 2312)
@@ -0,0 +1,133 @@
+/**
+ * Copyright (c) 2009 Martin O. J. Schmitz.
+ * 
+ * This file is part of the SCHMITZM library - a collection of utility 
+ * classes based on Java 1.6, focusing (not only) on Java Swing 
+ * and the Geotools library.
+ * 
+ * The SCHMITZM project is hosted at:
+ * http://wald.intevation.org/projects/schmitzm/
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License (license.txt)
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ * or try this link: http://www.gnu.org/licenses/lgpl.html
+ * 
+ * Contributors:
+ *     Martin O. J. Schmitz - initial API and implementation
+ *     Stefan A. Tzeggai - additional utility classes
+ */
+package de.schmitzm.swing;
+
+import java.awt.BorderLayout;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+import javax.swing.JButton;
+
+
+/**
+ * Dialog (with {@link BorderLayout}), which already provides OK, Apply and Cancel options (in
+ * {@link BorderLayout#SOUTH} region).
+ * @author Martin O.J. Schmitz
+ */
+public abstract class OkCancelApplyDialog extends OkCancelDialog {
+  /** Action of the APPLY button. */
+  protected JButton applyButton;
+  /** Action of the APPLY button. */
+  protected Action applyAction;
+  
+  /**
+   * Creates a new dialog 
+   * @param owner parent component
+   * @param title dialog title
+   * @param modal indicates whether the dialog is modal
+   */
+  public OkCancelApplyDialog(Frame owner, String title, boolean modal) {
+    this(owner, title, modal, true);
+  }
+  
+  /**
+   * Creates a new dialog 
+   * @param owner parent component
+   * @param title dialog title
+   * @param modal indicates whether the dialog is modal
+   */
+  public OkCancelApplyDialog(Dialog owner, String title, boolean modal) {
+    this(owner, title, modal, true);
+  }
+  
+  /**
+   * Creates a new dialog 
+   * @param owner parent component
+   * @param title dialog title
+   * @param modal indicates whether the dialog is modal
+   */
+  protected OkCancelApplyDialog(Frame owner, String title, boolean modal, boolean init) {
+    super(owner, title, modal, init);
+  }
+  
+  /**
+   * Creates a new dialog 
+   * @param owner parent component
+   * @param title dialog title
+   * @param modal indicates whether the dialog is modal
+   */
+  protected OkCancelApplyDialog(Dialog owner, String title, boolean modal, boolean init) {
+    super(owner, title, modal, init);
+  }
+
+  /**
+   * Called immediately by the constructor to initialize the
+   * dialog.
+   */
+  protected void init() {
+    super.init();
+    this.applyAction = GUIBuilder.INST.createAction(SwingUtil.R("Apply"),this,"APPLY",SwingUtil.R("Apply.Desc"),
+                                                    SwingUtil.createImageIconFromResourcePath("resource/icons/small/disk.png", null));
+    this.applyButton = new JButton(applyAction);
+    buttonPanel.add(applyButton,null,0);
+    
+    pack();
+  }
+  
+  /**
+   * Disposes the dialog.
+   */
+  public void dispose() {
+    applyButton.removeActionListener(this);
+    super.dispose();
+  }
+  
+  /**
+   * Performs the actions of the OK, APPLY and CANCEL Button.
+   */
+  @Override
+  public void actionPerformed(ActionEvent e) {
+    // super-method only for OK and CANCEL
+    if ( "OK".equalsIgnoreCase(e.getActionCommand()) ||
+         "CANCEL".equalsIgnoreCase(e.getActionCommand()) )
+      super.actionPerformed(e);
+  }
+    
+  /**
+   * Resets the caption of the APPLY action.
+   * @param caption new title
+   */
+  public void setApplyCaption(String caption) {
+    applyAction.putValue(Action.NAME, caption);
+  }
+
+}

Added: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form.png
===================================================================
(Binary files differ)


Property changes on: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_add.png
===================================================================
(Binary files differ)


Property changes on: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_add.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_delete.png
===================================================================
(Binary files differ)


Property changes on: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_delete.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_edit.png
===================================================================
(Binary files differ)


Property changes on: trunk/schmitzm-core/src/main/resources/de/schmitzm/swing/resource/icons/small/application_form_edit.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/DatabaseEntityEditorFrame.java
===================================================================
--- trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/DatabaseEntityEditorFrame.java	                        (rev 0)
+++ trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/DatabaseEntityEditorFrame.java	2013-05-23 13:40:29 UTC (rev 2312)
@@ -0,0 +1,380 @@
+/**
+ * Copyright (c) 2009 Martin O. J. Schmitz.
+ * 
+ * This file is part of the SCHMITZM library - a collection of utility 
+ * classes based on Java 1.6, focusing (not only) on Java Swing 
+ * and the Geotools library.
+ * 
+ * The SCHMITZM project is hosted at:
+ * http://wald.intevation.org/projects/schmitzm/
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License (license.txt)
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ * or try this link: http://www.gnu.org/licenses/lgpl.html
+ * 
+ * Contributors:
+ *     Martin O. J. Schmitz - initial API and implementation
+ *     Stefan A. Tzeggai - additional utility classes
+ */
+package de.schmitzm.db.hibernate.gui;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.sql.SQLException;
+
+import javax.swing.Action;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JOptionPane;
+import javax.swing.JToolBar;
+
+import org.hibernate.Session;
+import org.hibernate.exception.GenericJDBCException;
+
+import de.schmitzm.db.hibernate.DBUtil;
+import de.schmitzm.db.hibernate.HibernateSessionFactory;
+import de.schmitzm.db.hibernate.gui.event.DatabaseUpdateEmitter;
+import de.schmitzm.db.hibernate.types.UniqueIDType;
+import de.schmitzm.swing.Disposable;
+import de.schmitzm.swing.ExceptionDialog;
+import de.schmitzm.swing.OkCancelApplyDialog;
+import de.schmitzm.swing.SwingUtil;
+
+/**
+ * Frame to edit a {@link Song}.
+ * @see SongPanel
+ * @author Martin O.J. Schmitz
+ */
+public abstract class DatabaseEntityEditorFrame<E extends UniqueIDType, M extends JComponent> extends OkCancelApplyDialog implements Disposable {
+  protected JToolBar toolBar;
+  protected M mainPanel;
+  protected E entity;
+
+  protected Action editAction;
+  protected JButton editButton;
+
+  protected Action deleteAction;
+//  protected Action copyAction; 
+
+  protected boolean editable;
+  
+  /**
+   * Creates a new frame to edit a song's attributes.
+   */
+  public DatabaseEntityEditorFrame(Frame parent, String title, boolean modal, E entity, boolean editable) {
+    super(parent, title, modal, true);
+    setEntity(entity);
+    setEditable(editable);
+  }
+  
+  /**
+   * Initializes the GUI. Sub-classes have to extend this method by
+   * adding components (normally an entity specific panel) to {@link BorderLayout#CENTER}
+   * to display/edit the entity.
+   */
+  @Override
+  protected void init() {
+    super.init();
+   
+    // Actions
+    this.editAction = SwingUtil.createAction(GUIUtil.R("DatabaseEntityEditorFrame.action.edit"),
+                                             this, "EDIT",
+                                             GUIUtil.R("DatabaseEntityEditorFrame.action.edit.desc"),
+                                             SwingUtil.createImageIconFromResourcePath("resource/icons/small/application_form_edit.png", null));
+    this.editButton = new JButton(editAction);
+    buttonPanel.add(editButton, null, 0);
+    this.deleteAction = SwingUtil.createAction(GUIUtil.R("DatabaseEntityEditorFrame.action.delete"),
+                                             this, "DELETE",
+                                             GUIUtil.R("DatabaseEntityEditorFrame.action.delete.desc"),
+                                             SwingUtil.createImageIconFromResourcePath("resource/icons/small/application_form_delete.png", null));
+    
+    // set specific action titles
+    this.okAction.putValue(Action.SHORT_DESCRIPTION, GUIUtil.R("DatabaseEntityEditorFrame.action.ok.desc"));
+    this.cancelAction.putValue(Action.SHORT_DESCRIPTION, GUIUtil.R("DatabaseEntityEditorFrame.action.cancel.desc"));
+    this.applyAction.putValue(Action.SHORT_DESCRIPTION, GUIUtil.R("DatabaseEntityEditorFrame.action.apply.desc"));
+
+    // Toolbar
+    this.toolBar = new JToolBar();
+    toolBar.setFloatable(false);
+    toolBar.setRollover(true);
+    getContentPane().add(toolBar, BorderLayout.PAGE_START);
+    toolBar.add( cancelAction );
+    toolBar.add( okAction );
+    toolBar.add( applyAction );
+    toolBar.addSeparator();
+    toolBar.add( editAction );
+//    toolBar.add( copyAction );
+    toolBar.add( deleteAction );
+    
+    // Main panel
+    this.mainPanel = createEntityPanel();
+    getContentPane().add(mainPanel, BorderLayout.CENTER);
+    
+    updateActions();
+    
+    pack();
+    SwingUtil.setPreferredHeight(this,  mainPanel.getPreferredSize().height
+                                      + toolBar.getPreferredSize().height
+                                      + buttonPanel.getPreferredSize().height
+                                      + 25 );
+    pack();
+    SwingUtil.setRelativeFramePosition(this, getParent(), 0.5, 0.5);
+  }
+  
+  /**
+   * Sub-classes must implement this method to create a main panel ({@link BorderLayout#CENTER}
+   * section) which contains the entity-specific components.
+   */
+  protected abstract M createEntityPanel();
+
+  /**
+   * Updates the button actions according to the panel state.
+   */
+  protected void updateActions() {
+    if (okAction != null) {
+      okAction.setEnabled(isEditable());
+      okButton.setVisible(isEditable());
+    }
+    if (applyAction != null) {
+      applyAction.setEnabled(isEditable());
+      applyButton.setVisible(isEditable());
+    }
+    if (editAction != null) {
+        editAction.setEnabled(!isEditable());
+        editButton.setVisible(!isEditable());
+    }
+    if (deleteAction != null) {
+        // Delete action 
+        // - only in editable mode
+        // - not when record is a new record
+        deleteAction.setEnabled(
+            isEditable() &&
+            getEntity().getId() != null
+        );
+    }
+//    if (copyAction != null)
+//        copyAction.setEnabled( getEntity().getId() != null ); // not for new records
+  }
+  
+  
+  /**
+   * Performs the actions of the OK, APPLY and CANCEL Button.
+   */
+  @Override
+  public void actionPerformed(ActionEvent e) {
+    boolean success = true;
+
+    // bei "saveOrUpdate(.)" wird u.U. bereits die ID befuellt,
+    // auch wenn dann noch ein Fehler auftritt
+    // -> die ID muss dann wieder auf NULL zurueck gesetzt werden
+    // damit beim naechsten Speichern versuch wieder ein INSERT
+    // statt findet und nicht ein UPDATE versucht wird
+    boolean revertIdOnError = false;
+    if (getEntity().getId() == null)
+        revertIdOnError = true;
+
+    // Session which is used to edit record
+    Session session = HibernateSessionFactory.getGlobalFactory().getSession( getEntity() );
+    String  command = e.getActionCommand();
+    
+    try {
+      // If frame is not in editing mode, nothing has to be done
+      if ( "CANCEL".equalsIgnoreCase(command) && isEditable() ) {
+        // Dirty Check with confirmation
+        updateEntityFromGUI(getEntity());
+        int confirm = JOptionPane.NO_OPTION; // Default, if not dirty 
+        if ( session.isDirty() || getEntity().getId() == null )
+          confirm = GUIUtil.confirmSaveMessage(this);
+        
+        // If YES (save changes), continue like OK action
+        if ( confirm == JOptionPane.YES_OPTION ) {
+          command = "OK";
+        } else {
+          // Otherwise (Cancel/NO), rollback transaction
+          if (getEntity().getId() != null) {
+            DBUtil.endTransaction(session,false);
+            session.refresh(getEntity());
+          }
+          // If CANCEL, return to frame editing (no super-method call!)
+          if ( confirm != JOptionPane.NO_OPTION &&
+               confirm != JOptionPane.YES_OPTION )
+            return;
+        }
+      }
+
+      if ("APPLY".equalsIgnoreCase(command) ||
+          "OK".equalsIgnoreCase(command) ) {
+        updateEntityFromGUI(getEntity());
+        session.saveOrUpdate(getEntity());
+        success = DBUtil.endTransaction(session,true);
+        updateGUIFromEntity(getEntity());
+        if (success) {
+          // Wenn ein neuer Kontakt erzeugt wurde, die Session
+          // schliessen, da Kontakt nun ueber neue ID/Hash
+          // identifiziert wird
+          if ( revertIdOnError )
+            HibernateSessionFactory.getGlobalFactory().closeSession(session);
+          // Event ueber Aenderung initiieren
+          if ( getDatabaseUpdateEmitter() != null )
+            getDatabaseUpdateEmitter().fireDatabaseUpdate(this, getEntity());
+        }
+      }
+
+      if ("EDIT".equalsIgnoreCase(command)) {
+        checkPermission(getEntity());
+        try {
+          lockEntity(session, getEntity());
+        } catch (GenericJDBCException err) {
+          String errMessage = GUIUtil.R("DatabaseEntityEditorFrame.error.lock");
+          String errTitle = GUIUtil.R("DatabaseEntityEditorFrame.error.lock.desc");
+          if (err.getCause() instanceof SQLException)
+            ExceptionDialog.show(this, err.getCause(),
+                                 errTitle, errMessage);
+          else
+            ExceptionDialog.show(this, err,
+                                 errTitle, errMessage);
+          return;
+        }
+        setEditable(true);
+        // u.U. war Session zuvor dirty, da bei der Initialisierung
+        // der GUI bestimmte Kontakt-Getter aufgerufen wurden, die
+        // den Kontakt intern veraendern (z.B. Kontakt.getWohnanschrift())
+        // -> Beim Wechsel in Bearbeiten-Modus schreiben die Kontakt-
+        //    Instanz refreshen, da Session sonst dirty bleibt
+        updateGUIFromEntity(getEntity());
+      }
+
+//      if ("COPY_RECORD".equalsIgnoreCase(command)) {
+//        checkPermission(getEntity());
+//        Kontakt newKontakt = getKontakt().copy();
+//        KontaktFrame newFrame = WimeApp.getInstance()
+//                                       .getKontaktDialogManager()
+//                                       .showInstanceFor(newKontakt, this, // WimeApp.getInstance().getMainFrame(),
+//                                                        false // open in edit mode
+//                                          );
+//        // new Frame should not overlap the current frame completely
+//        newFrame.setLocation(getLocation().x + 20, getLocation().y + 20);
+//      }
+
+      if ("DELETE_RECORD".equalsIgnoreCase(command)) {
+        if (GUIUtil.confirmDeleteMessage(this) != JOptionPane.OK_OPTION)
+          return;
+        session.delete(getEntity());
+        success = DBUtil.endTransaction(session,true);
+        if (success) {
+          if ( getDatabaseUpdateEmitter() != null )
+            getDatabaseUpdateEmitter().fireDatabaseRecordDeleted(this, getEntity());
+          dispose();
+        }
+      }
+    } catch (Exception err) {
+      success = false;
+      ExceptionDialog.show(this, err);
+      DBUtil.endTransaction(session,false);
+    } finally {
+      if (!success && revertIdOnError) {
+        session.evict( getEntity() );
+        revertRecordOnError(getEntity());
+      }
+      updateActions();
+    }
+    super.actionPerformed(e);
+    // Dispose dialog on OK/CANCEL
+    if ( "OK".equalsIgnoreCase(e.getActionCommand()) ||
+        "CANCEL".equalsIgnoreCase(e.getActionCommand()) )
+      dispose();
+  }
+  
+  /**
+   * Reverts record fields after error during update. Only called
+   * for new records.
+   */
+  protected void revertRecordOnError(E record) {
+    getEntity().setId(null);
+  }
+
+  /**
+   * Returned the entity which is displayed in frame.
+   */
+  public E getEntity() {
+    return this.entity;
+  }
+  
+  /**
+   * Sets the entity to display in frame.
+   */
+  public void setEntity(E entity) {
+    this.entity = entity;
+    updateGUIFromEntity(entity);
+  }
+
+  
+  /**
+   * Updates the GUI components from entity. Called by {@link #setEntity(Object)}.
+   */
+  protected abstract void updateGUIFromEntity(E entity);
+
+  /**
+   * Updates the given entity from GUI components.
+   */
+  protected abstract void updateEntityFromGUI(E entity);
+  
+  /**
+   * Returns whether GUI is in edit mode.
+   */
+  public boolean isEditable() {
+    return this.editable;
+  }
+  
+  /**
+   * Sets the GUI components editable.
+   */
+  public void setEditable(boolean editable) {
+    this.editable = editable;
+    updateGUI(editable);
+    updateActions();
+  }
+
+  /**
+   * Updates the GUI fields according to editable state.
+   */
+  public abstract void updateGUI(boolean editable);
+
+  /**
+   * Checks whether there is a permission to edit the record. This
+   * implementation does nothing. Application dependent implementations, which
+   * support permission management, can override this method and throw
+   * a {@link RuntimeException} if there is no permission.
+   * @param entity
+   */
+  protected void checkPermission(E entity) {
+  }
+  
+  /**
+   * Returns the {@link DatabaseUpdateEmitter} to invoke entity changes
+   * by.
+   */
+  protected abstract DatabaseUpdateEmitter getDatabaseUpdateEmitter();
+  
+  /**
+   * Locks the given entity on the database for update actions.
+   * This implementation does nothing! Sub-classes can override this
+   * method to implement entity-dependent locking.<br>
+   * Method must throw a {@link RuntimeException} if locking is
+   * not successful. 
+   */
+  protected void lockEntity(Session session, E entity) {
+  }
+}

Modified: trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/GUIUtil.java
===================================================================
--- trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/GUIUtil.java	2013-05-23 13:38:13 UTC (rev 2311)
+++ trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/gui/GUIUtil.java	2013-05-23 13:40:29 UTC (rev 2312)
@@ -69,7 +69,7 @@
   /**
    * Shows a dialog to confirm the database update.
    * @return {@link JOptionPane#YES_OPTION}, {@link JOptionPane#CANCEL_OPTION}
-   *         oder {@link JOptionPane#NO_OPTION}
+   *         or {@link JOptionPane#NO_OPTION}
    */
   public static int confirmSaveMessage(Component parent) {
     int confirm = JOptionPane.showConfirmDialog(
@@ -80,7 +80,24 @@
     return confirm;
   }
 
+
   /**
+   * Shown a dialog to confirm record delete.
+   * 
+   * @return {@link JOptionPane#OK_OPTION} or
+   *         {@link JOptionPane#CANCEL_OPTION}
+   */
+  public static int confirmDeleteMessage(Component parent) {
+      int confirm = JOptionPane
+              .showConfirmDialog(
+                      parent,
+                      R("GUIUtil.delete.confirm.mess"),
+                      R("GUIUtil.delete.confirm.mess.title"),
+                      JOptionPane.OK_CANCEL_OPTION);
+      return confirm;
+  }
+
+  /**
    * Ends the current transaction (of the global session). If not persistent changes
    * exist the user is asked whether the changes should be committed or aborted.
    * @param parent parent component for comfirm dialog

Modified: trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle.properties
===================================================================
--- trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle.properties	2013-05-23 13:38:13 UTC (rev 2311)
+++ trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle.properties	2013-05-23 13:40:29 UTC (rev 2312)
@@ -37,8 +37,19 @@
 
 GUIUtil.save.confirm.mess=Changes were made. Do you want to save the changes in database?
 GUIUtil.save.confirm.mess.title=Save changes
+GUIUtil.delete.confirm.mess=The complete record will be deleted. Continue?
+GUIUtil.delete.confirm.mess.title=Delete record
 
 DatabaseSearchQueryToolBar.Query=Query:
 DatabaseSearchQueryToolBar.SEARCH=search
 DatabaseSearchQueryToolBar.SEARCH.desc=Submit search query
 
+DatabaseEntityEditorFrame.action.ok.desc=Save record and close editor
+DatabaseEntityEditorFrame.action.cancel.desc=Cancel editing
+DatabaseEntityEditorFrame.action.apply.desc=Save record
+DatabaseEntityEditorFrame.action.edit=Edit
+DatabaseEntityEditorFrame.action.edit.desc=Edit record
+DatabaseEntityEditorFrame.action.delete=Delete
+DatabaseEntityEditorFrame.action.delete.desc=Delete record
+DatabaseEntityEditorFrame.error.lock=The record is locked. You can not make chances until the external edit action has been finished.
+DatabaseEntityEditorFrame.error.lock.desc=Record locked

Modified: trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle_de.properties
===================================================================
--- trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle_de.properties	2013-05-23 13:38:13 UTC (rev 2311)
+++ trunk/schmitzm-hibernate/src/main/resources/de/schmitzm/db/hibernate/resource/locales/HibernateResourceBundle_de.properties	2013-05-23 13:40:29 UTC (rev 2312)
@@ -37,7 +37,19 @@
 
 GUIUtil.save.confirm.mess=Es wurden \u00c4nderungen vorgenommen. Wollen Sie diese speichern?
 GUIUtil.save.confirm.mess.title=\u00c4nderungen speichern
+GUIUtil.delete.confirm.mess=Der komplette Datensatz wird gel\u00f6scht. Fortfahren?
+GUIUtil.delete.confirm.mess.title=Datensatz l\u00f6schen
 
 DatabaseSearchQueryToolBar.Query=Anfrage:
 DatabaseSearchQueryToolBar.SEARCH=suchen
 DatabaseSearchQueryToolBar.SEARCH.desc=Suchanfrage absetzen
+
+DatabaseEntityEditorFrame.action.ok.desc=Datensatz speichern und Editor beenden
+DatabaseEntityEditorFrame.action.cancel.desc=Bearbeiten abbrechen
+DatabaseEntityEditorFrame.action.apply.desc=Datensatz speichern
+DatabaseEntityEditorFrame.action.edit=Bearbeiten
+DatabaseEntityEditorFrame.action.edit.desc=Datensatz bearbeiten
+DatabaseEntityEditorFrame.action.delete=L\u00f6schen
+DatabaseEntityEditorFrame.action.delete.desc=Datensatz l\u00f6schen
+DatabaseEntityEditorFrame.error.lock=Der Datensatz wird gerade extern bearbeitet. Sie k\u00f6nnen solange keine \u00c4nderungen vornehmen.
+DatabaseEntityEditorFrame.error.lock.desc=Datensatz wird bereits bearbeitet



More information about the Schmitzm-commits mailing list