extracted content gui: set labels to - if there is hit navigation is disabled

This commit is contained in:
adam-m 2012-05-18 11:15:54 -04:00
parent 99c85aa824
commit b6d899fdb1
2 changed files with 8 additions and 2 deletions

View File

@ -369,7 +369,9 @@ class ExtractedContentPanel extends javax.swing.JPanel {
* @param current, current hit to update the display with * @param current, current hit to update the display with
*/ */
void updateCurrentMatchDisplay(int current) { void updateCurrentMatchDisplay(int current) {
hitCountLabel.setText(Integer.toString(current)); if (current == 0)
hitCountLabel.setText("-");
else hitCountLabel.setText(Integer.toString(current));
} }
/** /**
@ -377,7 +379,9 @@ class ExtractedContentPanel extends javax.swing.JPanel {
* @param total total number of hits to update the display with * @param total total number of hits to update the display with
*/ */
void updateTotaMatcheslDisplay(int total) { void updateTotaMatcheslDisplay(int total) {
hitTotalLabel.setText(Integer.toString(total)); if (total == 0)
hitTotalLabel.setText("-");
else hitTotalLabel.setText(Integer.toString(total));
} }

View File

@ -479,6 +479,8 @@ public class ExtractedContentViewer implements DataContentViewer {
} else { } else {
panel.enableNextMatchControl(false); panel.enableNextMatchControl(false);
panel.enablePrevMatchControl(false); panel.enablePrevMatchControl(false);
panel.updateCurrentMatchDisplay(0);
panel.updateTotaMatcheslDisplay(0);
} }
} }