01: /*
02: * Copyright (c) 2005, romain guy (romain.guy@jext.org) and craig wickesser (craig@codecraig.com)
03: * All rights reserved.
04: *
05: * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
06: *
07: * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
08: * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
09: * * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10: *
11: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
13: * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
15: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
16: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
18: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20: * POSSIBILITY OF SUCH DAMAGE.
21: */
22:
23: package net.java.swingfx.rubberband.canvas;
24:
25: import javax.swing.JComponent;
26:
27: import net.java.swingfx.rubberband.rubberbands.RubberBand;
28:
29: /**
30: * An interface for which any {@link javax.swing.JComponent} that
31: * wishes to enable rubber band functionality should implement.
32: *
33: * The canvas is the area on which the {@link RubberBand} will be drawn
34: * onto.
35: *
36: * @author rwickesser
37: * @since 1.0
38: * $Revision: 1.1 $
39: */
40: public interface RubberBandCanvas {
41:
42: /**
43: * Returns the <code>JComponent</code> which is the canvas for the
44: * <code>RubberBand</code>
45: *
46: * @return the <code>JComponent</code> which is the canvas for the
47: * <code>RubberBand</code>
48: */
49: public JComponent getCanvas();
50:
51: /**
52: * Sets the <code>RubberBand</code> for the canvas
53: *
54: * @param rubberband the <code>RubberBand</code> for the canvas
55: */
56: public void setRubberBand(RubberBand rubberband);
57: }
|