KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > swing > scrollbars > spi > Mark


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20
21 /*
22  * Mark.java
23  *
24  * Created on March 5, 2003, 4:35 PM
25  */

26 package org.netbeans.swing.scrollbars.spi;
27
28
29 /**Interface representing an immutable marked position
30  *
31  * @version 1.0
32  * @author Tim Boudreau
33  */

34 public interface Mark {
35     /** Get the point in the model's range from 0 to <code>
36      * getMaximumMarkLocation()</code> at which this mark starts.
37      * @return The start index
38      */

39     public int getStart ();
40     /** Get the length of the mark, from its start
41      * @return The length
42      */

43     public int getLength ();
44     /** Get the text represented by the mark. MarkedScrollbarUI
45      * uses this to produce the tooltip.
46      * @return The text
47      */

48     public String JavaDoc getText ();
49     /** Get a hint about how the UI should render this mark.
50      * Only the string &quot;color&quot; is supported by
51      * MarkedScrollbarUI. Subclasses could support additional
52      * hints.
53      * @param key String key for the hint
54      * @return The object representing the hint, or null if not
55      * recognized
56      */

57     public Object JavaDoc get (String JavaDoc key);
58
59     /**
60      * Called when the mark has been clicked, after it has been scrolled into view. It is not necessary to do
61      * anything here, but it can be used to, for example, select some text, etc.
62      */

63     public void select();
64
65 }
66
Popular Tags