com.sun.electric.tool.user.ui
Class EditWindow

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.sun.electric.tool.user.ui.EditWindow
All Implemented Interfaces:
DatabaseChangeListener, EditWindow0, EditWindow_, HighlightListener, WindowContent, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class EditWindow
extends javax.swing.JPanel
implements EditWindow_, WindowContent, java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.awt.event.MouseWheelListener, java.awt.event.KeyListener, HighlightListener, DatabaseChangeListener

This class defines an editing window for displaying circuitry. It implements WindowContent, which means it can be in the main part of a window (to the right of the explorer panel).

See Also:
Serialized Form

Nested Class Summary
static class EditWindow.NodeProtoDataFlavor
          Class to define a custom data flavor that packages a NodeProto to create.
static class EditWindow.NodeProtoTransferable
          Class to define a custom transferable that packages a Cell or Group.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Method Summary
 void addCrossProbeBox(java.awt.geom.Rectangle2D box, java.awt.Color color)
          Method to add a box to the list of cross-probed levels in this EditWindow.
 void addCrossProbeLine(java.awt.geom.Point2D start, java.awt.geom.Point2D end, java.awt.Color color)
          Method to add a line to the list of cross-probed levels in this EditWindow.
 void addElectricObject(ElectricObject eObj, Cell cell)
           
 void addHighlightArea(java.awt.geom.Rectangle2D rect, Cell cell)
           
 void addHighlightLine(java.awt.geom.Point2D pt1, java.awt.geom.Point2D pt2, Cell cell, boolean thick)
           
 void addHighlightMessage(Cell cell, java.lang.String message, java.awt.geom.Point2D loc)
           
 void addHighlightText(ElectricObject eObj, Cell cell, Variable.Key varKey)
           
 void addInPlaceTextObject(GetInfoText.EditInPlaceListener tl)
          Method to store a new "in-place" text editing object on this EditWindow.
 void bottomScrollChanged(int value)
           
 void centerCursor()
          Method to shift the window so that the current cursor location becomes the center.
 void clearCrossProbeLevels()
          Method to clear the list of cross-probed levels in this EditWindow.
 void clearDoingAreaDrag()
           
 void clearHighlighting()
           
 void clearShowPopupCloud()
           
static void clearSubCellCache()
          Method to clear the cache of expanded subcells.
static EditWindow CreateElectricDoc(Cell cell, WindowFrame wf, java.awt.Dimension approxSZ)
          Factory method to create a new EditWindow with a given cell, in a given WindowFrame.
 void databaseChanged(DatabaseChangeEvent e)
          Invoked in the java AWT Event thread when the database state changes.
 java.awt.Point databaseToScreen(double dbX, double dbY)
          Method to convert a database coordinate to screen coordinates.
 void databaseToScreen(double dbX, double dbY, java.awt.Point result)
          Method to convert a database coordinate to screen coordinates.
 java.awt.Point databaseToScreen(java.awt.geom.Point2D db)
          Method to convert a database coordinate to screen coordinates.
 java.awt.Rectangle databaseToScreen(java.awt.geom.Rectangle2D db)
          Method to convert a database rectangle to screen coordinates.
 java.awt.Point deltaDatabaseToScreen(double dbDX, double dbDY)
          Method to convert a database distance to a screen distance.
 java.awt.geom.Point2D deltaScreenToDatabase(int screenDX, int screenDY)
          Method to convert a screen distance to a database distance.
 java.awt.geom.Rectangle2D displayableBounds()
          Method to return a rectangle in database coordinates that covers the viewable extent of this window.
static void displayAlgorithmChanged()
          Method requests that every EditWindow be redrawn, including a change of display algorithm.
 void downHierarchy(boolean keepFocus, boolean newWindow, boolean inPlace)
          Push into an instance (go down the hierarchy)
static void expansionChanged(Cell cell)
          Method to recurse flag all windows showing a cell to redraw.
 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.
static EditWindow findWindow(Cell cell)
          Method to find an EditWindow that is displaying a given cell.
 void finished()
          Method to get rid of this EditWindow.
 void finishedHighlighting()
           
 void focusOnHighlighted()
           
 void focusScreen(java.awt.geom.Rectangle2D bounds)
          Method to focus the screen so that an area fills it.
 void fullRepaint()
          Method requests that this EditWindow be redrawn, including a rerendering of the contents.
 java.util.List<AbstractDrawing.LayerColor> getBlendingOrder(java.util.Set<Layer> layersAvailable, boolean patternedDisplay, boolean alphaBlendingOvercolor)
          Returns alpha blending order for this EditWindow.
 javax.swing.JScrollBar getBottomScrollBar()
          Method to return the horizontal scroll bar at the bottom of the edit window.
 java.awt.geom.Rectangle2D getBoundsInWindow()
          Method to compute the bounds of the cell in this EditWindow.
 Cell getCell()
          Method to return the cell that is shown in this window.
static EditWindow getCurrent()
          Method to return the current EditWindow.
