particle
Class ParticleWorker

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by particle.ParticleWorker
All Implemented Interfaces:
Worker, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, java.util.EventListener

public class ParticleWorker
extends javax.swing.JComponent
implements Worker, java.awt.event.ActionListener

See Also:
Serialized Form

Nested Class Summary
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 int accept
           
 int choice
           
 double dDim1
           
 double dDim2
           
 double dDim3
           
 double dDim4
           
 double dDim5
           
 double density
           
 double diffDim1max
           
 double diffDim2max
           
 double diffDim3max
           
 double diffDim4max
           
 double diffDim5max
           
 double Dim1
           
 double Dim1g
           
 double Dim2
           
 double Dim2g
           
 double Dim3
           
 double Dim3g
           
 double Dim4
           
 double Dim4g
           
 double Dim5
           
 double Dim5g
           
static double dimPower
           
 double dr
           
 double factor1
           
 double factor2
           
 double factor3
           
 double[] g
           
 double gap
           
 double grange
           
 int grdump
           
 double grstep
           
 double hyprad
           
 int i
           
 int j
           
 int k
           
 double lengthDim1
           
 double lengthDim2
           
 double lengthDim3
           
 double lengthDim4
           
 double lengthDim5
           
 int ngr
           
static int ngrmax
           
static int nmax
           
 int nmcsteps
           
 int noneq
           
 double numberDim1
           
 double numberDim2
           
 double numberDim3
           
 double numberDim4
           
 double numberDim5
           
 int numParticles
           
 double order
           
 int order_index
           
 double[] orderArr
           
 int orderdump
           
static double Pi
           
 double post_average_accept
           
 int pre_accept
           
 double pre_average_accept
           
 double[] r
           
 
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
 
Constructor Summary
ParticleWorker()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void calg(int choice)
           
 javax.swing.JComponent getGUI()
          Returns a GUI component which is used to display progress and other information.
 float getPrecentageDone()
          Returns a float which represents what precentage of the calculation has completed.
 ResultUnit getResultUnit()
          Returns the ResultUnit produced by the implementing class.
 void move()
           
 void overlap(int _index)
           
 void paintComponent(java.awt.Graphics g)
           
 void run()
           
 void setWorkUnit(WorkUnit wu)
          Called by the host of the Worker object, in order to provide it with a work unit to be processed.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI
 
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, transferFocusBackward, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Pi

public static final double Pi
See Also:
Constant Field Values

density

public double density

numParticles

public int numParticles

accept

public int accept

pre_accept

public int pre_accept

ngrmax

public static int ngrmax

nmax

public static int nmax

numberDim1

public double numberDim1

numberDim2

public double numberDim2

numberDim3

public double numberDim3

numberDim4

public double numberDim4

numberDim5

public double numberDim5

lengthDim1

public double lengthDim1

lengthDim2

public double lengthDim2

lengthDim3

public double lengthDim3

lengthDim4

public double lengthDim4

lengthDim5

public double lengthDim5

choice

public int choice

i

public int i

j

public int j

k

public int k

dDim1

public double dDim1

dDim2

public double dDim2

dDim3

public double dDim3

dDim4

public double dDim4

dDim5

public double dDim5

diffDim1max

public double diffDim1max

diffDim2max

public double diffDim2max

diffDim3max

public double diffDim3max

diffDim4max

public double diffDim4max

diffDim5max

public double diffDim5max

Dim1

public double Dim1

Dim2

public double Dim2

Dim3

public double Dim3

Dim4

public double Dim4

Dim5

public double Dim5

dimPower

public static double dimPower

pre_average_accept

public double pre_average_accept

post_average_accept

public double post_average_accept

gap

public double gap

grange

public double grange

grstep

public double grstep

hyprad

public double hyprad

dr

public double dr

g

public double[] g

r

public double[] r

factor1

public double factor1

factor2

public double factor2

factor3

public double factor3

order_index

public int order_index

Dim1g

public double Dim1g

Dim2g

public double Dim2g

Dim3g

public double Dim3g

Dim4g

public double Dim4g

Dim5g

public double Dim5g

order

public double order

orderdump

public int orderdump

noneq

public int noneq

nmcsteps

public int nmcsteps

grdump

public int grdump

ngr

public int ngr

orderArr

public double[] orderArr
Constructor Detail

ParticleWorker

public ParticleWorker()
Method Detail

setWorkUnit

public void setWorkUnit(WorkUnit wu)
Description copied from interface: Worker
Called by the host of the Worker object, in order to provide it with a work unit to be processed.

Specified by:
setWorkUnit in interface Worker
Parameters:
wu - the WorkUnit to process

getResultUnit

public ResultUnit getResultUnit()
Description copied from interface: Worker
Returns the ResultUnit produced by the implementing class.

Specified by:
getResultUnit in interface Worker
Returns:
the ResultUnit which is conveyed to the the Computation class

getPrecentageDone

public float getPrecentageDone()
Description copied from interface: Worker
Returns a float which represents what precentage of the calculation has completed. It is also feasiable that this value cannot be calculated, in which case a -1.0 should be returned.

Specified by:
getPrecentageDone in interface Worker
Returns:
a value between 0.0 and 1.0 to indicate progress, or -1.0 if unknown

getGUI

public javax.swing.JComponent getGUI()
Description copied from interface: Worker
Returns a GUI component which is used to display progress and other information. It is not mandatory to provide a fancy GUI component, in which case a null should be returned.

Specified by:
getGUI in interface Worker
Returns:
the GUI component, or null if none is available

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

paintComponent

public void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

run

public void run()
Specified by:
run in interface java.lang.Runnable

move

public void move()

overlap

public void overlap(int _index)

calg

public void calg(int choice)