aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/library/LibraryTableModel.java
diff options
context:
space:
mode:
authorMatt Windsor <mbw500@student.cs.york.ac.uk>2011-02-21 23:21:35 +0000
committerMatt Windsor <mbw500@student.cs.york.ac.uk>2011-02-21 23:21:35 +0000
commitc33f098de8a43a2df778d4d694e0c07bbde59828 (patch)
treea6ffd4c0b133db81079ca0746088da76d511f438 /src/uk/org/ury/library/LibraryTableModel.java
parentaf1013959f6ab36ed9f2ff603c08116ee1b55c57 (diff)
Added auth; added clean property to Libraryitem etc., fixed a bug in LibraryViewerPanel which searching twice in a row for zero-result strings would crash the frontend.
Diffstat (limited to 'src/uk/org/ury/library/LibraryTableModel.java')
-rw-r--r--src/uk/org/ury/library/LibraryTableModel.java26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/uk/org/ury/library/LibraryTableModel.java b/src/uk/org/ury/library/LibraryTableModel.java
index 7883438..c648520 100644
--- a/src/uk/org/ury/library/LibraryTableModel.java
+++ b/src/uk/org/ury/library/LibraryTableModel.java
@@ -49,7 +49,7 @@ public class LibraryTableModel extends AbstractTableModel
public int
getColumnCount ()
{
- return 5;
+ return 6;
}
@@ -73,7 +73,8 @@ public class LibraryTableModel extends AbstractTableModel
@Override
public Class<?>
- getColumnClass (int c) {
+ getColumnClass (int c)
+ {
return getValueAt (0, c).getClass ();
}
@@ -113,11 +114,26 @@ public class LibraryTableModel extends AbstractTableModel
else
return "Unrecognised";
- case 4: // Digitised
+ case 4: // Clean?
+
+ // Return true if marked true, false if marked false or unknown etc.
+
+ String cleanString = li.get (LibraryProperty.IS_CLEAN);
+
+ // TODO: Nicer way of showing this
+
+ if (cleanString.equals ("y"))
+ return "Yes";
+ else if (cleanString.equals ("n"))
+ return "No";
+ else
+ return "???";
+
+ case 5: // isDigitised
// Return true if marked true, false if marked false or unknown etc.
- String digitisedString = li.get (LibraryProperty.DIGITISED);
+ String digitisedString = li.get (LibraryProperty.IS_DIGITISED);
if (digitisedString.equals ("t"))
return true;
@@ -149,6 +165,8 @@ public class LibraryTableModel extends AbstractTableModel
case 3:
return "Medium";
case 4:
+ return "Clean?";
+ case 5:
return "On system?";
default: