plugins.big.bigsnake.gui
Class SnakeSettingsPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by plugins.big.bigsnakeutils.icy.gui.CollapsiblePanel
                      extended by plugins.big.bigsnake.gui.SnakeSettingsPane
All Implemented Interfaces:
java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener

public class SnakeSettingsPane
extends plugins.big.bigsnakeutils.icy.gui.CollapsiblePanel
implements javax.swing.event.ChangeListener, java.awt.event.ItemListener

Panel in which the user specifies the parameters of the E-Snake.

Version:
May 24, 2015
Author:
Ricard Delgado-Gonzalo (ricard.delgado@gmail.com), Daniel Schmitter (daniel.schmitter@epfl.ch)
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.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
SnakeSettingsPane(java.lang.String title, BIGSnake bigSnake)
          Default constructor.
 
Method Summary
 java.lang.Double getAlpha()
          Returns the energy tradeoff parameter introduced by the user.
 java.lang.Double getBeta()
          Returns the energy weight associated to the prior-shape energy.
 plugins.big.bigsnakeutils.shape.priorshapes.shapes.Custom getCustomPriorShape()
           
 ESnakeEnergyType getEnergyType()
          Returns the energy type selected by the user.
 java.lang.Integer getMaxIterations()
          Returns the maximum number of iterations introduced by the user.
 java.lang.Integer getNumControlPoints()
          Returns the number of control points introduced by the user.
 ESnakePriorShapeType getPriorShapeType()
          Returns the energy type selected by the user.
 ShapeSpaceType getShapeSpaceType()
          Returns the shape space type selected by the user.
 ESnakeTargetType getTargetBrightness()
          Returns the brightness detection mode selected by the user.
 boolean isImmortal()
          Returns true if the user wants to ignore the maximum number of iterations, and evolve the snake till convergence.
 void itemStateChanged(java.awt.event.ItemEvent e)
          Handles the events of the combo boxes and the checkbox.
 void setSnakeParameters(ESnakeParameters snakeParameters)
          Sets the snake parameters to the interface.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Handles the events of the spinners.
 
Methods inherited from class plugins.big.bigsnakeutils.icy.gui.CollapsiblePanel
add, add, add, add, add, remove, remove, removeAll, setTitle
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnakeSettingsPane

public SnakeSettingsPane(java.lang.String title,
                         BIGSnake bigSnake)
Default constructor.

Method Detail

getAlpha

public java.lang.Double getAlpha()
Returns the energy tradeoff parameter introduced by the user.


getBeta

public java.lang.Double getBeta()
Returns the energy weight associated to the prior-shape energy.


getCustomPriorShape

public plugins.big.bigsnakeutils.shape.priorshapes.shapes.Custom getCustomPriorShape()

getEnergyType

public ESnakeEnergyType getEnergyType()
Returns the energy type selected by the user.


getMaxIterations

public java.lang.Integer getMaxIterations()
Returns the maximum number of iterations introduced by the user.


getNumControlPoints

public java.lang.Integer getNumControlPoints()
Returns the number of control points introduced by the user.


getPriorShapeType

public ESnakePriorShapeType getPriorShapeType()
Returns the energy type selected by the user.


getShapeSpaceType

public ShapeSpaceType getShapeSpaceType()
Returns the shape space type selected by the user.


getTargetBrightness

public ESnakeTargetType getTargetBrightness()
Returns the brightness detection mode selected by the user.


isImmortal

public boolean isImmortal()
Returns true if the user wants to ignore the maximum number of iterations, and evolve the snake till convergence. Returns false otherwise.


setSnakeParameters

public void setSnakeParameters(ESnakeParameters snakeParameters)
Sets the snake parameters to the interface.


stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Handles the events of the spinners.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Handles the events of the combo boxes and the checkbox. It fires an update of the active snake.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener