[jsword-svn] r1170 - in trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop: book book/install desktop display/tab display/textpane passage util
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Thu Oct 19 14:49:59 MST 2006
Author: dmsmith
Date: 2006-10-19 14:49:36 -0700 (Thu, 19 Oct 2006)
New Revision: 1170
Modified:
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleViewPane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DictionaryPane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/PassageSelectionPane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SwordSiteEditor.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Splash.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/StatusBar.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/textpane/TextPaneBookDataDisplay.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/util/ConfigurableSwingConverter.java
Log:
cleanup of issues identified by pmd
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -321,7 +321,7 @@
return chkRank.isSelected();
}
- public void setLabelRank(int val)
+ public final void setLabelRank(int val)
{
if (val == 0)
{
@@ -458,7 +458,7 @@
/**
*
*/
- public void updatePreset()
+ public final void updatePreset()
{
if (editingRestrict)
{
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -155,13 +155,9 @@
case LEVEL_BOOK:
return BibleInfo.getLongBookName(index + 1);
- case LEVEL_CHAPTER:
- case LEVEL_VERSE:
+ default:
return new Integer(index + 1);
- default:
- assert false : level;
- return null;
}
}
catch (NoSuchVerseException ex)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -52,7 +52,7 @@
/**
* The book combo box
*/
- public void setBookComboBox(JComboBox cboBook)
+ public final void setBookComboBox(JComboBox cboBook)
{
this.cboBook = cboBook;
@@ -63,7 +63,7 @@
/**
* The chapter combo box
*/
- public void setChapterComboBox(JComboBox cboChapter)
+ public final void setChapterComboBox(JComboBox cboChapter)
{
this.cboChapter = cboChapter;
@@ -76,7 +76,7 @@
/**
* The verse combo box
*/
- public void setVerseComboBox(JComboBox cboVerse)
+ public final void setVerseComboBox(JComboBox cboVerse)
{
this.cboVerse = cboVerse;
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleViewPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleViewPane.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleViewPane.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -297,7 +297,7 @@
/**
* Accessor for the current passage
*/
- public void setKey(Key key)
+ public final void setKey(Key key)
{
pnlPassg.setBookData(pnlSelect.getBook(), key);
// if (saved == null)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -93,7 +93,7 @@
// PARANOIA(joe): this check shouldn't be needed
if (index > books.size())
{
- log.error("trying to get book at " + index + " when there are only " + books.size() + " known books.", new Exception()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ log.error("trying to get book at " + index + " when there are only " + books.size() + " known books."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return null;
}
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DictionaryPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DictionaryPane.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DictionaryPane.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -240,23 +240,25 @@
*/
public void setWord(String data)
{
+ if (dict == null)
+ {
+ return;
+ }
+
+ Key key = null;
try
{
- if (dict == null)
- {
- return;
- }
-
- Key key = dict.getKey(data);
- if (key != null)
- {
- lstEntries.setSelectedValue(key, true);
- }
+ key = dict.getKey(data);
}
catch (NoSuchKeyException ex)
{
- // ignore
+ key = null;
}
+
+ if (key != null)
+ {
+ lstEntries.setSelectedValue(key, true);
+ }
}
/**
@@ -264,7 +266,7 @@
*/
public void setKey(Key key)
{
- if (key != null && key instanceof Passage)
+ if (key instanceof Passage)
{
Passage ref = (Passage) key;
if (ref.countVerses() > 0)
@@ -304,7 +306,7 @@
/**
* Called when someone selects a new Dictionary
*/
- protected void newDictionary()
+ /*private*/ final void newDictionary()
{
Object selected = lstDicts.getSelectedValue();
// Don't leave the scroller in the middle of the list!
@@ -350,7 +352,7 @@
/**
*
*/
- protected void updateDisplay()
+ /*protected*/ final void updateDisplay()
{
Book book = (Book) lstDicts.getSelectedValue();
if (book == null)
@@ -366,7 +368,7 @@
/**
* Called when someone selects a new entry from the current dictionary
*/
- protected void newEntry()
+ /*private*/ final void newEntry()
{
Key key = (Key) lstEntries.getSelectedValue();
if (key != null)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -517,7 +517,7 @@
/**
* Someone changed the version combo
*/
- protected void changeVersion()
+ public final void changeVersion()
{
Book newSelected = mdlBible.getSelectedBook();
@@ -590,7 +590,7 @@
/**
* Ensure that the right components are enabled
*/
- protected void enableComponents()
+ /*private*/ final void enableComponents()
{
boolean readable = selected != null;
boolean searchable = readable && selected.getIndexStatus().equals(IndexStatus.DONE);
@@ -612,7 +612,7 @@
/**
* Someone clicked the "..." button
*/
- protected void showSelectDialog()
+ /*private*/ final void showSelectDialog()
{
if (dlgSelect == null)
{
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/PassageSelectionPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/PassageSelectionPane.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/PassageSelectionPane.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -374,7 +374,7 @@
/**
* The tree selection has changed
*/
- protected void treeSelected()
+ /*private*/ final void treeSelected()
{
TreePath[] selected = treAll.getSelectionPaths();
actions.getAction(ADD).setEnabled(selected != null && selected.length > 0);
@@ -383,7 +383,7 @@
/**
* List selection has changed
*/
- protected void listSelected()
+ /*private*/ final void listSelected()
{
Object[] selected = lstSel.getSelectedValues();
actions.getAction(DELETE).setEnabled(selected != null && selected.length > 0);
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -254,7 +254,7 @@
/**
* The name field has been updated, so we need to check the entry is valid
*/
- protected void siteUpdate()
+ public final void siteUpdate()
{
if (txtName.isEditable())
{
@@ -279,7 +279,7 @@
/**
* The installer type combo box has been changed
*/
- protected void newType()
+ /*private*/ final void newType()
{
if (userInitiated)
{
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -366,14 +366,12 @@
try
{
IndexManager imanager = IndexManagerFactory.getIndexManager();
- if (imanager.isIndexed(book))
+ if (imanager.isIndexed(book)
+ && JOptionPane.showConfirmDialog(this, Msg.CONFIRM_UNINSTALL_BOOK.toString(new Object[] {book.getName()}),
+ Msg.CONFIRM_UNINSTALL_TITLE.toString(),
+ JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
{
- if (JOptionPane.showConfirmDialog(this, Msg.CONFIRM_UNINSTALL_BOOK.toString(new Object[] {book.getName()}),
- Msg.CONFIRM_UNINSTALL_TITLE.toString(),
- JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
- {
- imanager.deleteIndex(book);
- }
+ imanager.deleteIndex(book);
}
actions.getAction(UNINDEX).setEnabled(imanager.isIndexed(book));
}
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SwordSiteEditor.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SwordSiteEditor.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SwordSiteEditor.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -43,10 +43,6 @@
*/
public class SwordSiteEditor extends JPanel implements SiteEditor
{
- public SwordSiteEditor()
- {
- }
-
public void initialize()
{
host = new JTextField();
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -127,7 +127,7 @@
{
// Something went wrong before we've managed to get on our feet.
// so we want the best possible shot at working out what failed.
- ex.printStackTrace();
+ ex.printStackTrace(System.err);
ExceptionPane.showExceptionDialog(null, ex);
}
}
@@ -779,12 +779,12 @@
// so we want the best possible shot at working out what failed.
catch (IOException e)
{
- e.printStackTrace();
+ e.printStackTrace(System.err);
ExceptionPane.showExceptionDialog(null, e);
}
catch (JDOMException e)
{
- e.printStackTrace();
+ e.printStackTrace(System.err);
ExceptionPane.showExceptionDialog(null, e);
}
@@ -799,7 +799,7 @@
}
catch (IOException ex)
{
- ex.printStackTrace();
+ ex.printStackTrace(System.err);
ExceptionPane.showExceptionDialog(null, ex);
}
@@ -931,7 +931,7 @@
* Setup the choices so that the options dialog knows what there is to
* select from.
*/
- protected void fillChoiceFactory()
+ /*private*/ final void fillChoiceFactory()
{
refreshBooks();
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Splash.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Splash.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Splash.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -152,7 +152,7 @@
/**
* Shut up shop
*/
- public void close()
+ public final void close()
{
JobManager.removeWorkListener(listener);
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/StatusBar.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/StatusBar.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/StatusBar.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -69,30 +69,30 @@
*/
private void initialize()
{
- lbl_message.setText(Msg.STATUS_DEFAULT.toString());
+ labelMessage.setText(Msg.STATUS_DEFAULT.toString());
- Font font = pnl_progr.getFont();
- pnl_progr.setFont(font.deriveFont(6.0F));
+ Font font = panelProgress.getFont();
+ panelProgress.setFont(font.deriveFont(6.0F));
/*
- Dimension dim = pnl_progr.getPreferredSize();
- dim.height = lbl_message.getSize().height;
- pnl_progr.setPreferredSize(dim);
+ Dimension dim = panelProgress.getPreferredSize();
+ dim.height = labelMessage.getSize().height;
+ panelProgress.setPreferredSize(dim);
*/
- lbl_name.setText(' ' + Msg.getVersionedApplicationTitle() + ' ');
+ labelName.setText(' ' + Msg.getVersionedApplicationTitle() + ' ');
this.setBorder(BorderFactory.createEtchedBorder());
this.setLayout(new GridBagLayout());
- JSeparator separator = new JSeparator(SwingConstants.VERTICAL);
+ JSeparator separator = new JSeparator(SwingConstants.VERTICAL);
JSeparator separator2 = new JSeparator(SwingConstants.VERTICAL);
- this.add(lbl_message, new GridBagConstraints(0, 0, 1, 1, 0.5, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
- this.add(separator, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
- this.add(pnl_progr, new GridBagConstraints(2, 0, 1, 1, 0.5, 0.0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
- this.add(separator2, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
- this.add(lbl_name, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
+ this.add(labelMessage, new GridBagConstraints(0, 0, 1, 1, 0.5, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
+ this.add(separator, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
+ this.add(panelProgress, new GridBagConstraints(2, 0, 1, 1, 0.5, 0.0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+ this.add(separator2, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
+ this.add(labelName, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
/* (non-Javadoc)
@@ -112,11 +112,11 @@
String url = ev.getURL();
if (protocol.length() == 0)
{
- lbl_message.setText(url);
+ labelMessage.setText(url);
}
else
{
- lbl_message.setText(protocol + "://" + url); //$NON-NLS-1$
+ labelMessage.setText(protocol + "://" + url); //$NON-NLS-1$
}
}
@@ -125,7 +125,7 @@
*/
public void leaveURL(URLEvent ev)
{
- lbl_message.setText(Msg.STATUS_DEFAULT.toString());
+ labelMessage.setText(Msg.STATUS_DEFAULT.toString());
}
/**
@@ -136,9 +136,12 @@
{
if (txt == null)
{
- txt = Msg.STATUS_DEFAULT.toString();
+ labelMessage.setText(Msg.STATUS_DEFAULT.toString());
}
- lbl_message.setText(txt);
+ else
+ {
+ labelMessage.setText(txt);
+ }
}
/**
@@ -151,7 +154,7 @@
// {
// public void run()
// {
-// lbl_message.setText(signal.getMessage());
+// labelMessage.setText(signal.getMessage());
// }
// });
// }
@@ -174,7 +177,7 @@
if (value != null)
{
- lbl_message.setText(value.toString());
+ labelMessage.setText(value.toString());
}
}
}
@@ -186,7 +189,7 @@
*/
public void mouseExited(MouseEvent ev)
{
- lbl_message.setText(Msg.STATUS_DEFAULT.toString());
+ labelMessage.setText(Msg.STATUS_DEFAULT.toString());
}
/**
@@ -219,17 +222,17 @@
/**
* Where the progress bars go
*/
- private JobsProgressBar pnl_progr = new JobsProgressBar(true);
+ private JobsProgressBar panelProgress = new JobsProgressBar(true);
/**
* Where the help messages go
*/
- protected JLabel lbl_message = new JLabel();
+ protected JLabel labelMessage = new JLabel();
/**
* Where the product name goes
*/
- private JLabel lbl_name = new JLabel();
+ private JLabel labelName = new JLabel();
/**
* Serialization ID
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -162,24 +162,6 @@
return VALUES[i];
}
- /**
- * Prevent subclasses from overriding canonical identity based Object methods
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object o)
- {
- return super.equals(o);
- }
-
- /**
- * Prevent subclasses from overriding canonical identity based Object methods
- * @see java.lang.Object#hashCode()
- */
- public int hashCode()
- {
- return super.hashCode();
- }
-
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -280,7 +280,7 @@
/**
* Tabs changed, generate some stuff
*/
- protected void tabChanged()
+ /*private*/ final void tabChanged()
{
// This is someone clicking on more isnt it?
if (tabMain.getSelectedComponent() != pnlMore)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/textpane/TextPaneBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/textpane/TextPaneBookDataDisplay.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/textpane/TextPaneBookDataDisplay.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -255,8 +255,7 @@
data = data.substring(2);
}
- String[] parts = { protocol, data };
- return parts;
+ return new String[] { protocol, data };
}
/**
* Accessor for the Swing component
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -259,7 +259,7 @@
/**
* Someone clicked on a value in the list
*/
- protected void selection()
+ /*private*/ final void selection()
{
Object[] selected = list.getSelectedValues();
@@ -358,7 +358,7 @@
/**
* Inform the command keyChangeListeners
*/
- protected synchronized void fireKeyChanged(KeyChangeEvent ev)
+ /*private*/ final synchronized void fireKeyChanged(KeyChangeEvent ev)
{
if (keyChangeListeners != null)
{
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -193,7 +193,6 @@
case LEVEL_CHAPTER:
return WholeBibleTreeNode.getNode(this, range.getStart().getBook(), range.getStart().getChapter(), i + 1);
- case LEVEL_VERSE:
default:
return null;
}
@@ -218,7 +217,6 @@
case LEVEL_CHAPTER:
return BibleInfo.versesInChapter(range.getStart().getBook(), range.getStart().getChapter());
- case LEVEL_VERSE:
default:
return 0;
}
@@ -254,7 +252,6 @@
case LEVEL_CHAPTER:
return vnode.getVerseRange().getStart().getVerse() - 1;
- case LEVEL_VERSE:
default:
return -1;
}
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/util/ConfigurableSwingConverter.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/util/ConfigurableSwingConverter.java 2006-10-19 21:48:21 UTC (rev 1169)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/util/ConfigurableSwingConverter.java 2006-10-19 21:49:36 UTC (rev 1170)
@@ -114,8 +114,7 @@
String[] fontSpec = StringUtil.split(font, ","); //$NON-NLS-1$
int fontStyle = Integer.parseInt(fontSpec[1]);
int fontSize = Integer.parseInt(fontSpec[2]);
- Font newFont = new Font(fontSpec[0], fontStyle, fontSize);
- return newFont;
+ return new Font(fontSpec[0], fontStyle, fontSize);
}
/**
More information about the jsword-svn
mailing list