Program: 168559
Project: 168559
Buggy source:
public FileSystemBrowser(FileSystemProvider<A> iController){
  this.controller=iController;
  this.viewComponent=new FilesystemBrowserPanel();
  this.addressField=viewComponent.addressField;
  this.upButton=viewComponent.upButton;
  this.infoButton=viewComponent.infoButton;
  this.extractButton=viewComponent.extractButton;
  this.goButton=viewComponent.goButton;
  this.statusLabel=viewComponent.statusLabel;
  this.fileTable=viewComponent.fileTable;
  this.fileTableScroller=viewComponent.fileTableScroller;
  this.dirTree=viewComponent.dirTree;
  upButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGotoParentDir();
    }
  }
);
  extractButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionExtractToDir();
    }
  }
);
  infoButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGetInfo();
    }
  }
);
  goButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGotoDir();
    }
  }
);
  addressField.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGotoDir();
    }
  }
);
  final Class objectClass=new Object().getClass();
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  tableModel=new DefaultTableModel(colNames,0){
    @Override public boolean isCellEditable(    int rowIndex,    int columnIndex){
      return false;
    }
  }
;
  fileTable.setModel(tableModel);
  fileTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
  fileTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  final int WIDTH_NAME_COLUMN=180;
  final int WIDTH_SIZE_COLUMN=96;
  final int WIDTH_TYPE_COLUMN=120;
  final int WIDTH_DATE_COLUMN=130;
  fileTable.getColumnModel().getColumn(0).setPreferredWidth(WIDTH_NAME_COLUMN);
  fileTable.getColumnModel().getColumn(1).setPreferredWidth(WIDTH_SIZE_COLUMN);
  fileTable.getColumnModel().getColumn(2).setPreferredWidth(WIDTH_TYPE_COLUMN);
  fileTable.getColumnModel().getColumn(3).setPreferredWidth(WIDTH_DATE_COLUMN);
  fileTable.getColumnModel().getColumn(4).setPreferredWidth(0);
  totalColumnWidth=WIDTH_NAME_COLUMN + WIDTH_SIZE_COLUMN + WIDTH_TYPE_COLUMN+ WIDTH_DATE_COLUMN;
  fileTable.getColumnModel().getColumn(4).setMinWidth(0);
  fileTable.getColumnModel().getColumn(4).setResizable(false);
  if (Java6Util.isJava6OrHigher()) {
    Comparator c=new ComparableComparator();
    Java6Specific.addRowSorter(fileTable,tableModel,4,c,c,c,c,c);
  }
  TableColumnModelListener columnListener=new TableColumnModelListener(){
    private boolean locked=false;
    private int[] w1=null;
    @Override public void columnAdded(    TableColumnModelEvent e){
    }
    @Override public void columnMarginChanged(    ChangeEvent e){
      if (disableColumnListener[0]) {
        return;
      }
synchronized (this) {
        if (!locked)         locked=true;
 else {
          return;
        }
      }
      int columnCount=fileTable.getColumnModel().getColumnCount();
      TableColumn lastColumn=fileTable.getColumnModel().getColumn(columnCount - 1);
      if (lastWidths.o == null) {
        lastWidths.o=new int[columnCount];
      }
      if (w1 == null || w1.length != columnCount) {
        w1=new int[columnCount];
      }
      int diffSum=0;
      int currentWidth=0;
      for (int i=0; i < w1.length; ++i) {
        w1[i]=fileTable.getColumnModel().getColumn(i).getWidth();
        currentWidth+=w1[i];
        int diff=(w1[i] - lastWidths.o[i]);
        if (i < w1.length - 1) {
          diffSum+=diff;
        }
      }
      int lastDiff=(w1[columnCount - 1] - lastWidths.o[columnCount - 1]);
      if (lastDiff != -diffSum) {
        int importantColsWidth=currentWidth - w1[columnCount - 1];
        int newLastColumnWidth=totalColumnWidth - importantColsWidth;
        int nextTotalWidth=importantColsWidth + newLastColumnWidth;
        if (newLastColumnWidth >= 0) {
          if ((nextTotalWidth <= totalColumnWidth || diffSum > 0)) {
            lastColumn.setPreferredWidth(newLastColumnWidth);
            lastColumn.setWidth(newLastColumnWidth);
            fileTableScroller.invalidate();
            fileTableScroller.validate();
          }
        }
 else {
          if (lastColumn.getWidth() != 0) {
            lastColumn.setPreferredWidth(0);
            lastColumn.setWidth(0);
            fileTableScroller.invalidate();
            fileTableScroller.validate();
          }
        }
      }
      for (int i=0; i < w1.length; ++i) {
        w1[i]=fileTable.getColumnModel().getColumn(i).getWidth();
      }
      int[] usedArray=lastWidths.o;
      lastWidths.o=w1;
      w1=usedArray;
synchronized (this) {
        locked=false;
      }
    }
    @Override public void columnMoved(    TableColumnModelEvent e){
    }
    @Override public void columnRemoved(    TableColumnModelEvent e){
    }
    @Override public void columnSelectionChanged(    ListSelectionEvent e){
    }
  }
