Source code: com/memoire/dja/DjaFrame.java
1 /**
2 * @modification $Date: 2002/01/14 18:22:55 $
3 * @statut unstable
4 * @file DjaFrame.java
5 * @version 0.36
6 * @author Guillaume Desnoix
7 * @email guillaume@desnoix.com
8 * @license GNU General Public License 2 (GPL2)
9 * @copyright 1998-2001 Guillaume Desnoix
10 */
11
12 package com.memoire.dja;
13
14 import com.memoire.fu.*;
15 import com.memoire.dnd.*;
16 import com.memoire.bu.*;
17 import com.memoire.dja.*;
18 import com.memoire.mst.*;
19
20
21 import java.awt.*;
22 import java.awt.event.*;
23 import java.io.*;
24 import java.beans.*;
25 import java.util.*;
26
27 import javax.swing.*;
28 import javax.swing.border.*;
29
30 public class DjaFrame
31 extends BuInternalFrame
32 implements ActionListener,
33 BuCutCopyPasteInterface,
34 BuPrintable,
35 BuSelectFindReplaceInterface
36 // BuUndoRedoInterface
37 {
38 protected BuCommonImplementation app_;
39 protected String file_;
40 protected DjaGrid grid_;
41 protected boolean tools_;
42
43 private JComponent content_;
44 private BuBorderLayout layout_;
45
46 protected BuToggleButton tbInteractive_;
47 protected BuButton btRecenter_;
48 protected BuButton btOverlap_;
49 protected BuButton btFront_;
50 protected BuButton btBack_;
51 protected BuButton btResize_;
52 protected BuButton btForeground_;
53 protected BuButton btBackground_;
54 protected BuButton btTextColor_;
55 protected BuButton btTextFont_;
56 protected BuButton btAddText_;
57 protected BuButton btRemoveText_;
58
59 protected BuPopupButton pbForms_;
60 protected BuPopupButton pbLinks_;
61 protected BuPopupButton pbUml_;
62 protected BuPopupButton pbBrcks_;
63 protected BuPopupButton pbStrks_;
64 protected BuPopupButton pbThkns_;
65
66 public DjaFrame(BuCommonImplementation _app,
67 String _file, DjaGrid _grid)
68 {
69 this(_app,_file,_grid,true);
70 }
71
72 public DjaFrame(BuCommonImplementation _app,
73 String _file, DjaGrid _grid, boolean _tools)
74 {
75 super("",true,true,true,true);
76 app_ =_app;
77 grid_ =_grid;
78 tools_=_tools;
79
80 setName("ifDJA");
81 // app_.installContextHelp(getRootPane(),"alma/source.html");
82
83 setFile(_file);
84
85 content_=(JComponent)getContentPane();
86 layout_=new BuBorderLayout();
87 content_.setLayout(layout_);
88 content_.setBorder(new EmptyBorder(0,0,0,0));
89
90 content_.add(new JScrollPane(grid_),BuBorderLayout.CENTER);
91
92 tbInteractive_=new BuToggleButton();
93 tbInteractive_.setIcon(DjaResource.DJA.getIcon("dja-interactive",16));
94 tbInteractive_.setActionCommand("DJA_TOGGLE_INTERACTIVE");
95 tbInteractive_.setToolTipText
96 (DjaResource.DJA.getString("Mode interactif"));
97 tbInteractive_.setName("tbINTERACTIVE");
98 tbInteractive_.setRequestFocusEnabled(false);
99 tbInteractive_.setEnabled (grid_ instanceof DjaGridInteractive);
100 tbInteractive_.setSelected(grid_.isInteractive());
101 tbInteractive_.addActionListener(this);
102
103 btRecenter_=new BuButton();
104 btRecenter_.setIcon(DjaResource.DJA.getIcon("dja-recenter",16));
105 btRecenter_.setActionCommand("DJA_RECENTER");
106 btRecenter_.setToolTipText
107 (DjaResource.DJA.getString("Recentrer"));
108 btRecenter_.setName("btRECENTER");
109 btRecenter_.setRequestFocusEnabled(false);
110 btRecenter_.setEnabled(grid_ instanceof DjaGridInteractive);
111 btRecenter_.addActionListener(this);
112
113 btOverlap_=new BuButton();
114 btOverlap_.setIcon(DjaResource.DJA.getIcon("dja-overlap",16));
115 btOverlap_.setActionCommand("DJA_OVERLAP");
116 btOverlap_.setToolTipText
117 (DjaResource.DJA.getString("Eviter les chevauchements"));
118 btOverlap_.setName("btOVERLAP");
119 btOverlap_.setRequestFocusEnabled(false);
120 btOverlap_.setEnabled(grid_ instanceof DjaGridInteractive);
121 btOverlap_.addActionListener(this);
122
123 btFront_=new BuButton();
124 btFront_.setIcon(DjaResource.DJA.getIcon("disposerdevant",16));
125 btFront_.setActionCommand("DJA_FRONT");
126 btFront_.setToolTipText(DjaResource.DJA.getString("Disposer devant"));
127 btFront_.setName("btFRONT");
128 btFront_.setRequestFocusEnabled(false);
129 btFront_.setEnabled(grid_ instanceof DjaGridInteractive);
130 btFront_.addActionListener(this);
131
132 btBack_=new BuButton();
133 btBack_.setIcon(DjaResource.DJA.getIcon("disposerderriere",16));
134 btBack_.setActionCommand("DJA_BACK");
135 btBack_.setToolTipText(DjaResource.DJA.getString("Disposer derrière"));
136 btBack_.setName("btBACK");
137 btBack_.setRequestFocusEnabled(false);
138 btBack_.setEnabled(grid_ instanceof DjaGridInteractive);
139 btBack_.addActionListener(this);
140
141 btResize_=new BuButton();
142 btResize_.setIcon(DjaResource.DJA.getIcon("redimensionner",16));
143 btResize_.setActionCommand("DJA_RESIZE");
144 btResize_.setToolTipText(DjaResource.DJA.getString
145 ("Redimensionner à la taille optimale"));
146 btResize_.setName("btRESIZE");
147 btResize_.setRequestFocusEnabled(false);
148 btResize_.setEnabled(grid_ instanceof DjaGridInteractive);
149 btResize_.addActionListener(this);
150
151 btForeground_=new BuButton();
152 btForeground_.setIcon(DjaResource.DJA.getIcon("avantplan",16));
153 btForeground_.setActionCommand("DJA_FOREGROUND");
154 btForeground_.setToolTipText(DjaResource.DJA.getString("Couleur de contour"));
155 btForeground_.setName("btFOREGROUND");
156 btForeground_.setRequestFocusEnabled(false);
157 btForeground_.setEnabled(grid_ instanceof DjaGridInteractive);
158 btForeground_.addActionListener(this);
159
160 btBackground_=new BuButton();
161 btBackground_.setIcon(DjaResource.DJA.getIcon("arriereplan",16));
162 btBackground_.setActionCommand("DJA_BACKGROUND");
163 btBackground_.setToolTipText(DjaResource.DJA.getString("Couleur de remplissage"));
164 btBackground_.setName("btBACKGROUND");
165 btBackground_.setRequestFocusEnabled(false);
166 btBackground_.setEnabled(grid_ instanceof DjaGridInteractive);
167 btBackground_.addActionListener(this);
168
169 btTextColor_=new BuButton();
170 btTextColor_.setIcon(DjaResource.DJA.getIcon("couleurtexte",16));
171 btTextColor_.setActionCommand("DJA_TEXTCOLOR");
172 btTextColor_.setToolTipText(DjaResource.DJA.getString("Couleur du texte"));
173 btTextColor_.setName("btTEXTCOLOR");
174 btTextColor_.setRequestFocusEnabled(false);
175 btTextColor_.setEnabled(grid_ instanceof DjaGridInteractive);
176 btTextColor_.addActionListener(this);
177
178 btTextFont_=new BuButton();
179 btTextFont_.setIcon(DjaResource.DJA.getIcon("fonte",16));
180 btTextFont_.setActionCommand("DJA_TEXTFONT");
181 btTextFont_.setToolTipText(DjaResource.DJA.getString("Fonte du texte"));
182 btTextFont_.setName("btTEXTFONT");
183 btTextFont_.setRequestFocusEnabled(false);
184 btTextFont_.setEnabled(grid_ instanceof DjaGridInteractive);
185 btTextFont_.addActionListener(this);
186
187 btAddText_=new BuButton();
188 btAddText_.setIcon(DjaResource.DJA.getIcon("ajouter",16));
189 btAddText_.setActionCommand("DJA_ADDTEXT");
190 btAddText_.setToolTipText(DjaResource.DJA.getString
191 ("Ajouter un texte"));
192 btAddText_.setName("btADDTEXT");
193 btAddText_.setRequestFocusEnabled(false);
194 btAddText_.setEnabled(grid_ instanceof DjaGridInteractive);
195 btAddText_.addActionListener(this);
196
197 btRemoveText_=new BuButton();
198 btRemoveText_.setIcon(DjaResource.DJA.getIcon("enlever",16));
199 btRemoveText_.setActionCommand("DJA_REMOVETEXT");
200 btRemoveText_.setToolTipText(DjaResource.DJA.getString
201 ("Supprimer un texte"));
202 btRemoveText_.setName("btREMOVETEXT");
203 btRemoveText_.setRequestFocusEnabled(false);
204 btRemoveText_.setEnabled(grid_ instanceof DjaGridInteractive);
205 btRemoveText_.addActionListener(this);
206
207 if(tools_)
208 {
209 DjaPaletteForm srcforms=new DjaPaletteForm(this);
210 pbForms_=new BuPopupButton
211 (DjaResource.DJA.getString("Formes"),srcforms);
212 pbForms_.setToolTipText
213 (DjaResource.DJA.getString("Palette de formes"));
214 pbForms_.setIcon(DjaResource.DJA.getIcon("dja-box",16));
215 pbForms_.setEnabled (grid_ instanceof DjaGridInteractive);
216
217 DjaPaletteLink srclinks=new DjaPaletteLink(this);
218 pbLinks_=new BuPopupButton
219 (DjaResource.DJA.getString("Liens"),srclinks);
220 pbLinks_.setToolTipText
221 (DjaResource.DJA.getString("Palette de liens"));
222 pbLinks_.setIcon(DjaResource.DJA.getIcon("dja-brokenarrow",16));
223 pbLinks_.setEnabled (grid_ instanceof DjaGridInteractive);
224
225 DjaPaletteUml srcuml=new DjaPaletteUml(this);
226 pbUml_=new BuPopupButton
227 (DjaResource.DJA.getString("Elts UML"),srcuml);
228 pbUml_.setToolTipText
229 (DjaResource.DJA.getString("Palette d'éléments UML"));
230 pbUml_.setIcon(DjaResource.DJA.getIcon("dja-umlclass",16));
231 pbUml_.setEnabled (grid_ instanceof DjaGridInteractive);
232
233 DjaPaletteBracket srcbrcks=new DjaPaletteBracket(this);
234 pbBrcks_=new BuPopupButton
235 (DjaResource.DJA.getString("Extrémités"),srcbrcks);
236 pbBrcks_.setToolTipText
237 (DjaResource.DJA.getString("Palette d'extrémités"));
238 pbBrcks_.setIcon(DjaResource.DJA.getIcon("dja-links",16));
239 pbBrcks_.setEnabled (grid_ instanceof DjaGridInteractive);
240
241 DjaPaletteStroke srcstrks=new DjaPaletteStroke(this);
242 pbStrks_=new BuPopupButton("Traits",srcstrks);
243 pbStrks_.setToolTipText
244 (DjaResource.DJA.getString("Palette de traits"));
245 pbStrks_.setIcon(DjaResource.DJA.getIcon("dja-strokes",16));
246 pbStrks_.setEnabled (grid_ instanceof DjaGridInteractive);
247
248 DjaPaletteThickness srcthkns=new DjaPaletteThickness(this);
249 pbThkns_=new BuPopupButton("Epaisseurs",srcthkns);
250 pbThkns_.setToolTipText
251 (DjaResource.DJA.getString("Palette d'épaisseurs"));
252 pbThkns_.setIcon(DjaResource.DJA.getIcon("dja-thickness",16));
253 pbThkns_.setEnabled (grid_ instanceof DjaGridInteractive);
254
255 /*
256 Dimension ps1=pbForms_.getPalettePreferredSize();
257 Dimension ps2=pbLinks_.getPalettePreferredSize();
258 pbForms_.setPaletteLocation(0,0);
259 pbLinks_.setPaletteLocation(0,ps1.height);
260 pbBrcks_.setPaletteLocation(ps1.width,0);
261 pbStrks_.setPaletteLocation(0,ps1.height+ps2.height);
262 pbThkns_.setPaletteLocation(0,ps1.height+ps2.height);
263 */
264 }
265
266 setFrameIcon(BuResource.BU.getFrameIcon("graphe"));
267
268 Dimension ps=new Dimension(296,296);
269 setPreferredSize(ps);
270 setSize(ps);
271 //setLocation(150,10);
272 }
273
274 public void setSelected(boolean _state) throws PropertyVetoException
275 {
276 super.setSelected(_state);
277 if(isSelected()) grid_.requestFocus();
278 }
279
280 public DjaGrid getGrid()
281 { return grid_; }
282
283 public String getFile()
284 { return file_; }
285
286 public void setFile(String _file)
287 {
288 file_=_file;
289 int i=file_.lastIndexOf(System.getProperty("file.separator"));
290 setTitle(file_.substring(i+1));
291 }
292
293 public String getSource()
294 {
295 StringBuffer r=new StringBuffer();
296 DjaSaver.saveAsText(grid_.getObjects(),r);
297 return r.toString();
298 }
299
300 public Image getImage()
301 {
302 Image r;
303
304 synchronized(grid_)
305 {
306 Dimension d=grid_.getSize();
307 r=grid_.createImage(d.width,d.height);
308 Graphics g=r.getGraphics();
309 g.setClip(0,0,d.width,d.height);
310 g.setColor(Color.white);
311 g.fillRect(0,0,d.width,d.height);
312 grid_.paint(g);
313 }
314
315 return r;
316 }
317
318 public void actionPerformed(ActionEvent _evt)
319 {
320 // JComponent source=(JComponent)_evt.getSource();
321 // System.err.println("DjaFrame : "+source);
322
323 String action=_evt.getActionCommand();
324 String arg ="";
325
326 int i=action.indexOf('(');
327 if(i>=0)
328 {
329 arg =action.substring(i+1,action.length()-1);
330 action=action.substring(0,i);
331 }
332
333 // System.err.println("action="+action);
334 // System.err.println("arg ="+arg);
335
336 if("DJA_TOGGLE_INTERACTIVE".equals(action))
337 {
338 ((DjaGridInteractive)grid_).setInteractive(!grid_.isInteractive());
339
340 JComponent[] c=getSpecificTools();
341 boolean b=grid_.isInteractive();
342 for(int j=1;j<c.length;j++) // All except the first one
343 if(c[j]!=null) c[j].setEnabled(b);
344 }
345 else
346 if("DJA_RECENTER".equals(action))
347 {
348 grid_.recenter();
349 }
350 else
351 if("DJA_OVERLAP".equals(action))
352 {
353 grid_.avoidOverlap();
354 }
355 else
356 if("DJA_FRONT".equals(action))
357 {
358 ((DjaGridInteractive)grid_).putSelectionToFront();
359 }
360 else
361 if("DJA_BACK".equals(action))
362 {
363 ((DjaGridInteractive)grid_).putSelectionToBack();
364 }
365 else
366 if("DJA_RESIZE".equals(action))
367 {
368 DjaLib.resizeSelection((DjaGridInteractive)grid_);
369 }
370 else
371 if("DJA_FOREGROUND".equals(action))
372 {
373 DjaLib.setForeground((DjaGridInteractive)grid_);
374 }
375 else
376 if("DJA_BACKGROUND".equals(action))
377 {
378 DjaLib.setBackground((DjaGridInteractive)grid_);
379 }
380 else
381 if("DJA_TEXTCOLOR".equals(action))
382 {
383 DjaLib.setColor((DjaGridInteractive)grid_);
384 }
385 else
386 if("DJA_TEXTFONT".equals(action))
387 {
388 DjaLib.setFont((DjaGridInteractive)grid_);
389 }
390 else
391 if("DJA_ADDTEXT".equals(action))
392 {
393 DjaLib.addText((DjaGridInteractive)grid_);
394 }
395 else
396 if("DJA_REMOVETEXT".equals(action))
397 {
398 DjaLib.removeText((DjaGridInteractive)grid_);
399 }
400 else
401 if("DJA_CREATE_FORM".equals(action))
402 {
403 if("Box" .equals(arg)) grid_.add(new DjaBox ());
404 if("RoundBox".equals(arg)) grid_.add(new DjaRoundBox());
405 if("Diamond" .equals(arg)) grid_.add(new DjaDiamond ());
406 if("Square" .equals(arg)) grid_.add(new DjaSquare ());
407 if("Circle" .equals(arg)) grid_.add(new DjaCircle ());
408 if("Ellipse" .equals(arg)) grid_.add(new DjaEllipse ());
409 if("HLine" .equals(arg)) grid_.add(new DjaHLine ());
410 if("VLine" .equals(arg)) grid_.add(new DjaVLine ());
411 }
412 else
413 if("DJA_CREATE_UML".equals(action))
414 {
415 if("Class" .equals(arg)) grid_.add(new DjaUmlClass());
416 if("AbstractClass".equals(arg)) grid_.add(new DjaUmlClass());
417 if("TemplateClass".equals(arg)) grid_.add(new DjaUmlClass());
418 if("Note" .equals(arg)) grid_.add(new DjaUmlNote ());
419 if("SmallPackage" .equals(arg)) grid_.add(new DjaUmlSmallPackage());
420 if("LargePackage" .equals(arg)) grid_.add(new DjaUmlLargePackage());
421 if("Actor" .equals(arg)) grid_.add(new DjaUmlActor());
422 if("Usecase" .equals(arg)) grid_.add(new DjaUmlUsecase());
423 if("Lifeline" .equals(arg)) grid_.add(new DjaUmlLifeline());
424 if("Object" .equals(arg)) grid_.add(new DjaUmlObject());
425 if("Component" .equals(arg)) grid_.add(new DjaUmlComponent());
426 if("Node" .equals(arg)) grid_.add(new DjaUmlNode());
427 if("ClassIcon" .equals(arg)) grid_.add(new DjaUmlClassIcon());
428 if("State" .equals(arg)) grid_.add(new DjaUmlState());
429 if("Join" .equals(arg)) grid_.add(new DjaUmlJoin());
430 if("Branch" .equals(arg)) grid_.add(new DjaUmlBranch());
431 }
432 else
433 if("DJA_CREATE_LINK".equals(action))
434 {
435 if("DirectArrow".equals(arg)) grid_.add(new DjaDirectArrow());
436 if("BrokenArrow".equals(arg)) grid_.add(new DjaBrokenArrow());
437 if("ArcArrow" .equals(arg)) grid_.add(new DjaArcArrow ());
438 if("BezierArrow".equals(arg)) grid_.add(new DjaBezierArrow());
439 if("ZigZagArrow".equals(arg)) grid_.add(new DjaZigZagArrow());
440
441 if("ZigZagArrow3".equals(arg)) grid_.add(new DjaZigZagArrow(3));
442 if("ZigZagArrow4".equals(arg)) grid_.add(new DjaZigZagArrow(4));
443 if("ZigZagArrow5".equals(arg)) grid_.add(new DjaZigZagArrow(5));
444 if("ZigZagArrow6".equals(arg)) grid_.add(new DjaZigZagArrow(6));
445 }
446 else
447 if("DJA_STROKE".equals(action))
448 {
449 DjaLib.setProperty(((DjaGridInteractive)grid_).getSelection(),"trace",arg);
450 }
451 else
452 if("DJA_THICKNESS".equals(action))
453 {
454 DjaLib.setProperty(((DjaGridInteractive)grid_).getSelection(),"epaisseur",arg);
455 }
456 else
457 if("DJA_BEGIN_TYPE".equals(action))
458 {
459 int t=Integer.parseInt(arg);
460 DjaLib.setBeginType(((DjaGridInteractive)grid_).getSelection(),t);
461 }
462 else
463 if("DJA_END_TYPE".equals(action))
464 {
465 int t=Integer.parseInt(arg);
466 DjaLib.setEndType(((DjaGridInteractive)grid_).getSelection(),t);
467 }
468 else
469 if("DJA_BEGIN_ORIENTATION".equals(action))
470 {
471 int t=Integer.parseInt(arg);
472 DjaLib.setBeginO(((DjaGridInteractive)grid_).getSelection(),t);
473 }
474 else
475 if("DJA_END_ORIENTATION".equals(action))
476 {
477 int t=Integer.parseInt(arg);
478 DjaLib.setEndO(((DjaGridInteractive)grid_).getSelection(),t);
479 }
480 else
481 super.actionPerformed(_evt);
482
483 grid_.repaint();
484 }
485
486 private static DjaVector clipboard=new DjaVector();
487
488 public void copy()
489 {
490 if(grid_.isInteractive())
491 clipboard=((DjaGridInteractive)grid_).cloneSelection();
492 }
493
494 public void cut()
495 {
496 if(grid_.isInteractive())
497 {
498 clipboard=((DjaGridInteractive)grid_).cloneSelection();
499
500 for(Enumeration e=((DjaGridInteractive)grid_).getSelection().elements();
501 e.hasMoreElements(); )
502 {
503 DjaObject o=(DjaObject)e.nextElement();
504 grid_.removeDependencies(o);
505 grid_.remove(o);
506 }
507
508 ((DjaGridInteractive)grid_).clearSelection();
509 grid_.repaint();
510 }
511 }
512
513 public void duplicate()
514 {
515 if(grid_.isInteractive())
516 {
517 copy();
518 paste();
519 ((DjaGridInteractive)grid_).moveSelection
520 (DjaOptions.deltaX,DjaOptions.deltaY);
521 }
522 }
523
524 public void find()
525 {
526 }
527
528 public void paste()
529 {
530 if(grid_.isInteractive())
531 {
532 DjaVector s=DjaLib.clone(clipboard);
533
534 for(Enumeration e=s.elements(); e.hasMoreElements(); )
535 {
536 DjaObject o=(DjaObject)e.nextElement();
537 o.setOwner(null);
538 grid_.add(o);
539 }
540
541 ((DjaGridInteractive)grid_).setSelection(s);
542 grid_.repaint();
543 }
544 }
545
546 public void replace()
547 {
548 }
549
550 public void print(PrintJob _job, Graphics _g)
551 {
552 BuPrinter.INFO_DOC =new BuInformationsDocument();
553 BuPrinter.INFO_DOC.name=getTitle();
554 BuPrinter.INFO_DOC.logo=BuResource.BU.getIcon("graphe",24);
555
556 BuPrinter.printComponent(_job,_g,grid_);
557 }
558
559 public void select()
560 {
561 if(grid_.isInteractive())
562 ((DjaGridInteractive)grid_).setSelectionToAll();
563 }
564
565 // BuInternalFrame
566
567 public String[] getEnabledActions()
568 {
569 String[] r=new String[]
570 {
571 "ENREGISTRER", "ENREGISTRERSOUS",
572 "IMPRIMER", "PREVISUALISER",
573 "COUPER", "COPIER", "COLLER", "DUPLIQUER",
574 "TOUTSELECTIONNER",
575 };
576 return r;
577 }
578
579 public JComponent[] getSpecificTools()
580 {
581 JComponent[] r;
582 final int N=15;
583
584 if(!tools_)
585 {
586 r=new JComponent[N];
587 }
588 else
589 {
590 pbForms_.setDesktop((BuDesktop)getDesktopPane());
591 pbLinks_.setDesktop((BuDesktop)getDesktopPane());
592 pbUml_ .setDesktop((BuDesktop)getDesktopPane());
593 pbStrks_.setDesktop((BuDesktop)getDesktopPane());
594 pbThkns_.setDesktop((BuDesktop)getDesktopPane());
595 pbBrcks_.setDesktop((BuDesktop)getDesktopPane());
596
597 r=new JComponent[N+8];
598 r[N ]=null;
599 r[N+1]=pbStrks_;
600 r[N+2]=pbThkns_;
601 r[N+3]=pbBrcks_;
602 r[N+4]=null;
603 r[N+5]=pbForms_;
604 r[N+6]=pbLinks_;
605 r[N+7]=pbUml_;
606 }
607
608 r[ 0]=tbInteractive_;
609 r[ 1]=null;
610 r[ 2]=btRecenter_;
611 r[ 3]=btOverlap_;
612 r[ 4]=btFront_;
613 r[ 5]=btBack_;
614 r[ 6]=btResize_;
615 r[ 7]=null;
616 r[ 8]=btForeground_;
617 r[ 9]=btBackground_;
618 r[10]=btTextColor_;
619 r[11]=btTextFont_;
620 r[12]=null;
621 r[13]=btAddText_;
622 r[14]=btRemoveText_;
623 return r;
624 }
625 }
626