Author: lemovice
Date: Thu Oct 10 22:03:49 2013
New Revision: 4609

Log:
update according module dependency modification

Modified:
   
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/FindPlacePanel.java
   
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/GedcomPlaceListModel.java
   
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/ReferencesTableModel.java
   
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.form
   
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.java
   
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesTablePanel.java

Modified: 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/FindPlacePanel.java
==============================================================================
--- 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/FindPlacePanel.java
 (original)
+++ 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/FindPlacePanel.java
 Thu Oct 10 22:03:49 2013
@@ -1,20 +1,14 @@
 package ancestris.modules.editors.placeeditor;
 
-import 
ancestris.modules.editors.placeeditor.models.GeonamePostalCodeTableModel;
 import ancestris.api.place.Place;
+import 
ancestris.modules.editors.placeeditor.models.GeonamePostalCodeTableModel;
 import ancestris.place.geonames.GeonamesPlacesList;
+import genj.gedcom.PropertyPlace;
 import java.awt.BorderLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.util.List;
-import javax.swing.GroupLayout;
-import javax.swing.JButton;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JTextField;
-import javax.swing.LayoutStyle;
+import javax.swing.*;
 import org.openide.awt.Mnemonics;
 import org.openide.util.NbBundle;
 
@@ -112,7 +106,7 @@
     }// </editor-fold>//GEN-END:initComponents
 
     private void searchPlaceButtonActionPerformed(ActionEvent evt) 
{//GEN-FIRST:event_searchPlaceButtonActionPerformed
-        List<Place> findPlaces = new 
GeonamesPlacesList().findPlace(placeTextField.getText());
+        List<Place> findPlaces = new GeonamesPlacesList().findPlace(new 
PropertyPlace(placeTextField.getText()));
         if (findPlaces != null) {
             placeTableModel.update(findPlaces);
         }

Modified: 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/GedcomPlaceListModel.java
==============================================================================
--- 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/GedcomPlaceListModel.java
    (original)
+++ 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/GedcomPlaceListModel.java
    Thu Oct 10 22:03:49 2013
@@ -4,11 +4,7 @@
 import genj.gedcom.Gedcom;
 import genj.gedcom.Property;
 import genj.gedcom.PropertyPlace;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import javax.swing.AbstractListModel;
 
 /**

Modified: 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/ReferencesTableModel.java
==============================================================================
--- 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/ReferencesTableModel.java
    (original)
+++ 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/models/ReferencesTableModel.java
    Thu Oct 10 22:03:49 2013
@@ -1,7 +1,10 @@
 package ancestris.modules.editors.placeeditor.models;
 
 import ancestris.modules.gedcom.utilities.EntityTag2Name;
+import ancestris.modules.gedcom.utilities.PropertyTag2Name;
 import genj.gedcom.Entity;
+import genj.gedcom.Property;
+import genj.gedcom.PropertyPlace;
 import java.util.ArrayList;
 import javax.swing.table.AbstractTableModel;
 
@@ -13,11 +16,12 @@
 
     String[] referencesTablecolumnNames = {"Id",
         "type",
+        "event",
         "description"};
-    protected ArrayList<Entity> referencesTableValues;
-            
+    protected ArrayList<PropertyPlace> referencesTableValues;
+
     public ReferencesTableModel() {
-        referencesTableValues = new ArrayList<Entity>();
+        referencesTableValues = new ArrayList<PropertyPlace>();
     }
 
     @Override
@@ -32,11 +36,16 @@
 
     @Override
     public Object getValueAt(int row, int column) {
-        Entity entity = referencesTableValues.get(row);
+        PropertyPlace place = referencesTableValues.get(row);
+        Entity entity = place.getEntity();
+        Property parent = place.getParent();
+
         if (column == 0) {
             return entity.getId();
         } else if (column == 1) {
             return EntityTag2Name.getTagName(entity.getTag());
+        } else if (column == 2) {
+            return PropertyTag2Name.getTagName(parent.getTag());
         } else {
             return entity.toString(false);
         }
@@ -46,8 +55,8 @@
     public String getColumnName(int column) {
         return referencesTablecolumnNames[column];
     }
-    
-    public void addRow(Entity entity) {
-        referencesTableValues.add(entity);
+
+    public void addRow(PropertyPlace place) {
+        referencesTableValues.add(place);
     }
 }

Modified: 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.form
==============================================================================
--- 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.form
       (original)
+++ 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.form
       Thu Oct 10 22:03:49 2013
@@ -29,11 +29,11 @@
     <DimensionLayout dim="1">
       <Group type="103" groupAlignment="0" attributes="0">
           <Group type="102" alignment="0" attributes="0">
-              <EmptySpace max="-2" attributes="0"/>
+              <EmptySpace min="-2" max="-2" attributes="0"/>
               <Component id="jPanel1" min="-2" max="-2" attributes="0"/>
-              <EmptySpace max="-2" attributes="0"/>
-              <Component id="jTabbedPane1" min="-2" max="-2" attributes="0"/>
-              <EmptySpace max="32767" attributes="0"/>
+              <EmptySpace min="-2" max="-2" attributes="0"/>
+              <Component id="jTabbedPane1" max="32767" attributes="0"/>
+              <EmptySpace min="-2" max="-2" attributes="0"/>
           </Group>
       </Group>
     </DimensionLayout>

Modified: 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.java
==============================================================================
--- 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.java
       (original)
+++ 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesEditorPanel.java
       Thu Oct 10 22:03:49 2013
@@ -32,7 +32,7 @@
         String[] jurisdictions = ((PropertyPlace) 
propertyPlaceArray[0]).getJurisdictions();
         if (jurisdictions.length > 1) {
             if (jurisdictions[1].isEmpty() == false) {
-                List<Place> findPlaces = new 
GeonamesPlacesList().findPlace(jurisdictions[1]);
+                List<Place> findPlaces = new 
GeonamesPlacesList().findPlace((PropertyPlace)propertyPlaceArray[0]);
 
                 if (findPlaces != null) {
                     for (Place place : findPlaces) {
@@ -43,7 +43,7 @@
         }
 
         for (PropertyPlace propertyPlace : propertyPlaces) {
-            referencesTableModel.addRow(propertyPlace.getEntity());
+            referencesTableModel.addRow(propertyPlace);
         }
 
         initComponents();
@@ -408,8 +408,8 @@
                 .addContainerGap()
                 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                 
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jTabbedPane1, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE))
+                .addComponent(jTabbedPane1)
+                .addContainerGap())
         );
     }// </editor-fold>//GEN-END:initComponents
 

Modified: 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesTablePanel.java
==============================================================================
--- 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesTablePanel.java
        (original)
+++ 
trunk/AncestrisExtensions/placeeditor/src/ancestris/modules/editors/placeeditor/panels/PlacesTablePanel.java
        Thu Oct 10 22:03:49 2013
@@ -125,7 +125,7 @@
     private void searchPlace() {
         String city = jTextField2.getText();
         if (city.length() > 0) {
-            List<Place> findPlaces = new GeonamesPlacesList().findPlace(city);
+            List<Place> findPlaces = new GeonamesPlacesList().findPlace(new 
PropertyPlace(city));
             if (findPlaces != null) {
                 geonamePostalCodeListModel.update(findPlaces);
             }

---------------------------------------------------------------------
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