;
  fileTable.getColumnModel().addColumnModelListener(columnListener);
  final TableCellRenderer objectRenderer=fileTable.getDefaultRenderer(objectClass);
  fileTable.setDefaultRenderer(objectClass,new TableCellRenderer(){
    private JLabel theOne=new JLabel();
    private JLabel theTwo=new JLabel("String_Node_Str",SwingConstants.RIGHT);
    private ImageIcon documentIcon=new ImageIcon(ClassLoader.getSystemResource("String_Node_Str"));
    private ImageIcon folderIcon=new ImageIcon(ClassLoader.getSystemResource("String_Node_Str"));
    private ImageIcon emptyIcon=new ImageIcon(ClassLoader.getSystemResource("String_Node_Str"));
    @Override public Component getTableCellRendererComponent(    JTable table,    Object value,    boolean isSelected,    boolean hasFocus,    final int row,    final int column){
      if (value instanceof RecordContainer) {
        final Component objectComponent=objectRenderer.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
        final JLabel jl=theOne;
        Record rec=((RecordContainer)value).getRecord(genericPlaceholder);
        if (rec.getType() == RecordType.FOLDER || rec.getType() == RecordType.FOLDER_LINK)         jl.setIcon(folderIcon);
 else         if (rec.getType() == RecordType.FILE || rec.getType() == RecordType.FILE_LINK)         jl.setIcon(documentIcon);
 else         jl.setIcon(emptyIcon);
        jl.setVisible(true);
        Component c=new Component(){
{
            jl.setSize(jl.getPreferredSize());
            jl.setLocation(0,0);
            objectComponent.setSize(objectComponent.getPreferredSize());
            objectComponent.setLocation(jl.getWidth(),0);
            setSize(jl.getWidth() + objectComponent.getWidth(),Math.max(jl.getHeight(),objectComponent.getHeight()));
          }
          @Override public void paint(          Graphics g){
            jl.paint(g);
            int translatex=jl.getWidth();
            g.translate(translatex,0);
            objectComponent.paint(g);
            g.translate(-translatex,0);
          }
        }
;
        return c;
      }
 else       if (column == 1) {
        theTwo.setText(value.toString());
        return theTwo;
      }
 else {
        return objectRenderer.getTableCellRendererComponent(table,value,false,false,row,column);
      }
    }
  }
);
  fileTable.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
    @Override public void valueChanged(    ListSelectionEvent e){
      int[] selection=fileTable.getSelectedRows();
      long selectionSize=0;
      for (      int selectedRow : selection) {
        Object o=fileTable.getValueAt(selectedRow,0);
        if (o instanceof RecordContainer) {
          Record rec=((RecordContainer)o).getRecord(genericPlaceholder);
          if (rec.getType() == RecordType.FILE || rec.getType() == RecordType.FILE_LINK)           selectionSize+=rec.getSize();
        }
      }
      setSelectionStatus(selection.length,selectionSize);
    }
  }
);
  fileTableScroller.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      int row=fileTable.rowAtPoint(e.getPoint());
      if (row == -1)       fileTable.clearSelection();
    }
  }
);
  fileTable.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      if (e.getButton() == MouseEvent.BUTTON3) {
        int row=fileTable.rowAtPoint(e.getPoint());
        int col=fileTable.columnAtPoint(e.getPoint());
        if (col == 0 && row >= 0) {
          int[] currentSelection=fileTable.getSelectedRows();
          if (!Util.contains(currentSelection,row)) {
            fileTable.clearSelection();
            fileTable.changeSelection(row,col,false,false);
          }
          fileTable.requestFocus();
          List<Record<A>> selection=getTableSelection();
          List<Record<A>> selectionParentPath=getRecordPath(lastTreeSelectionPath);
          JPopupMenu jpm=controller.getRightClickRecordPopupMenu(selectionParentPath,selection);
          jpm.show(fileTable,e.getX(),e.getY());
        }
      }
 else       if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
        int row=fileTable.rowAtPoint(e.getPoint());
        int col=fileTable.columnAtPoint(e.getPoint());
        if (col == 0 && row >= 0) {
          Object colValue=fileTable.getValueAt(row,col);
          if (colValue instanceof RecordContainer) {
            Record<A> rec=((RecordContainer)colValue).getRecord(genericPlaceholder);
            if (rec.getType() == RecordType.FILE || rec.getType() == RecordType.FILE_LINK) {
              List<Record<A>> dirPath=getRecordPath(lastTreeSelectionPath);
              ArrayList<Record<A>> completePath=new ArrayList<Record<A>>(dirPath.size() + 1);
              completePath.addAll(dirPath);
              completePath.add(rec);
              controller.actionDoubleClickFile(completePath);
            }
 else             if (rec.getType() == RecordType.FOLDER || rec.getType() == RecordType.FOLDER_LINK)             actionChangeDir(rec);
          }
 else           throw new RuntimeException("String_Node_Str");
        }
      }
    }
  }
);
  dirTree.addMouseListener(new MouseAdapter(){
    @Override public void mousePressed(    MouseEvent e){
      if (e.getButton() == MouseEvent.BUTTON3 && controller.isFileSystemLoaded()) {
        TreePath tp=dirTree.getPathForLocation(e.getX(),e.getY());
        if (tp != null) {
          dirTree.clearSelection();
          dirTree.setSelectionPath(tp);
          dirTree.requestFocus();
          List<Record<A>> recList=Arrays.asList(getTreeSelection());
          List<Record<A>> selectionParentPath=getRecordPath(lastTreeSelectionPath.getParentPath());
          controller.getRightClickRecordPopupMenu(selectionParentPath,recList).show(dirTree,e.getX(),e.getY());
        }
      }
    }
  }
);
  setRoot(null);
  dirTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  dirTree.addTreeSelectionListener(new TreeSelectionListener(){
    @Override public void valueChanged(    TreeSelectionEvent e){
      TreePath tp=e.getPath();
      actionTreeNodeSelected(tp);
    }
  }
);
  dirTree.addTreeWillExpandListener(new TreeWillExpandListener(){
    @Override public void treeWillExpand(    TreeExpansionEvent e) throws ExpandVetoException {
      actionExpandDirTreeNode(e.getPath());
    }
    @Override public void treeWillCollapse(    TreeExpansionEvent e){
    }
  }
);
  fileTable.addFocusListener(new FocusListener(){
    @Override public void focusGained(    FocusEvent e){
      fileTableLastFocus=System.nanoTime();
    }
    @Override public void focusLost(    FocusEvent e){
    }
  }
);
  dirTree.addFocusListener(new FocusListener(){
    @Override public void focusGained(    FocusEvent e){
      dirTreeLastFocus=System.nanoTime();
    }
    @Override public void focusLost(    FocusEvent e){
    }
  }
);
  fileTableScroller.addComponentListener(new ComponentAdapter(){
    @Override public void componentResized(    ComponentEvent e){
      adjustTableWidth();
    }
  }
);
}