static int getDefaultFontSize()
           
 java.awt.geom.Rectangle2D getDisplayedBounds()
           
 java.awt.Point getEndDrag()
           
 java.awt.Font getFont(TextDescriptor descript)
          Method to get a Font to use for a given TextDescriptor in this EditWindow.
 double getFontHeight(TextDescriptor descript)
          Method to get the height of text given a TextDescriptor in this EditWindow.
 double getGlobalTextScale()
          Method to return the text scale factor for this window.
 java.awt.font.GlyphVector getGlyphs(java.lang.String text, java.awt.Font font)
          Method to convert a string and descriptor to a GlyphVector.
 double getGridXSpacing()
          Method to return the distance between grid dots in the X direction.
 double getGridYSpacing()
          Method to return the distance between grid dots in the Y direction.
 java.awt.geom.Rectangle2D getHighlightedArea()
           
 java.util.List<Geometric> getHighlightedEObjs(boolean wantNodes, boolean wantArcs)
           
 java.util.Set<Network> getHighlightedNetworks()
           
 Highlighter getHighlighter()
          Get the highlighter for this WindowContent.
 java.awt.geom.Point2D getHighlightOffset()
           
 java.util.List<NodeInst> getInPlaceEditNodePath()
          Method to return a List of NodeInsts to the cell being in-place edited.
 Cell getInPlaceEditTopCell()
          Method to return the top-level cell for "in-place" display.
 GetInfoText.EditInPlaceListener getInPlaceTextObject()
          Method to return the current "in-place" text editing object on this EditWindow.
 java.awt.geom.AffineTransform getInPlaceTransformIn()
          Method to return the transformation matrix from the displayed top-level cell to the current cell.
 java.awt.geom.AffineTransform getInPlaceTransformOut()
          Method to return the transformation matrix from the current cell to the displayed top-level cell.
 java.awt.Point getLastMousePosition()
           
 Highlighter getMouseOverHighlighter()
          Get the mouse over highlighter for this EditWindow.
 int getMultiPageNumber()
          Method to return the page number that is shown in this window.
 java.awt.geom.Point2D getOffset()
          Method to return the offset factor for this window.
 ElectricObject getOneElectricObject(java.lang.Class clz)
           
 javax.swing.JPanel getPanel()
          Method to return the top-level JPanel for this EditWindow.
 java.awt.image.BufferedImage getPrintImage(ElectricPrinter ep)
          Method to print window using offscreen canvas.
 javax.swing.JScrollBar getRightScrollBar()
          Method to return the vertical scroll bar at the right side of the edit window.
 Highlighter getRulerHighlighter()
          Get the ruler highlighter for this EditWindow (for measurement).
 EditWindowFocusBrowser getSavedFocusBrowser()
          Get the Saved View Browser for this Edit Window
 double getScale()
          Method to return the scale factor for this window.
 java.awt.geom.Point2D getScheduledOffset()
          Method to return the offset factor for this window.
 java.awt.Point getScreenLocationOfCorner()
          Method to return the location of this window on the user's screens.
 java.awt.Dimension getScreenSize()
          Method to return the size of this EditWindow.
static int getScrollBarResolution()
          Method to return the scroll bar resolution.
 boolean getShowPopupCloud()
           
 java.awt.Point getStartDrag()
           
 RTNode getTextInCell()
          Get the RTree with all text in this Cell.
 double getTextScreenSize(double dbSize)
          Method to find the size in points (actual screen units) for text of a given database size in this EditWindow.
 double getTextUnitSize(double pointSize)
          Method to find the size in database units for text of a given point size in this EditWindow.
 VarContext getVarContext()
          Get the window's VarContext
 WindowFrame getWindowFrame()
          Method to return the WindowFrame in which this EditWindow resides.
static void gridAlign(java.awt.geom.Point2D pt)
          Method to snap a point to the nearest database-space grid unit.
static void gridAlignSize(java.awt.geom.Point2D pt, int direction)
          Method to snap a point to the nearest database-space grid unit.
 boolean hasCrossProbeData()
          Method to tell whether there is any cross-probed data in this EditWindow.
 void highlightChanged(Highlighter which)
          Called by the Highlight manager when highlights have changed and will be updated on the screen.
 void highlighterLostFocus(Highlighter highlighterGainedFocus)
          Called when by a Highlighter when it loses focus.
 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
static void invokeRenderJob()
           
