imports leaned
authorEneko Pinzolas Murua <kelossus@localhost.localdomain>
Tue, 14 Apr 2015 15:07:35 +0000 (17:07 +0200)
committerEneko Pinzolas Murua <kelossus@localhost.localdomain>
Tue, 14 Apr 2015 15:07:35 +0000 (17:07 +0200)
34 files changed:
ruralHouses/src/businessLogic/AdminManager.java
ruralHouses/src/businessLogic/HouseManager.java
ruralHouses/src/businessLogic/HouseManagerInterface.java
ruralHouses/src/businessLogic/LoginManagerInterface.java
ruralHouses/src/businessLogic/OfferManager.java
ruralHouses/src/businessLogic/OwnerManager.java
ruralHouses/src/businessLogic/OwnerManagerInterface.java
ruralHouses/src/businessLogic/__ApplicationFacadeInterface.java
ruralHouses/src/businessLogic/__FacadeImplementation.java
ruralHouses/src/configuration/Config.java [deleted file]
ruralHouses/src/dataAccess/DB4oManager.java
ruralHouses/src/dataAccess/DB4oManagerServer.java
ruralHouses/src/domain/Booking.java
ruralHouses/src/domain/Offer.java
ruralHouses/src/gui/AddOffersGUI.java
ruralHouses/src/gui/AdminMenuGUI.java
ruralHouses/src/gui/BookRuralHouseConfirmationWindow.java
ruralHouses/src/gui/CreateOfferGUI.java
ruralHouses/src/gui/DeleteOfferGUI.java
ruralHouses/src/gui/HouseFeaturesGUI.java
ruralHouses/src/gui/HousesRelatedOwnerGUI.java
ruralHouses/src/gui/LoginGUI.java
ruralHouses/src/gui/ModifyHouseGUI.java
ruralHouses/src/gui/ModifyOfferGUI.java
ruralHouses/src/gui/OffersRelatedOwnerGUI.java
ruralHouses/src/gui/OwnerMenuGUI.java
ruralHouses/src/gui/QueryAvailabilityGUI2.java
ruralHouses/src/gui/RequestDeleteHouseGUI.java
ruralHouses/src/gui/RequestNewHouseGUI.java
ruralHouses/src/gui/StartWindow.java
ruralHouses/src/gui/TableRowRenderingTip.java [deleted file]
ruralHouses/src/gui/listOfAdditionRequestsGUI.java
ruralHouses/src/gui/listOfHousesGUI.java
ruralHouses/src/gui/listOfRemovalRequestsGUI.java

index 7c827ae..d32eafa 100644 (file)
@@ -2,8 +2,8 @@ package businessLogic;
 
 import java.util.Vector;
 
-import domain.RuralHouse;
 import domain.Administrator;