Fixed version (ground truth):
public FileSystemBrowser(FileSystemProvider<A> iController){
  this.controller=iController;
  this.viewComponent=new FilesystemBrowserPanel();
  this.addressField=viewComponent.addressField;
  this.upButton=viewComponent.upButton;
  this.infoButton=viewComponent.infoButton;
  this.extractButton=viewComponent.extractButton;
  this.goButton=viewComponent.goButton;
  this.statusLabel=viewComponent.statusLabel;
  this.fileTable=viewComponent.fileTable;
  this.fileTableScroller=viewComponent.fileTableScroller;
  this.dirTree=viewComponent.dirTree;
  upButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGotoParentDir();
    }
  }
);
  extractButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionExtractToDir();
    }
  }
);
  infoButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGetInfo();
    }
  }
);
  goButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGotoDir();
    }
  }
);
  addressField.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      actionGotoDir();
    }
  }
);
  final Class objectClass=new Object().getClass();
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  colNames.add("String_Node_Str");
  tableModel=new DefaultTableModel(colNames,0){
    @Override public boolean isCellEditable(    int rowIndex,    int columnIndex){
      return false;
    }
  }
;
  fileTable.setModel(tableModel);
  fileTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
  fileTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  final int WIDTH_NAME_COLUMN=180;
  final int WIDTH_SIZE_COLUMN=96;
  final int WIDTH_TYPE_COLUMN=120;
  final int WIDTH_DATE_COLUMN=130;
  fileTable.getColumnModel().getColumn(0).setPreferredWidth(WIDTH_NAME_COLUMN);
  fileTable.getColumnModel().getColumn(1).setPreferredWidth(WIDTH_SIZE_COLUMN);
  fileTable.getColumnModel().getColumn(2).setPreferredWidth(WIDTH_TYPE_COLUMN);
  fileTable.getColumnModel().getColumn(3).setPreferredWidth(WIDTH_DATE_COLUMN);
  fileTable.getColumnModel().getColumn(4).setPreferredWidth(0);
  totalColumnWidth=WIDTH_NAME_COLUMN + WIDTH_SIZE_COLUMN + WIDTH_TYPE_COLUMN+ WIDTH_DATE_COLUMN;
  fileTable.getColumnModel().getColumn(4).setMinWidth(0);
  fileTable.getColumnModel().getColumn(4).setResizable(false);
  if (Java6Util.isJava6OrHigher()) {
    Comparator c=new ComparableComparator();
    Java6Specific.addRowSorter(fileTable,tableModel,4,c,c,c,c,c);
  }
  TableColumnModelListener columnListener=new TableColumnModelListener(){
    private boolean locked=false;
    private int[] w1=null;
    @Override public void columnAdded(    TableColumnModelEvent e){
    }
    @Override public void columnMarginChanged(    ChangeEvent e){
      if (disableColumnListener[0]) {
        return;
      }
synchronized (this) {
        if (!locked)         locked=true;
 else {
          return;
        }
      }
      int columnCount=fileTable.getColumnModel().getColumnCount();
      TableColumn lastColumn=fileTable.getColumnModel().getColumn(columnCount - 1);
      if (lastWidths.o == null) {
        lastWidths.o=new int[columnCount];
      }
      if (w1 == null || w1.length != columnCount) {
        w1=new int[columnCount];
      }
      int diffSum=0;
      int currentWidth=0;
      for (int i=0; i < w1.length; ++i) {
        w1[i]=fileTable.getColumnModel().getColumn(i).getWidth();
        currentWidth+=w1[i];
        int diff=(w1[i] - lastWidths.o[i]);
        if (i < w1.length - 1) {
          diffSum+=diff;
        }
      }
      int lastDiff=(w1[columnCount - 1] - lastWidths.o[columnCount - 1]);
      if (lastDiff != -diffSum) {
        int importantColsWidth=currentWidth - w1[columnCount - 1];
        int newLastColumnWidth=totalColumnWidth - importantColsWidth;
        int nextTotalWidth=importantColsWidth + newLastColumnWidth;
        if (newLastColumnWidth >= 0) {
          if ((nextTotalWidth <= totalColumnWidth || diffSum > 0)) {
            lastColumn.setPreferredWidth(newLastColumnWidth);
            lastColumn.setWidth(newLastColumnWidth);
            fileTableScroller.invalidate();
            fileTableScroller.validate();
          }
        }
 else {
          if (lastColumn.getWidth() != 0) {
            lastColumn.setPreferredWidth(0);
            lastColumn.setWidth(0);
            fileTableScroller.invalidate();
            fileTableScroller.validate();
          }
        }
      }
      for (int i=0; i < w1.length; ++i) {
        w1[i]=fileTable.getColumnModel().getColumn(i).getWidth();
      }
      int[] usedArray=lastWidths.o;
      lastWidths.o=w1;
      w1=usedArray;
synchronized (this) {
        locked=false;
      }
    }
    @Override public void columnMoved(    TableColumnModelEvent e){
    }
    @Override public void columnRemoved(    TableColumnModelEvent e){
    }
    @Override public void columnSelectionChanged(    ListSelectionEvent e){
    }
  }
;
  fileTable.getColumnModel().addColumnModelListener(columnListener);
  final TableCellRenderer objectRenderer=fileTable.getDefaultRenderer(objectClass);
  fileTable.setDefaultRenderer(objectClass,new TableCellRenderer(){
    private JLabel theOne=new JLabel();
    private JLabel theTwo=new JLabel("String_Node_Str",SwingConstants.RIGHT);
    private ImageIcon documentIcon=new ImageIcon(ClassLoader.getSystemResource("String_Node_Str"));
    private ImageIcon folderIcon=new ImageIcon(ClassLoader.getSystemResource("String_Node_Str"));
    private ImageIcon emptyIcon=new ImageIcon(ClassLoader.getSystemResource("String_Node_Str"));
    @Override public Component getTableCellRendererComponent(    JTable table,    Object value,    boolean isSelected,    boolean hasFocus,    final int row,    final int column){
      if (value instanceof RecordContainer) {
        final Component objectComponent=objectRenderer.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
        final JLabel jl=theOne;
        Record rec=((RecordContainer)value).getRecord(genericPlaceholder);
switch (rec.getType()) {
case FOLDER:
case FOLDER_LINK:
          jl.setIcon(folderIcon);
        break;
case FILE:
case FILE_LINK:
      jl.setIcon(documentIcon);
    break;
case BROKEN_LINK:
  jl.setIcon(emptyIcon);
break;
default :
throw new RuntimeException("String_Node_Str" + rec.getType());
}
jl.setVisible(true);
Component c=new Component(){
{
jl.setSize(jl.getPreferredSize());
jl.setLocation(0,0);
objectComponent.setSize(objectComponent.getPreferredSize());
objectComponent.setLocation(jl.getWidth(),0);
setSize(jl.getWidth() + objectComponent.getWidth(),Math.max(jl.getHeight(),objectComponent.getHeight()));
}
@Override public void paint(Graphics g){
jl.paint(g);
int translatex=jl.getWidth();
g.translate(translatex,0);
objectComponent.paint(g);
g.translate(-translatex,0);
}
}
;
return c;
}
 else if (column == 1) {
theTwo.setText(value.toString());
return theTwo;
}
 else {
return objectRenderer.getTableCellRendererComponent(table,value,false,false,row,column);
}
}
}
);
fileTable.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
@Override public void valueChanged(ListSelectionEvent e){
int[] selection=fileTable.getSelectedRows();
long selectionSize=0;
for (int selectedRow : selection) {
Object o=fileTable.getValueAt(selectedRow,0);
if (o instanceof RecordContainer) {
Record rec=((RecordContainer)o).getRecord(genericPlaceholder);
if (rec.getType() == RecordType.FILE || rec.getType() == RecordType.FILE_LINK) selectionSize+=rec.getSize();
}
}
setSelectionStatus(selection.length,selectionSize);
}
}
);
fileTableScroller.addMouseListener(new MouseAdapter(){
@Override public void mouseClicked(MouseEvent e){
int row=fileTable.rowAtPoint(e.getPoint());
if (row == -1) fileTable.clearSelection();
}
}
);
fileTable.addMouseListener(new MouseAdapter(){
@Override public void mouseClicked(MouseEvent e){
if (e.getButton() == MouseEvent.BUTTON3) {
int row=fileTable.rowAtPoint(e.getPoint());
int col=fileTable.columnAtPoint(e.getPoint());
if (col == 0 && row >= 0) {
int[] currentSelection=fileTable.getSelectedRows();
if (!Util.contains(currentSelection,row)) {
fileTable.clearSelection();
fileTable.changeSelection(row,col,false,false);
}
fileTable.requestFocus();
List<Record<A>> selection=getTableSelection();
List<Record<A>> selectionParentPath=getRecordPath(lastTreeSelectionPath);
JPopupMenu jpm=controller.getRightClickRecordPopupMenu(selectionParentPath,selection);
jpm.show(fileTable,e.getX(),e.getY());
}
}
 else if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
int row=fileTable.rowAtPoint(e.getPoint());
int col=fileTable.columnAtPoint(e.getPoint());
if (col == 0 && row >= 0) {
Object colValue=fileTable.getValueAt(row,col);
if (colValue instanceof RecordContainer) {
Record<A> rec=((RecordContainer)colValue).getRecord(genericPlaceholder);
if (rec.getType() == RecordType.FILE || rec.getType() == RecordType.FILE_LINK) {
List<Record<A>> dirPath=getRecordPath(lastTreeSelectionPath);
ArrayList<Record<A>> completePath=new ArrayList<Record<A>>(dirPath.size() + 1);
completePath.addAll(dirPath);
completePath.add(rec);
controller.actionDoubleClickFile(completePath);
}
 else if (rec.getType() == RecordType.FOLDER || rec.getType() == RecordType.FOLDER_LINK) actionChangeDir(rec);
}
 else throw new RuntimeException("String_Node_Str");
}
}
}
}
);
dirTree.addMouseListener(new MouseAdapter(){
@Override public void mousePressed(MouseEvent e){
if (e.getButton() == MouseEvent.BUTTON3 && controller.isFileSystemLoaded()) {
TreePath tp=dirTree.getPathForLocation(e.getX(),e.getY());
if (tp != null) {
dirTree.clearSelection();
dirTree.setSelectionPath(tp);
dirTree.requestFocus();
List<Record<A>> recList=Arrays.asList(getTreeSelection());
List<Record<A>> selectionParentPath=getRecordPath(lastTreeSelectionPath.getParentPath());
controller.getRightClickRecordPopupMenu(selectionParentPath,recList).show(dirTree,e.getX(),e.getY());
}
}
}
}
);
setRoot(null);
dirTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
dirTree.addTreeSelectionListener(new TreeSelectionListener(){
@Override public void valueChanged(TreeSelectionEvent e){
TreePath tp=e.getPath();
actionTreeNodeSelected(tp);
}
}
);
dirTree.addTreeWillExpandListener(new TreeWillExpandListener(){
@Override public void treeWillExpand(TreeExpansionEvent e) throws ExpandVetoException {
actionExpandDirTreeNode(e.getPath());
}
@Override public void treeWillCollapse(TreeExpansionEvent e){
}
}
);
fileTable.addFocusListener(new FocusListener(){
@Override public void focusGained(FocusEvent e){
fileTableLastFocus=System.nanoTime();
}
@Override public void focusLost(FocusEvent e){
}
}
);
dirTree.addFocusListener(new FocusListener(){
@Override public void focusGained(FocusEvent e){
dirTreeLastFocus=System.nanoTime();
}
@Override public void focusLost(FocusEvent e){
}
}
);
fileTableScroller.addComponentListener(new ComponentAdapter(){
@Override public void componentResized(ComponentEvent e){
adjustTableWidth();
}
}
);
}