static boolean isArrayedContextMatter(Nodable no)
          Returns true if, in terms of context, it matters which index of the nodable we push into.
 boolean isDoingAreaDrag()
           
 boolean isGrid()
          Method to return the state of grid display in this window.
 boolean isInPlaceEdit()
          Method to tell whether this EditWindow is displaying a cell "in-place".
 void keyPressed(java.awt.event.KeyEvent evt)
           
 void keyReleased(java.awt.event.KeyEvent evt)
           
 void keyTyped(java.awt.event.KeyEvent evt)
           
 java.util.List<javax.swing.tree.MutableTreeNode> loadExplorerTrees()
           
 void mouseClicked(java.awt.event.MouseEvent evt)
           
 void mouseDragged(java.awt.event.MouseEvent evt)
           
 void mouseEntered(java.awt.event.MouseEvent evt)
           
 void mouseExited(java.awt.event.MouseEvent evt)
           
 void mouseMoved(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
           
 void mouseReleased(java.awt.event.MouseEvent evt)
           
 void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
           
static EditWindow needCurrent()
          Method to return the current EditWindow.
 void paintComponent(java.awt.Graphics graphics)
          Method to repaint this EditWindow.
 void panXOrY(int direction, double[] panningAmounts, int ticks)
          Method to pan along X or Y according to fixed amount of ticks
 void removeAllInPlaceTextObjects()
          Method to remove all in-place text objects in this window.
 void removeInPlaceTextObject(GetInfoText.EditInPlaceListener tl)
          Method to remove a "in-place" text editing object from this EditWindow.
static void repaintAll()
          Method requests that every EditWindow be redrawn, without rerendering the offscreen contents.
static void repaintAllContents()
          Method requests that every EditWindow be redrawn, including a rerendering of its contents.
 void repaintContents(java.awt.geom.Rectangle2D bounds, boolean fullInstantiate)
          Method requests that this EditWindow be redrawn, including a rerendering of the contents.
 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 restoreHighlightList(java.util.List<Highlight2> list)
           
 void rightScrollChanged(int value)
           
 java.util.List<Highlight2> saveHighlightList()
           
 java.awt.geom.Point2D screenToDatabase(int screenX, int screenY)
          Method to convert a screen coordinate to database coordinates.
 java.awt.geom.Rectangle2D screenToDatabase(java.awt.geom.Rectangle2D screenRect)
          Method to convert a rectangle in screen units to a rectangle in database units.
 void setCell(Cell cell, VarContext context, WindowFrame.DisplayAttributes displayAttributes)
          Method to set the cell that is shown in the window to "cell".
static void setDefaultOpacity(Technology tech)
          Method to automatically set the opacity of each layer in a Technology.
 void setDoingAreaDrag()
           
 void setEndDrag(int x, int y)
           
 void setGlobalTextScale(double gts)
          Method to set the text scale factor for this window.
 void setGrid(boolean showGrid)
          Method to set the display of a grid in this window.
 void setGridXSpacing(double spacing)
          Method to set the distance between grid dots in the X direction.
 void setGridYSpacing(double spacing)
          Method to set the distance between grid dots in the Y direction.
 void setHighlightOffset(int dX, int dY)
           
 void setMultiPageNumber(int pageNumber)
          Method to set the page number that is shown in this window.
 void setOffset(java.awt.geom.Point2D off)
          Method to set the offset factor for this window.
 void setScale(double scale)
          Method to set the scale factor for this window.
 void setScrollPosition()
          New version of setScrollPosition.
 void setShowPopupCloud(java.util.List<java.lang.String> text, java.awt.geom.Point2D point)
           
 void setStartDrag(int x, int y)
           
 void setTextInCell(RTNode tic)
          Set the RTree with all text in this Cell.
 void setWindowTitle()
          Method to set the window title.
 void showDraggedBox(java.lang.Object toDraw, int oldx, int oldy)
          Method to set the highlight to show the outline of a node that will be placed in this EditWindow.
static EditWindow showEditWindowForCell(Cell c, VarContext varC)
          Method to bring to the front a WindowFrame associated to a given Cell.
 void testJogl()
           
 void upHierarchy(boolean keepFocus)
          Pop out of an instance (go up the hierarchy)
 void writeImage(ElectricPrinter ep, java.lang.String filePath)
          Method to export directly PNG file.
 void zoomInContents()
           
 void zoomOutContents()
           
 void zoomWindowToFitCellInstance(NodeProto np)
          Method to zoom this window to fit a placed node (if appropriate).
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.electric.tool.user.ui.WindowContent
repaint, setCursor
 

Method Detail

CreateElectricDoc

public static EditWindow CreateElectricDoc(Cell cell,
                                           WindowFrame wf,
                                           java.awt.Dimension approxSZ)
Factory method to create a new EditWindow with a given cell, in a given WindowFrame.

Parameters:
cell - the cell in this EditWindow.
wf - the WindowFrame that this EditWindow lives in.
approxSZ - the approximate size of this EditWindow (in pixels).
Returns:
the new EditWindow.

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent evt)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent evt)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent evt)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent evt)
Specified by:
keyTyped in interface java.awt.event.KeyListener

highlightChanged

public void highlightChanged(Highlighter which)
Description copied from interface: HighlightListener
Called by the Highlight manager when highlights have changed and will be updated on the screen.

Specified by:
highlightChanged in interface HighlightListener

highlighterLostFocus

public void highlighterLostFocus(Highlighter highlighterGainedFocus)
Called when by a Highlighter when it loses focus. The argument is the Highlighter that has gained focus (may be null).

Specified by:
highlighterLostFocus in interface HighlightListener
Parameters:
highlighterGainedFocus - the highlighter for the current window (may be null).

getLastMousePosition

public java.awt.Point getLastMousePosition()

showDraggedBox

public void showDraggedBox(java.lang.Object toDraw,
                           int oldx,
                           int oldy)
Method to set the highlight to show the outline of a node that will be placed in this EditWindow.

