AtomLeafAgentManager.AgentSource<Ball>
DisplayBoxCanvas3DGlass
public class DisplayBoxCanvasG3DSys extends DisplayCanvas implements AtomLeafAgentManager.AgentSource<Ball>
Modifier and Type | Class | Description |
---|---|---|
class |
DisplayBoxCanvasG3DSys.OrientedAgentSource |
|
static class |
DisplayBoxCanvasG3DSys.OrientedFullSite |
|
static class |
DisplayBoxCanvasG3DSys.OrientedSite |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
java.awt.Container.AccessibleAWTContainer
Modifier and Type | Field | Description |
---|---|---|
protected AtomLeafAgentManager<Ball> |
aam |
|
protected AtomLeafAgentManager<Ball[]> |
aamOriented |
|
protected java.util.Map<AtomType,DisplayBoxCanvasG3DSys.OrientedSite[]> |
atomTypeOrientedManager |
|
protected G3DSys |
gsys |
|
protected Line[] |
lineFigures |
|
protected LineSegment[] |
lines |
|
protected Vector |
rMax |
|
protected Vector |
rMin |
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
controller, displayBox, DRAW_BOUNDARY_ALL, DRAW_BOUNDARY_MAX, DRAW_BOUNDARY_NONE, DRAW_BOUNDARY_OUTLINE, DRAW_BOUNDARY_SHELL, offScreen, osg, pixel
Constructor | Description |
---|---|
DisplayBoxCanvasG3DSys(Simulation sim,
DisplayBox _box,
Space _space,
Controller controller) |
Modifier and Type | Method | Description |
---|---|---|
void |
addLine(LineSegment newLine) |
|
void |
addPlane(Plane newPlane) |
|
void |
doPaint(java.awt.Graphics g) |
|
java.awt.Color |
getBackgroundColor() |
Gets the background color of the display box canvas.
|
java.awt.Color |
getBoundaryFrameColor() |
Gets the color of box boundary.
|
double |
getDepth() |
Get depth percentage
|
G3DSys |
getG3DSys() |
|
java.awt.Color |
getPlaneColor() |
Gets the color of the plane.
|
double |
getSlab() |
Get depth percentage
|
Ball |
makeAgent(IAtom a,
Box agentBox) |
AgentSource methods
|
java.lang.Object |
makeBond(IAtomList pair,
java.lang.Object bondType) |
Add a bond to the graphical display between the given pairs.
|
protected double |
rBound(double r,
int i) |
helper method that returns the position r if there are no bounds or
if r is inside the bounds or (if r is outside the bounds) returns the
position in the bounds nearest r.
|
void |
refreshAtomAgentMgr() |
refreshAtomAgentMgr() - sets the new atom manager based upon the box.
|
void |
releaseAgent(Ball agent,
IAtom atom,
Box agentBox) |
This informs the agent source that the agent is going away and that
the agent source should disconnect the agent from other elements.
|
void |
releaseBond(java.lang.Object bond) |
Removes the given bond from the graphical display.
|
void |
removeLine(LineSegment oldLine) |
|
void |
removeObjectByBox(Box p) |
|
void |
removePlane(Plane oldPlane) |
|
void |
scaleSetSize(int width,
int height) |
Sets the size of the display to a new value and scales the image so that
the box fits in the canvas in the same proportion as before.
|
void |
setBackgroundColor(java.awt.Color color) |
Sets the background color of the display box canvas.
|
void |
setBoundaryFrameColor(java.awt.Color color) |
Sets the color of the box boundary.
|
void |
setBoundingBox(Vector rMin,
Vector rMax) |
Sets the display bounding box.
|
void |
setBounds(int x,
int y,
int width,
int height) |
|
void |
setDepth(double depth) |
Set depth percentage
|
void |
setOrientationSites(AtomTypeOriented atomType,
DisplayBoxCanvasG3DSys.OrientedSite[] sites) |
|
void |
setPlaneColor(java.awt.Color color) |
Sets the color of the plane.
|
void |
setSlab(double slab) |
Set slab percentage
|
void |
stopRotate() |
|
protected void |
updateLine(int iLine) |
|
protected void |
updatePlane(int iPlane) |
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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
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
createOffScreen, dispose, ensureOffScreen, getDrawBoundary, getPixelUnit, getPrevX, getPrevY, getShiftX, getShiftY, getWriteScale, getXRot, getYRot, getZoom, isMovable, isResizable, paint, repaint, reshape, setDrawBoundary, setMovable, setPixelUnit, setPrevX, setPrevY, setResizable, setShiftX, setShiftY, setWriteScale, setXRot, setYRot, setZoom, startRotate
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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
protected final java.util.Map<AtomType,DisplayBoxCanvasG3DSys.OrientedSite[]> atomTypeOrientedManager
protected AtomLeafAgentManager<Ball> aam
protected LineSegment[] lines
protected Line[] lineFigures
protected AtomLeafAgentManager<Ball[]> aamOriented
protected Vector rMin
protected Vector rMax
protected G3DSys gsys
public DisplayBoxCanvasG3DSys(Simulation sim, DisplayBox _box, Space _space, Controller controller)
public G3DSys getG3DSys()
public void setBoundingBox(Vector rMin, Vector rMax)
public void scaleSetSize(int width, int height)
public void setBounds(int x, int y, int width, int height)
setBounds
in class java.awt.Component
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color color)
color
- : color to set background topublic java.awt.Color getBoundaryFrameColor()
public void setBoundaryFrameColor(java.awt.Color color)
color
- : color to set box boundarypublic java.awt.Color getPlaneColor()
public void setPlaneColor(java.awt.Color color)
color
- : color to set planepublic void removeObjectByBox(Box p)
public void refreshAtomAgentMgr()
protected double rBound(double r, int i)
public void doPaint(java.awt.Graphics g)
doPaint
in class DisplayCanvas
public void addLine(LineSegment newLine)
public void removeLine(LineSegment oldLine)
protected void updateLine(int iLine)
public void addPlane(Plane newPlane)
public void removePlane(Plane oldPlane)
protected void updatePlane(int iPlane)
public java.lang.Object makeBond(IAtomList pair, java.lang.Object bondType)
public void setOrientationSites(AtomTypeOriented atomType, DisplayBoxCanvasG3DSys.OrientedSite[] sites)
public void releaseBond(java.lang.Object bond)
public Ball makeAgent(IAtom a, Box agentBox)
makeAgent
in interface AtomLeafAgentManager.AgentSource<Ball>
agentBox
- TODOpublic void releaseAgent(Ball agent, IAtom atom, Box agentBox)
AtomLeafAgentManager.AgentSource
releaseAgent
in interface AtomLeafAgentManager.AgentSource<Ball>
public double getSlab()
public void setSlab(double slab)
slab
- the slab percentage to setpublic double getDepth()
public void setDepth(double depth)
depth
- the depth percentage to setpublic void stopRotate()
stopRotate
in class DisplayCanvas