Skip to content

Commit

Permalink
Parameterize the FocusListeners list and fix feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Braunch committed Jul 18, 2016
1 parent 1843285 commit b2ed3cd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/net/sf/jabref/gui/FieldSetComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public FieldSetComponent(String title, List<String> fields, List<String> preset,

private FieldSetComponent(String title, List<String> fields, List<String> preset, String addText, String removeText,
boolean arrows, boolean forceLowerCase) {

this.forceLowerCase = forceLowerCase;
add = new JButton(addText);
remove = new JButton(removeText);
Expand Down Expand Up @@ -180,7 +179,6 @@ private FieldSetComponent(String title, List<String> fields, List<String> preset

FieldListFocusListener fieldListFocusListener = new FieldListFocusListener(list);
list.addFocusListener(fieldListFocusListener);

}

public void setListSelectionMode(int mode) {
Expand Down Expand Up @@ -372,11 +370,11 @@ public void actionPerformed(ActionEvent e) {
/**
* FocusListener to select the first entry in the list of fields when they are focused
*/
protected class FieldListFocusListener implements FocusListener {
protected class FieldListFocusListener<T> implements FocusListener {

private JList list;
private JList<T> list;

public FieldListFocusListener(JList list) {
public FieldListFocusListener(JList<T> list) {
this.list = list;
}

Expand Down

0 comments on commit b2ed3cd

Please sign in to comment.