Parameters:
toDraw - the object to draw (a NodeInst or a NodeProto).
oldx - the X position (on the screen) of the outline.
oldy - the Y position (on the screen) of the outline.

zoomWindowToFitCellInstance

public void zoomWindowToFitCellInstance(NodeProto np)
Method to zoom this window to fit a placed node (if appropriate). If the placed object is a cell instance that is larger than the window, and the window is empty, zoom out to fit.

Parameters:
np - the node being placed.

getPanel

public javax.swing.JPanel getPanel()
Method to return the top-level JPanel for this EditWindow. The actual EditWindow object is below the top level, surrounded by scroll bars.

Specified by:
getPanel in interface WindowContent
Returns:
the top-level JPanel for this EditWindow.

getScreenLocationOfCorner

public java.awt.Point getScreenLocationOfCorner()
Method to return the location of this window on the user's screens.

Specified by:
getScreenLocationOfCorner in interface EditWindow_
Returns:
the location of this window on the user's screens.

getCurrent

public static EditWindow getCurrent()
Method to return the current EditWindow.

Returns:
the current EditWindow (null if none).

needCurrent

public static EditWindow needCurrent()
Method to return the current EditWindow.

Returns:
the current EditWindow. If there is none, an error message is displayed and it returns null.

getCell

public Cell getCell()
Method to return the cell that is shown in this window.

Specified by:
getCell in interface EditWindow_
Specified by:
getCell in interface WindowContent
Returns:
the cell that is shown in this window.

setMultiPageNumber

public void setMultiPageNumber(int pageNumber)
Method to set the page number that is shown in this window. Only applies to multi-page schematics.

Parameters:
pageNumber - the page number that is shown in this window (0-based).

getMultiPageNumber

public int getMultiPageNumber()
Method to return the page number that is shown in this window. Only applies to multi-page schematics.

Returns:
the page number that is shown in this window (0-based).

isInPlaceEdit

public boolean isInPlaceEdit()
Method to tell whether this EditWindow is displaying a cell "in-place". In-place display implies that the user has descended into a lower-level cell while requesting that the upper-level remain displayed.

Returns:
true if this EditWindow is displaying a cell "in-place".

getInPlaceEditTopCell

public Cell getInPlaceEditTopCell()
Method to return the top-level cell for "in-place" display. In-place display implies that the user has descended into a lower-level cell while requesting that the upper-level remain displayed. The top-level cell is the original cell that is remaining displayed.

Returns:
the top-level cell for "in-place" display.

getInPlaceEditNodePath

public java.util.List<NodeInst> getInPlaceEditNodePath()
Method to return a List of NodeInsts to the cell being in-place edited. In-place display implies that the user has descended into a lower-level cell while requesting that the upper-level remain displayed.

Returns:
a List of NodeInsts to the cell being in-place edited.

getInPlaceTransformIn

public java.awt.geom.AffineTransform getInPlaceTransformIn()
Method to return the transformation matrix from the displayed top-level cell to the current cell. In-place display implies that the user has descended into a lower-level cell while requesting that the upper-level remain displayed.

Returns:
the transformation matrix from the displayed top-level cell to the current cell.

getInPlaceTransformOut

public java.awt.geom.AffineTransform getInPlaceTransformOut()
Method to return the transformation matrix from the current cell to the displayed top-level cell. In-place display implies that the user has descended into a lower-level cell while requesting that the upper-level remain displayed.

Returns:
the transformation matrix from the current cell to the displayed top-level cell.

getHighlighter

public Highlighter getHighlighter()
Get the highlighter for this WindowContent.

Specified by:
getHighlighter in interface WindowContent
Returns:
the highlighter.

getMouseOverHighlighter

public Highlighter getMouseOverHighlighter()
Get the mouse over highlighter for this EditWindow.

Returns:
the mouse over highlighter.

getRulerHighlighter

public Highlighter getRulerHighlighter()
Get the ruler highlighter for this EditWindow (for measurement).

Returns:
the ruler highlighter.

getTextInCell

public RTNode getTextInCell()
Get the RTree with all text in this Cell.

Returns:
the RTree with all text in this Cell.

setTextInCell

public void setTextInCell(RTNode tic)
Set the RTree with all text in this Cell.

Parameters:
tic - the RTree with all text in this Cell.

getWindowFrame

public WindowFrame getWindowFrame()
Method to return the WindowFrame in which this EditWindow resides.

Returns:
the WindowFrame in which this EditWindow resides.

setCell

public void setCell(Cell cell,
                    VarContext context,
                    WindowFrame.DisplayAttributes displayAttributes)
Method to set the cell that is shown in the window to "cell".

Specified by:
setCell in interface WindowContent

setWindowTitle

public void setWindowTitle()
Method to set the window title.

Specified by:
setWindowTitle in interface WindowContent

findWindow

public static EditWindow findWindow(Cell cell)
Method to find an EditWindow that is displaying a given cell.

Parameters:
cell - the Cell to find.
Returns:
the EditWindow showing that cell, or null if none found.

showEditWindowForCell

public static EditWindow showEditWindowForCell(Cell c,
                                               VarContext varC)
