KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > htmlparser > lexerapplications > thumbelina > Tile


1 // HTMLParser Library - A java-based parser for HTML
2
// http://htmlparser.org
3
// Copyright (C) 2006 Derrick Oswald
4
//
5
// Revision Control Information
6
//
7
// $URL: https://svn.sourceforge.net/svnroot/htmlparser/trunk/thumbelina/src/main/java/org/htmlparser/lexerapplications/thumbelina/Tile.java $
8
// $Author: derrickoswald $
9
// $Date: 2006-09-16 10:44:17 -0400 (Sat, 16 Sep 2006) $
10
// $Revision: 4 $
11
//
12
// This library is free software; you can redistribute it and/or
13
// modify it under the terms of the Common Public License; either
14
// version 1.0 of the License, or (at your option) any later version.
15
//
16
// This library is distributed in the hope that it will be useful,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
// Common Public License for more details.
20
//
21
// You should have received a copy of the Common Public License
22
// along with this library; if not, the license is available from
23
// the Open Source Initiative (OSI) website:
24
// http://opensource.org/licenses/cpl1.0.php
25

26 package org.htmlparser.lexerapplications.thumbelina;
27
28 import java.awt.Rectangle JavaDoc;
29
30 /**
31  * Specifies the interface for Tile objects handled by the TileSet class.
32  * Basically a Rectangle with auxillary attributes.
33  */

34 public interface Tile extends Cloneable JavaDoc
35 {
36     /**
37      * Get the rectangular region for this tile.
38      * @return A rectangle boundary.
39      */

40     Rectangle JavaDoc getBounds ();
41
42     /**
43      * Set the rectangular region for this tile.
44      * Crops the tile to the size provided.
45      * @param rectangle The new boundary.
46      */

47     void setBounds (Rectangle JavaDoc rectangle);
48
49     /*
50      * Returns true if this tile is valid.
51      * @return <code>true</code> when the tile has not been marked invalid.
52      */

53     boolean getValid ();
54
55     /**
56      * Sets the validity of the tile.
57      * @param valid If <code>true</code> the tile is marked valid,
58      * false otherwise.
59      */

60     void setValid (boolean valid);
61     
62     /**
63      * Return the distinguishing identity for this tile.
64      * @return An object suitable for use in hashing or testing for equality.
65      */

66     Object JavaDoc getIdentity ();
67
68     /**
69      * Set the distinguishing identity for this tile.
70      * This will usually have semantic meaning for the tile, so it should
71      * be of the type expected by the implementing class.
72      * @param object An object defining this tile's identity.
73      */

74     void setIdentity (Object JavaDoc object);
75
76     /**
77      * Reset the tile to it's uncropped size.
78      */

79     void reset ();
80
81     /**
82      * Clone this object.
83      * Exposes java.lang.Object clone() as a public method.
84      * @return A clone of this object.
85      */

86     Object JavaDoc clone ();
87 }
88
Popular Tags