Statistics
| Revision:

root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / gui / layout / fframes / FFrameText.java @ 3041

History | View | Annotate | Download (17.6 KB)

1
/*
2
 * Created on 22-jun-2004
3
 *
4
 */
5
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
6
 *
7
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
8
 *
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation; either version 2
12
 * of the License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
22
 *
23
 * For more information, contact:
24
 *
25
 *  Generalitat Valenciana
26
 *   Conselleria d'Infraestructures i Transport
27
 *   Av. Blasco Ib??ez, 50
28
 *   46010 VALENCIA
29
 *   SPAIN
30
 *
31
 *      +34 963862235
32
 *   gvsig@gva.es
33
 *      www.gvsig.gva.es
34
 *
35
 *    or
36
 *
37
 *   IVER T.I. S.A
38
 *   Salamanca 50
39
 *   46005 Valencia
40
 *   Spain
41
 *
42
 *   +34 963163400
43
 *   dac@iver.es
44
 */
45
package com.iver.cit.gvsig.gui.layout.fframes;
46

    
47
import java.awt.Color;
48
import java.awt.Font;
49
import java.awt.Graphics2D;
50
import java.awt.font.FontRenderContext;
51
import java.awt.font.TextLayout;
52
import java.awt.geom.AffineTransform;
53
import java.awt.geom.Rectangle2D;
54
import java.awt.image.BufferedImage;
55
import java.util.ArrayList;
56

    
57
import com.iver.andami.PluginServices;
58
import com.iver.cit.gvsig.gui.layout.Layout;
59
import com.iver.utiles.StringUtilities;
60
import com.iver.utiles.XMLEntity;
61

    
62

    
63
/**
64
 * FFrame para introducir un texto en el Layout.
65
 *
66
 * @author Vicente Caballero Navarro
67
 */
68
public class FFrameText extends FFrame {
69
        /** Localizaci?n del texto. */
70
        public static final int LEFT = 0;
71
        public static final int CENTER = 1;
72
        public static final int RIGTH = 2;
73
        private ArrayList m_text = new ArrayList();
74
        private boolean m_isFixed = false;
75
        //private double m_rotation = 0;
76
        private int m_pos = LEFT;
77
        private Color textColor = Color.BLACK;
78

    
79
        //jaume
80
        private boolean surrounded = false; // The text field is surrounded by a rectangle
81
        private int cellPadding = 0; // The gap between the the text field and the surrounding rectangle 
82
        private boolean fixedFontSize = false; // The text field font size is constant fixed to the folio's size
83
        private int fontSize; // Text field's font size
84
        private boolean hasTitle; // The text field has title
85
        private String title; // The text for the title
86
        private int titleSize; // The title's font size
87
        private int frameBorderSize; // The surrounding rectangle's border size
88
        private Color frameColor = Color.BLACK; // The surrounding rectangle's color
89
        private Color titleColor = Color.BLACK; // The title's color
90

    
91
        //private int m_space=0;
92
        private Font m_f = null;
93

    
94
        /**
95
         * Crea un nuevo FFrameText.
96
         */
97

    
98
        //        public FFrameText(Layout l) {
99
        //            layout=l;
100
        //                m_f = new Font("SansSerif", Font.PLAIN, 9);
101
        //        }
102
        public FFrameText() {
103
                m_f = new Font("SansSerif", Font.PLAIN, 9);
104
        }
105

    
106
        /**
107
         * Inserta la fuente del texto.
108
         *
109
         * @param f Fuente del texto.
110
         */
111
        public void setFont(Font f) {
112
                m_f = f;
113
        }
114

    
115
        /**
116
         * Devuelve el color del texto del FFrameText.
117
         *
118
         * @return Color del texto.
119
         */
120
        public Color getTextColor() {
121
                return textColor;
122
        }
123

    
124
        /**
125
         * Obtiene el fixedFontSize
126
         *
127
         * @return boolean
128
         */
129
        public boolean isFontSizeFixed() {
130
                return fixedFontSize;
131
        }
132

    
133
        /**
134
         * Establece fixedFontSize
135
         *
136
         * @param fixedFontSize
137
         */
138
        public void setFixedFontSize(boolean fixedFontSize) {
139
                this.fixedFontSize = fixedFontSize;
140
        }
141

    
142
        /**
143
         * Obtiene el fontSize
144
         *
145
         * @return int
146
         */
147
        public int getFontSize() {
148
                return fontSize;
149
        }
150

    
151
        /**
152
         * Establece fontSize
153
         *
154
         * @param fontSize
155
         */
156
        public void setFontSize(int fontSize) {
157
                this.fontSize = fontSize;
158
        }
159

    
160
        /**
161
         * Obtiene el cellPadding
162
         *
163
         * @return int
164
         */
165
        public int getCellPadding() {
166
                return cellPadding;
167
        }
168

    
169
        /**
170
         * Inserta el color del texto a escribir.
171
         *
172
         * @param color Color del texto.
173
         */
174
        public void setTextColor(Color color) {
175
                textColor = color;
176
        }
177

    
178
        /**
179
         * Devuelve la fuente del texto.
180
         *
181
         * @return Fuente del texto.
182
         */
183
        public Font getFont() {
184
                return new Font(m_f.getFontName(), m_f.getStyle(), 9);
185
        }
186

    
187
        /*public void setSpace(int s){
188
           m_space=s;
189
           }
190
           public int getSpace(){
191
                   return m_space;
192
           }*/
193

    
194
        /**
195
         * Devuelve la posici?n izquierda, centro o derecha del texto.
196
         *
197
         * @return Posici?n del texto.
198
         */
199
        public int getPos() {
200
                return m_pos;
201
        }
202

    
203
        /**
204
         * Pone la posici?n izquierda, centro o derecha del texto.
205
         *
206
         * @param p 0=LEFT,1=CENTER,2=RIGTH.
207
         */
208
        public void setPos(int p) {
209
                m_pos = p;
210
        }
211

    
212
        /**
213
         * M?todo que dibuja sobre el graphics que se le pasa como par?metro, seg?n
214
         * la transformada afin que se debe de aplicar y el rect?ngulo que se debe
215
         * de dibujar.
216
         *
217
         * @param g Graphics
218
         * @param at Transformada af?n.
219
         * @param rv rect?ngulo sobre el que hacer un clip.
220
         * @param imgBase Imagen para acelerar el dibujado.
221
         */
222
        public void draw(Graphics2D g, AffineTransform at, Rectangle2D rv,
223
                BufferedImage imgBase) {
224
                g.setColor(Color.BLACK);
225
                Rectangle2D.Double rec = getBoundingBox(at);
226
                Rectangle2D.Double raux = (Rectangle2D.Double) rec.clone();
227
                g.rotate(Math.toRadians(getRotation()), raux.x + (raux.width / 2),
228
                                raux.y + (raux.height / 2));
229
                int longmax = 1;
230

    
231
                if (intersects(rv, raux)) { // comprueba que no cae fuera de la pantalla
232

    
233
                        if (m_text.isEmpty()) {
234
                                drawEmpty(g);
235
                        } else {
236
                                for (int i = 0; i < m_text.size(); i++) {
237
                    if (m_text.get(i) == null)
238
                        m_text.set(i,"<NULL>");
239
                                        if (((String) m_text.get(i)).length() > longmax) {
240
                                                longmax = ((String) m_text.get(i)).length();
241
                                        }
242
                                }
243

    
244
                                FontRenderContext frc = g.getFontRenderContext();
245
                                int scaledFontSize;
246

    
247
                                // TODO myScale es la escala sobre la que se extraen todos los escalados. Esto
248
                                // funciona bien tal cual est? si la ratio de aspecto (alto/ancho) del folio es constante
249
                                // porque se toma como medidas el ancho del folio real y el ancho del folio en pantalla.
250
                                // No se que pasar? si la ratio cambia, por ejemplo si se usan USLetter en lugar de DIN A4
251
                                double myScale = at.getScaleX() * 0.0234; //FLayoutUtilities.fromSheetDistance(folio.getAncho(),at)/rv.getWidth();
252

    
253
                                // Distinguish when the font has fixed size or not
254
                                if (isFontSizeFixed()) {
255
                                        scaledFontSize = (int) (myScale * fontSize);
256
                                } else {
257
                                        scaledFontSize = ((int) (raux.width)) / longmax;
258

    
259
                                        if (scaledFontSize > (int) ((raux.height) / m_text.size())) {
260
                                                scaledFontSize = (int) ((raux.height) / m_text.size());
261
                                        }
262
                                }
263

    
264
                                if (m_f != null) {
265
                                        // Aqu? se ajusta a partir de las caracter?sticas de la fuente, una nueva fuente con el tama?o ajustado.
266
                                        m_f = new Font(m_f.getFontName(), m_f.getStyle(),
267
                                                        scaledFontSize);
268
                                } else {
269
                                        // Aqu? pasa cuando se abre el di?logo para seleccionar un tipo de fuente y se cierra sin haber seleccionado ninguna.
270
                                        m_f = new Font("SansSerif", Font.PLAIN, scaledFontSize);
271
                                }
272

    
273
                                // Draw the text title if it exists
274
                                if (hasTitle()) {
275
                                        int scaledTitleFontSize = (int) (myScale * titleSize);
276
                                        int gap = 3;
277

    
278
                                        if (isSurrounded()) {
279
                                                // Para evitar que el marco se pinte sobre el t?tulo
280
                                                gap += (int) (frameBorderSize * myScale);
281
                                        }
282

    
283
                                        g.setColor(titleColor);
284

    
285
                                        Font titleFont = new Font(m_f.getFontName(),
286
                                                        m_f.getStyle(), scaledTitleFontSize);
287
                                        if (!getTitle().equals("")){
288
                                        TextLayout titleTextLayout = new TextLayout(getTitle(),
289
                                                        titleFont, frc);
290
                                        titleTextLayout.draw(g, (float) raux.getX(),
291
                                                (float) (raux.getY() - (gap * myScale)));
292
                                        }
293
                                }
294

    
295
                                // Draw the frame involving the text if it exists
296
                                if (isSurrounded()) {
297
                                        g.setColor(frameColor);
298
                                        g.drawRect((int) raux.x, (int) raux.y, (int) raux.width,
299
                                                (int) raux.height);
300

    
301
                                        double scaledCellPadding = cellPadding * myScale;
302

    
303
                                        if (frameBorderSize > 1) {
304
                                                System.out.println("borderSize = " + frameBorderSize);
305

    
306
                                                int scaledBorderSize = (int) (frameBorderSize * myScale);
307

    
308
                                                for (int i = scaledBorderSize - 1; i > 0; i--)
309
                                                        g.drawRect((int) raux.x - i, (int) raux.y - i,
310
                                                                (int) raux.width + (2 * i),
311
                                                                (int) raux.height + (2 * i));
312
                                        }
313

    
314
                                        // Recalibro el rectangulo para establecer el ?rea donde se dibujan las fuentes
315
                                        // al ?rea marcada con el rat?n menos la distancia al marco especificada
316
                                        raux.setRect(raux.getX() + scaledCellPadding,
317
                                                raux.getY() + scaledCellPadding,
318
                                                raux.getWidth() - (scaledCellPadding * 2),
319
                                                raux.getHeight() - (scaledCellPadding * 2));
320
                                }
321

    
322
                                g.setColor(textColor);
323
                                
324

    
325
                                drawText(raux, scaledFontSize, g);
326
                                g.rotate(Math.toRadians(-getRotation()),
327
                                        raux.x + (raux.width / 2), raux.y + (raux.height / 2));
328
                        }
329
                }
330

    
331
                raux = null;
332
        }
333

    
334
        /**
335
         * Dibuja el texto sobre el graphics con el tama?o adecuado.
336
         *
337
         * @param r Rect?ngulo sobre el que dibujar.
338
         * @param sfs Tama?o aproximado del texto.
339
         * @param g Graphics sobre el que dibujar el texto.
340
         */
341
        private void drawText(Rectangle2D r, int sfs, Graphics2D g) {
342
                int minSFS = Integer.MAX_VALUE;
343
                FontRenderContext frc = g.getFontRenderContext();
344
                int ht = (int) (r.getHeight() / m_text.size());
345
if (isFontSizeFixed()){
346
        minSFS=sfs;
347
}else{
348
                for (int i = 0; i < m_text.size(); i++) {
349
                        if (!((String) m_text.get(i)).equals("")) {
350
                                TextLayout textaux = new TextLayout((String) m_text.get(i),
351
                                                m_f, frc);
352
                                Rectangle2D txtBound = textaux.getBounds();
353
                                double difW = txtBound.getWidth() / r.getWidth();
354
                                double difH = (txtBound.getHeight() * m_text.size()) / (r.getHeight());
355

    
356
                                if (difW > difH) {
357
                                        if (minSFS > sfs) {
358
                                                minSFS = (int) (sfs / difW);
359
                                        }
360
                                } else {
361
                                        if (minSFS > sfs) {
362
                                                minSFS = (int) (sfs / difH);
363
                                        }
364
                                }
365
                        }
366
                }
367
}
368

    
369
                TextLayout textLayout = null;
370

    
371
                for (int i = 0; i < m_text.size(); i++) {
372
                        if (!((String) m_text.get(i)).equals("")) {
373
                                m_f = new Font(m_f.getFontName(), m_f.getStyle(), minSFS);
374

    
375
                                textLayout = new TextLayout((String) m_text.get(i), m_f, frc);
376

    
377
                                Rectangle2D txtBound = textLayout.getBounds();
378
                                float difW = (float) (r.getWidth() - txtBound.getWidth());
379

    
380
                                switch (m_pos) {
381
                                        case (LEFT):
382
                                                textLayout.draw(g, (float) r.getX(),
383
                                                        (float) (r.getY() + (ht * (i + 1))));
384

    
385
                                                break;
386

    
387
                                        case (CENTER):
388
                                                textLayout.draw(g, (float) r.getX() + (difW / 2),
389
                                                        (float) (r.getY() + (ht * (i + 1))));
390

    
391
                                                break;
392

    
393
                                        case (RIGTH):
394
                                                textLayout.draw(g, (float) r.getX() + difW,
395
                                                        (float) (r.getY() + (ht * (i + 1)))); //- (ht / 2))));
396

    
397
                                                break;
398
                                }
399
                        }
400
                }
401
        }
402

    
403
        /**
404
         * @see com.iver.cit.gvsig.gui.layout.fframes.IFFrame#print(java.awt.Graphics2D,
405
         *                 java.awt.geom.AffineTransform)
406
         */
407
        public void print(Graphics2D g, AffineTransform at) {
408
                draw(g, at, null, null);
409
        }
410

    
411
        /**
412
         * Rellenar el texto que se quiere a?adir al Layout.
413
         *
414
         * @param s String a a?adir.
415
         */
416
        public void addText(String s) {
417
                m_text.add(s);
418
        }
419

    
420
        /**
421
         * Devuelve el ArrayList que contiene las l?neas de texto.
422
         *
423
         * @return ArrayList.
424
         */
425
        public ArrayList getText() {
426
                return m_text;
427
        }
428

    
429
        /**
430
         * Seleccionar si se quiere un tama?o fijo o adecuado a la escala.
431
         *
432
         * @param b true si se quiere tama?o fijo.
433
         */
434
        public void setSizeFixed(boolean b) {
435
                m_isFixed = b;
436
        }
437

    
438
        /**
439
         * Devuelve si est? fijado el tama?o.
440
         *
441
         * @return True si est? fijado el tama?o.
442
         */
443
        public boolean isSizeFixed() {
444
                return m_isFixed;
445
        }
446

    
447
        
448

    
449
        /**
450
         * @see com.iver.cit.gvsig.gui.layout.fframes.IFFrame#getXMLEntity()
451
         */
452
        public XMLEntity getXMLEntity() {
453
                XMLEntity xml = new XMLEntity();
454
                xml.putProperty("className", this.getClass().getName());
455
                xml.putProperty("m_name", m_name);
456
                xml.putProperty("x", getBoundBox().x);
457
                xml.putProperty("y", getBoundBox().y);
458
                xml.putProperty("w", getBoundBox().width);
459
                xml.putProperty("h", getBoundBox().height);
460
                xml.putProperty("m_Selected", m_Selected);
461
                xml.putProperty("type", Layout.RECTANGLETEXT);
462

    
463
                String[] s = (String[]) m_text.toArray(new String[0]);
464
                xml.putProperty("s", s);
465
                xml.putProperty("m_isFixed", m_isFixed);
466
                xml.putProperty("m_rotation",getRotation());
467
                xml.putProperty("m_pos", m_pos);
468
                
469
                xml.putProperty("fontName", m_f.getFontName());
470
                xml.putProperty("fontStyle", m_f.getStyle());
471
                xml.putProperty("tag", getTag());
472
                xml.putProperty("textColor", StringUtilities.color2String(textColor));
473

    
474
                // jaume
475
                xml.putProperty("cellPadding", cellPadding);
476
                xml.putProperty("fontSize", fontSize);
477
                xml.putProperty("fixedFontSize", fixedFontSize);
478
                xml.putProperty("surrounded", surrounded);
479
                xml.putProperty("hasTitle", hasTitle);
480
                xml.putProperty("title", title);
481
                xml.putProperty("titleSize", titleSize);
482
                xml.putProperty("frameBorderSize", frameBorderSize);
483
                xml.putProperty("frameColor", StringUtilities.color2String(frameColor));
484
                xml.putProperty("titleColor", StringUtilities.color2String(titleColor));
485

    
486
                return xml;
487
        }
488

    
489
        /**
490
         * @see com.iver.cit.gvsig.gui.layout.fframes.IFFrame#setXMLEntity(com.iver.utiles.XMLEntity,
491
         *                 com.iver.cit.gvsig.project.Project)
492
         */
493
        public void setXMLEntity03(XMLEntity xml, Layout l) {
494
                if (xml.getIntProperty("m_Selected") != 0) {
495
                        this.setSelected(true);
496
                } else {
497
                        this.setSelected(false);
498
                }
499

    
500
                String[] s = xml.getStringArrayProperty("s");
501

    
502
                for (int i = 0; i < s.length; i++) {
503
                        this.m_text.add(s[i]);
504
                }
505

    
506
                this.m_isFixed = xml.getBooleanProperty("m_isFixed");
507
                this.m_pos = xml.getIntProperty("m_pos");
508
                setRotation(xml.getDoubleProperty("m_rotation"));
509
                
510
                this.m_f = new Font(xml.getStringProperty("fontName"),
511
                                xml.getIntProperty("fontStyle"), 9);
512

    
513
                if (xml.contains("textColor")) {
514
                        this.textColor = StringUtilities.string2Color(xml.getStringProperty(
515
                                                "textColor"));
516
                }
517
        }
518

    
519
        /**
520
         * @see com.iver.cit.gvsig.gui.layout.fframes.IFFrame#setXMLEntity(com.iver.utiles.XMLEntity,
521
         *                 com.iver.cit.gvsig.project.Project)
522
         */
523
        public void setXMLEntity(XMLEntity xml, Layout l) {
524
                if (xml.getIntProperty("m_Selected") != 0) {
525
                        this.setSelected(true);
526
                } else {
527
                        this.setSelected(false);
528
                }
529

    
530
                String[] s = xml.getStringArrayProperty("s");
531

    
532
                for (int i = 0; i < s.length; i++) {
533
                        this.m_text.add(s[i]);
534
                }
535

    
536
                this.m_isFixed = xml.getBooleanProperty("m_isFixed");
537
                this.m_pos = xml.getIntProperty("m_pos");
538
                setRotation(xml.getDoubleProperty("m_rotation"));
539
                this.m_f = new Font(xml.getStringProperty("fontName"),
540
                                xml.getIntProperty("fontStyle"), 9);
541

    
542
                if (xml.contains("textColor")) {
543
                        this.textColor = StringUtilities.string2Color(xml.getStringProperty(
544
                                                "textColor"));
545
                }
546

    
547
                // jaume
548
                if (xml.contains("cellPadding")) {
549
                        this.cellPadding = xml.getIntProperty("cellPadding");
550
                }
551

    
552
                if (xml.contains("fontSize")) {
553
                        this.fontSize = xml.getIntProperty("fontSize");
554
                }
555

    
556
                if (xml.contains("fixedFontSize")) {
557
                        this.fixedFontSize = xml.getBooleanProperty("fixedFontSize");
558
                }
559

    
560
                if (xml.contains("surrounded")) {
561
                        this.surrounded = xml.getBooleanProperty("surrounded");
562
                }
563

    
564
                if (xml.contains("hasTitle")) {
565
                        this.hasTitle = xml.getBooleanProperty("hasTitle");
566
                }
567

    
568
                if (xml.contains("title")) {
569
                        this.title = xml.getStringProperty("title");
570
                }
571

    
572
                if (xml.contains("titleSize")) {
573
                        this.titleSize = xml.getIntProperty("titleSize");
574
                }
575

    
576
                if (xml.contains("frameBorderSize")) {
577
                        this.frameBorderSize = xml.getIntProperty("frameBorderSize");
578
                }
579

    
580
                if (xml.contains("frameColor")) {
581
                        this.frameColor = StringUtilities.string2Color(xml.getStringProperty(
582
                                                "frameColor"));
583
                }
584

    
585
                if (xml.contains("titleColor")) {
586
                        this.titleColor = StringUtilities.string2Color(xml.getStringProperty(
587
                                                "titleColor"));
588
                }
589
        }
590

    
591
        /**
592
         * @see com.iver.cit.gvsig.gui.layout.fframes.IFFrame#getNameFFrame()
593
         */
594
        public String getNameFFrame() {
595
                return PluginServices.getText(this, "texto") + num;
596
        }
597

    
598
        /**
599
         * Sets FFrameText to draw an involving rectangle
600
         *
601
         * @param b
602
         */
603
        public void setSurrounded(boolean b) {
604
                surrounded = b;
605
        }
606

    
607
        /**
608
         * True if the FFrameText is set to draw an involving rectangle, or false
609
         * if not.
610
         *
611
         * @return boolean
612
         */
613
        public boolean isSurrounded() {
614
                return surrounded;
615
        }
616

    
617
        /**
618
         * Sets the gap between the involving rectangle and the text
619
         *
620
         * @param i
621
         */
622
        public void setCellPadding(int i) {
623
                cellPadding = i;
624
        }
625

    
626
        /**
627
         * DOCUMENT ME!
628
         *
629
         * @return
630
         */
631
        public boolean hasTitle() {
632
                return hasTitle;
633
        }
634

    
635
        /**
636
         * DOCUMENT ME!
637
         *
638
         * @return
639
         */
640
        public String getTitle() {
641
                return title;
642
        }
643

    
644
        /**
645
         * DOCUMENT ME!
646
         *
647
         * @param b
648
         */
649
        public void setHasTitle(boolean b) {
650
                hasTitle = b;
651
        }
652

    
653
        /**
654
         * DOCUMENT ME!
655
         *
656
         * @param text
657
         */
658
        public void setTitle(String text) {
659
                title = text;
660
        }
661

    
662
        /**
663
         * DOCUMENT ME!
664
         *
665
         * @return
666
         */
667
        public int getTitleSize() {
668
                return titleSize;
669
        }
670

    
671
        /**
672
         * DOCUMENT ME!
673
         *
674
         * @param size DOCUMENT ME!
675
         */
676
        public void setTitleSize(int size) {
677
                titleSize = size;
678
        }
679

    
680
        /**
681
         * DOCUMENT ME!
682
         *
683
         * @param size
684
         */
685
        public void setFrameBorderSize(int size) {
686
                frameBorderSize = size;
687
        }
688

    
689
        /**
690
         * DOCUMENT ME!
691
         *
692
         * @return
693
         */
694
        public int getFrameBorderSize() {
695
                return frameBorderSize;
696
        }
697

    
698
        /**
699
         * DOCUMENT ME!
700
         *
701
         * @param frameColor
702
         */
703
        public void setFrameColor(Color frameColor) {
704
                this.frameColor = frameColor;
705
        }
706

    
707
        /**
708
         * DOCUMENT ME!
709
         *
710
         * @param titleColor DOCUMENT ME!
711
         */
712
        public void setTitleColor(Color titleColor) {
713
                this.titleColor = titleColor;
714
        }
715

    
716
        /**
717
         * DOCUMENT ME!
718
         *
719
         * @return DOCUMENT ME!
720
         */
721
        public Color getFrameColor() {
722
                return frameColor;
723
        }
724

    
725
        /**
726
         * DOCUMENT ME!
727
         *
728
         * @return DOCUMENT ME!
729
         */
730
        public Color getTitleColor() {
731
                return titleColor;
732
        }
733

    
734
        /**
735
         * Use this method if you want the text in the FFrameText to be removed.
736
         */
737
        public void clearText() {
738
                m_text.clear();
739
        }
740
}