Method to bring to the front a WindowFrame associated to a given Cell. If no WindowFrame is found, a new WindowFrame will be created and displayed

Parameters:
c - the Cell in the window to raise.
varC - the Context of that window.
Returns:
the EditWindow of the cell that was found or created.

loadExplorerTrees

public java.util.List<javax.swing.tree.MutableTreeNode> loadExplorerTrees()
Specified by:
loadExplorerTrees in interface WindowContent

finished

public void finished()
Method to get rid of this EditWindow. Called by WindowFrame when that windowFrame gets closed.

Specified by:
finished in interface WindowContent

getScrollBarResolution

public static int getScrollBarResolution()
Method to return the scroll bar resolution. This is the extent of the JScrollBar.

Returns:
the scroll bar resolution.

getBottomScrollBar

public javax.swing.JScrollBar getBottomScrollBar()
Method to return the horizontal scroll bar at the bottom of the edit window.

Returns:
the horizontal scroll bar at the bottom of the edit window.

getRightScrollBar

public javax.swing.JScrollBar getRightScrollBar()
Method to return the vertical scroll bar at the right side of the edit window.

Returns:
the vertical scroll bar at the right side of the edit window.

paintComponent

public void paintComponent(java.awt.Graphics graphics)
Method to repaint this EditWindow. Composites the image (taken from the PixelDrawing object) with the grid, highlight, and any dragging rectangle.

Overrides:
paintComponent in class javax.swing.JComponent

addInPlaceTextObject

public void addInPlaceTextObject(GetInfoText.EditInPlaceListener tl)
Method to store a new "in-place" text editing object on this EditWindow.

Parameters:
tl - the Listener that is now sitting on top of this EditWindow.

getInPlaceTextObject

public GetInfoText.EditInPlaceListener getInPlaceTextObject()
Method to return the current "in-place" text editing object on this EditWindow.

Returns:
the current "in-place" text editing object on this EditWindow.

removeInPlaceTextObject

public void removeInPlaceTextObject(GetInfoText.EditInPlaceListener tl)
Method to remove a "in-place" text editing object from this EditWindow.

Parameters:
tl - the Listener that is no longer sitting on top of this EditWindow.

removeAllInPlaceTextObjects

public void removeAllInPlaceTextObjects()
Method to remove all in-place text objects in this window. Called when the window pans or zooms and the text objects are no longer in the proper place.


displayAlgorithmChanged

public static void displayAlgorithmChanged()
Method requests that every EditWindow be redrawn, including a change of display algorithm.


repaintAllContents

public static void repaintAllContents()
Method requests that every EditWindow be redrawn, including a rerendering of its contents.


repaintAll

public static void repaintAll()
Method requests that every EditWindow be redrawn, without rerendering the offscreen contents.


fullRepaint

public void fullRepaint()
Method requests that this EditWindow be redrawn, including a rerendering of the contents.

Specified by:
fullRepaint in interface WindowContent

repaintContents

public void repaintContents(java.awt.geom.Rectangle2D bounds,
                            boolean fullInstantiate)
Method requests that this EditWindow be redrawn, including a rerendering of the contents.

Specified by:
repaintContents in interface EditWindow_
Parameters:
bounds - the area to redraw (null to draw everything).
fullInstantiate - true to display to the bottom of the hierarchy (for peeking).

invokeRenderJob

public static void invokeRenderJob()

setDefaultOpacity

public static void setDefaultOpacity(Technology tech)
Method to automatically set the opacity of each layer in a Technology. At the current time, this method is not used.

Parameters:
tech - the Technology to set.

getBlendingOrder

public java.util.List<AbstractDrawing.LayerColor> getBlendingOrder(java.util.Set<Layer> layersAvailable,
                                                                   boolean patternedDisplay,
                                                                   boolean alphaBlendingOvercolor)
Returns alpha blending order for this EditWindow. Alpha blending order specifies pixel color by such a way: Color col = backgroudColor; for (LayerColor layerColor: blendingOrder) { if (This pixel covers a piece of layer layerColor.layer) { alpha = layerColor.color.getAlpha(); col = layerColor.color.getRGB()*alpha + col*(1 - alpha) } } return col;

Parameters:
layersAvailable - layers available in this EditWindow
Returns:
alpha blending order.

testJogl

public void testJogl()

clearCrossProbeLevels

public void clearCrossProbeLevels()
Method to clear the list of cross-probed levels in this EditWindow. Cross-probed levels are displays of the current simulation value at a point in the display, and come from the Waveform Window.


hasCrossProbeData

public boolean hasCrossProbeData()
Method to tell whether there is any cross-probed data in this EditWindow. Cross-probed levels are displays of the current simulation value at a point in the display, and come from the Waveform Window.

Returns:
true if there are any cross-probed data displays in this EditWindow.

addCrossProbeLine

public void addCrossProbeLine(java.awt.geom.Point2D start,
                              java.awt.geom.Point2D end,
                              java.awt.Color color)
Method to add a line to the list of cross-probed levels in this EditWindow. Cross-probed levels are displays of the current simulation value at a point in the display, and come from the Waveform Window.

