resize "Text View" text area to match other content viewers, reset match count on new file selection

This commit is contained in:
Dick Fickling 2012-01-19 13:44:32 -05:00
parent 118bcf2b40
commit b137b342b7
3 changed files with 13 additions and 4 deletions

View File

@ -53,8 +53,8 @@
<Component id="hitPreviousButton" min="-2" pref="23" max="-2" attributes="0"/> <Component id="hitPreviousButton" min="-2" pref="23" max="-2" attributes="0"/>
<Component id="hitNextButton" min="-2" pref="23" max="-2" attributes="0"/> <Component id="hitNextButton" min="-2" pref="23" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="287" max="32767" attributes="0"/> <Component id="jScrollPane1" pref="293" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>

View File

@ -135,8 +135,8 @@ class ExtractedContentPanel extends javax.swing.JPanel {
.addComponent(hitCountLabel)) .addComponent(hitCountLabel))
.addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGap(0, 0, 0)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 287, Short.MAX_VALUE)) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 293, Short.MAX_VALUE))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
@ -221,6 +221,14 @@ class ExtractedContentPanel extends javax.swing.JPanel {
hitTotalLabel.setText(Integer.toString(total)); hitTotalLabel.setText(Integer.toString(total));
} }
/**
* reset the current/total display
*/
public void resetHitDisplay() {
hitTotalLabel.setText("-");
hitCountLabel.setText("-");
}
/** /**
* enable previous match control * enable previous match control
* @param enable whether to enable or disable * @param enable whether to enable or disable

View File

@ -138,6 +138,7 @@ public class ExtractedContentViewer implements DataContentViewer {
@Override @Override
public void resetComponent() { public void resetComponent() {
setPanel(Collections.EMPTY_LIST); setPanel(Collections.EMPTY_LIST);
panel.resetHitDisplay();
} }
@Override @Override