List of utility methods to do JTree Color
Color | getTreeBackground() get Tree Background return UIManager.getColor("Tree.background"); |
void | setComponentTreeBackground(Component c, Color color) Sets the background for an entire component hierarchy to the specified color. c.setBackground(color); Component[] children = getChildren(c); if (children != null) { for (int i = 0; i < children.length; i++) { setComponentTreeBackground(children[i], color); |
void | updateAllComponentTreeUIs() Updates the componentTreeUI of all top-level windows of the current application. for (Frame frame : Frame.getFrames()) {
updateAllComponentTreeUIs(frame);
|
void | updateComponentTreeUI(Component c) A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.
updateComponentTreeUI0(c); c.invalidate(); c.validate(); c.repaint(); |
void | updateComponentTreeUI(JComponent c) update Component Tree UI if (c != null) {
SwingUtilities.updateComponentTreeUI(c);
|
void | updateComponentTreeUI(Window window) update Component Tree UI SwingUtilities.updateComponentTreeUI(window);
for (Window w : window.getOwnedWindows())
updateComponentTreeUI(w);
|
void | updateComponentTreeUI0(Component c) Repaints UI tree recursively. if (c instanceof JComponent) { JComponent jc = (JComponent) c; jc.invalidate(); jc.validate(); jc.repaint(); JPopupMenu jpm = jc.getComponentPopupMenu(); if (jpm != null && jpm.isVisible() && jpm.getInvoker() == jc) { updateComponentTreeUI(jpm); ... |