Parameters:
start - the starting point of the line.
end - the ending point of the line.
color - the color of the line.

addCrossProbeBox

public void addCrossProbeBox(java.awt.geom.Rectangle2D box,
                             java.awt.Color color)
Method to add a box to the list of cross-probed levels in this EditWindow. Cross-probed levels are displays of the current simulation value at a point in the display, and come from the Waveform Window.

Parameters:
box - the bounds of the box.
color - the color of the box.

isDoingAreaDrag

public boolean isDoingAreaDrag()

setDoingAreaDrag

public void setDoingAreaDrag()

clearDoingAreaDrag

public void clearDoingAreaDrag()

getStartDrag

public java.awt.Point getStartDrag()

setStartDrag

public void setStartDrag(int x,
                         int y)

getEndDrag

public java.awt.Point getEndDrag()

setEndDrag

public void setEndDrag(int x,
                       int y)

setGrid

public void setGrid(boolean showGrid)
Method to set the display of a grid in this window.

Parameters:
showGrid - true to show the grid.

isGrid

public boolean isGrid()
Method to return the state of grid display in this window.

Specified by:
isGrid in interface EditWindow_
Returns:
true if the grid is displayed in this window.

getGridXSpacing

public double getGridXSpacing()
Method to return the distance between grid dots in the X direction.

Specified by:
getGridXSpacing in interface EditWindow_
Returns:
the distance between grid dots in the X direction.

setGridXSpacing

public void setGridXSpacing(double spacing)
Method to set the distance between grid dots in the X direction.

Parameters:
spacing - the distance between grid dots in the X direction.

getGridYSpacing

public double getGridYSpacing()
Method to return the distance between grid dots in the Y direction.

Specified by:
getGridYSpacing in interface EditWindow_
Returns:
the distance between grid dots in the Y direction.

setGridYSpacing

public void setGridYSpacing(double spacing)
Method to set the distance between grid dots in the Y direction.

Parameters:
spacing - the distance between grid dots in the Y direction.

displayableBounds

public java.awt.geom.Rectangle2D displayableBounds()
Method to return a rectangle in database coordinates that covers the viewable extent of this window.

Returns:
a rectangle that describes the viewable extent of this window (database coordinates).

initTextSearch

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)
Method to initialize for a new text

Specified by:
initTextSearch in interface WindowContent
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.
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.

findNextText

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

Specified by:
findNextText in interface WindowContent
Parameters:
reverse - true to find in the reverse direction.
Returns:
true if something was found.

replaceText

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

Specified by:
replaceText in interface WindowContent
Parameters:
replace - the new text to replace.

replaceAllText

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

Specified by:
replaceAllText in interface WindowContent
Parameters:
replace - the new text to replace everywhere.

getShowPopupCloud

public boolean getShowPopupCloud()

setShowPopupCloud

public void setShowPopupCloud(java.util.List<java.lang.String> text,
                              java.awt.geom.Point2D point)

clearShowPopupCloud

public void clearShowPopupCloud()

getScreenSize

public java.awt.Dimension getScreenSize()
Method to return the size of this EditWindow.

Returns:
a Dimension with the size of this EditWindow.

getScale

public double getScale()
Method to return the scale factor for this window.

Specified by:
getScale in interface EditWindow0
Specified by:
getScale in interface EditWindow_
Returns:
the scale factor for this window.

getGlobalTextScale

public double getGlobalTextScale()
Method to return the text scale factor for this window.

Specified by:
getGlobalTextScale in interface EditWindow0
Returns:
the text scale factor for this window.

setGlobalTextScale

public void setGlobalTextScale(double gts)
Method to set the text scale factor for this window.

Parameters:
gts - the text scale factor for this window.

setScale

public void setScale(double scale)
Method to set the scale factor for this window.

Specified by:
setScale in interface EditWindow_
Parameters:
scale - the scale factor for this window.

getOffset

public java.awt.geom.Point2D getOffset()
Method to return the offset factor for this window.

Specified by:
getOffset in interface EditWindow_
Returns:
the offset factor for this window.

getScheduledOffset

public java.awt.geom.Point2D getScheduledOffset()
Method to return the offset factor for this window. If new offsets are queued, this gets the ultimate offset value.

Returns:
the offset factor for this window.

setOffset

public void setOffset(java.awt.geom.Point2D off)
Method to set the offset factor for this window.

Specified by:
setOffset in interface EditWindow_
Parameters:
off - the offset factor for this window.

getDisplayedBounds

public java.awt.geom.Rectangle2D getDisplayedBounds()
Specified by:
getDisplayedBounds in interface EditWindow_

setScrollPosition

public void setScrollPosition()
New version of setScrollPosition. Attempts to provides means of scrolling out of cell bounds.


bottomScrollChanged

public void bottomScrollChanged(int value)
Specified by:
bottomScrollChanged in interface WindowContent

rightScrollChanged

public void rightScrollChanged(int value)
Specified by:
rightScrollChanged in interface WindowContent

focusScreen

public void focusScreen(java.awt.geom.Rectangle2D bounds)
Method to focus the screen so that an area fills it.

