* 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
|
||||
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)
|
||||
return this;
|
||||
|
|
|
@ -18,7 +18,7 @@ public class FileNameTableCellRenderer extends DefaultTableCellRenderer {
|
|||
@Override
|
||||
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) {
|
||||
// do not highlight text is focused, that just looks weird
|
||||
|
@ -33,15 +33,13 @@ public class FileNameTableCellRenderer extends DefaultTableCellRenderer {
|
|||
return this;
|
||||
}
|
||||
|
||||
matcher.reset();
|
||||
StringBuffer sb = new StringBuffer("<html>");
|
||||
// html label will word-wrap automatically, so we use nobr to make it single-line
|
||||
StringBuffer sb = new StringBuffer("<html><nobr>");
|
||||
|
||||
while (matcher.find()) {
|
||||
matcher.appendReplacement(sb, "[<font color=#009900>$1</font>]");
|
||||
}
|
||||
|
||||
matcher.appendTail(sb);
|
||||
sb.append("</html>");
|
||||
|
||||
sb.append("</nobr></html>");
|
||||
|
||||
setText(sb.toString());
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class StateIconTableCellRenderer extends DefaultTableCellRenderer {
|
|||
|
||||
@Override
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue