Examples of TreeUI


Examples of javax.swing.plaf.TreeUI

        defaults.put("Tree[Enabled].collapsedIconPainter", collapsedIconPainter);
        defaults.put("Tree[Enabled].expandedIconPainter", expandedIconPainter);
        defaults.put("Tree:TreeCell[Focused+Selected].backgroundPainter", new SelectionBackgroundPainter(renderer.getBackgroundSelectionColor()));

        TreeUI treeUI = getUI();
        if (treeUI instanceof MetalTreeUI) {
            BasicTreeUI basicUI = (BasicTreeUI) treeUI;
            int size = 7;
            BufferedImage expandedIcon = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
            expandedIconPainter.paint(expandedIcon.createGraphics(), null, size, size);
View Full Code Here

Examples of javax.swing.plaf.TreeUI

   */
  private class MyFocusListener extends FocusAdapter{
    private void focusChanges(){
      TreePath[] paths = getSelectionPaths();
      if(paths != null){
        TreeUI ui = getUI();
        for(int i = paths.length - 1; i >= 0; i--){
          Rectangle bounds = ui.getPathBounds(Tree.this, paths[i]);
          if(bounds != null){
            repaint(bounds);
          }
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.