* don't wrap html labels in sfv table

* don't paint focus border of cells in sfv table
This commit is contained in:
Reinhard Pointner 2008-09-07 18:49:20 +00:00
parent da0e730243
commit 4ebbcaeebc
3 changed files with 8 additions and 10 deletions

View File

@ -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;

View File

@ -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());

View File

@ -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;