Author: lemovice
Date: Sun Nov 24 15:18:10 2013
New Revision: 4684

Log:
display correctly Names type
Display events date , there is a exception  however the date is now displayed

Modified:
   
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/models/NameTypeComboBoxModel.java
   
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/Bundle.properties
   
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.form
   
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.java
   
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventsListPanel.java

Modified: 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/models/NameTypeComboBoxModel.java
==============================================================================
--- 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/models/NameTypeComboBoxModel.java
   (original)
+++ 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/models/NameTypeComboBoxModel.java
   Sun Nov 24 15:18:10 2013
@@ -26,9 +26,4 @@
             addElement(nameTypeComboBox.get(key));
         }
     }
-
-    @Override
-    public void setSelectedItem(Object anObject) {
-        super.setSelectedItem(nameTypeComboBox.get(anObject.toString()));
-    }
 }

Modified: 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/Bundle.properties
==============================================================================
--- 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/Bundle.properties
    (original)
+++ 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/Bundle.properties
    Sun Nov 24 15:18:10 2013
@@ -15,7 +15,6 @@
 EventEditorPanel.addPlaceButton.toolTipText=Add a place
 EventEditorPanel.editPlaceButton.toolTipText=Edit place
 EventEditorPanel.removePlaceButton.toolTipText=Delete place
-EventEditorPanel.dateWidgetPanel.toolTipText=date of the event
 EventEditorPanel.eventTypeComboBox.toolTipText=Type of event
 EventEditorPanel.eventDescriptionTextArea.toolTipText=Event description
 EventEditorPanel.eventPlaceTextField.toolTipText=event place tooltip

Modified: 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.form
==============================================================================
--- 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.form
        (original)
+++ 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.form
        Sun Nov 24 15:18:10 2013
@@ -61,10 +61,7 @@
                   </Group>
                   <Group type="103" groupAlignment="0" attributes="0">
                       <Group type="102" attributes="0">
-                          <Group type="103" groupAlignment="0" attributes="0">
-                              <Component id="eventIDTextField" min="-2" 
max="-2" attributes="0"/>
-                              <Component id="eventPlaceTextField" 
alignment="0" max="32767" attributes="0"/>
-                          </Group>
+                          <Component id="eventPlaceTextField" max="32767" 
attributes="0"/>
                           <EmptySpace max="-2" attributes="0"/>
                           <Component id="addPlaceButton" min="-2" max="-2" 
attributes="0"/>
                           <EmptySpace max="-2" attributes="0"/>
@@ -72,14 +69,17 @@
                           <EmptySpace max="-2" attributes="0"/>
                           <Component id="removePlaceButton" min="-2" max="-2" 
attributes="0"/>
                       </Group>
-                      <Group type="102" attributes="0">
-                          <Component id="eventTypeComboBox" min="-2" 
pref="164" max="-2" attributes="0"/>
-                          <EmptySpace max="-2" attributes="0"/>
+                      <Component id="jScrollPane2" max="32767" attributes="0"/>
+                      <Group type="102" alignment="0" attributes="0">
+                          <Group type="103" groupAlignment="0" attributes="0">
+                              <Component id="eventTypeComboBox" alignment="0" 
min="-2" pref="164" max="-2" attributes="0"/>
+                              <Component id="eventIDTextField" alignment="0" 
min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <EmptySpace min="-2" max="-2" attributes="0"/>
                           <Component id="dateLabel" min="-2" max="-2" 
attributes="0"/>
                           <EmptySpace max="-2" attributes="0"/>
-                          <Component id="dateWidgetPanel" max="32767" 
attributes="0"/>
+                          <Component id="aDateBean" max="32767" 
attributes="0"/>
                       </Group>
-                      <Component id="jScrollPane2" max="32767" attributes="0"/>
                   </Group>
               </Group>
           </Group>
@@ -87,22 +87,22 @@
         <DimensionLayout dim="1">
           <Group type="103" groupAlignment="0" attributes="0">
               <Group type="102" alignment="0" attributes="0">
-                  <Group type="103" groupAlignment="1" attributes="0">
+                  <Group type="103" groupAlignment="0" attributes="0">
                       <Group type="102" attributes="0">
                           <Group type="103" groupAlignment="3" attributes="0">
                               <Component id="eventIdLabel" alignment="3" 
