KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > IInformationControlExtension3


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.text;
12
13 import org.eclipse.swt.graphics.Rectangle;
14
15
16 /**
17  * Extension interface for {@link org.eclipse.jface.text.IInformationControl}.
18  * Adds API which allows to get this information control's bounds and introduces
19  * the concept of persistent size and location by introducing predicates for
20  * whether the information control supports restoring of size and location.
21  * <p>
22  * Note: An information control which implements this interface can ignore calls
23  * to
24  * {@link org.eclipse.jface.text.IInformationControl#setSizeConstraints(int, int)}
25  * or use it as hint for its very first appearance.
26  * </p>
27  *
28  * @see org.eclipse.jface.text.IInformationControl
29  * @since 3.0
30  */

31 public interface IInformationControlExtension3 {
32
33     /**
34      * Returns a rectangle describing the receiver's size and location
35      * relative to its parent (or its display if its parent is null).
36      * <p>
37      * Note: If the receiver is already disposed then this methods must
38      * return the last valid location and size.
39      * </p>
40      *
41      * @return the receiver's bounding rectangle
42      */

43     Rectangle getBounds();
44
45     /**
46      * Computes the trim for this control.
47      * x and y denote the upper left corner of the trimming relative
48      * to this control's location i.e. this will most likely be
49      * negative values. Width and height represent the border sizes.
50      *
51      * @return the receivers trim
52      */

53     Rectangle computeTrim();
54
55     /**
56      * Tells whether this control allows to restore the previously
57      * used size.
58      * <p>
59      * Note: This is not a static property - it can change during the
60      * lifetime of this control.</p>
61      *
62      * @return <code>true</code> if restoring size is supported
63      */

64     boolean restoresSize();
65
66     /**
67      * Tells whether this control allows to restore the previously
68      * used location.
69      * <p>
70      * Note: This is not a static property - it can change during the
71      * lifetime of this control.</p>
72      *
73      * @return <code>true</code> if restoring location is supported
74      */

75     boolean restoresLocation();
76 }
77
Popular Tags