|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.tool.user.ui.TextWindow
public class TextWindow
This class defines a text window for displaying text cells.
Constructor Summary | |
---|---|
TextWindow(Cell cell,
WindowFrame wf)
Factory method to create a new TextWindow with a given cell, in a given WindowFrame. |
Method Summary | |
---|---|
static void |
addTextRedoListener(java.beans.PropertyChangeListener l)
|
static void |
addTextUndoListener(java.beans.PropertyChangeListener l)
|
void |
bottomScrollChanged(int value)
|
void |
centerCursor()
Method to shift the window so that the current cursor location becomes the center. |
java.lang.String[] |
convertToStrings()
Method to convert the document in this window to an array of strings. |
void |
fillScreen()
Method to pan and zoom the screen so that the entire cell is displayed. |
boolean |
findNextText(boolean reverse)
Method to find the next occurrence of a string. |
void |
finished()
Method to get rid of this EditWindow. |
void |
focusOnHighlighted()
|
void |
fullRepaint()
|
Cell |
getCell()
Method to return the cell that is shown in this window. |
Highlighter |
getHighlighter()
Get the Highlighter for this window |
int |
getLineCount()
Method to return the number of lines of text in this TextWindow. |
javax.swing.JPanel |
getPanel()
Method to return the top-level JPanel for this TextWindow. |
java.awt.image.BufferedImage |
getPrintImage(ElectricPrinter ep)
Method to print window using offscreen canvas. |
void |
goToLineNumber(int lineNumber)
Method to select a line number in this TextWindow. |
boolean |
initializePrinting(ElectricPrinter ep,
java.awt.print.PageFormat pageFormat)
Method to intialize for printing. |
void |
initTextSearch(java.lang.String search,
boolean caseSensitive,
boolean regExp,
java.util.Set<TextUtils.WhatToSearch> whatToSearch,
CodeExpression.Code codeRestr,
AbstractTextDescriptor.Unit unitRestr,
boolean highlightedOnly)
Method to initialize for a new text search. |
java.util.List<javax.swing.tree.MutableTreeNode> |
loadExplorerTrees()
|
void |
paint(java.awt.Graphics g)
Method to repaint this TextWindow. |
void |
panXOrY(int direction,
double[] panningAmounts,
int ticks)
Method to pan along X or Y according to fixed amount of ticks |
static void |
readTextCell()
Method to read a text disk file into this TextWindow. |
void |
readTextCell(java.lang.String fileName)
|
void |
redo()
Method to redo changes to text in this TextWindow. |
static void |
removeTextRedoListener(java.beans.PropertyChangeListener l)
|
static void |
removeTextUndoListener(java.beans.PropertyChangeListener l)
|
void |
repaint()
|
void |
replaceAllText(java.lang.String replace)
Method to replace all selected text. |
void |
replaceText(java.lang.String replace)
Method to replace the text that was just selected with findNextText(). |
void |
rightScrollChanged(int value)
|
void |
setCell(Cell cell,
VarContext context,
WindowFrame.DisplayAttributes displayAttributes)
Method to set the cell that is shown in the window to "cell". |
void |
setCursor(java.awt.Cursor cursor)
Method relevant for waveform windows where the drawing panel is not given by getPanel() |
void |
setWindowTitle()
Method to set the window title. |
void |
undo()
Method to undo changes to text in this TextWindow. |
void |
updateFontInformation()
Method to update the font information in this window. |
static void |
updateText(Cell cell)
Method to update text for a cell (if it is being displayed). |
void |
writeImage(ElectricPrinter ep,
java.lang.String filePath)
Method to export directly PNG file |
static void |
writeTextCell()
Method to save this TextWindow to a disk file. |
boolean |
writeTextCell(java.lang.String fileName)
Method to write text cell into a file |
void |
zoomInContents()
|
void |
zoomOutContents()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextWindow(Cell cell, WindowFrame wf)
cell
- the cell in this TextWindow.wf
- the WindowFrame that this TextWindow lives in.Method Detail |
---|
public void setCursor(java.awt.Cursor cursor)
WindowContent
setCursor
in interface WindowContent
cursor
- the cursor to displaypublic static void addTextUndoListener(java.beans.PropertyChangeListener l)
public static void addTextRedoListener(java.beans.PropertyChangeListener l)
public static void removeTextUndoListener(java.beans.PropertyChangeListener l)
public static void removeTextRedoListener(java.beans.PropertyChangeListener l)
public void undo()
public void redo()
public void paint(java.awt.Graphics g)
public void updateFontInformation()
public java.util.List<javax.swing.tree.MutableTreeNode> loadExplorerTrees()
loadExplorerTrees
in interface WindowContent
public javax.swing.JPanel getPanel()
getPanel
in interface WindowContent
public void finished()
finished
in interface WindowContent
public void setWindowTitle()
setWindowTitle
in interface WindowContent
public Cell getCell()
getCell
in interface WindowContent
public Highlighter getHighlighter()
WindowContent
getHighlighter
in interface WindowContent
public void setCell(Cell cell, VarContext context, WindowFrame.DisplayAttributes displayAttributes)
setCell
in interface WindowContent
public static void readTextCell()
public void readTextCell(java.lang.String fileName)
public static void writeTextCell()
public boolean writeTextCell(java.lang.String fileName)
fileName
-
public void goToLineNumber(int lineNumber)
lineNumber
- the line to select (1-based).public static void updateText(Cell cell)
cell
- the Cell whose text changed.public int getLineCount()
public java.lang.String[] convertToStrings()
public void rightScrollChanged(int value)
rightScrollChanged
in interface WindowContent
public void bottomScrollChanged(int value)
bottomScrollChanged
in interface WindowContent
public void repaint()
repaint
in interface WindowContent
public void fullRepaint()
fullRepaint
in interface WindowContent
public void fillScreen()
fillScreen
in interface WindowContent
public void zoomOutContents()
zoomOutContents
in interface WindowContent
public void zoomInContents()
zoomInContents
in interface WindowContent
public void focusOnHighlighted()
focusOnHighlighted
in interface WindowContent
public void initTextSearch(java.lang.String search, boolean caseSensitive, boolean regExp, java.util.Set<TextUtils.WhatToSearch> whatToSearch, CodeExpression.Code codeRestr, AbstractTextDescriptor.Unit unitRestr, boolean highlightedOnly)
initTextSearch
in interface WindowContent
search
- the string to locate.caseSensitive
- true to match only where the case is the same.regExp
- true if the search string is a regular expression.whatToSearch
- a collection of text types to consider.codeRestr
- a restriction on types of Code to consider (null to consider all Code values).unitRestr
- a restriction on types of Units to consider (null to consider all Unit values).highlightedOnly
- true to search only in the highlighted area.public boolean findNextText(boolean reverse)
findNextText
in interface WindowContent
reverse
- true to find in the reverse direction.
public void replaceText(java.lang.String replace)
replaceText
in interface WindowContent
replace
- the new text to replace.public void replaceAllText(java.lang.String replace)
replaceAllText
in interface WindowContent
replace
- the new text to replace everywhere.public void writeImage(ElectricPrinter ep, java.lang.String filePath)
writeImage
in interface WindowContent
ep
- printable object.filePath
- public boolean initializePrinting(ElectricPrinter ep, java.awt.print.PageFormat pageFormat)
initializePrinting
in interface WindowContent
ep
- the ElectricPrinter object.pageFormat
- information about the print job.
public java.awt.image.BufferedImage getPrintImage(ElectricPrinter ep)
getPrintImage
in interface WindowContent
ep
- printable object.
public void panXOrY(int direction, double[] panningAmounts, int ticks)
panXOrY
in interface WindowContent
direction
- panningAmounts
- ticks
- public void centerCursor()
centerCursor
in interface WindowContent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |