PageRenderTime 21ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/SideKick/sidekick/util/SideKickElement.java

#
Java | 59 lines | 12 code | 11 blank | 36 comment | 0 complexity | 69776f964b3bba7dc50316330cff2e94 MD5 | raw file
 1/*
 2Copyright (c) 2006, Dale Anson
 3All rights reserved.
 4
 5Redistribution and use in source and binary forms, with or without modification, 
 6are permitted provided that the following conditions are met:
 7
 8* Redistributions of source code must retain the above copyright notice, 
 9this list of conditions and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, 
11this list of conditions and the following disclaimer in the documentation 
12and/or other materials provided with the distribution.
13* Neither the name of the <ORGANIZATION> nor the names of its contributors 
14may be used to endorse or promote products derived from this software without 
15specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
18ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
19WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
20DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
21ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
22(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
23LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
24ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
25(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
26SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
28
29package sidekick.util;
30
31import javax.swing.text.Position;
32
33/**
34 * danson: an interface for objects that need to provide both Location and 
35 * Position information.  This is useful for objects created by javacc parsers.
36 * All the javacc parsers I've written so far for sidekick create objects that
37 * provide Location information.  These objects also need to provide Position
38 * information for sidekick.  By generalizing to an interface, these various
39 * objects can be handled by utilities that need to manipulate this data without
40 * regard for the actual object type. 
41 */
42public interface SideKickElement {
43    public void setStartLocation( Location loc );
44
45    public Location getStartLocation();
46
47    public void setEndLocation( Location loc );
48
49    public Location getEndLocation();
50
51    public void setStartPosition( Position s );
52
53    public Position getStartPosition();
54
55    public void setEndPosition( Position s );
56
57    public Position getEndPosition();
58
59}