| java.lang.Object de.uka.ilkd.key.ocl.gf.Display
Display | class Display (Code) | | author: daniels author: Takes care of collecting the linearized text and the length calculations |
Constructor Summary | |
public | Display(int dt) |
Method Summary | |
protected MarkedArea | addAsMarked(String toAdd, LinPosition position, String language) Adds toAdd to both the pure text as the HTML fields, they are inherently the same,
since they are mapped to the same position in the AST. | protected void | addToStages(String text, String html) Appends the given text to the respective fields from
where it can be displayed later
Parameters: text - The pure text that is to be appended. Parameters: html - The HTML text that is to be appended. | protected String | getHtml(Font font) Parameters: font - The Font, that is to be used. | protected String | getText() | public void | resetLin() Resets the stored text, but leaves the scroll markers untouched. | protected void | setDisplayType(int dt) | public String | toString() |
recHtml | Rectangle recHtml(Code) | | To store the scroll state of the HTML linearization area
|
recText | Rectangle recText(Code) | | To store the scroll state of the pure text linearization area
|
scrollHtml | int scrollHtml(Code) | | To store the scroll state of the HTML linearization area
|
scrollText | int scrollText(Code) | | To store the scroll state of the pure text linearization area
|
Display | public Display(int dt)(Code) | | initializes this object, nothing special
Parameters: dt - 1 if only text is to be shown, 2 for only HTML, 3 for both.Other values are forbidden. |
addAsMarked | protected MarkedArea addAsMarked(String toAdd, LinPosition position, String language)(Code) | | Adds toAdd to both the pure text as the HTML fields, they are inherently the same,
since they are mapped to the same position in the AST.
On the way of adding, some length calculations are done, which are used to
create an HtmlMarkedArea object, which is ready to be used in GFEditor2.
Parameters: toAdd - The String that the to-be-produced MarkedArea should represent Parameters: position - The position String in Haskell notation Parameters: language - the language of the current linearization the HtmlMarkedArea object that represents the given informationand knows about its beginning and end in the display areas. |
addToStages | protected void addToStages(String text, String html)(Code) | | Appends the given text to the respective fields from
where it can be displayed later
Parameters: text - The pure text that is to be appended. Parameters: html - The HTML text that is to be appended. Most likely the same as text |
getHtml | protected String getHtml(Font font)(Code) | | Parameters: font - The Font, that is to be used. If null, the default of JTextPane is taken. the collected HTML text, that has been added to this object.<html> tags are wrapped around the result, if not already there. |
getText | protected String getText()(Code) | | The collected pure text, that has been added to this object. |
resetLin | public void resetLin()(Code) | | Resets the stored text, but leaves the scroll markers untouched.
|
setDisplayType | protected void setDisplayType(int dt)(Code) | | (de-)activates display of text and HTML according to dt
Parameters: dt - 1 if only text is to be shown, 2 for only HTML, 3 for both. |
|
|