Parameters:
bounds - the area to make fill the screen.

getBoundsInWindow

public java.awt.geom.Rectangle2D getBoundsInWindow()
Method to compute the bounds of the cell in this EditWindow. Bounds includes factors such as frame size and large text.

Specified by:
getBoundsInWindow in interface EditWindow_
Returns:
the bounds of the cell in this EditWindow.

addElectricObject

public void addElectricObject(ElectricObject eObj,
                              Cell cell)
Specified by:
addElectricObject in interface EditWindow_

getHighlightedArea

public java.awt.geom.Rectangle2D getHighlightedArea()
Specified by:
getHighlightedArea in interface EditWindow_

addHighlightArea

public void addHighlightArea(java.awt.geom.Rectangle2D rect,
                             Cell cell)
Specified by:
addHighlightArea in interface EditWindow_

addHighlightLine

public void addHighlightLine(java.awt.geom.Point2D pt1,
                             java.awt.geom.Point2D pt2,
                             Cell cell,
                             boolean thick)
Specified by:
addHighlightLine in interface EditWindow_

addHighlightMessage

public void addHighlightMessage(Cell cell,
                                java.lang.String message,
                                java.awt.geom.Point2D loc)
Specified by:
addHighlightMessage in interface EditWindow_

addHighlightText

public void addHighlightText(ElectricObject eObj,
                             Cell cell,
                             Variable.Key varKey)
Specified by:
addHighlightText in interface EditWindow_

getOneElectricObject

public ElectricObject getOneElectricObject(java.lang.Class clz)
Specified by:
getOneElectricObject in interface EditWindow_

getHighlightedEObjs

public java.util.List<Geometric> getHighlightedEObjs(boolean wantNodes,
                                                     boolean wantArcs)
Specified by:
getHighlightedEObjs in interface EditWindow_

getHighlightedNetworks

public java.util.Set<Network> getHighlightedNetworks()
Specified by:
getHighlightedNetworks in interface EditWindow_

getHighlightOffset

public java.awt.geom.Point2D getHighlightOffset()
Specified by:
getHighlightOffset in interface EditWindow_

setHighlightOffset

public void setHighlightOffset(int dX,
                               int dY)
Specified by:
setHighlightOffset in interface EditWindow_

saveHighlightList

public java.util.List<Highlight2> saveHighlightList()
Specified by:
saveHighlightList in interface EditWindow_

restoreHighlightList

public void restoreHighlightList(java.util.List<Highlight2> list)
Specified by:
restoreHighlightList in interface EditWindow_

clearHighlighting

public void clearHighlighting()
Specified by:
clearHighlighting in interface EditWindow_

finishedHighlighting

public void finishedHighlighting()
Specified by:
finishedHighlighting in interface EditWindow_

fillScreen

public void fillScreen()
Method to pan and zoom the screen so that the entire cell is displayed.

Specified by:
fillScreen in interface EditWindow_
Specified by:
fillScreen in interface WindowContent

zoomOutContents

public void zoomOutContents()
Specified by:
zoomOutContents in interface WindowContent

zoomInContents

public void zoomInContents()
Specified by:
zoomInContents in interface WindowContent

focusOnHighlighted

public void focusOnHighlighted()
Specified by:
focusOnHighlighted in interface WindowContent

getSavedFocusBrowser

public EditWindowFocusBrowser getSavedFocusBrowser()
Get the Saved View Browser for this Edit Window


getVarContext

public VarContext getVarContext()
Get the window's VarContext

Specified by:
getVarContext in interface EditWindow0
Specified by:
getVarContext in interface EditWindow_
Returns:
the current VarContext

downHierarchy

public void downHierarchy(boolean keepFocus,
                          boolean newWindow,
                          boolean inPlace)
Push into an instance (go down the hierarchy)

Parameters:
keepFocus - true to keep the zoom and scale in the new window.
newWindow - true to create a new window for the cell.
inPlace - true to descend "in-place" showing the higher levels.

isArrayedContextMatter

public static boolean isArrayedContextMatter(Nodable no)
Returns true if, in terms of context, it matters which index of the nodable we push into.

Parameters:
no - the nodable
Returns:
true if we need to ask the user which index to descent into, false otherwise.

upHierarchy

public void upHierarchy(boolean keepFocus)
Pop out of an instance (go up the hierarchy)


clearSubCellCache

public static void clearSubCellCache()
Method to clear the cache of expanded subcells. This is used by layer visibility which, when changed, causes everything to be redrawn.


expansionChanged

public static void expansionChanged(Cell cell)
Method to recurse flag all windows showing a cell to redraw.

Parameters:
cell - the Cell that changed.

screenToDatabase

public java.awt.geom.Point2D screenToDatabase(int screenX,
                                              int screenY)
Method to convert a screen coordinate to database coordinates.

Parameters:
screenX - the X coordinate (on the screen in this EditWindow).
screenY - the Y coordinate (on the screen in this EditWindow).
Returns:
the coordinate of that point in database units.

screenToDatabase