min="-2" max="-2" attributes="0"/>
                               <Component id="eventIDTextField" alignment="3" 
min="-2" max="-2" attributes="0"/>
                           </Group>
-                          <EmptySpace max="-2" attributes="0"/>
+                          <EmptySpace pref="10" max="32767" attributes="0"/>
                           <Group type="103" groupAlignment="3" attributes="0">
                               <Component id="eventTypeLabel" alignment="3" 
min="-2" max="-2" attributes="0"/>
                               <Component id="eventTypeComboBox" alignment="3" 
min="-2" max="-2" attributes="0"/>
                               <Component id="dateLabel" alignment="3" min="-2" 
max="-2" attributes="0"/>
                           </Group>
                       </Group>
-                      <Group type="102" alignment="1" attributes="0">
-                          <EmptySpace min="34" pref="34" max="-2" 
attributes="0"/>
-                          <Component id="dateWidgetPanel" max="32767" 
attributes="0"/>
+                      <Group type="102" attributes="0">
+                          <EmptySpace min="0" pref="0" max="32767" 
attributes="0"/>
+                          <Component id="aDateBean" min="-2" max="-2" 
attributes="0"/>
                       </Group>
                   </Group>
                   <EmptySpace min="-2" max="-2" attributes="0"/>
@@ -239,24 +239,6 @@
             <EventHandler event="actionPerformed" 
listener="java.awt.event.ActionListener" 
parameters="java.awt.event.ActionEvent" 
handler="removePlaceButtonActionPerformed"/>
           </Events>
         </Component>
-        <Container class="javax.swing.JPanel" name="dateWidgetPanel">
-          <Properties>
-            <Property name="border" type="javax.swing.border.Border" 
editor="org.netbeans.modules.form.editors2.BorderEditor">
-              <Border 
info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
-                <EmptyBorder/>
-              </Border>
-            </Property>
-            <Property name="toolTipText" type="java.lang.String" 
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
-              <ResourceString 
bundle="ancestris/modules/editors/genealogyeditor/panels/Bundle.properties" 
key="EventEditorPanel.dateWidgetPanel.toolTipText" 
replaceFormat="java.text.MessageFormat.format(java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;),
 {arguments})"/>
-            </Property>
-            <Property name="opaque" type="boolean" value="false"/>
-          </Properties>
-          <AuxValues>
-            <AuxValue name="JavaCodeGenerator_CreateCodeCustom" 
type="java.lang.String" value="new DateBean()"/>
-          </AuxValues>
-
-          <Layout 
class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
-        </Container>
         <Container class="javax.swing.JScrollPane" name="jScrollPane2">
           <AuxValues>
             <AuxValue name="autoScrollPane" type="java.lang.Boolean" 
value="true"/>
@@ -276,6 +258,8 @@
             </Component>
           </SubComponents>
         </Container>
+        <Component class="ancestris.modules.beans.ADateBean" name="aDateBean">
+        </Component>
       </SubComponents>
     </Container>
     <Container class="javax.swing.JTabbedPane" 
name="eventInformationTabbedPane">
@@ -304,7 +288,7 @@
             </DimensionLayout>
             <DimensionLayout dim="1">
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="sourcesListPanel" alignment="0" pref="350" 
max="32767" attributes="0"/>
+                  <Component id="sourcesListPanel" alignment="0" pref="346" 
max="32767" attributes="0"/>
               </Group>
             </DimensionLayout>
           </Layout>
@@ -335,7 +319,7 @@
             </DimensionLayout>
             <DimensionLayout dim="1">
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="notesListPanel" alignment="0" pref="350" 
max="32767" attributes="0"/>
+                  <Component id="notesListPanel" alignment="0" pref="346" 
max="32767" attributes="0"/>
               </Group>
             </DimensionLayout>
           </Layout>
@@ -366,7 +350,7 @@
             </DimensionLayout>
             <DimensionLayout dim="1">
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="multimediaObjectsListPanel" alignment="0" 
pref="350" max="32767" attributes="0"/>
+                  <Component id="multimediaObjectsListPanel" alignment="0" 
pref="346" max="32767" attributes="0"/>
               </Group>
             </DimensionLayout>
           </Layout>

Modified: 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.java
==============================================================================
--- 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.java
        (original)
+++ 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventEditorPanel.java
        Sun Nov 24 15:18:10 2013
