Lines 85-92
Link Here
|
85 |
*/ |
85 |
*/ |
86 |
protected EscherTextboxWrapper _txtbox; |
86 |
protected EscherTextboxWrapper _txtbox; |
87 |
|
87 |
|
88 |
private String _fontname; |
|
|
89 |
|
90 |
/** |
88 |
/** |
91 |
* Create a TextBox object and initialize it from the supplied Record container. |
89 |
* Create a TextBox object and initialize it from the supplied Record container. |
92 |
* |
90 |
* |
Lines 432-437
Link Here
|
432 |
* Sets the <code>Font</code> object for this text frame |
430 |
* Sets the <code>Font</code> object for this text frame |
433 |
* |
431 |
* |
434 |
* @param size the size of the font |
432 |
* @param size the size of the font |
|
|
433 |
* |
434 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
435 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
435 |
*/ |
436 |
*/ |
436 |
public void setFontSize(int size){ |
437 |
public void setFontSize(int size){ |
437 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
438 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
Lines 441-446
Link Here
|
441 |
/** |
442 |
/** |
442 |
* |
443 |
* |
443 |
* @return the size of the font applied to this text shape |
444 |
* @return the size of the font applied to this text shape |
|
|
445 |
* |
446 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
447 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
444 |
*/ |
448 |
*/ |
445 |
public int getFontSize(){ |
449 |
public int getFontSize(){ |
446 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
450 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
Lines 450-455
Link Here
|
450 |
/** |
454 |
/** |
451 |
* |
455 |
* |
452 |
* @return the size of the font applied to this text shape |
456 |
* @return the size of the font applied to this text shape |
|
|
457 |
* |
458 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
459 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
453 |
*/ |
460 |
*/ |
454 |
public Color getFontColor(){ |
461 |
public Color getFontColor(){ |
455 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
462 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
Lines 462-467
Link Here
|
462 |
* Set whether to use bold or not |
469 |
* Set whether to use bold or not |
463 |
* |
470 |
* |
464 |
* @param bold <code>true</code> if the text should be bold, <code>false</code> otherwise |
471 |
* @param bold <code>true</code> if the text should be bold, <code>false</code> otherwise |
|
|
472 |
* |
473 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
474 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
465 |
*/ |
475 |
*/ |
466 |
public void setBold(boolean bold){ |
476 |
public void setBold(boolean bold){ |
467 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
477 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
Lines 472-477
Link Here
|
472 |
* Set whether to use italic or not |
482 |
* Set whether to use italic or not |
473 |
* |
483 |
* |
474 |
* @param italic <code>true</code> if the text should be italic, <code>false</code> otherwise |
484 |
* @param italic <code>true</code> if the text should be italic, <code>false</code> otherwise |
|
|
485 |
* |
486 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
487 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
475 |
*/ |
488 |
*/ |
476 |
public void setItalic(boolean italic){ |
489 |
public void setItalic(boolean italic){ |
477 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
490 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
Lines 482-487
Link Here
|
482 |
* Set whether to use underline or not |
495 |
* Set whether to use underline or not |
483 |
* |
496 |
* |
484 |
* @param underline <code>true</code> if the text should be underlined, <code>false</code> otherwise |
497 |
* @param underline <code>true</code> if the text should be underlined, <code>false</code> otherwise |
|
|
498 |
* |
499 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
500 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
485 |
*/ |
501 |
*/ |
486 |
public void setUnderline(boolean underline){ |
502 |
public void setUnderline(boolean underline){ |
487 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
503 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
Lines 492-511
Link Here
|
492 |
* Sets the font of this text shape |
508 |
* Sets the font of this text shape |
493 |
* |
509 |
* |
494 |
* @param name the name of the font to be applied to this text shape |
510 |
* @param name the name of the font to be applied to this text shape |
|
|
511 |
* |
512 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
513 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
495 |
*/ |
514 |
*/ |
496 |
public void setFontName(String name){ |
515 |
public void setFontName(String name){ |
497 |
if (_sheet == null) { |
|
|
498 |
//we can't set font since slideshow is not assigned yet |
499 |
_fontname = name; |
500 |
} else{ |
501 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
516 |
RichTextRun rt = _txtrun.getRichTextRuns()[0]; |
502 |
rt.setFontName(name); |
517 |
rt.setFontName(name); |
503 |
} |
518 |
} |
504 |
} |
|
|
505 |
|
519 |
|
506 |
/** |
520 |
/** |
507 |
* Sets the font color |
521 |
* Sets the font color |
508 |
* @param color the font color |
522 |
* @param color the font color |
|
|
523 |
* |
524 |
* @deprecated Use <code>RichTextRun</code> to work with the text format. |
525 |
* <p>This method will be permanently removed in a future version of the POI HSLF API.</p> |
509 |
*/ |
526 |
*/ |
510 |
public void setFontColor(Color color){ |
527 |
public void setFontColor(Color color){ |
511 |
//in PowerPont RGB bytes are swapped, |
528 |
//in PowerPont RGB bytes are swapped, |
Lines 535-545
Link Here
|
535 |
for (int i = 0; i < rt.length; i++) { |
552 |
for (int i = 0; i < rt.length; i++) { |
536 |
rt[i].supplySlideShow(_sheet.getSlideShow()); |
553 |
rt[i].supplySlideShow(_sheet.getSlideShow()); |
537 |
} |
554 |
} |
538 |
if (_fontname != null) { |
|
|
539 |
setFontName(_fontname); |
540 |
_fontname = null; |
541 |
} |
542 |
|
543 |
} |
555 |
} |
544 |
|
556 |
|
545 |
private void initTextRun(){ |
557 |
private void initTextRun(){ |