mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04:00
* don't wrap html labels in sfv table
* don't paint focus border of cells in sfv table
This commit is contained in:
parent
da0e730243
commit
4ebbcaeebc
@ -17,7 +17,7 @@ public class ChecksumTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||||
super.getTableCellRendererComponent(table, null, isSelected, hasFocus, row, column);
|
super.getTableCellRendererComponent(table, null, isSelected, false, row, column);
|
||||||
|
|
||||||
if (value == null)
|
if (value == null)
|
||||||
return this;
|
return this;
|
||||||
|
@ -18,7 +18,7 @@ public class FileNameTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
@Override
|
@Override
|
||||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||||
|
|
||||||
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
|
||||||
|
|
||||||
if (hasFocus) {
|
if (hasFocus) {
|
||||||
// do not highlight text is focused, that just looks weird
|
// do not highlight text is focused, that just looks weird
|
||||||
@ -33,15 +33,13 @@ public class FileNameTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
matcher.reset();
|
// html label will word-wrap automatically, so we use nobr to make it single-line
|
||||||
StringBuffer sb = new StringBuffer("<html>");
|
StringBuffer sb = new StringBuffer("<html><nobr>");
|
||||||
|
|
||||||
while (matcher.find()) {
|
|
||||||
matcher.appendReplacement(sb, "[<font color=#009900>$1</font>]");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
matcher.appendReplacement(sb, "[<font color=#009900>$1</font>]");
|
||||||
matcher.appendTail(sb);
|
matcher.appendTail(sb);
|
||||||
sb.append("</html>");
|
|
||||||
|
sb.append("</nobr></html>");
|
||||||
|
|
||||||
setText(sb.toString());
|
setText(sb.toString());
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ public class StateIconTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||||
super.getTableCellRendererComponent(table, null, isSelected, hasFocus, row, column);
|
super.getTableCellRendererComponent(table, null, isSelected, false, row, column);
|
||||||
|
|
||||||
ChecksumRow.State state = (State) value;
|
ChecksumRow.State state = (State) value;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user