* workaround scrollpane problems by always showing the type label
This commit is contained in:
parent
8bd737ae71
commit
4fcc3def80
|
@ -104,9 +104,17 @@ class RenameListCellRenderer extends DefaultFancyListCellRenderer {
|
||||||
if (formattedFuture.isDone() && !formattedFuture.isCancelled()) {
|
if (formattedFuture.isDone() && !formattedFuture.isCancelled()) {
|
||||||
if (!renameModel.preserveExtension() && renameModel.hasComplement(index)) {
|
if (!renameModel.preserveExtension() && renameModel.hasComplement(index)) {
|
||||||
// absolute path mode
|
// absolute path mode
|
||||||
File targetDir = renameModel.getMatch(index).getCandidate().getParentFile();
|
File file = renameModel.getMatch(index).getCandidate();
|
||||||
|
File targetDir = file.getParentFile();
|
||||||
File path = resolveAbsolutePath(targetDir, formattedFuture.toString());
|
File path = resolveAbsolutePath(targetDir, formattedFuture.toString());
|
||||||
setText(isSelected || matchProbablity < 1 ? formatPath(path) : colorizePath(path, true));
|
setText(isSelected || matchProbablity < 1 ? formatPath(path) : colorizePath(path, true));
|
||||||
|
|
||||||
|
String ext = getExtension(path);
|
||||||
|
typeRenderer.setText(ext != null ? ext.toLowerCase() : "!");
|
||||||
|
if (file.isDirectory()) {
|
||||||
|
typeRenderer.setText("Folder");
|
||||||
|
}
|
||||||
|
typeRenderer.setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
// relative name mode
|
// relative name mode
|
||||||
File path = new File(formattedFuture.toString());
|
File path = new File(formattedFuture.toString());
|
||||||
|
|
Loading…
Reference in New Issue