KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > gvt > Selectable


1 /*
2
3    Copyright 2000-2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.gvt;
19
20 import java.awt.Shape JavaDoc;
21
22 /**
23  * Interface describing object that can be selected or have selections
24  * made on it.
25  *
26  * @author <a HREF="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a>
27  * @version $Id: Selectable.java,v 1.8 2005/03/27 08:58:34 cam Exp $
28  */

29 public interface Selectable {
30
31     /**
32      * Initializes the current selection to begin with the character at (x, y).
33      * @return true if action resulted in change of selection.
34      */

35     boolean selectAt(double x, double y);
36
37     /**
38      * Extends the current selection to the character at (x, y)..
39      * @return true if action resulted in change of selection.
40      */

41     boolean selectTo(double x, double y);
42
43     /**
44      * Selects the entire contents of the GraphicsNode at (x, y).
45      * @return true if action resulted in change of selection.
46      */

47     boolean selectAll(double x, double y);
48
49     /**
50      * Get the current text selection.
51      * @return an object containing the selected content.
52      */

53     Object JavaDoc getSelection();
54
55     /**
56      * Return a shape in user coords which encloses the current selection.
57      */

58     Shape JavaDoc getHighlightShape();
59 }
60
Popular Tags