|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Panel java.applet.Applet javax.swing.JApplet com.rubecula.darwin.visualization.swing.EvolutionaryApplet com.rubecula.darwin.visualization.swing.VisualizingEvolutionaryApplet
public abstract class VisualizingEvolutionaryApplet
This subclass of EvolutionaryApplet additionally knows how to paint the
changes to the visualization model.
TODO fix the issue where we add (for Applet) (for each visualization model)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JApplet |
---|
javax.swing.JApplet.AccessibleJApplet |
Nested classes/interfaces inherited from class java.applet.Applet |
---|
java.applet.Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
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 |
---|
Fields inherited from class com.rubecula.darwin.visualization.swing.EvolutionaryApplet |
---|
_title, APPLET_PARAM_ENABLE_SLIDER, controlPanel, DEFAULT_PROPERTIES_URL, evolution, LBL_VERSION, LOG, P_TITLE_APPLICATION, PROPERTIES_URL |
Fields inherited from class javax.swing.JApplet |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.rubecula.darwin.visualization.ControlAction |
---|
NEXT, QUIT, START, STOP, TIME_DELAY |
Fields inherited from interface com.rubecula.darwin.domain.helper.GenerationListener |
---|
$1_SECOND |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
protected |
VisualizingEvolutionaryApplet()
|
Method Summary | |
---|---|
void |
addVisualizationModel(VisualizationModel visualizationModel)
Method to add a visualization model to this applet. |
protected void |
addVisualizer(java.lang.String key,
VisualizationModel visualizationModel)
|
protected void |
addVisualizer(java.lang.String key,
VisualizationModel visualizationModel,
javax.swing.Icon icon,
java.lang.String tip)
|
protected void |
addVisualizer(java.lang.String key,
VisualizationModel visualizationModel,
java.lang.String tip)
|
protected void |
addVisualizers()
Method to add visualizers to this applet's visualizer tabs. |
protected java.util.Map<java.lang.String,java.awt.Component> |
createOptionsComponentMap()
Needs to be overridden by extenders. |
protected OptionsPanel |
getOptionsPanel()
|
Painter |
getPainter()
|
protected VisualizationFactory |
getVisualizationFactory()
|
protected VisualizerTabs |
getVisualizerTabs()
XXX consider defining this public in interface |
void |
setOptionsPanel(OptionsPanel optionsPanel)
|
protected void |
setup()
Do nothing. |
void |
setVisualizationFactory(VisualizationFactory visualizationFactory)
|
void |
setVisualizerTabs(VisualizerTabs visualizerTabs)
|
protected void |
updateModel(java.lang.String name,
java.lang.Object value)
As always when a user-interface action causes a change to the model which backs a widget, two things must happen: we must fire a change event so that other parts of the system know that the property has changed. |
Methods inherited from class com.rubecula.darwin.visualization.swing.EvolutionaryApplet |
---|
createControlPanel, createEastPanel, createNorthPanel, createSouthPanel, createWestPanel, destroy, getBooleanParameter, getControlPanel, getDefaultBeansFilename, getEvolution, getParameter, getTitle, init, onGeneration, setAppletTitle, setControlPanel, setEvolution, setProperty, setState, settable, setupLayout, start, stop, update |
Methods inherited from class javax.swing.JApplet |
---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler |
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 |
Methods inherited from class java.awt.Panel |
---|
addNotify |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.rubecula.darwin.visualization.ControlAction |
---|
setProperty, setState, settable |
Constructor Detail |
---|
protected VisualizingEvolutionaryApplet() throws java.awt.HeadlessException
java.awt.HeadlessException
Method Detail |
---|
public void addVisualizationModel(VisualizationModel visualizationModel)
addVisualizers()
is
invoked.
As a side-effect, we set the component property of the visualizationModel
to be this
.
visualizationModel
- public Painter getPainter()
getPainter
in interface Paints
Paints.getPainter()
public void setOptionsPanel(OptionsPanel optionsPanel)
optionsPanel
- the optionsPanel to setpublic void setVisualizationFactory(VisualizationFactory visualizationFactory)
visualizationFactory
- the visualizationFactory to setpublic void setVisualizerTabs(VisualizerTabs visualizerTabs)
visualizerTabs
- the visualizer tabs
XXX consider defining this public in interfaceprotected void addVisualizer(java.lang.String key, VisualizationModel visualizationModel) throws VisualizationException
key
- XXXvisualizationModel
- XXX consider defining this public in interface
VisualizationException
protected void addVisualizer(java.lang.String key, VisualizationModel visualizationModel, javax.swing.Icon icon, java.lang.String tip) throws VisualizationException
key
- XXXvisualizationModel
- icon
- tip
- XXX consider defining this public in interface
VisualizationException
protected void addVisualizer(java.lang.String key, VisualizationModel visualizationModel, java.lang.String tip) throws VisualizationException
key
- XXXvisualizationModel
- tip
- XXX consider defining this public in interface
VisualizationException
protected void addVisualizers() throws VisualizationException
_visualizationModels
and for each individual visualization
model, to take it's title as it's key and add a visualizer based on that
key and that model. It's important to note that visualizers are looked up
by events which note a change in a Visualizable, by keying on the
visualizable's identifier. Therefore, it is expected that the title of
the visualizable model corresponds to the identifier of the visualizable.
TODO consider that we may not have a 1:1 correspondence between
visualizers and visualizable models.
May to be overridden by extenders.
VisualizationException
protected java.util.Map<java.lang.String,java.awt.Component> createOptionsComponentMap()
EvolutionaryApplet
createOptionsComponentMap
in class EvolutionaryApplet
EvolutionaryApplet.createOptionsComponentMap()
protected OptionsPanel getOptionsPanel()
protected VisualizationFactory getVisualizationFactory()
protected VisualizerTabs getVisualizerTabs()
protected void setup()
setup
in class EvolutionaryApplet
EvolutionaryApplet.setup()
protected void updateModel(java.lang.String name, java.lang.Object value) throws VisualizationException
updateModel
in class EvolutionaryApplet
name
- the user-interface property that has changed.value
- the new value.
VisualizationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |