1 /******************************************************************************
2 * MosaicTile.java - Define one Tile (a tiny pic) in a Mosaic
3 *
4 * PicMan - The BuckoSoft Picture Manager in Java
5 * Copyright(c) 2008 - Dick Balaska
6 *
7 */
8 package com.buckosoft.PicMan.domain;
9
10 /** Define one Tile (a tiny pic) in a Mosaic.
11 * This is so we can resume Mosaic creation.
12 * @author Dick Balaska
13 *
14 */
15 public class MosaicTile {
16 private int mid;
17 private int pid;
18 private int x;
19 private int y;
20 private int width;
21 private int height;
22
23 public MosaicTile() {}
24
25 /** Convienence constructor to build a MosaicTile in one go
26 * @param mid The mosaicId that this tile belongs to
27 * @param pid The picId of this Tile
28 * @param x The X of where this Tile lies in the Mosaic (in pixels)
29 * @param y The Y of where this Tile lies in the Mosaic (in pixels)
30 * @param width The scaled width of this Tile
31 * @param height The scaled height of this Tile
32 */
33 public MosaicTile(int mid, int pid, int x, int y, int width, int height) {
34 this.mid = mid;
35 this.pid = pid;
36 this.x = x;
37 this.y = y;
38 this.width = width;
39 this.height = height;
40 }
41
42 /**
43 * @return the mid
44 */
45 public int getMid() {
46 return mid;
47 }
48
49 /**
50 * @param mid the mid to set
51 */
52 public void setMid(int mid) {
53 this.mid = mid;
54 }
55
56 /**
57 * @return the pid
58 */
59 public int getPid() {
60 return pid;
61 }
62
63 /**
64 * @param pid the pid to set
65 */
66 public void setPid(int pid) {
67 this.pid = pid;
68 }
69
70 /**
71 * @return the x
72 */
73 public int getX() {
74 return x;
75 }
76
77 /**
78 * @param x the x to set
79 */
80 public void setX(int x) {
81 this.x = x;
82 }
83
84 /**
85 * @return the y
86 */
87 public int getY() {
88 return y;
89 }
90
91 /**
92 * @param y the y to set
93 */
94 public void setY(int y) {
95 this.y = y;
96 }
97
98 /**
99 * @return the width
100 */
101 public int getWidth() {
102 return width;
103 }
104
105 /**
106 * @param width the width to set
107 */
108 public void setWidth(int width) {
109 this.width = width;
110 }
111
112 /**
113 * @return the height
114 */
115 public int getHeight() {
116 return height;
117 }
118
119 /**
120 * @param height the height to set
121 */
122 public void setHeight(int height) {
123 this.height = height;
124 }
125
126 }