home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / plaf / basic / BasicTreeUI$BasicTreeUIPaintInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  2.3 KB  |  55 lines

  1. package com.sun.java.swing.plaf.basic;
  2.  
  3. import com.sun.java.swing.Icon;
  4. import com.sun.java.swing.JTree;
  5. import com.sun.java.swing.tree.TreeCellRenderer;
  6. import com.sun.java.swing.tree.TreeModel;
  7. import java.awt.Color;
  8. import java.awt.Graphics;
  9.  
  10. public class BasicTreeUI$BasicTreeUIPaintInfo {
  11.    // $FF: renamed from: g java.awt.Graphics
  12.    public Graphics field_0;
  13.    public TreeCellRenderer renderer;
  14.    public int totalIndent;
  15.    public Color hashColor;
  16.    public int halfRowHeight;
  17.    public int levelOffset;
  18.    public Icon expandedIcon;
  19.    public Icon collapsedIcon;
  20.    public int rChildIndent;
  21.    public int rowHeight;
  22.    public JTree tree;
  23.    public TreeModel treeModel;
  24.    public int leadIndex;
  25.  
  26.    public BasicTreeUI$BasicTreeUIPaintInfo(BasicTreeUI var1, Graphics var2) {
  27.       this.reset(var1, var2);
  28.    }
  29.  
  30.    public void reset(BasicTreeUI var1, Graphics var2) {
  31.       this.field_0 = var2;
  32.       this.renderer = var1.getCellRenderer();
  33.       this.totalIndent = var1.totalChildIndent;
  34.       this.hashColor = var1.getHashColor();
  35.       this.halfRowHeight = ((AbstractTreeUI)var1).getRowHeight() / 2;
  36.       if (((AbstractTreeUI)var1).getShowsRootHandles()) {
  37.          this.levelOffset = 1;
  38.       } else {
  39.          this.levelOffset = 0;
  40.       }
  41.  
  42.       this.expandedIcon = var1.getExpandedIcon();
  43.       this.collapsedIcon = var1.getCollapsedIcon();
  44.       this.rChildIndent = var1.getRightChildIndent();
  45.       this.rowHeight = ((AbstractTreeUI)var1).getRowHeight();
  46.       this.tree = var1.tree;
  47.       this.treeModel = ((AbstractTreeUI)var1).getModel();
  48.       if (!var1.tree.hasFocus()) {
  49.          this.leadIndex = -1;
  50.       } else {
  51.          this.leadIndex = var1.tree.getLeadSelectionRow();
  52.       }
  53.    }
  54. }
  55.