44 |
import java.awt.Graphics; |
import java.awt.Graphics; |
45 |
import java.awt.Rectangle; |
import java.awt.Rectangle; |
46 |
|
|
47 |
|
import javax.swing.border.Border; |
48 |
import javax.swing.Icon; |
import javax.swing.Icon; |
49 |
import javax.swing.JLabel; |
import javax.swing.JLabel; |
50 |
import javax.swing.JTree; |
import javax.swing.JTree; |
391 |
this.selected = selected; |
this.selected = selected; |
392 |
this.hasFocus = hasFocus; |
this.hasFocus = hasFocus; |
393 |
setHorizontalAlignment(LEFT); |
setHorizontalAlignment(LEFT); |
394 |
setOpaque(true); |
setOpaque(false); |
395 |
setVerticalAlignment(TOP); |
setVerticalAlignment(TOP); |
396 |
setEnabled(true); |
setEnabled(true); |
397 |
super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font")); |
super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font")); |
400 |
{ |
{ |
401 |
super.setBackground(getBackgroundSelectionColor()); |
super.setBackground(getBackgroundSelectionColor()); |
402 |
setForeground(getTextSelectionColor()); |
setForeground(getTextSelectionColor()); |
403 |
|
setBorder(UIManager.getLookAndFeelDefaults().getBorder("Tree.selectionBorder")); |
404 |
} |
} |
405 |
else |
else |
406 |
{ |
{ |
407 |
super.setBackground(getBackgroundNonSelectionColor()); |
super.setBackground(getBackgroundNonSelectionColor()); |
408 |
setForeground(getTextNonSelectionColor()); |
setForeground(getTextNonSelectionColor()); |
409 |
} |
setBorder(UIManager.getLookAndFeelDefaults().getBorder("Tree.nonSelectionBorder")); |
410 |
|
} |
411 |
|
|
412 |
return this; |
return this; |
413 |
} |
} |
414 |
|
|