Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.9.0)

E52944-01


oracle.javatools.ui.simplestyle
Class StyledTextModel

java.lang.Object
  extended by oracle.javatools.ui.simplestyle.StyledTextModel


public class StyledTextModel
extends java.lang.Object

Class to hold simple styled text. Text is added one style at a time via addText(String text, StyleAttribute attr), appending new text of the desired style to existing text in the model. New lines can be inserted via addLineBreak().


Constructor Summary
StyledTextModel()
           
StyledTextModel(java.lang.String initialText, StyledTextAttribute initialStyle)
          Create a model containing the initial text and style as the first run.

 

Method Summary
 void addLineBreak()
          Add a line break at the end of the model
 void addText(java.lang.String text, StyledTextAttribute attr)
          Add a new run of styled text to the end of the model
 void append(StyledTextModel model)
          Add the contents from one model to the end of this model No line break is added between the model, so the start of the given model is appended immediately to the end of the last run of the last line of this model
 void prependText(java.lang.String text, StyledTextAttribute attr)
          Add a new run of text to the front of the model
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

StyledTextModel

public StyledTextModel()

StyledTextModel

public StyledTextModel(java.lang.String initialText,
                       StyledTextAttribute initialStyle)
Create a model containing the initial text and style as the first run.
Parameters:
initialText -
initialStyle -

Method Detail

append

public void append(StyledTextModel model)
Add the contents from one model to the end of this model No line break is added between the model, so the start of the given model is appended immediately to the end of the last run of the last line of this model
Parameters:
model -

addText

public void addText(java.lang.String text,
                    StyledTextAttribute attr)
Add a new run of styled text to the end of the model
Parameters:
text -
attr -

prependText

public void prependText(java.lang.String text,
                        StyledTextAttribute attr)
Add a new run of text to the front of the model
Parameters:
text -
attr -

addLineBreak

public void addLineBreak()
Add a line break at the end of the model

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.9.0)

E52944-01


Copyright © 1997, 2015, Oracle. All rights reserved.