View Javadoc

1   /*
2    *  File: IHierarchyRenderer.java 
3    *  Copyright (c) 2004-2007  Peter Kliem (Peter.Kliem@jaret.de)
4    *  A commercial license is available, see http://www.jaret.de.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Common Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/cpl-v10.html
10   */
11  package de.jaret.util.ui.table.renderer;
12  
13  import org.eclipse.swt.graphics.Rectangle;
14  
15  import de.jaret.util.ui.table.model.IRow;
16  
17  /***
18   * Interface specifying extensions to the ICellRenderer interface necessary for hierarchy handling.
19   * 
20   * @author Peter Kliem
21   * @version $Id: IHierarchyRenderer.java 179 2007-01-07 17:37:50Z olk $
22   */
23  public interface IHierarchyRenderer extends ICellRenderer {
24      /***
25       * Should return true if a click on the coordinates x,y should toggle expanded state.
26       * 
27       * @param row row
28       * @param drawingarea drawing area of the hierarchy section of the row
29       * @param x x coordinate to check
30       * @param y y coordinate to check
31       * @return true if the click is in the acive area
32       */
33      boolean isInActiveArea(IRow row, Rectangle drawingarea, int x, int y);
34  }