public java.awt.geom.Rectangle2D screenToDatabase(java.awt.geom.Rectangle2D screenRect)
Method to convert a rectangle in screen units to a rectangle in database units.

Parameters:
screenRect - the rectangle to convert
Returns:
the same rectangle in database units

deltaScreenToDatabase

public java.awt.geom.Point2D deltaScreenToDatabase(int screenDX,
                                                   int screenDY)
Method to convert a screen distance to a database distance.

Parameters:
screenDX - the X coordinate change (on the screen in this EditWindow).
screenDY - the Y coordinate change (on the screen in this EditWindow).
Returns:
the distance in database units.

databaseToScreen

public void databaseToScreen(double dbX,
                             double dbY,
                             java.awt.Point result)
Method to convert a database coordinate to screen coordinates.

Parameters:
dbX - the X coordinate (in database units).
dbY - the Y coordinate (in database units).
result - the Point in which to store the screen coordinates.

databaseToScreen

public java.awt.Point databaseToScreen(double dbX,
                                       double dbY)
Method to convert a database coordinate to screen coordinates.

Specified by:
databaseToScreen in interface EditWindow_
Parameters:
dbX - the X coordinate (in database units).
dbY - the Y coordinate (in database units).
Returns:
the coordinate on the screen.

databaseToScreen

public java.awt.Point databaseToScreen(java.awt.geom.Point2D db)
Method to convert a database coordinate to screen coordinates.

Parameters:
db - the coordinate (in database units).
Returns:
the coordinate on the screen.

databaseToScreen

public java.awt.Rectangle databaseToScreen(java.awt.geom.Rectangle2D db)
Method to convert a database rectangle to screen coordinates.

Parameters:
db - the rectangle (in database units).
Returns:
the rectangle on the screen.

deltaDatabaseToScreen

public java.awt.Point deltaDatabaseToScreen(double dbDX,
                                            double dbDY)
Method to convert a database distance to a screen distance.

Parameters:
dbDX - the X change (in database units).
dbDY - the Y change (in database units).
Returns:
the distance on the screen.

gridAlign

public static void gridAlign(java.awt.geom.Point2D pt)
Method to snap a point to the nearest database-space grid unit.

Parameters:
pt - the point to be snapped.

gridAlignSize

public static void gridAlignSize(java.awt.geom.Point2D pt,
                                 int direction)
Method to snap a point to the nearest database-space grid unit.

Parameters:
pt - the point to be snapped.
direction - -1 if X and Y coordinates, 0 if only X and 1 if only Y

getTextUnitSize

public double getTextUnitSize(double pointSize)
Method to find the size in database units for text of a given point size in this EditWindow. The scale of this EditWindow is used to determine the acutal unit size.

Parameters:
pointSize - the size of the text in points.
Returns:
the database size (in grid units) of the text.

getTextScreenSize

public double getTextScreenSize(double dbSize)
Method to find the size in points (actual screen units) for text of a given database size in this EditWindow. The scale of this EditWindow is used to determine the acutal screen size.

Parameters:
dbSize - the size of the text in database grid-units.
Returns:
the screen size (in points) of the text.

getDefaultFontSize

public static int getDefaultFontSize()

getFont

public java.awt.Font getFont(TextDescriptor descript)
Method to get a Font to use for a given TextDescriptor in this EditWindow.

Parameters:
descript - the TextDescriptor.
Returns:
the Font to use (returns null if the text is too small to display).

getFontHeight

public double getFontHeight(TextDescriptor descript)
Method to get the height of text given a TextDescriptor in this EditWindow.

Parameters:
descript - the TextDescriptor.
Returns:
the height of the text.

getGlyphs

public java.awt.font.GlyphVector getGlyphs(java.lang.String text,
                                           java.awt.Font font)
Method to convert a string and descriptor to a GlyphVector.

Parameters:
text - the string to convert.
font - the Font to use.
Returns:
a GlyphVector describing the text.

databaseChanged

public void databaseChanged(DatabaseChangeEvent e)
Description copied from interface: DatabaseChangeListener
Invoked in the java AWT Event thread when the database state changes.

Specified by:
databaseChanged in interface DatabaseChangeListener
Parameters:
e - database change event.

writeImage

public void writeImage(ElectricPrinter ep,
                       java.lang.String filePath)
Method to export directly PNG file.

Specified by:
writeImage in interface WindowContent
Parameters:
ep - printable object.
filePath -

initializePrinting

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

Specified by:
initializePrinting in interface WindowContent
Parameters:
ep - the ElectricPrinter object.
pageFormat - information about the print job.
Returns:
Always true.

getPrintImage

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

Specified by:
getPrintImage in interface WindowContent
Parameters:
ep - printable object.
Returns:
the image to print (null on error).

panXOrY

public void panXOrY(int direction,
                    double[] panningAmounts,
                    int ticks)
Method to pan along X or Y according to fixed amount of ticks

Specified by:
panXOrY in interface WindowContent
Parameters:
direction - 0 is X and 1 is Y
panningAmounts -
ticks -

centerCursor

public void centerCursor()
Method to shift the window so that the current cursor location becomes the center.

Specified by:
centerCursor in interface WindowContent