synchronized (_extraClassPathList)
{
int idx = _extraClassPathList.getSelectedIndex();
if (idx > 0)
{
IFileListBoxModel model = _extraClassPathList.getTypedModel();
File file = model.removeFile(idx);
--idx;
model.insertFileAt(file, idx);
_extraClassPathList.setSelectedIndex(idx);
}
}
}
});
_extraClasspathDownBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.down"));
_extraClasspathDownBtn.setEnabled(false);
_extraClasspathDownBtn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
synchronized (_extraClassPathList)
{
int idx = _extraClassPathList.getSelectedIndex();
IFileListBoxModel model = _extraClassPathList.getTypedModel();
if (idx > -1 && idx < (model.getSize() - 1))
{
File file = model.removeFile(idx);
++idx;
model.insertFileAt(file, idx);
_extraClassPathList.setSelectedIndex(idx);
}
}
}
});
JButton newBtn = new AddListEntryButton();
_extraClasspathDeleteBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.delete"));
_extraClasspathDeleteBtn.setEnabled(false);
_extraClasspathDeleteBtn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
int idx = _extraClassPathList.getSelectedIndex();
if (idx != -1)
{
IFileListBoxModel model = _extraClassPathList.getTypedModel();
model.removeFile(idx);
final int size = model.getSize();
if (idx < size)
{
_extraClassPathList.setSelectedIndex(idx);
}
else if (size > 0)