com.sun.electric.tool.user.ui
Interface WindowContent

All Known Implementing Classes:
EditWindow, TextWindow, View3DWindow, WaveformWindow

public interface WindowContent

This class defines the right-side of a windowframe (the contents, as opposed to the explorer tree).


Method Summary
 void bottomScrollChanged(int e)
           
 void centerCursor()
           
 void fillScreen()
           
 boolean findNextText(boolean reverse)
          Method to find the next occurrence of a string.
 void finished()
           
 void focusOnHighlighted()
           
 void fullRepaint()
           
 Cell getCell()
           
 Highlighter getHighlighter()
          Get the Highlighter for this window
 javax.swing.JPanel getPanel()
          Method to return the top-level JPanel for this WindowContent.
 java.awt.image.BufferedImage getPrintImage(ElectricPrinter ep)
          Method to print window using offscreen canvas.
 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, boolean highlightedOnly)
          Method to initialize for a new text search.
 java.util.List<javax.swing.tree.MutableTreeNode> loadExplorerTrees()
           
 void panXOrY(int direction, double[] panningAmounts, int ticks)
           
 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 e)
           
 void setCell(Cell cell, VarContext context, WindowFrame.DisplayAttributes displayAttributes)
           
 void setCursor(java.awt.Cursor cursor)
          Method relevant for waveform windows where the drawing panel is not given by getPanel()
 void setWindowTitle()
           
 void writeImage(ElectricPrinter ep, java.lang.String filePath)
          Saving method should be done in display thread (valid at least for 3D) to guarantee correct rasting.
 void zoomInContents()
           
 void zoomOutContents()
           
 

Method Detail

initTextSearch

void initTextSearch(java.lang.String search,
                    boolean caseSensitive,
                    boolean regExp,
                    java.util.Set<TextUtils.WhatToSearch> whatToSearch,
                    boolean highlightedOnly)
Method to initialize for a new text search.

Parameters:
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.
highlightedOnly - true to search only in the highlighted area.

findNextText

boolean findNextText(boolean reverse)
Method to find the next occurrence of a string.

Parameters:
reverse - true to find in the reverse direction.
Returns:
true if something was found.

replaceText

void replaceText(java.lang.String replace)
Method to replace the text that was just selected with findNextText().

Parameters:
replace - the new text to replace.

replaceAllText

void replaceAllText(java.lang.String replace)
Method to replace all selected text.

Parameters:
replace - the new text to replace everywhere.

finished

void finished()

repaint

void repaint()

fullRepaint

void fullRepaint()

fillScreen

void fillScreen()

zoomOutContents

void zoomOutContents()

zoomInContents

void zoomInContents()

focusOnHighlighted

void focusOnHighlighted()

panXOrY

void panXOrY(int direction,
             double[] panningAmounts,
             int ticks)

centerCursor

void centerCursor()

setCell

void setCell(Cell cell,
             VarContext context,
             WindowFrame.DisplayAttributes displayAttributes)

getCell

Cell getCell()

getHighlighter

Highlighter getHighlighter()
Get the Highlighter for this window


getPanel

javax.swing.JPanel getPanel()
Method to return the top-level JPanel for this WindowContent. Although the classes that implement this interface may also extend JPanel, it is not always the case that those classes will be the JPanel that this method returns. For example, the actual EditWindow object is below the top level, surrounded by scroll bars.

Returns:
the top-level JPanel for this WindowContent.

bottomScrollChanged

void bottomScrollChanged(int e)

rightScrollChanged

void rightScrollChanged(int e)

loadExplorerTrees

java.util.List<javax.swing.tree.MutableTreeNode> loadExplorerTrees()

setWindowTitle

void setWindowTitle()

setCursor

void setCursor(java.awt.Cursor cursor)
Method relevant for waveform windows where the drawing panel is not given by getPanel()

Parameters:
cursor - the cursor to display

initializePrinting

boolean initializePrinting(ElectricPrinter ep,
                           java.awt.print.PageFormat pageFormat)
Method to intialize for printing.

Parameters:
ep - the ElectricPrinter object.
pageFormat - information about the print job.
Returns:
true if there were no errors initializing the printer.

getPrintImage

java.awt.image.BufferedImage getPrintImage(ElectricPrinter ep)
Method to print window using offscreen canvas.

Parameters:
ep - Image observer plus printable object.
Returns:
the image to print (null on error).

writeImage

void writeImage(ElectricPrinter ep,
                java.lang.String filePath)
Saving method should be done in display thread (valid at least for 3D) to guarantee correct rasting.

Parameters:
ep - Image observer plus printable object.
filePath - file in which to save image.