[jsword-svn] biblemapper/java/main/org/crosswire/biblemapper/swing s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun Nov 28 14:34:32 MST 2004


Update of /cvs/jsword/biblemapper/java/main/org/crosswire/biblemapper/swing
In directory www.crosswire.org:/tmp/cvs-serv11007/java/main/org/crosswire/biblemapper/swing

Modified Files:
	Mapper.java RulesPane.java MapperPane.java RuleSlider.java 
	MapTableModel.java 
Log Message:
intellij refactor - not critical

Index: Mapper.java
===================================================================
RCS file: /cvs/jsword/biblemapper/java/main/org/crosswire/biblemapper/swing/Mapper.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Mapper.java	25 Jun 2004 15:01:45 -0000	1.3
--- Mapper.java	28 Nov 2004 21:34:30 -0000	1.4
***************
*** 88,92 ****
  public class Mapper extends JFrame
  {
!     /**
      * Central start point.
      * @param args The command line arguments
--- 88,92 ----
  public class Mapper extends JFrame
  {
! 	/**
      * Central start point.
      * @param args The command line arguments
***************
*** 1126,1129 ****
--- 1126,1134 ----
  
      /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 4120849979792371762L;
+ 
+     /**
       * A Layout Thread Runnable
       */

Index: RulesPane.java
===================================================================
RCS file: /cvs/jsword/biblemapper/java/main/org/crosswire/biblemapper/swing/RulesPane.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RulesPane.java	20 Apr 2004 21:10:38 -0000	1.1
--- RulesPane.java	28 Nov 2004 21:34:30 -0000	1.2
***************
*** 1,3 ****
- 
  package org.crosswire.biblemapper.swing;
  
--- 1,2 ----
***************
*** 36,51 ****
  public class RulesPane extends JPanel
  {
!     /**
       * Basic Constructor
       */
      public RulesPane(Rule[] rules)
      {
!         add(pnl_main);
  
!         pnl_main.setLayout(new BoxLayout(pnl_main, BoxLayout.Y_AXIS));
  
          for (int i=0; i<rules.length; i++)
          {
!             pnl_main.add(new RuleSlider(rules[i]));
          }
      }
--- 35,50 ----
  public class RulesPane extends JPanel
  {
! 	/**
       * Basic Constructor
       */
      public RulesPane(Rule[] rules)
      {
!         add(pnlMain);
  
!         pnlMain.setLayout(new BoxLayout(pnlMain, BoxLayout.Y_AXIS));
  
          for (int i=0; i<rules.length; i++)
          {
!             pnlMain.add(new RuleSlider(rules[i]));
          }
      }
***************
*** 57,65 ****
      public void setRules(Rule[] rules)
      {
!         pnl_main.removeAll();
  
          for (int i=0; i<rules.length; i++)
          {
!             pnl_main.add(new RuleSlider(rules[i]));
          }
  
--- 56,64 ----
      public void setRules(Rule[] rules)
      {
!         pnlMain.removeAll();
  
          for (int i=0; i<rules.length; i++)
          {
!             pnlMain.add(new RuleSlider(rules[i]));
          }
  
***************
*** 67,70 ****
      }
      
!     private JPanel pnl_main = new JPanel();
  }
--- 66,74 ----
      }
      
!     private JPanel pnlMain = new JPanel();
! 
!     /**
!      * Serialization ID
!      */
!     private static final long serialVersionUID = 3906651911955626041L;
  }

Index: RuleSlider.java
===================================================================
RCS file: /cvs/jsword/biblemapper/java/main/org/crosswire/biblemapper/swing/RuleSlider.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RuleSlider.java	20 Apr 2004 21:10:38 -0000	1.1
--- RuleSlider.java	28 Nov 2004 21:34:30 -0000	1.2
***************
*** 42,46 ****
  public class RuleSlider extends JPanel
  {
!     /**
       * Basic constructor
       */
--- 42,46 ----
  public class RuleSlider extends JPanel
  {
! 	/**
       * Basic constructor
       */
***************
*** 49,62 ****
          this.rule = rule;
  
!         jbInit();
  
          String fullname = rule.getClass().getName();
          int last_dot = fullname.lastIndexOf('.');
!         if (last_dot == -1) last_dot = 0;
          title = fullname.substring(last_dot+1);
!         bdr_rule.setTitle(title);
  
!         sdr_rule.setValue(rule.getScale());
!         txt_rule.setText(""+rule.getScale());
      }
  
--- 49,66 ----
          this.rule = rule;
  
!         init();
  
          String fullname = rule.getClass().getName();
          int last_dot = fullname.lastIndexOf('.');
!         if (last_dot == -1)
!         {
!             last_dot = 0;
!         }
! 
          title = fullname.substring(last_dot+1);
!         bdrRule.setTitle(title);
  
!         sdrRule.setValue(rule.getScale());
!         txtRule.setText(""+rule.getScale());
      }
  
***************
*** 64,72 ****
       * Create the GUI
       */
!     private void jbInit()
      {
!         bdr_rule = BorderFactory.createTitledBorder("Rule");
  
!         sdr_rule.addChangeListener(new ChangeListener()
          {
              public void stateChanged(ChangeEvent ev)
--- 68,76 ----
       * Create the GUI
       */
!     private void init()
      {
!         bdrRule = BorderFactory.createTitledBorder("Rule");
  
!         sdrRule.addChangeListener(new ChangeListener()
          {
              public void stateChanged(ChangeEvent ev)
***************
*** 75,93 ****
              }
          });
!         sdr_rule.setPaintLabels(true);
!         sdr_rule.setPaintTicks(true);
!         sdr_rule.setMinorTickSpacing(16);
!         sdr_rule.setMajorTickSpacing(32);
!         sdr_rule.setMaximum(256);
!         sdr_rule.setOrientation(SwingConstants.HORIZONTAL);
!         sdr_rule.setValue(0);
  
!         txt_rule.setText("256");
!         txt_rule.setEditable(false);
  
          this.setLayout(new BorderLayout());
!         this.setBorder(bdr_rule);
!         this.add(sdr_rule, BorderLayout.CENTER);
!         this.add(txt_rule, BorderLayout.EAST);
      }
  
--- 79,97 ----
              }
          });
!         sdrRule.setPaintLabels(true);
!         sdrRule.setPaintTicks(true);
!         sdrRule.setMinorTickSpacing(16);
!         sdrRule.setMajorTickSpacing(32);
!         sdrRule.setMaximum(256);
!         sdrRule.setOrientation(SwingConstants.HORIZONTAL);
!         sdrRule.setValue(0);
  
!         txtRule.setText("256");
!         txtRule.setEditable(false);
  
          this.setLayout(new BorderLayout());
!         this.setBorder(bdrRule);
!         this.add(sdrRule, BorderLayout.CENTER);
!         this.add(txtRule, BorderLayout.EAST);
      }
  
***************
*** 97,122 ****
      protected void changed()
      {
!         rule.setScale(sdr_rule.getValue());
  
          int check = rule.getScale();
!         if (check != sdr_rule.getValue())
!             sdr_rule.setValue(check);
  
!         txt_rule.setText(""+check);
  
          log.info(title+": "+check);
      }
  
!     /** The rule that we notify of any changes */
      private Rule rule;
  
      /* GUI Components */
!     private JSlider sdr_rule = new JSlider();
!     private JTextField txt_rule = new JTextField(3);
      private String title = "-";
  
!     private TitledBorder bdr_rule;
! 
!     /** The log stream */
      private static final Logger log = Logger.getLogger(RuleSlider.class);
  }
--- 101,136 ----
      protected void changed()
      {
!         rule.setScale(sdrRule.getValue());
  
          int check = rule.getScale();
!         if (check != sdrRule.getValue())
!         {
!             sdrRule.setValue(check);
!         }
  
!         txtRule.setText(""+check);
  
          log.info(title+": "+check);
      }
  
!     /**
!      * The rule that we notify of any changes
!      */
      private Rule rule;
  
      /* GUI Components */
!     private JSlider sdrRule = new JSlider();
!     private JTextField txtRule = new JTextField(3);
      private String title = "-";
+     private TitledBorder bdrRule;
  
!     /**
!      * The log stream
!      */
      private static final Logger log = Logger.getLogger(RuleSlider.class);
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3544953268381038132L;
  }

Index: MapTableModel.java
===================================================================
RCS file: /cvs/jsword/biblemapper/java/main/org/crosswire/biblemapper/swing/MapTableModel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MapTableModel.java	20 Apr 2004 21:10:38 -0000	1.1
--- MapTableModel.java	28 Nov 2004 21:34:30 -0000	1.2
***************
*** 41,45 ****
  public class MapTableModel extends AbstractTableModel
  {
!     /**
       * Basic constructor
       */
--- 41,45 ----
  public class MapTableModel extends AbstractTableModel
  {
! 	/**
       * Basic constructor
       */
***************
*** 64,68 ****
--- 64,70 ----
      {
          if (map != null)
+         {
              map.removeMapListener(cml);
+         }
  
          this.map = map;
***************
*** 258,274 ****
      }
  
!     /** The map that we are viewing */
      private Map map;
  
!     /** The number of rows */
      private static int cib = BibleInfo.chaptersInBible();
  
!     /** The number of columns */
      private static int cols;
  
!     /** The map listener */
      private CustomMapListener cml = new CustomMapListener();
  
      /**
       * Sync the map and the table
       */
--- 260,289 ----
      }
  
!     /**
!      * The map that we are viewing
!      */
      private Map map;
  
!     /**
!      * The number of rows
!      */
      private static int cib = BibleInfo.chaptersInBible();
  
!     /**
!      * The number of columns
!      */
      private static int cols;
  
!     /**
!      * The map listener
!      */
      private CustomMapListener cml = new CustomMapListener();
  
      /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3906649695802963768L;
+ 
+     /**
       * Sync the map and the table
       */
***************
*** 291,294 ****
--- 306,310 ----
                      }
                  });
+ 
                  return;
              }
***************
*** 325,328 ****
--- 341,345 ----
                      }
                  });
+ 
                  return;
              }

Index: MapperPane.java
===================================================================
RCS file: /cvs/jsword/biblemapper/java/main/org/crosswire/biblemapper/swing/MapperPane.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MapperPane.java	20 Apr 2004 21:10:38 -0000	1.1
--- MapperPane.java	28 Nov 2004 21:34:30 -0000	1.2
***************
*** 43,47 ****
  public class MapperPane extends JPanel implements Scrollable
  {
!     /**
       * Basic Constructor
       */
--- 43,47 ----
  public class MapperPane extends JPanel implements Scrollable
  {
! 	/**
       * Basic Constructor
       */
***************
*** 381,384 ****
--- 381,389 ----
  
      /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3833180350343296569L;
+ 
+     /**
       * Sync the map and the table
       */



More information about the jsword-svn mailing list