/[classpath]/classpath/javax/swing/plaf/basic/BasicTreeUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicTreeUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.51 by roehrijn, Sun Jul 31 22:06:33 2005 UTC revision 1.52 by roehrijn, Sun Jul 31 22:32:59 2005 UTC
# Line 326  public class BasicTreeUI extends TreeUI Line 326  public class BasicTreeUI extends TreeUI
326     *     *
327     * @return the indent value for the right child.     * @return the indent value for the right child.
328     */     */
329    public int getRightChildIndent(int newAmount)    public int getRightChildIndent()
330    {    {
331      return rightChildIndent;      return rightChildIndent;
332    }    }
# Line 2884  public class BasicTreeUI extends TreeUI Line 2884  public class BasicTreeUI extends TreeUI
2884    /**    /**
2885     * Draws a vertical line using the given graphic context     * Draws a vertical line using the given graphic context
2886     *     *
2887     * @param g The graphic context     * @param g is the graphic context
2888     * @param c The component the new line will belong to     * @param c is the component the new line will belong to
2889     * @param x Horizonal position     * @param x is the horizonal position
2890     * @param top Top of the line     * @param top specifies the top of the line
2891     * @param bottom Bottom of the line     * @param bottom specifies the bottom of the line
2892     */     */
2893    protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom) {    protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom) {
2894      g.drawLine(x, top, x, bottom);      g.drawLine(x, top, x, bottom);
# Line 2897  public class BasicTreeUI extends TreeUI Line 2897  public class BasicTreeUI extends TreeUI
2897    /**    /**
2898     * Draws a horizontal line using the given graphic context     * Draws a horizontal line using the given graphic context
2899     *     *
2900     * @param g The graphic context     * @param g is the graphic context
2901     * @param c The component the new line will belong to     * @param c is the component the new line will belong to
2902     * @param y Vertical position     * @param y is the vertical position
2903     * @param left Left point of the line     * @param left specifies the left point of the line
2904     * @param right Right point of the line     * @param right specifies the right point of the line
2905     */     */
2906    protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right) {    protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right) {
2907      g.drawLine(left, y, right, y);      g.drawLine(left, y, right, y);
2908    }    }
2909      
2910      /**
2911       * Draws an icon at around a specific position
2912       *
2913       * @param c is the component the new line will belong to
2914       * @param g is the graphic context
2915       * @param icon is the icon which will be drawn
2916       * @param x is the center position in x-direction
2917       * @param y is the center position in y-direction
2918       *
2919       * FIXME what to do if x < (icon.width / 2). Same with y
2920       */
2921      protected void drawCentered(JComponent c, Graphics g, Icon icon, int x, int y) {
2922        int beginPositionX = x - icon.getIconWidth() / 2;
2923        int beginPositionY = y - icon.getIconHeight() / 2;
2924        icon.paintIcon(c, g, beginPositionX, beginPositionY);
2925      }
2926  } // BasicTreeUI  } // BasicTreeUI

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26