+import domain.RuralHouse;
 
 public class AdminManager {
        public AdminManager (){
index c87db68..02574fc 100644 (file)
@@ -1,13 +1,10 @@
 package businessLogic;
 
 import java.rmi.RemoteException;
-import java.util.Date;
 import java.util.Vector;
 
 import dataAccess.DB4oManager;
-import domain.Account;
 import domain.HouseFeatures;
-import domain.Offer;
 import domain.Owner;
 import domain.RuralHouse;
 
index 4a0ba9a..e921da5 100644 (file)
@@ -1,10 +1,8 @@
 package businessLogic;
 
 import java.rmi.RemoteException;
-import java.util.Date;
 import java.util.Vector;
 
-import domain.Offer;
 import domain.Owner;
 import domain.RuralHouse;
 
index 57b070a..b3362e0 100644 (file)
@@ -1,6 +1,6 @@
 package businessLogic;
 
-import domain.*;
+import domain.Owner;
 
 public interface LoginManagerInterface {
        
index c286a40..8286b54 100644 (file)
@@ -7,11 +7,9 @@ import com.db4o.ObjectContainer;
 import com.db4o.ObjectSet;
 
 import dataAccess.DB4oManager;
-import domain.Booking;
 import domain.Offer;
 import domain.RuralHouse;
 import exceptions.BadDates;
-import exceptions.OfferCanNotBeBooked;
 import exceptions.OverlappingOfferExists;
 
 public final class OfferManager {
index e48679b..7f3cef0 100644 (file)
@@ -1,15 +1,10 @@
 package businessLogic;
 
 import java.rmi.RemoteException;
-import java.util.Date;
 import java.util.Vector;
 
 import dataAccess.DB4oManager;
-import domain.Account;
-import domain.HouseFeatures;
-import domain.Offer;
 import domain.Owner;
-import domain.RuralHouse;
 
 public class OwnerManager implements OwnerManagerInterface {
        DB4oManager dbMngr;
index ab45739..1fe92a9 100644 (file)
@@ -1,12 +1,9 @@
 package businessLogic;
 
 import java.rmi.RemoteException;
-import java.util.Date;
 import java.util.Vector;
 
-import domain.Offer;
 import domain.Owner;
-import domain.RuralHouse;
 
 public interface OwnerManagerInterface {
 
index 341d190..edea314 100644 (file)
@@ -1,16 +1,15 @@
 package businessLogic;
 
-import java.rmi.*;
-import java.util.Vector;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
 import java.sql.Date;
+import java.util.Vector;
 
 import domain.Booking;
 import domain.Offer;
 import domain.Owner;
 import domain.RuralHouse;
-
-
-import exceptions.OfferCanNotBeBooked; 
+import exceptions.OfferCanNotBeBooked;
 
 
 public interface __ApplicationFacadeInterface extends Remote {
index 9cbf791..9f377d7 100644 (file)
@@ -6,10 +6,6 @@ import java.sql.Date;
 import java.sql.SQLException;
 import java.util.Vector;
 
-import com.db4o.ObjectContainer;
-import com.db4o.ObjectSet;
-
-import configuration.ConfigXML;
 import dataAccess.DB4oManager;
 import domain.Booking;
 import domain.Offer;
diff --git a/ruralHouses/src/configuration/Config.java b/ruralHouses/src/configuration/Config.java
deleted file mode 100644 (file)
index 0ddca0f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-package configuration;
-
-public class Config {
-
-       private final String serverRMI = "localhost";
-
-       private final String portRMI = "1099";
-
-       private final String serviceRMI = "RuralHouses";
-       
-       private final String javaPolicyPath="java.policy";
-       
-       private final  String db4oFilename = "db/DBjcampos004.yap";
-
-       //Two possible values: "open" or "initialize"
-       private final String dataBaseOpenMode="initialize";
-
-       private static Config theInstance = new Config();
-   
-       private Config(){}
-    
-       public static Config getInstance() { 
-               return theInstance; 
-       }
-
-       public String getServerRMI() {
-               return serverRMI; 
-       }
-
-       public String getPortRMI() { 
-               return portRMI; 
-       }
-
-       public String getServiceRMI() {
-               return serviceRMI;
-       }
-
-       public String getDb4oFilename() {
-               return db4oFilename; 
-       }
-
-       public String getJavaPolicyPath() {
-               return javaPolicyPath;
-       }
-
-       public String getDataBaseOpenMode(){
-               return dataBaseOpenMode;
-       }
-
-}
index 8078e78..6e24ece 100644 (file)
@@ -3,14 +3,14 @@ package dataAccess;
 import java.io.File;
 //import java.util.Enumeration;
 //import java.util.Vector;
-
 import java.rmi.RemoteException;
 import java.util.Date;
-import java.util.HashSet;
 import java.util.ListIterator;
 import java.util.Vector;
 
-import com.db4o.*;
+import com.db4o.Db4oEmbedded;
+import com.db4o.ObjectContainer;
+import com.db4o.ObjectSet;
 import com.db4o.config.EmbeddedConfiguration;
 import com.db4o.cs.Db4oClientServer;
 import com.db4o.cs.config.ClientConfiguration;
@@ -189,7 +189,6 @@ public class DB4oManager {
                return o;
        }
 
-       @SuppressWarnings("finally")
        public Offer modifyOffer(Offer offer) throws RemoteException, Exception {
                if (c.isDatabaseLocal() == false)
                        openSDB();
@@ -210,7 +209,6 @@ public class DB4oManager {
                return offer;
        }
 
-       @SuppressWarnings("finally")
        public void deleteOffer(RuralHouse rh, Offer offer) throws RemoteException,
                        Exception {
                if (c.isDatabaseLocal() == false)
index 06ca88a..b329e95 100644 (file)
@@ -2,32 +2,23 @@ package dataAccess;
 
 import java.awt.BorderLayout;
 import java.awt.FlowLayout;
-import java.io.BufferedReader;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 import java.io.File;
-import java.io.InputStreamReader;
-import java.rmi.Naming;
-import java.rmi.RMISecurityManager;
-import java.rmi.RemoteException;
 
 import javax.swing.JButton;
 import javax.swing.JDialog;
 import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
-
-import configuration.ConfigXML;
-
 import javax.swing.JTextArea;
+import javax.swing.border.EmptyBorder;
 
 import com.db4o.ObjectServer;
 import com.db4o.cs.Db4oClientServer;
 import com.db4o.cs.config.ServerConfiguration;
 
-import domain.Offer;
+import configuration.ConfigXML;
 import domain.Owner;
 
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-
 public class DB4oManagerServer extends JDialog {
 
        private final JPanel contentPanel = new JPanel();
index 20d110e..0ce0ddc 100644 (file)
@@ -1,10 +1,8 @@
 package domain;
 
-import java.io.*;
+import java.io.Serializable;
 import java.util.Date;
 
-import businessLogic.BookingManager;
-
 @SuppressWarnings("serial")
 public class Booking implements Serializable {
        private int bookingNumber;
index 7a6d7de..8e4e785 100644 (file)
@@ -1,7 +1,7 @@
 package domain;
 
-import java.io.*;
-import java.util.Date; 
+import java.io.Serializable;
+import java.util.Date;
 
 
 @SuppressWarnings("serial")
index da71714..e93e775 100644 (file)
@@ -1,24 +1,33 @@
 package gui;
-import java.beans.*;
-import java.rmi.RMISecurityManager;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 import java.sql.Date;
 import java.text.DateFormat;
-import java.util.*;
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.Vector;
 
-import javax.swing.*;
-
-import java.awt.*;
-import java.awt.event.*;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
 
 import businessLogic.OfferManager;
 
 import com.toedter.calendar.JCalendar;
 
-import configuration.ConfigXML;
 import domain.Offer;
 import domain.RuralHouse;
-import exceptions.OverlappingOfferExists;
 import exceptions.BadDates;
+import exceptions.OverlappingOfferExists;
 
 
 
index f8d9d85..5408e60 100644 (file)
@@ -1,16 +1,15 @@
 package gui;
 
 import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
 import javax.swing.JButton;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
 
 public class AdminMenuGUI extends JFrame {
 
index 70dd714..a268b46 100644 (file)
@@ -1,18 +1,17 @@
 package gui;
 
-import javax.swing.JFrame;
 import java.awt.Dimension;
-import javax.swing.JLabel;
 import java.awt.Rectangle;
-import javax.swing.JTextField;
-import javax.swing.JButton;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
 
 import domain.Booking;
 
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-
 public class BookRuralHouseConfirmationWindow extends JFrame {
  private static final long serialVersionUID = 1L;
        
@@ -80,10 +79,10 @@ public class BookRuralHouseConfirmationWindow extends JFrame {
     jTextField3.setBounds(new Rectangle(180, 140, 115, 25));
     jTextField3.setEditable(false);
 
-    jTextField3.setText(Float.toString(book.getPrice()) + " \80");
+    jTextField3.setText(Float.toString(book.getPrice()) + " ");
     jTextField4.setBounds(new Rectangle(180, 175, 115, 25));
     jTextField4.setEditable(false);
-    jTextField4.setText(Float.toString(book.getPrice()*(float)0.2) + " \80");
+    jTextField4.setText(Float.toString(book.getPrice()*(float)0.2) + " ");
     this.getContentPane().add(jTextField4, null);
     this.getContentPane().add(jTextField3, null);
     this.getContentPane().add(jLabel5, null);
index a6f07d9..621a840 100644 (file)
@@ -1,15 +1,25 @@
 package gui;
 
-import java.beans.*;
-
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 import java.sql.Date;
 import java.text.DateFormat;
-import java.util.*;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.*;
-
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.Vector;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
 
 import businessLogic.OfferManager;
 
index d58ab58..faa4f81 100644 (file)
@@ -1,33 +1,26 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
-import java.rmi.RemoteException;
 import java.util.Vector;
 
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
+import javax.swing.JButton;
 import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
 import javax.swing.JRadioButton;
-import javax.swing.JButton;
+import javax.swing.border.EmptyBorder;
 
-import businessLogic.HouseManager;
-import businessLogic.HouseManagerInterface;
 import businessLogic.OfferManager;
 import domain.Offer;
 import domain.Owner;
 import domain.RuralHouse;
 
-import javax.swing.JLabel;
-import javax.swing.LayoutStyle.ComponentPlacement;
-
 public class DeleteOfferGUI extends JFrame {
 
        /**
index ecc44ab..ba912b1 100644 (file)
@@ -26,7 +26,6 @@ import businessLogic.BookingManager;
 import domain.Booking;
 import domain.Offer;
 import domain.RuralHouse;
-import exceptions.OfferCanNotBeBooked;
 
 public class HouseFeaturesGUI extends JFrame {
 
@@ -244,11 +243,12 @@ public class HouseFeaturesGUI extends JFrame {
                //RegExp to see if telephone number is correct??TODO
                Booking book = null;
                try {
-                       book = bookingM.createBooking(rh, rh.offers.get(row).getFirstDay(), rh.offers.get(row).getLastDay(), telIn.getText());
-               } catch (OfferCanNotBeBooked e) {
+                       if (table.getRowCount()!=0)
+                               book = bookingM.createBooking(rh, rh.offers.get(row).getFirstDay(), rh.offers.get(row).getLastDay(), telIn.getText());
+               } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
-               }
+               } 
                if (book != null) {
                        BookRuralHouseConfirmationWindow confirmWindow = new BookRuralHouseConfirmationWindow(
                                        book);
index c0f9ec9..95a654d 100644 (file)
@@ -1,25 +1,17 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
 import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JButton;
 import javax.swing.JFrame;
 import javax.swing.JPanel;
 import javax.swing.border.EmptyBorder;
-import javax.swing.JButton;
-import javax.swing.GroupLayout;
-import javax.swing.GroupLayout.Alignment;
 
 import domain.Owner;
-import domain.RuralHouse;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import java.util.Vector;
-import javax.swing.JLabel;
-import java.awt.Color;
-import java.awt.Font;
 
 public class HousesRelatedOwnerGUI extends JFrame {
 
index caeb1cd..7e8ec11 100644 (file)
@@ -1,18 +1,21 @@
 package gui;
 
-import javax.swing.*;
-
+import java.awt.Color;
 import java.awt.Frame;
-import java.awt.Rectangle;
-import java.util.Vector;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 
-import businessLogic.*;
-import domain.Owner;
-import domain.RuralHouse;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JPasswordField;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
 
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import java.awt.Color;
+import businessLogic.LoginManager;
+import businessLogic.LoginManagerInterface;
+import domain.Owner;
 
 public class LoginGUI extends JFrame {
 
index 497829e..34f94c2 100644 (file)
@@ -1,31 +1,25 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
 
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
-
-import domain.HouseFeatures;
-import domain.Owner;
-import domain.RuralHouse;
-
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
 import javax.swing.JLabel;
+import javax.swing.JPanel;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle.ComponentPlacement;
 import javax.swing.SwingConstants;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
+import javax.swing.border.EmptyBorder;
 
 import businessLogic.HouseManager;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
+import domain.Owner;
+import domain.RuralHouse;
 
 public class ModifyHouseGUI extends JFrame {
 
index aa674dc..b5fc2af 100644 (file)
@@ -1,14 +1,27 @@
 package gui;
 
-import java.beans.*;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 import java.sql.Date;
 import java.text.DateFormat;
-import java.util.*;
-
-import javax.swing.*;
-
-import java.awt.*;
-import java.awt.event.*;
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.Vector;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
 
 import businessLogic.OfferManager;
 
index 04252d4..bbe48be 100644 (file)
@@ -1,25 +1,17 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
 import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JButton;
 import javax.swing.JFrame;
 import javax.swing.JPanel;
 import javax.swing.border.EmptyBorder;
-import javax.swing.JButton;
-import javax.swing.GroupLayout;
-import javax.swing.GroupLayout.Alignment;
 
 import domain.Owner;
-import domain.RuralHouse;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import java.util.Vector;
-import javax.swing.JLabel;
-import java.awt.Color;
-import java.awt.Font;
 
 public class OffersRelatedOwnerGUI extends JFrame {
 
index 980916d..59f7542 100644 (file)
@@ -1,22 +1,17 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
 import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
 import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
 
 import domain.Owner;
-import domain.RuralHouse;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import java.util.Vector;
 
 public class OwnerMenuGUI extends JFrame {
 
index cdb3282..fef5d2a 100644 (file)
@@ -1,25 +1,43 @@
 package gui;
 
-import java.beans.*;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 import java.sql.Date;
 import java.text.DateFormat;
-import java.util.*;
-
-import javax.swing.*;
-
-import java.awt.*;
-import java.awt.event.*;
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.Vector;
+
+import javax.swing.ButtonGroup;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
 
 import businessLogic.HouseManager;
-import businessLogic.OfferManager;
 
 import com.toedter.calendar.JCalendar;
 
 import domain.Districs;
-import domain.Offer;
 import domain.RuralHouse;
-import exceptions.OverlappingOfferExists;
-import exceptions.BadDates;
 
 public class QueryAvailabilityGUI2 extends JFrame {
        private static final long serialVersionUID = 1L;
index 539c9e4..ce4fe96 100644 (file)
@@ -1,25 +1,20 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
-import java.util.Vector;
 
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
+import javax.swing.JButton;
 import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
 import javax.swing.JRadioButton;
-import javax.swing.JButton;
+import javax.swing.border.EmptyBorder;
 
 import businessLogic.AdminManager;
-import businessLogic.HouseManager;
-import businessLogic.HouseManagerInterface;
 import domain.Owner;
 import domain.RuralHouse;
 
index 39725c6..d0cf337 100644 (file)
@@ -1,33 +1,24 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
 import javax.swing.GroupLayout;
 import javax.swing.GroupLayout.Alignment;
-
-import domain.HouseFeatures;
-import domain.Owner;
-import domain.RuralHouse;
-
+import javax.swing.JButton;
+import javax.swing.JFrame;
 import javax.swing.JLabel;
+import javax.swing.JPanel;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle.ComponentPlacement;
 import javax.swing.SwingConstants;
-import javax.swing.JButton;
-
-import java.awt.Color;
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-
-import javax.swing.JTextPane;
+import javax.swing.border.EmptyBorder;
 
 import businessLogic.AdminManager;
-import businessLogic.HouseManager;
-import businessLogic.HouseManagerInterface;
+import domain.HouseFeatures;
+import domain.Owner;
+import domain.RuralHouse;
 
 public class RequestNewHouseGUI extends JFrame {
 
index e115587..288b011 100644 (file)
@@ -3,23 +3,20 @@ package gui;
 /**
  * @author willCodeForFood
  */
-import exceptions.DB4oManagerCreationException;
-
-import javax.swing.*;
-
-import configuration.ConfigXML;
-import java.rmi.*;
 import java.awt.Color;
 import java.awt.Font;
-import java.awt.Rectangle;
-import java.awt.Dimension;
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-import java.awt.GridLayout;
-import java.awt.GridBagLayout;
-import java.awt.GridBagConstraints;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
+import java.rmi.RMISecurityManager;
+
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.SwingConstants;
+import javax.swing.UIManager;
+
+import configuration.ConfigXML;
 
 
 public class StartWindow extends JFrame {
diff --git a/ruralHouses/src/gui/TableRowRenderingTip.java b/ruralHouses/src/gui/TableRowRenderingTip.java
deleted file mode 100644 (file)
index 860db19..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-package gui;
-
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.table.*;
-import javax.swing.border.*;
-
-public class TableRowRenderingTip extends JPanel
-{
-       public TableRowRenderingTip()
-       {
-               Object[] columnNames = {"Type", "Company", "Shares", "Price", "Boolean"};
-               Object[][] data =
-               {
-                       {"Buy", "IBM", new Integer(1000), new Double(80.5), Boolean.TRUE},
-                       {"Sell", "Dell", new Integer(2000), new Double(6.25), Boolean.FALSE},
-                       {"Short Sell", "Apple", new Integer(3000), new Double(7.35), Boolean.TRUE},
-                       {"Buy", "MicroSoft", new Integer(4000), new Double(27.50), Boolean.FALSE},
-                       {"Short Sell", "Cisco", new Integer(5000), new Double(20), Boolean.TRUE}
-               };
-
-               DefaultTableModel model = new DefaultTableModel(data, columnNames)
-               {
-                       public Class getColumnClass(int column)
-                       {
-                               return getValueAt(0, column).getClass();
-                       }
-               };
-
-               JTabbedPane tabbedPane = new JTabbedPane();
-               tabbedPane.addTab("Alternating", createAlternating(model));
-               tabbedPane.addTab("Border", createBorder(model));
-               tabbedPane.addTab("Data", createData(model));
-               add( tabbedPane );
-       }
-
-       private JComponent createAlternating(DefaultTableModel model)
-       {
-               JTable table = new JTable( model )
-               {
-                       public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
-                       {
-                               Component c = super.prepareRenderer(renderer, row, column);
-
-                               //  Alternate row color
-
-                               if (!isRowSelected(row))
-                                       c.setBackground(row % 2 == 0 ? getBackground() : Color.LIGHT_GRAY);
-
-                               return c;
-                       }
-               };
-
-               table.setPreferredScrollableViewportSize(table.getPreferredSize());
-               table.changeSelection(0, 0, false, false);
-               return new JScrollPane( table );
-       }
-
-       private JComponent createBorder(DefaultTableModel model)
-       {
-
-               JTable table = new JTable( model )
-               {
-                       private Border outside = new MatteBorder(1, 0, 1, 0, Color.RED);
-                       private Border inside = new EmptyBorder(0, 1, 0, 1);
-                       private Border highlight = new CompoundBorder(outside, inside);
-
-                       public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
-                       {
-                               Component c = super.prepareRenderer(renderer, row, column);
-                               JComponent jc = (JComponent)c;
-
-                               // Add a border to the selected row
-
-                               if (isRowSelected(row))
-                                       jc.setBorder( highlight );
-
-                               return c;
-                       }
-               };
-
-               table.setPreferredScrollableViewportSize(table.getPreferredSize());
-               table.changeSelection(0, 0, false, false);
-               return new JScrollPane( table );
-       }
-
-       private JComponent createData(DefaultTableModel model)
-       {
-               JTable table = new JTable( model )
-               {
-                       public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
-                       {
-                               Component c = super.prepareRenderer(renderer, row, column);
-
-                               //  Color row based on a cell value
-
-                               if (!isRowSelected(row))
-                               {
-                                       c.setBackground(getBackground());
-                                       int modelRow = convertRowIndexToModel(row);
-                                       String type = (String)getModel().getValueAt(modelRow, 0);
-                                       if ("Buy".equals(type)) c.setBackground(Color.GREEN);
-                                       if ("Sell".equals(type)) c.setBackground(Color.YELLOW);
-                               }
-
-                               return c;
-                       }
-               };
-
-               table.setPreferredScrollableViewportSize(table.getPreferredSize());
-               table.changeSelection(0, 0, false, false);
-        table.setAutoCreateRowSorter(true);
-               return new JScrollPane( table );
-       }
-
-       public static void main(String[] args)
-       {
-               SwingUtilities.invokeLater(new Runnable() {
-                       public void run() {
-                               createAndShowGUI();
-                       }
-               });
-       }
-
-       public static void createAndShowGUI()
-       {
-               JFrame.setDefaultLookAndFeelDecorated(true);
-               JFrame frame = new JFrame("Table Row Rendering");
-               frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-               frame.add( new TableRowRenderingTip() );
-               frame.pack();
-               frame.setLocationRelativeTo(null);
-               frame.setVisible(true);
-       }
-}
index 4ab671f..f1c19cf 100644 (file)
@@ -1,42 +1,25 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
-
-import domain.*;
-
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
-import javax.swing.JLabel;
-
 import java.awt.Font;
-
-import javax.swing.JTextField;
-import javax.swing.JScrollPane;
-
 import java.awt.Rectangle;
-
-import javax.swing.JTable;
-import javax.swing.table.DefaultTableModel;
-
-import java.awt.Component;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.sql.Date;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 import java.util.Enumeration;
-import java.util.LinkedList;
 import java.util.Vector;
 
-import javax.swing.Box;
 import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.border.EmptyBorder;
+import javax.swing.table.DefaultTableModel;
 
 import businessLogic.AdminManager;
 import businessLogic.HouseManager;
 import businessLogic.HouseManagerInterface;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
+import domain.RuralHouse;
 
 public class listOfAdditionRequestsGUI extends JFrame {
 
index b8db0df..171dbbd 100644 (file)
@@ -1,34 +1,21 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
-
-import domain.*;
-
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
-import javax.swing.JLabel;
-
 import java.awt.Font;
-
-import javax.swing.JTextField;
-import javax.swing.JScrollPane;
-
 import java.awt.Rectangle;
-
-import javax.swing.JTable;
-import javax.swing.table.DefaultTableModel;
-
-import java.awt.Component;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
-import java.sql.Date;
 import java.util.Enumeration;
-import java.util.LinkedList;
 import java.util.Vector;
 
-import javax.swing.Box;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.border.EmptyBorder;
+import javax.swing.table.DefaultTableModel;
+
+import domain.RuralHouse;
 
 public class listOfHousesGUI extends JFrame {
 
index fbde5a4..acad7bf 100644 (file)
@@ -1,41 +1,25 @@
 package gui;
 
-import java.awt.BorderLayout;
-import java.awt.EventQueue;
-
-import domain.*;
-
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
-import javax.swing.JLabel;
-
 import java.awt.Font;
-
-import javax.swing.JTextField;
-import javax.swing.JScrollPane;
-
 import java.awt.Rectangle;
-
-import javax.swing.JTable;
-import javax.swing.table.DefaultTableModel;
-
-import java.awt.Component;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.sql.Date;
 import java.util.Enumeration;
-import java.util.LinkedList;
 import java.util.Vector;
 
-import javax.swing.Box;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.border.EmptyBorder;
+import javax.swing.table.DefaultTableModel;
 
 import businessLogic.AdminManager;
 import businessLogic.HouseManager;
 import businessLogic.HouseManagerInterface;
+import domain.RuralHouse;
 
 public class listOfRemovalRequestsGUI extends JFrame {