@@ -1,14 +1,10 @@
 package ancestris.modules.editors.genealogyeditor.panels;
 
 import 
ancestris.modules.editors.genealogyeditor.models.EventsTypeComboBoxModelModel;
-import 
ancestris.modules.editors.genealogyeditor.models.MultiMediaObjectsTableModel;
-import ancestris.modules.editors.genealogyeditor.models.NotesTableModel;
-import ancestris.modules.editors.genealogyeditor.models.SourcesTableModel;
 import ancestris.modules.gedcom.utilities.PropertyTag2Name;
 import ancestris.util.swing.DialogManager;
 import genj.edit.beans.DateBean;
 import genj.gedcom.*;
-import genj.util.swing.DateWidget;
 import java.util.ArrayList;
 import java.util.List;
 import org.openide.DialogDescriptor;
@@ -31,6 +27,7 @@
         initComponents();
         eventIdLabel.setVisible(false);
         eventIDTextField.setVisible(false);
+        aDateBean.setPreferHorizontal(true);
     }
 
     /**
@@ -54,9 +51,9 @@
         addPlaceButton = new javax.swing.JButton();
         editPlaceButton = new javax.swing.JButton();
         removePlaceButton = new javax.swing.JButton();
-        dateWidgetPanel = new DateBean();
         jScrollPane2 = new javax.swing.JScrollPane();
         eventDescriptionTextArea = new javax.swing.JTextArea();
+        aDateBean = new ancestris.modules.beans.ADateBean();
         eventInformationTabbedPane = new javax.swing.JTabbedPane();
         sourcesPanel = new javax.swing.JPanel();
         sourcesListPanel = new 
ancestris.modules.editors.genealogyeditor.panels.SourcesListPanel();
@@ -111,11 +108,6 @@
             }
         });
 
-        
dateWidgetPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 
1));
-        
dateWidgetPanel.setToolTipText(java.text.MessageFormat.format(java.util.ResourceBundle.getBundle("ancestris/modules/editors/genealogyeditor/panels/Bundle").getString("EventEditorPanel.dateWidgetPanel.toolTipText"),
 new Object[] {})); // NOI18N
-        dateWidgetPanel.setOpaque(false);
-        dateWidgetPanel.setLayout(new javax.swing.BoxLayout(dateWidgetPanel, 
javax.swing.BoxLayout.LINE_AXIS));
-
         eventDescriptionTextArea.setColumns(20);
         eventDescriptionTextArea.setRows(5);
         
eventDescriptionTextArea.setToolTipText(java.text.MessageFormat.format(java.util.ResourceBundle.getBundle("ancestris/modules/editors/genealogyeditor/panels/Bundle").getString("EventEditorPanel.eventDescriptionTextArea.toolTipText"),
 new Object[] {})); // NOI18N
@@ -139,39 +131,39 @@
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                 
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(jPanel1Layout.createSequentialGroup()
-                        
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(eventIDTextField, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(eventPlaceTextField))
+                        .addComponent(eventPlaceTextField)
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addComponent(addPlaceButton)
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addComponent(editPlaceButton)
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addComponent(removePlaceButton))
+                    .addComponent(jScrollPane2)
                     .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addComponent(eventTypeComboBox, 
javax.swing.GroupLayout.PREFERRED_SIZE, 164, 
javax.swing.GroupLayout.PREFERRED_SIZE)
+                        
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(eventTypeComboBox, 
javax.swing.GroupLayout.PREFERRED_SIZE, 164, 
javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(eventIDTextField, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addComponent(dateLabel)
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(dateWidgetPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE))
-                    .addComponent(jScrollPane2)))
+                        .addComponent(aDateBean, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE))))
         );
         jPanel1Layout.setVerticalGroup(
             
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             .addGroup(jPanel1Layout.createSequentialGroup()
-                
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(jPanel1Layout.createSequentialGroup()
                         
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                             .addComponent(eventIdLabel)
                             .addComponent(eventIDTextField, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
-                        
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, 
Short.MAX_VALUE)
                         
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                             .addComponent(eventTypeLabel)
                             .addComponent(eventTypeComboBox, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                             .addComponent(dateLabel)))
                     .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addGap(34, 34, 34)
-                        .addComponent(dateWidgetPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE)))
+                        .addGap(0, 0, Short.MAX_VALUE)
+                        .addComponent(aDateBean, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)))
                 
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addComponent(eventDescriptionLabel)
@@ -194,7 +186,7 @@
         );
         sourcesPanelLayout.setVerticalGroup(
             
sourcesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(sourcesListPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
+            .addComponent(sourcesListPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)
         );
 
         
eventInformationTabbedPane.addTab(java.text.MessageFormat.format(java.util.ResourceBundle.getBundle("ancestris/modules/editors/genealogyeditor/panels/Bundle").getString("EventEditorPanel.sourcesPanel.TabConstraints.tabTitle"),
 new Object[] {}), new 
javax.swing.ImageIcon(getClass().getResource("/ancestris/modules/editors/genealogyeditor/resources/Source.png")),
 sourcesPanel); // NOI18N
@@ -207,7 +199,7 @@
         );
         notesPanelLayout.setVerticalGroup(
             
notesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(notesListPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
+            .addComponent(notesListPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)
         );
 
         
eventInformationTabbedPane.addTab(java.text.MessageFormat.format(java.util.ResourceBundle.getBundle("ancestris/modules/editors/genealogyeditor/panels/Bundle").getString("EventEditorPanel.notesPanel.TabConstraints.tabTitle"),
 new Object[] {}), new 
javax.swing.ImageIcon(getClass().getResource("/ancestris/modules/editors/genealogyeditor/resources/Note.png")),
 notesPanel); // NOI18N
@@ -220,7 +212,7 @@
         );
         galleryPanelLayout.setVerticalGroup(
             
galleryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(multimediaObjectsListPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
+            .addComponent(multimediaObjectsListPanel, 
javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)
         );
 
         
eventInformationTabbedPane.addTab(java.text.MessageFormat.format(java.util.ResourceBundle.getBundle("ancestris/modules/editors/genealogyeditor/panels/Bundle").getString("EventEditorPanel.galleryPanel.TabConstraints.tabTitle"),
 new Object[] {}), new 
javax.swing.ImageIcon(getClass().getResource("/ancestris/modules/editors/genealogyeditor/resources/Media.png")),
 galleryPanel); // NOI18N
@@ -300,9 +292,9 @@
         }
     }//GEN-LAST:event_removePlaceButtonActionPerformed
     // Variables declaration - do not modify//GEN-BEGIN:variables
+    private ancestris.modules.beans.ADateBean aDateBean;
     private javax.swing.JButton addPlaceButton;
     private javax.swing.JLabel dateLabel;
-    private javax.swing.JPanel dateWidgetPanel;
     private javax.swing.JButton editPlaceButton;
     private javax.swing.JLabel eventDescriptionLabel;
     private javax.swing.JTextArea eventDescriptionTextArea;
@@ -358,7 +350,7 @@
 
         PropertyDate date = (PropertyDate) event.getProperty("DATE");
         if (date != null) {
-            ((DateBean) dateWidgetPanel).setContext(date, date.getPath());
+            aDateBean.setContext(date);
         }
 
         List<Source> sourcesList = new ArrayList<Source>();

Modified: 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventsListPanel.java
==============================================================================
--- 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventsListPanel.java
 (original)
+++ 
trunk/AncestrisExtensions/editors.genealogyeditor/src/ancestris/modules/editors/genealogyeditor/panels/EventsListPanel.java
 Sun Nov 24 15:18:10 2013
@@ -2,7 +2,9 @@
 
 import ancestris.modules.editors.genealogyeditor.models.EventsTableModel;
 import ancestris.util.swing.DialogManager.ADialog;
-import genj.gedcom.*;
+import genj.gedcom.GedcomException;
+import genj.gedcom.Property;
+import genj.gedcom.PropertyEvent;
 import java.util.ArrayList;
 import java.util.List;
 import org.openide.DialogDescriptor;

---------------------------------------------------------------------
Site Web Ancestris : http://www.ancestris.org

<*> Pour vous desinscrire de cette liste, envoyez un mail a :
              [email protected]
<*> Pour obtenir de l'aide sur les commandes de la liste :
              [email protected]

Pour obtenir tous les messages lies a ce fil de discussion, cliquez sur le 
lien ci-dessous, cela ouvrira votre logiciel de messagerie. Il vous suffira 
d'envoyer le message :
              [email protected]

Reply via email to