1
2
3
4
5
6
7
8
9
10
11
12
13
14 package org.gscg.gameleader.animation2D;
15
16 import java.awt.Dimension;
17
18 import nl.tudelft.simulation.dsol.animation.D2.ImageRenderable;
19 import nl.tudelft.simulation.language.d3.DirectedPoint;
20
21
22 /***
23 * The SingleImageDataElement contains the data for a single image renderable
24 * which can be displayed on a remote animation panel.
25 * <p>
26 *
27 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
28 * Delft, the Netherlands. All rights reserved.
29 *
30 * See for project information <a href="http://www.simulation.tudelft.nl/">
31 * www.simulation.tudelft.nl </a>.
32 *
33 * The source code and binary code of this software is proprietary information
34 * of Delft University of Technology.
35 *
36 * @author <a
37 * href="http://www.tbm.tudelft.nl/webstaf/stijnh/index.htm">Stijn-Pieter
38 * van Houten </a>
39 * @version $Revision: 1.1 $ $Date: 2005/06/16 12:34:03 $
40 * @since 1.0
41 */
42 public class SingleImageDataElement extends ImageDataElement
43 {
44 /*** the serial version uid */
45 private static final long serialVersionUID = 11L;
46
47 /*** the dimension of the image */
48 private Dimension dimension = null;
49
50 /*** flip */
51 private boolean flip = false;
52
53 /*** orientation */
54 private short orientation = ImageRenderable.CC;
55
56 /*** rotation */
57 private boolean rotate = false;
58
59 /*** scaling */
60 private boolean scale = false;
61
62 /*** translation */
63 private boolean translate = false;
64
65 /***
66 * constructs a new ImageDataElement
67 *
68 * @param type the type of the image
69 * @param key the key
70 * @param image the name of the image
71 * @param location the location
72 * @param dimension the dimension of the image
73 * @param flip boolean for flip
74 * @param orientation the orientation
75 * @param rotate boolean for rotation
76 * @param scale boolean for scale
77 * @param translate boolean for translation
78 */
79 public SingleImageDataElement(final String type, final String key,
80 final String image, final DirectedPoint location,
81 final Dimension dimension, final boolean flip,
82 final short orientation, final boolean rotate, final boolean scale,
83 final boolean translate)
84 {
85 super(type, key, location, image);
86 this.dimension = dimension;
87 this.flip = flip;
88 this.orientation = orientation;
89 this.rotate = rotate;
90 this.scale = scale;
91 this.translate = translate;
92 }
93
94 /***
95 * @return returns the dimension of the image
96 */
97 public Dimension getDimension()
98 {
99 return this.dimension;
100 }
101
102 /***
103 * @return returns the boolean for flipping
104 */
105 public boolean isFlip()
106 {
107 return this.flip;
108 }
109
110 /***
111 * @return returns the orientation
112 */
113 public short getOrientation()
114 {
115 return this.orientation;
116 }
117
118 /***
119 * @return returns the boolean for rotating
120 */
121 public boolean isRotate()
122 {
123 return this.rotate;
124 }
125
126 /***
127 * @return returns the boolean for scaling
128 */
129 public boolean isScale()
130 {
131 return this.scale;
132 }
133
134 /***
135 * @return returns the boolean for translation
136 */
137 public boolean isTranslate()
138 {
139 return this.translate;
140 }
141 }