|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--org.concord.collisions.ui.GUIPanel
GUI front end for JPartWorld
| Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected java.lang.Object |
activity
|
protected int |
arrowsVelDragMode
|
protected int |
atomsDragMode
|
protected boolean |
constrainDragInside
|
protected int |
daemonsDragMode
|
static java.text.DecimalFormat |
df
|
static int |
DRAG_ARROW_VEL_NONE
|
static int |
DRAG_ARROW_VEL_ONLYX
|
static int |
DRAG_ARROW_VEL_ONLYY
|
static int |
DRAG_ARROW_VEL_XY
|
static int |
DRAG_MODE_DAEMON
|
static int |
DRAG_MODE_FORCE
|
static int |
DRAG_MODE_FORCEMAGNITUDE
|
static int |
DRAG_MODE_NONE
|
static int |
DRAG_MODE_NORMAL
|
static int |
DRAG_MODE_ONLYVX
|
static int |
DRAG_MODE_ONLYVY
|
static int |
DRAG_MODE_ROTATE
|
static int |
DRAG_MODE_VEL
|
protected boolean |
editable
|
protected boolean |
elementsSelectable
|
protected int |
forcesDragMode
|
protected boolean |
tracePossible
|
protected int |
wallsDragMode
|
static int |
WATCH_MODE_CROSS
|
static int |
WATCH_MODE_LEFT_BOTTOM
|
static int |
WATCH_MODE_LEFT_TOP
|
static int |
WATCH_MODE_RIGHT_BOTTOM
|
static int |
WATCH_MODE_RIGHT_TOP
|
| 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 org.concord.shared.simulation.CCSimulator |
SIM_RESET_STATE, SIM_RUN_STATE, SIM_STOP_STATE, SIM_UNDEF_STATE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
GUIPanel()
GUIPanel constructor creates instance of GUIPanel |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Deprecated. |
void |
addCollisionsListener(CollisionsListener l)
|
void |
addEditableProperty(java.lang.String className,
java.lang.String propName)
|
void |
addEditableProperty(java.lang.String className,
java.lang.String propName,
java.lang.String propLabel)
|
void |
addElement(JWorldElement element)
add element into the panel |
void |
addPassiveElement(PassiveElement pe)
add passive element(Line, Icon, Rectangle, Text) into the panel |
JWall[] |
buildBox(float x0,
float y0,
float boxWidth,
float boxHeight,
float thickness)
build square box: 4 walls |
JWall[] |
buildBox(float x0,
float y0,
float boxWidth,
float boxHeight,
float thickness,
float tLeft,
float tRight,
float tTop,
float tBottom)
build square box: 4 walls |
void |
clearAll()
remove all elements from the panel |
void |
clearBackgroundIcon()
|
void |
clearGrid()
|
void |
clearOriginElement()
|
void |
closeEverything()
|
void |
continueSteps()
continue simulation |
DomainView |
create(java.lang.String viewSpecification)
|
void |
createPopupMenu(JWorldElement element)
|
void |
createPopupMenu(PassiveElement element)
|
protected void |
createWorld()
|
protected void |
createWorld(float calcDT,
float drawDT)
|
void |
doOneStep()
make only one simulation's step |
static void |
drawDashedStraightLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2,
int delta,
int skipPoint)
used for drawing velocity projections |
void |
drawStaticPart(java.awt.Graphics g)
|
JAtom |
findAtom(float x,
float y)
|
JDaemon |
findDaemon(float x,
float y)
|
CCDraggable |
findDaemonDraggable(float x,
float y)
|
static java.awt.Frame |
findNearestFrame(java.awt.Component c)
|
PassiveElement |
findPassiveElement(float x,
float y)
|
int |
getArrowsVelDragMode()
|
int |
getAtomsDragMode()
getting drag mode for the atoms |
java.awt.Point |
getClosestPointInside(java.awt.Point p)
|
int |
getDaemonsDragMode()
determine drag mode for the daemons |
boolean |
getEditable()
|
DomainEngine |
getEngine()
|
int |
getForcesDragMode()
determine drag mode for the forces |
PassiveGrid |
getGrid()
|
java.awt.Image |
getGUIPanelOffscreen()
|
java.awt.Image |
getGUIPanelStaticImage()
|
CCCoordinateTuner |
getPanelToWorldCoordinateTuner()
|
protected float |
getPanelXfromWorldX(float worldX)
Converts x coordinate from world coordinate system to GUIPanel coordinate system |
protected float |
getPanelYfromWorldY(float worldY)
Converts y coordinate from world coordinate system to GUIPanel coordinate system |
java.awt.Image |
getPartOffImage(int x,
int y,
int w,
int h)
|
int |
getSelectedElemDragMode()
|
JWorldElement |
getSelectedElement()
|
int |
getSimulationState()
|
java.util.Vector |
getViewActions()
|
java.util.Vector |
getViewEvents()
|
java.util.Vector |
getViewMethods()
|
int |
getWallsDragMode()
determine drag mode for the daemons |
JWorldElement |
getWatchableElement()
|
int |
getWatchMode()
|
JPartWorld |
getWorldModel()
|
CCCoordinateTuner |
getWorldToPanelCoordinateTuner()
|
protected float |
getWorldXfromPanelX(float panelX)
Converts x coordinate from GUIPanel coordinate system to world coordinate system |
protected float |
getWorldYfromPanelY(float panelY)
Converts y coordinate from GUIPanel coordinate system to world coordinate system |
void |
hideCM()
hide Center of Mass point |
boolean |
isConstrainDragInside()
|
boolean |
isDoAACollisions()
|
boolean |
isDoAWCollisions()
|
boolean |
isElementInside(JWorldElement elem)
|
boolean |
isElementSelected(JWorldElement elem)
|
boolean |
isElementsSelectable()
|
boolean |
isFocusTraversable()
Returns the value of a flag that indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal. |
boolean |
isPassiveElementInside(PassiveElement elem)
|
boolean |
isPointInside(float x,
float y)
|
boolean |
isRunning()
isRunning |
boolean |
isTracePossible()
|
void |
nextStep()
nextStep shouldn't be called directly calculates next simulation's step |
void |
paintComponent(java.awt.Graphics g)
shouldn't be called directly |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
redraw()
redraw GUIPanel content, actually calls super class repaint method |
void |
release(DomainView view)
|
void |
removeAllAtomsFromArea(int xa,
int ya,
int wa,
int ha)
|
void |
removeAtom(JAtom atom)
remove the given atom from the panel |
void |
removeAtom(java.lang.String name)
remove the atom with given name from the panel |
void |
removeCollisionsListener(CollisionsListener l)
|
void |
removeDaemon(JDaemon daemon)
remove the given daemon from the panel |
void |
removeDaemon(java.lang.String name)
remove the daemon of the given name from the panel |
void |
removeEditableProperty(java.lang.String className,
java.lang.String propName)
|
void |
removeElement(JWorldElement element)
remove the element from the panel |
void |
removePassiveElement(PassiveElement pe)
add passive element(Line, Icon, Rectangle, Text) into the panel |
void |
removePassiveElements()
remove all passive elements from the panel |
void |
removeRigidBox(JRigidBox box)
remove the given box from the panel |
void |
removeRigidBox(java.lang.String name)
remove the box of the given name from the panel |
void |
removeWall(JWall wall)
remove the given wall from the panel |
void |
removeWall(java.lang.String name)
remove the wall with given name from the panel |
void |
reset()
reset simulation |
void |
resetStaticImage()
clear all possible elements from static part of GUIPanel usually that clears all traces; |
void |
restore(java.io.InputStream input)
|
void |
restore(java.io.Reader reader)
|
void |
save(java.io.OutputStream output)
|
void |
save(java.io.Writer writer)
|
org.w3c.dom.Element |
serializeAsElement(org.w3c.dom.Document document)
|
void |
setActivity(java.lang.Object activity)
|
void |
setArrowsVelDragMode(int arrowsVelDragMode)
|
void |
setAtomsDragMode(int atomsDragMode)
setting drag mode for the atoms |
void |
setBackground(java.awt.Color col)
|
void |
setBackgroundIcon(java.lang.String url)
|
void |
setBackgroundIcon(java.lang.String url,
int x,
int y)
|
void |
setBackgroundQTIcon(java.lang.String url)
|
void |
setBackgroundQTIcon(java.lang.String url,
int x,
int y)
|
void |
setConstrainDragInside(boolean b)
|
void |
setDaemonsDragMode(int daemonDragMode)
setting drag mode for the daemons |
void |
setDoAACollisions(boolean doCollisions)
|
void |
setDoAWCollisions(boolean doCollisions)
|
void |
setEditable(boolean editable)
|
void |
setEditableProperty(java.lang.String className,
java.lang.String propName,
boolean display)
|
void |
setElementsSelectable(boolean b)
|
void |
setElemsPropertiesPanel(PropertyPanel pan)
|
void |
setForcesDragMode(int forceDragMode)
setting drag mode for the forces |
void |
setGrid()
|
void |
setGrid(int x,
int y,
int width,
int height)
|
void |
setNeedScreenResolution(float needScreenResolution)
|
void |
setNeedScreenResolution(float newValue,
java.awt.Component c)
|
void |
setOriginElement(CCMassive originElement)
|
void |
setPropertiesPanel(PropertyPanel pan)
|
void |
setPropertyForAlElementsInRect(java.lang.String property,
int type,
float x,
float y,
float w,
float h,
java.lang.Object val)
|
void |
setSelectedElemDragMode(int d)
|
void |
setSelectedElement(JWorldElement elem)
|
void |
setSize(int width,
int height)
Resizes this component so that it has width width
and height. |
void |
setSnapToGrid(boolean atom,
boolean velocity)
|
void |
setSnapToGrid(boolean atom,
boolean velocity,
int scaleX,
int scaleY)
|
void |
setTracePossible(boolean tracePossible)
set GUIPanel trace property |
void |
setTransformParam(float xtransform,
float ytransform)
|
void |
setWallsDragMode(int wallDragMode)
setting drag mode for the walls |
void |
setWatchableElement(JWorldElement watchableElement)
|
void |
setWatchMode(int wm)
|
void |
setWorld(JPartWorld newWorld)
|
void |
setWorldAperture(float waperture,
float haperture)
|
void |
setWorldOrigin(float xorigin,
float yorigin)
|
void |
showCM()
show Center of Mass point Center of Mass will be represented as point |
void |
showCM(boolean showCMCross)
show Center of Mass point |
void |
start()
start simulation |
void |
stepFinished(StepEvent evt)
|
void |
stop()
stop simulation |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected boolean tracePossible
public static final int DRAG_MODE_NORMAL
public static final int DRAG_MODE_VEL
public static final int DRAG_MODE_ONLYVX
public static final int DRAG_MODE_ONLYVY
public static final int DRAG_MODE_NONE
public static final int DRAG_MODE_DAEMON
public static final int DRAG_MODE_FORCE
public static final int DRAG_MODE_FORCEMAGNITUDE
public static final int DRAG_MODE_ROTATE
protected int atomsDragMode
public static final int DRAG_ARROW_VEL_NONE
public static final int DRAG_ARROW_VEL_ONLYX
public static final int DRAG_ARROW_VEL_ONLYY
public static final int DRAG_ARROW_VEL_XY
protected int arrowsVelDragMode
protected int daemonsDragMode
protected int forcesDragMode
protected int wallsDragMode
protected boolean editable
protected boolean constrainDragInside
protected boolean elementsSelectable
public static java.text.DecimalFormat df
public static final int WATCH_MODE_LEFT_TOP
public static final int WATCH_MODE_LEFT_BOTTOM
public static final int WATCH_MODE_RIGHT_TOP
public static final int WATCH_MODE_RIGHT_BOTTOM
public static final int WATCH_MODE_CROSS
protected java.lang.Object activity
| Constructor Detail |
public GUIPanel()
| Method Detail |
public CCCoordinateTuner getPanelToWorldCoordinateTuner()
public CCCoordinateTuner getWorldToPanelCoordinateTuner()
public java.awt.Image getGUIPanelOffscreen()
public java.awt.Image getGUIPanelStaticImage()
public boolean getEditable()
public void setEditable(boolean editable)
public void setSize(int width,
int height)
width
and height.setSize in class java.awt.Componentwidth - The new width of this component in pixels.height - The new height of this component in pixels.#java.awt.Component#setSizepublic boolean isFocusTraversable()
requestFocus(), but it will not automatically
be assigned focus during tab traversal.isFocusTraversable in class javax.swing.JComponenttrue if this component is
focus-traverable; false otherwise.#java.awt.Component#isFocusTraversable
public JAtom findAtom(float x,
float y)
public JDaemon findDaemon(float x,
float y)
public CCDraggable findDaemonDraggable(float x,
float y)
public void setOriginElement(CCMassive originElement)
public void clearOriginElement()
protected float getPanelXfromWorldX(float worldX)
worldX - The x coordinate (world coordinate)x coordinate in GUIPanel coordinate systemprotected float getPanelYfromWorldY(float worldY)
worldY - The y coordinate (world coordinate)y coordinate in GUIPanel coordinate systemprotected float getWorldXfromPanelX(float panelX)
worldX - The y coordinate (GUIPanel coordinate)x coordinate in GUIPanel coordinate systemprotected float getWorldYfromPanelY(float panelY)
worldY - The y coordinate (GUIPanel coordinate)x coordinate in GUIPanel coordinate system
public void setWorldOrigin(float xorigin,
float yorigin)
public void setTransformParam(float xtransform,
float ytransform)
public void setWorldAperture(float waperture,
float haperture)
public PassiveElement findPassiveElement(float x,
float y)
public void removeElement(JWorldElement element)
element - the element to be removed
public void removeAllAtomsFromArea(int xa,
int ya,
int wa,
int ha)
public void removeAtom(java.lang.String name)
name - name of the atom to be removedJAtompublic void removeAtom(JAtom atom)
atom - the atom to be removedJAtompublic void removeWall(java.lang.String name)
name - name of the wall to be removedJWallpublic void removeWall(JWall wall)
wall - the wall to be removedJWallpublic void removeRigidBox(JRigidBox box)
box - the box to be removedJRigidBoxpublic void removeRigidBox(java.lang.String name)
name - name of the box to be removedJRigidBoxpublic void removeDaemon(JDaemon daemon)
daemon - the daemon to be removedJDaemonpublic void removeDaemon(java.lang.String name)
name - name of the daemon to be removedJDaemonpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - ActionEventprotected void createWorld()
protected void createWorld(float calcDT,
float drawDT)
public void setWorld(JPartWorld newWorld)
public JPartWorld getWorldModel()
JPartWorld
public void addElement(JWorldElement element)
throws java.lang.Exception
element - element to addJPartWorld.addWorldElement(org.concord.collisions.engine.JWorldElement)public void addPassiveElement(PassiveElement pe)
pe - element to addPassiveElementpublic void removePassiveElement(PassiveElement pe)
pe - element to addPassiveElementpublic void removePassiveElements()
PassiveElementpublic void clearAll()
PassiveElement,
org.concord.collisions.engine.world#clearWorldpublic void resetStaticImage()
public java.awt.Image getPartOffImage(int x,
int y,
int w,
int h)
public void setNeedScreenResolution(float needScreenResolution)
public void setNeedScreenResolution(float newValue,
java.awt.Component c)
public void drawStaticPart(java.awt.Graphics g)
public void setBackground(java.awt.Color col)
setBackground in class javax.swing.JComponentpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void redraw()
public void reset()
reset in interface CCSimulatorJPartWorld.reset()public void stop()
stop in interface CCSimulatorJPartWorld.stop()public void continueSteps()
continueSteps in interface CCSimulatorJPartWorld.stop()public void doOneStep()
doOneStep in interface CCSimulatorJPartWorld.doOneStep()public void nextStep()
nextStep in interface CCSimulatorpublic boolean isRunning()
isRunning in interface CCSimulatortrue if simulation is running
or false if simulation was resetpublic int getSimulationState()
getSimulationState in interface CCSimulatorpublic void start()
start in interface CCSimulatorJPartWorld.start()
public JWall[] buildBox(float x0,
float y0,
float boxWidth,
float boxHeight,
float thickness)
x0 - x coordinate of top left corner of the boxy0 - y coordinate of top left corner of the boxboxWidth - width of the boxboxHeight - height of the boxthickness - thickness of the wallsJWall
public JWall[] buildBox(float x0,
float y0,
float boxWidth,
float boxHeight,
float thickness,
float tLeft,
float tRight,
float tTop,
float tBottom)
x0 - x coordinate of top left corner of the boxy0 - y coordinate of top left corner of the boxboxWidth - width of the boxboxHeight - height of the boxthickness - thickness of the wallstLeft - temperature of the left walltRight - temperature of the right walltTop - temperature of the top walltBottom - temperature of the bottom wallJWall
public void setPropertyForAlElementsInRect(java.lang.String property,
int type,
float x,
float y,
float w,
float h,
java.lang.Object val)
type - kind of particle could be JPartWorld.TYPE_ATOM or JPartWorld.TYPE_WALLJPartWorld.TYPE_ATOM,
JPartWorld.TYPE_WALL,
JPartWorld.setPropertyForAtomsInRect(java.lang.String, float, float, float, float, java.lang.Object),
JPartWorld.setPropertyForWallsInRect(java.lang.String, float, float, float, float, java.lang.Object)public void addCollisionsListener(CollisionsListener l)
JPartWorld.addCollisionsListener(org.concord.collisions.event.CollisionsListener)public void removeCollisionsListener(CollisionsListener l)
JPartWorld.removeCollisionsListener(org.concord.collisions.event.CollisionsListener)public void setTracePossible(boolean tracePossible)
tracePossible - if parameter is true, GUIPanel will support the drawing atom's tracespublic boolean isTracePossible()
public void createPopupMenu(JWorldElement element)
public void createPopupMenu(PassiveElement element)
public static void drawDashedStraightLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2,
int delta,
int skipPoint)
g - Graphics where line should be drawnx1 - start point x coordinatey1 - start point y coordinatex2 - end point x coordinatey2 - end point y coordinatedelta - number of pixels to drawskipPoint - number of pixels to skippublic void showCM()
public void showCM(boolean showCMCross)
showCMCross - if true Center of Mass will be represented as cross
if false Center of Mass will be represented as pointpublic void hideCM()
public void setAtomsDragMode(int atomsDragMode)
desired - drag mode:
DRAG_MODE_NORMAL - moving atom
DRAG_MODE_VEL - changing atom's velocitypublic int getAtomsDragMode()
public void setDaemonsDragMode(int daemonDragMode)
desired - drag mode:
DRAG_MODE_NORMAL - moving daemon
DRAG_MODE_VEL - changing daemon's velocity
DRAG_MODE_DAEMON - changing daemon's specific thing
for example for booster it's the delta velocity
for force daemons it's the force
for displ daemons it's the arrow lengthpublic int getDaemonsDragMode()
public void setForcesDragMode(int forceDragMode)
desired - drag mode:
DRAG_MODE_NORMAL - snap force to another atom or element
DRAG_MODE_FORCE - changing daemon's velocity
DRAG_MODE_FORCEMAGNITUDE - changing daemon's velocitypublic int getForcesDragMode()
public void setWallsDragMode(int wallDragMode)
desired - drag mode:
DRAG_MODE_NORMAL - moving wall
DRAG_MODE_ROTATE - rotate wall around one edge as pivotpublic int getWallsDragMode()
public void setArrowsVelDragMode(int arrowsVelDragMode)
public int getArrowsVelDragMode()
public void setSelectedElemDragMode(int d)
public int getSelectedElemDragMode()
public boolean isDoAACollisions()
public void setDoAACollisions(boolean doCollisions)
public boolean isDoAWCollisions()
public void setDoAWCollisions(boolean doCollisions)
public JWorldElement getWatchableElement()
public void setWatchableElement(JWorldElement watchableElement)
public int getWatchMode()
public void setWatchMode(int wm)
public void stepFinished(StepEvent evt)
stepFinished in interface StepListenerpublic void setGrid()
public void setGrid(int x,
int y,
int width,
int height)
public PassiveGrid getGrid()
public void clearGrid()
public void setBackgroundIcon(java.lang.String url)
public void setBackgroundIcon(java.lang.String url,
int x,
int y)
public void setBackgroundQTIcon(java.lang.String url)
public void setBackgroundQTIcon(java.lang.String url,
int x,
int y)
public void clearBackgroundIcon()
public void setSnapToGrid(boolean atom,
boolean velocity)
public void setSnapToGrid(boolean atom,
boolean velocity,
int scaleX,
int scaleY)
public boolean isElementInside(JWorldElement elem)
public boolean isPassiveElementInside(PassiveElement elem)
public boolean isPointInside(float x,
float y)
public java.awt.Point getClosestPointInside(java.awt.Point p)
public static java.awt.Frame findNearestFrame(java.awt.Component c)
public void setConstrainDragInside(boolean b)
public boolean isConstrainDragInside()
public DomainView create(java.lang.String viewSpecification)
create in interface DomainViewpublic void release(DomainView view)
release in interface DomainViewpublic java.util.Vector getViewMethods()
getViewMethods in interface DomainViewpublic java.util.Vector getViewEvents()
getViewEvents in interface DomainViewpublic java.util.Vector getViewActions()
getViewActions in interface DomainViewpublic DomainEngine getEngine()
getEngine in interface DomainViewpublic void setActivity(java.lang.Object activity)
setActivity in interface DomainViewpublic void closeEverything()
closeEverything in interface DomainViewpublic void save(java.io.Writer writer)
save in interface DomainPersistentElementpublic void restore(java.io.Reader reader)
restore in interface DomainPersistentElementpublic void save(java.io.OutputStream output)
save in interface DomainPersistentElementpublic void restore(java.io.InputStream input)
restore in interface DomainPersistentElementpublic org.w3c.dom.Element serializeAsElement(org.w3c.dom.Document document)
serializeAsElement in interface DomainPersistentElementpublic void setElementsSelectable(boolean b)
public boolean isElementsSelectable()
public JWorldElement getSelectedElement()
public boolean isElementSelected(JWorldElement elem)
public void setSelectedElement(JWorldElement elem)
public void setElemsPropertiesPanel(PropertyPanel pan)
public void setPropertiesPanel(PropertyPanel pan)
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListener
public void setEditableProperty(java.lang.String className,
java.lang.String propName,
boolean display)
public void addEditableProperty(java.lang.String className,
java.lang.String propName)
public void addEditableProperty(java.lang.String className,
java.lang.String propName,
java.lang.String propLabel)
throws java.lang.IllegalArgumentException
public void removeEditableProperty(java.lang.String className,
java.lang.String propName)
throws java.lang.IllegalArgumentException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||