View Javadoc

1   
2   	 	/**
3            IMPORTANT !!!
4   
5            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY
6            THE JavaClassesGenerator.xslt. MODIFY THAT FILE INSTEAD OF THIS ONE.
7            
8            Use Ant task process-gb-messages after that to generate .java files again.
9            
10           IMPORTANT END !!!
11          */
12   	package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13   		/**
14   		 * Representation of the GameBots2004 command SETEMOT.
15   		 *
16   		 * 
17  		Sets the emoticon for current bot.
18  	
19           */
20   	public class SetEmoticon 
21  		extends CommandMessage
22  	        {
23  	        	
24  		        
25      	/** Example how the message looks like - used during parser tests. */
26      	public static final String PROTOTYPE =
27      		" {Center text}  {CenterSize 0}  {Left text}  {LeftSize 0}  {Right text}  {RightSize 0}  {BubbleType text}  {BubbleSize 0}  {Time 0} ";
28      
29  		/**
30  		 * Creates new instance of command SetEmoticon.
31  		 * 
32  		Sets the emoticon for current bot.
33  	
34  		 * Corresponding GameBots message for this command is
35  		 * SETEMOT.
36  		 *
37  		 * 
38  		 *    @param Center 
39              Sets the center emoticon.
40          
41  		 *    @param CenterSize 
42              Sets the center emoticon size. 0 will disable the emoticon.
43          
44  		 *    @param Left 
45              Sets the left emoticon.
46          
47  		 *    @param LeftSize 
48              Sets the left emoticon size. 0 will disable the emoticon.
49          
50  		 *    @param Right 
51              Sets the right emoticon.
52          
53  		 *    @param RightSize 
54              Sets the right emoticon size. 0 will disable the emoticon.
55          
56  		 *    @param BubbleType 
57              Sets the bubble type behind the emoticons.
58          
59  		 *    @param BubbleSize 
60              Sets the bubble size behind the emoticons. 0 for no bubble.
61          
62  		 *    @param Time 
63              Fade out of the emoticons in seconds.
64          
65  		 */
66  		public SetEmoticon(
67  			String Center,  Integer CenterSize,  String Left,  Integer LeftSize,  String Right,  Integer RightSize,  String BubbleType,  Integer BubbleSize,  Double Time
68  		) {
69  			
70  				this.Center = Center;
71              
72  				this.CenterSize = CenterSize;
73              
74  				this.Left = Left;
75              
76  				this.LeftSize = LeftSize;
77              
78  				this.Right = Right;
79              
80  				this.RightSize = RightSize;
81              
82  				this.BubbleType = BubbleType;
83              
84  				this.BubbleSize = BubbleSize;
85              
86  				this.Time = Time;
87              
88  		}
89  
90  		
91  			/**
92  			 * Creates new instance of command SetEmoticon.
93  			 * 
94  		Sets the emoticon for current bot.
95  	
96  			 * Corresponding GameBots message for this command is
97  			 * SETEMOT.
98  			 * <p></p>
99  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
100 		     */
101 		    public SetEmoticon() {
102 		    }
103 			
104 		
105 		/**
106 		 * Cloning constructor.
107 		 *
108 		 * @param original
109 		 */
110 		public SetEmoticon(SetEmoticon original) {
111 		   
112 		        this.Center = original.Center;
113 		   
114 		        this.CenterSize = original.CenterSize;
115 		   
116 		        this.Left = original.Left;
117 		   
118 		        this.LeftSize = original.LeftSize;
119 		   
120 		        this.Right = original.Right;
121 		   
122 		        this.RightSize = original.RightSize;
123 		   
124 		        this.BubbleType = original.BubbleType;
125 		   
126 		        this.BubbleSize = original.BubbleSize;
127 		   
128 		        this.Time = original.Time;
129 		   
130 		}
131     
132 	        /**
133 	        
134             Sets the center emoticon.
135          
136 	        */
137 	        protected
138 	         String Center =
139 	       	
140 	        		null
141 	        	;
142 	
143 	        
144 	        
145  		/**
146          * 
147             Sets the center emoticon.
148          
149          */
150         public String getCenter()
151  	
152 	        {
153 	            return
154 	        	 Center;
155 	        }
156 	        
157 	        
158 	        
159  		
160  		/**
161          * 
162             Sets the center emoticon.
163          
164          */
165         public SetEmoticon 
166         setCenter(String Center)
167  	
168 			{
169 				this.Center = Center;
170 				return this;
171 			}
172 		
173 	        /**
174 	        
175             Sets the center emoticon size. 0 will disable the emoticon.
176          
177 	        */
178 	        protected
179 	         Integer CenterSize =
180 	       	
181 	        		null
182 	        	;
183 	
184 	        
185 	        
186  		/**
187          * 
188             Sets the center emoticon size. 0 will disable the emoticon.
189          
190          */
191         public Integer getCenterSize()
192  	
193 	        {
194 	            return
195 	        	 CenterSize;
196 	        }
197 	        
198 	        
199 	        
200  		
201  		/**
202          * 
203             Sets the center emoticon size. 0 will disable the emoticon.
204          
205          */
206         public SetEmoticon 
207         setCenterSize(Integer CenterSize)
208  	
209 			{
210 				this.CenterSize = CenterSize;
211 				return this;
212 			}
213 		
214 	        /**
215 	        
216             Sets the left emoticon.
217          
218 	        */
219 	        protected
220 	         String Left =
221 	       	
222 	        		null
223 	        	;
224 	
225 	        
226 	        
227  		/**
228          * 
229             Sets the left emoticon.
230          
231          */
232         public String getLeft()
233  	
234 	        {
235 	            return
236 	        	 Left;
237 	        }
238 	        
239 	        
240 	        
241  		
242  		/**
243          * 
244             Sets the left emoticon.
245          
246          */
247         public SetEmoticon 
248         setLeft(String Left)
249  	
250 			{
251 				this.Left = Left;
252 				return this;
253 			}
254 		
255 	        /**
256 	        
257             Sets the left emoticon size. 0 will disable the emoticon.
258          
259 	        */
260 	        protected
261 	         Integer LeftSize =
262 	       	
263 	        		null
264 	        	;
265 	
266 	        
267 	        
268  		/**
269          * 
270             Sets the left emoticon size. 0 will disable the emoticon.
271          
272          */
273         public Integer getLeftSize()
274  	
275 	        {
276 	            return
277 	        	 LeftSize;
278 	        }
279 	        
280 	        
281 	        
282  		
283  		/**
284          * 
285             Sets the left emoticon size. 0 will disable the emoticon.
286          
287          */
288         public SetEmoticon 
289         setLeftSize(Integer LeftSize)
290  	
291 			{
292 				this.LeftSize = LeftSize;
293 				return this;
294 			}
295 		
296 	        /**
297 	        
298             Sets the right emoticon.
299          
300 	        */
301 	        protected
302 	         String Right =
303 	       	
304 	        		null
305 	        	;
306 	
307 	        
308 	        
309  		/**
310          * 
311             Sets the right emoticon.
312          
313          */
314         public String getRight()
315  	
316 	        {
317 	            return
318 	        	 Right;
319 	        }
320 	        
321 	        
322 	        
323  		
324  		/**
325          * 
326             Sets the right emoticon.
327          
328          */
329         public SetEmoticon 
330         setRight(String Right)
331  	
332 			{
333 				this.Right = Right;
334 				return this;
335 			}
336 		
337 	        /**
338 	        
339             Sets the right emoticon size. 0 will disable the emoticon.
340          
341 	        */
342 	        protected
343 	         Integer RightSize =
344 	       	
345 	        		null
346 	        	;
347 	
348 	        
349 	        
350  		/**
351          * 
352             Sets the right emoticon size. 0 will disable the emoticon.
353          
354          */
355         public Integer getRightSize()
356  	
357 	        {
358 	            return
359 	        	 RightSize;
360 	        }
361 	        
362 	        
363 	        
364  		
365  		/**
366          * 
367             Sets the right emoticon size. 0 will disable the emoticon.
368          
369          */
370         public SetEmoticon 
371         setRightSize(Integer RightSize)
372  	
373 			{
374 				this.RightSize = RightSize;
375 				return this;
376 			}
377 		
378 	        /**
379 	        
380             Sets the bubble type behind the emoticons.
381          
382 	        */
383 	        protected
384 	         String BubbleType =
385 	       	
386 	        		null
387 	        	;
388 	
389 	        
390 	        
391  		/**
392          * 
393             Sets the bubble type behind the emoticons.
394          
395          */
396         public String getBubbleType()
397  	
398 	        {
399 	            return
400 	        	 BubbleType;
401 	        }
402 	        
403 	        
404 	        
405  		
406  		/**
407          * 
408             Sets the bubble type behind the emoticons.
409          
410          */
411         public SetEmoticon 
412         setBubbleType(String BubbleType)
413  	
414 			{
415 				this.BubbleType = BubbleType;
416 				return this;
417 			}
418 		
419 	        /**
420 	        
421             Sets the bubble size behind the emoticons. 0 for no bubble.
422          
423 	        */
424 	        protected
425 	         Integer BubbleSize =
426 	       	
427 	        		null
428 	        	;
429 	
430 	        
431 	        
432  		/**
433          * 
434             Sets the bubble size behind the emoticons. 0 for no bubble.
435          
436          */
437         public Integer getBubbleSize()
438  	
439 	        {
440 	            return
441 	        	 BubbleSize;
442 	        }
443 	        
444 	        
445 	        
446  		
447  		/**
448          * 
449             Sets the bubble size behind the emoticons. 0 for no bubble.
450          
451          */
452         public SetEmoticon 
453         setBubbleSize(Integer BubbleSize)
454  	
455 			{
456 				this.BubbleSize = BubbleSize;
457 				return this;
458 			}
459 		
460 	        /**
461 	        
462             Fade out of the emoticons in seconds.
463          
464 	        */
465 	        protected
466 	         Double Time =
467 	       	
468 	        		null
469 	        	;
470 	
471 	        
472 	        
473  		/**
474          * 
475             Fade out of the emoticons in seconds.
476          
477          */
478         public Double getTime()
479  	
480 	        {
481 	            return
482 	        	 Time;
483 	        }
484 	        
485 	        
486 	        
487  		
488  		/**
489          * 
490             Fade out of the emoticons in seconds.
491          
492          */
493         public SetEmoticon 
494         setTime(Double Time)
495  	
496 			{
497 				this.Time = Time;
498 				return this;
499 			}
500 		
501  	    public String toString() {
502             return toMessage();
503         }
504  	
505  		public String toHtmlString() {
506 			return super.toString() + "[<br/>" +
507             	
508             	"<b>Center</b> = " +
509             	String.valueOf(getCenter()
510  	) +
511             	" <br/> " +
512             	
513             	"<b>CenterSize</b> = " +
514             	String.valueOf(getCenterSize()
515  	) +
516             	" <br/> " +
517             	
518             	"<b>Left</b> = " +
519             	String.valueOf(getLeft()
520  	) +
521             	" <br/> " +
522             	
523             	"<b>LeftSize</b> = " +
524             	String.valueOf(getLeftSize()
525  	) +
526             	" <br/> " +
527             	
528             	"<b>Right</b> = " +
529             	String.valueOf(getRight()
530  	) +
531             	" <br/> " +
532             	
533             	"<b>RightSize</b> = " +
534             	String.valueOf(getRightSize()
535  	) +
536             	" <br/> " +
537             	
538             	"<b>BubbleType</b> = " +
539             	String.valueOf(getBubbleType()
540  	) +
541             	" <br/> " +
542             	
543             	"<b>BubbleSize</b> = " +
544             	String.valueOf(getBubbleSize()
545  	) +
546             	" <br/> " +
547             	
548             	"<b>Time</b> = " +
549             	String.valueOf(getTime()
550  	) +
551             	" <br/> " +
552             	 
553             	"<br/>]"
554             ;
555 		}
556  	
557 		public String toMessage() {
558      		StringBuffer buf = new StringBuffer();
559      		buf.append("SETEMOT");
560      		
561 						if (Center != null) {
562 							buf.append(" {Center " + Center + "}");
563 						}
564 					
565 						if (CenterSize != null) {
566 							buf.append(" {CenterSize " + CenterSize + "}");
567 						}
568 					
569 						if (Left != null) {
570 							buf.append(" {Left " + Left + "}");
571 						}
572 					
573 						if (LeftSize != null) {
574 							buf.append(" {LeftSize " + LeftSize + "}");
575 						}
576 					
577 						if (Right != null) {
578 							buf.append(" {Right " + Right + "}");
579 						}
580 					
581 						if (RightSize != null) {
582 							buf.append(" {RightSize " + RightSize + "}");
583 						}
584 					
585 						if (BubbleType != null) {
586 							buf.append(" {BubbleType " + BubbleType + "}");
587 						}
588 					
589 						if (BubbleSize != null) {
590 							buf.append(" {BubbleSize " + BubbleSize + "}");
591 						}
592 					
593 						if (Time != null) {
594 							buf.append(" {Time " + Time + "}");
595 						}
596 					
597    			return buf.toString();
598    		}
599  	
600  		// --- Extra Java from XML BEGIN (extra/code/java)
601         	
602 		// --- Extra Java from XML END (extra/code/java)
603  	
604 	        }
605