|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.sun.electric.plugins.j3d.View3DWindow
public class View3DWindow
This class deals with 3D View using Java3D
Nested Class Summary |
---|
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 | |
---|---|
protected Cell |
cell
the cell that is in the window |
protected TransformGroup |
objTrans
|
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 |
actionPerformed(java.awt.event.ActionEvent e)
Respond to an action performed, in this case change the current cell when the user clicks on an entry in the upHierarchy popup menu. |
void |
addArc(ArcInst ai,
java.awt.geom.AffineTransform transform,
TransformGroup objTrans)
Adds given Arc to scene graph |
J3DUtils.ThreeDDemoKnot |
addFrame(boolean useView)
|
java.util.Map<TransformGroup,BranchGroup> |
addInterpolator(java.util.List<J3DUtils.ThreeDDemoKnot> knotList)
Method to create a path interpolator using knots defined in input list |
java.util.Map<TransformGroup,BranchGroup> |
addInterpolatorPerGroup(java.util.List<J3DUtils.ThreeDDemoKnot> knotList,
TransformGroup grp,
java.util.Map<TransformGroup,BranchGroup> interMap,
boolean useView)
Method to add interpolator per group |
void |
bottomScrollChanged(int e)
|
void |
centerCursor()
Method to shift the panels so that the current cursor location becomes the center. |
static void |
create3DWindow(Cell cell,
WindowFrame wf,
WindowContent view2D,
boolean transPerNode)
|
protected BranchGroup |
createSceneGraph(Cell cell)
Method to create main transformation group |
void |
fillScreen()
Method to reset zoom/rotation/extraTrans to original place (Fill Window operation) |
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()
Dummy functios due to text-oriented functions |
Cell |
getCell()
Method to return the cell that is shown in this window. |
Highlighter |
getHighlighter()
Get the Highlighter for this window |
java.awt.Point |
getLastMousePosition()
|
void |
getObjTransform(Transform3D trans)
|
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. |
protected double |
getScale()
|
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. |
boolean |
isCollision(Transform3D t3d)
|
protected boolean |
isCollision(Vector3d worldCoord)
Method to detect if give x, y location in the world collides with geometry |
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)
|
J3DUtils.ThreeDDemoKnot |
moveAndRotate(double[] values)
Method to rotate individual groups |
void |
panXOrY(int direction,
double[] panningAmounts,
int ticks)
Method to pan along X according to fixed amount of ticks |
void |
removeInterpolator(java.util.Map<TransformGroup,BranchGroup> interMap)
Method to remove certain interpolators from scene graph |
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 |
saveImage(boolean movieMode)
|
void |
saveMovie(java.lang.String filename)
|
java.awt.geom.Point2D |
screenToDatabase(int screenX,
int screenY)
Method to convert a screen coordinate to database coordinates. |
static void |
setAntialiasing(boolean value)
Method to turn on/off antialiasing |
void |
setCell(Cell cell,
VarContext context,
WindowFrame.DisplayAttributes da)
|
void |
setObjTransform(Transform3D trans)
|
static void |
setScaleFactor(double value)
Method to change Z values in elements |
void |
setWindowTitle()
Method to set the window title. |
static void |
setZValues(Layer layer,
java.lang.Double origDist,
java.lang.Double origThick,
java.lang.Double distance,
java.lang.Double thickness)
Method to change geometry of all nodes using this particular layer This could be an expensive function!. |
void |
showCoordinates(java.awt.event.MouseEvent evt)
|
void |
update(java.util.Observable o,
java.lang.Object arg)
Observer method to highlight 3D nodes by clicking 2D objects |
void |
writeImage(ElectricPrinter ep,
java.lang.String filePath)
Method to export directly PNG file |
void |
zoomInContents()
Method to zoom in by a factor of 2 plus mouse pre-defined factor |
void |
zoomOutContents()
Method to zoom out by a factor of 2 plus mouse pre-defined factor |
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, paintComponent, 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 |
Field Detail |
---|
protected TransformGroup objTrans
protected Cell cell
Method Detail |
---|
public static void create3DWindow(Cell cell, WindowFrame wf, WindowContent view2D, boolean transPerNode)
public void getObjTransform(Transform3D trans)
public void setObjTransform(Transform3D trans)
protected BranchGroup createSceneGraph(Cell cell)
cell
-
public void setWindowTitle()
setWindowTitle
in interface WindowContent
public Cell getCell()
getCell
in interface WindowContent
public void finished()
finished
in interface WindowContent
public void bottomScrollChanged(int e)
bottomScrollChanged
in interface WindowContent
public void rightScrollChanged(int e)
rightScrollChanged
in interface WindowContent
public void fullRepaint()
fullRepaint
in interface WindowContent
public boolean findNextText(boolean reverse)
WindowContent
findNextText
in interface WindowContent
reverse
- true to find in the reverse direction.
public void replaceText(java.lang.String replace)
WindowContent
replaceText
in interface WindowContent
replace
- the new text to replace.public javax.swing.JPanel getPanel()
WindowContent
getPanel
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)
WindowContent
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 void panXOrY(int direction, double[] panningAmounts, int ticks)
panXOrY
in interface WindowContent
direction
- panningAmounts
- ticks
- public void centerCursor()
centerCursor
in interface WindowContent
public void zoomOutContents()
zoomOutContents
in interface WindowContent
public void zoomInContents()
zoomInContents
in interface WindowContent
public void fillScreen()
fillScreen
in interface WindowContent
public void setCell(Cell cell, VarContext context, WindowFrame.DisplayAttributes da)
setCell
in interface WindowContent
public void focusOnHighlighted()
focusOnHighlighted
in interface WindowContent
public void replaceAllText(java.lang.String replace)
WindowContent
replaceAllText
in interface WindowContent
replace
- the new text to replace everywhere.public Highlighter getHighlighter()
WindowContent
getHighlighter
in interface WindowContent
public java.util.List<javax.swing.tree.MutableTreeNode> loadExplorerTrees()
loadExplorerTrees
in interface WindowContent
public void addArc(ArcInst ai, java.awt.geom.AffineTransform transform, TransformGroup objTrans)
ai
- objTrans
- public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
o
- arg
- public static void setScaleFactor(double value)
value
- public static void setAntialiasing(boolean value)
value
- true if antialiasing is set to truepublic static void setZValues(Layer layer, java.lang.Double origDist, java.lang.Double origThick, java.lang.Double distance, java.lang.Double thickness)
layer
- distance
- thickness
- public void writeImage(ElectricPrinter ep, java.lang.String filePath)
writeImage
in interface WindowContent
ep
- filePath
- public void saveImage(boolean movieMode)
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 actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void mousePressed(java.awt.event.MouseEvent evt)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased
in interface java.awt.event.MouseListener
public J3DUtils.ThreeDDemoKnot moveAndRotate(double[] values)
values
- array of valuespublic void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent evt)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void showCoordinates(java.awt.event.MouseEvent evt)
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
public void keyPressed(java.awt.event.KeyEvent evt)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent evt)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent evt)
keyTyped
in interface java.awt.event.KeyListener
public java.awt.Point getLastMousePosition()
public java.awt.geom.Point2D screenToDatabase(int screenX, int screenY)
screenX
- the X coordinate (on the screen in this EditWindow).screenY
- the Y coordinate (on the screen in this EditWindow).
public java.util.Map<TransformGroup,BranchGroup> addInterpolator(java.util.List<J3DUtils.ThreeDDemoKnot> knotList)
knotList
- list with knot data. If null, search for data attached to nodespublic java.util.Map<TransformGroup,BranchGroup> addInterpolatorPerGroup(java.util.List<J3DUtils.ThreeDDemoKnot> knotList, TransformGroup grp, java.util.Map<TransformGroup,BranchGroup> interMap, boolean useView)
knotList
- grp
- interMap
-
public void removeInterpolator(java.util.Map<TransformGroup,BranchGroup> interMap)
interMap
- protected double getScale()
public boolean isCollision(Transform3D t3d)
protected boolean isCollision(Vector3d worldCoord)
worldCoord
-
public J3DUtils.ThreeDDemoKnot addFrame(boolean useView)
public void saveMovie(java.lang.String filename)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |