pga
Class PGAApplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--pga.PGAApplet

public class PGAApplet
extends java.applet.Applet
implements java.awt.event.ActionListener, java.awt.event.FocusListener, java.lang.Runnable

Vlastni trida appletu demonstrujiciho rozdily mezi SGA a PGA

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
PGAApplet()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Reakce na udalosti od tlacitek.
 void destroy()
          Ukoncovaci prace - zastaveni vlaken.
protected  void finalize()
          Ukoncovaci prace - zastaveni vlaken.
 void focusGained(java.awt.event.FocusEvent e)
          Prazdne - definovano kvuli implementaci FocusListeneru
 void focusLost(java.awt.event.FocusEvent e)
          Zpracuje udalosti v textovych polich.
 java.awt.Dimension getMinSize()
          Minimalni rozmery appletu = preferovane rozmery
 java.awt.Dimension getPreferredSize()
          Preferovane rozmery apletu
 void init()
          Inicializace appletu
 void initCanvases()
          Inicializace obou canvasu pro zobrazeni reseni SGA a PGA
 void initGAs()
          Inicializace oboi GA
static void main(java.lang.String[] args)
          Metoda main Kvuli spusteni appletu jako aplikace.
 void paint(java.awt.Graphics g)
          Vykresleni appletu
 void run()
          Rozbehnuti algoritmu jako dalsiho vlakna.
 void updateCanvases()
          Aktualizace obou canvasu
 
Methods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, checkImage, checkImage, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PGAApplet

public PGAApplet()
Method Detail

initGAs

public void initGAs()
Inicializace oboi GA

initCanvases

public void initCanvases()
Inicializace obou canvasu pro zobrazeni reseni SGA a PGA

updateCanvases

public void updateCanvases()
Aktualizace obou canvasu

init

public void init()
Inicializace appletu
Overrides:
init in class java.applet.Applet

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Reakce na udalosti od tlacitek. Vola metody actionXXX.
Specified by:
actionPerformed in interface java.awt.event.ActionListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Prazdne - definovano kvuli implementaci FocusListeneru
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Zpracuje udalosti v textovych polich.

Pokud bylo pole opusteno a zmeneno, vyvola se prislusna akce pro zmenu parametru algoritmu nebo instance.

Specified by:
focusLost in interface java.awt.event.FocusListener

run

public void run()
Rozbehnuti algoritmu jako dalsiho vlakna.
Specified by:
run in interface java.lang.Runnable

destroy

public void destroy()
Ukoncovaci prace - zastaveni vlaken.
Overrides:
destroy in class java.applet.Applet

finalize

protected void finalize()
                 throws java.lang.Throwable
Ukoncovaci prace - zastaveni vlaken.
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - predek muze vyhodit vyjimku

paint

public void paint(java.awt.Graphics g)
Vykresleni appletu
Overrides:
paint in class java.awt.Container

getPreferredSize

public java.awt.Dimension getPreferredSize()
Preferovane rozmery apletu
Overrides:
getPreferredSize in class java.awt.Container

getMinSize

public java.awt.Dimension getMinSize()
Minimalni rozmery appletu = preferovane rozmery

main

public static void main(java.lang.String[] args)
Metoda main

Kvuli spusteni appletu jako aplikace.