gov.nih.mipav.view.renderer.WildMagic.brainflattenerview_WM
Class JPanelBrainSurfaceFlattener_WM

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 gov.nih.mipav.view.renderer.WildMagic.brainflattenerview_WM.JPanelBrainSurfaceFlattener_WM
All Implemented Interfaces:
ViewImageUpdateInterface, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class JPanelBrainSurfaceFlattener_WM
extends JPanel
implements ActionListener, ViewImageUpdateInterface

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JButton cancelButton
          Cancel button is used on most dialogs.
protected  JPanel mainPanel
          The main control.
protected  JButton OKButton
          OK button is used on most dialogs.
protected  Font serif12
          Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
protected  Font serif12B
          Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
 
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
JPanelBrainSurfaceFlattener_WM(CorticalAnalysisRender kView, VolumeTriPlanarInterface kParent)
          Create the control-panel for the brainsurfaceFlattener interface:
 
Method Summary
 void actionPerformed(ActionEvent event)
           
protected  JButton buildOKButton()
          Builds the OK button.
static TitledBorder buildTitledBorder(String title)
          Builds a titled border with the given title, an etched border, and the proper font and color.
 WildMagic.LibGraphics.SceneGraph.Node displayCorticalAnalysis(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
           
 void disposeLocal()
          Memory cleanup.
protected  void finalize()
           
 ModelImage getImageA()
          Return ModelImage A.
 ModelImage getImageB()
          Return ModelImage B.
 JPanel getMainPanel()
          Return the main control panel.
 void resizePanel(int panelWidth, int frameHeight)
          Resizing the control panel.
 void setSlice(int slice)
          setSlice.
 void setTimeSlice(int tSlice)
          setTimeSlice.
 boolean updateImageExtents()
          This methods calls the componentImage's REPAINT method to redraw the screen.
 boolean updateImages()
          This methods calls the componentImage's REPAINT method to redraw the screen.
 boolean updateImages(boolean flag)
          This methods calls the componentImage's update method to redraw the screen.
 boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
          This methods calls the componentImage's update method to redraw the screen.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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
 
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, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mainPanel

protected JPanel mainPanel
The main control.


serif12

protected Font serif12
Fonts, same as MipavUtil.font12 and MipavUtil.font12B.


serif12B

protected Font serif12B
Fonts, same as MipavUtil.font12 and MipavUtil.font12B.


OKButton

protected JButton OKButton
OK button is used on most dialogs. Defining it in the base allows default actions if the user presses return and the button is in focus.


cancelButton

protected JButton cancelButton
Cancel button is used on most dialogs. Defining it in the base allows default actions if the user presses return and the button is in focus.

Constructor Detail

JPanelBrainSurfaceFlattener_WM

public JPanelBrainSurfaceFlattener_WM(CorticalAnalysisRender kView,
                                      VolumeTriPlanarInterface kParent)
Create the control-panel for the brainsurfaceFlattener interface:

Parameters:
kView - the engine behind the brainsurfaceFlattener and one of the parent frames affected by the interface
kParentFrame - the parent frame for the panel, contains the surfaceRenderer, where the brain model is displayed
Method Detail

buildTitledBorder

public static TitledBorder buildTitledBorder(String title)
Builds a titled border with the given title, an etched border, and the proper font and color. Changed to public static member so that it can be used for other JPanels not inherited from this base class.

Parameters:
title - Title of the border
Returns:
The titled border.

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener

displayCorticalAnalysis

public WildMagic.LibGraphics.SceneGraph.Node displayCorticalAnalysis(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh,
                                                                     WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Parameters:
kMesh -
Returns:
Scene-graph node containing the TriMesh lat/lon lines.

disposeLocal

public void disposeLocal()
Memory cleanup.


getImageA

public ModelImage getImageA()
Return ModelImage A.

Returns:
ModelImage A.

getImageB

public ModelImage getImageB()
Return ModelImage B.

Returns:
ModelImage B.

getMainPanel

public JPanel getMainPanel()
Return the main control panel.

Returns:
JPanel the main control panel

resizePanel

public void resizePanel(int panelWidth,
                        int frameHeight)
Resizing the control panel.

Parameters:
panelWidth - int width
frameHeight - int height

setSlice

public void setSlice(int slice)
Description copied from interface: ViewImageUpdateInterface
setSlice.

Specified by:
setSlice in interface ViewImageUpdateInterface
Parameters:
slice - DOCUMENT ME!

setTimeSlice

public void setTimeSlice(int tSlice)
Description copied from interface: ViewImageUpdateInterface
setTimeSlice.

Specified by:
setTimeSlice in interface ViewImageUpdateInterface
Parameters:
tSlice - DOCUMENT ME!

updateImageExtents

public boolean updateImageExtents()
Description copied from interface: ViewImageUpdateInterface
This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.

Specified by:
updateImageExtents in interface ViewImageUpdateInterface
Returns:
DOCUMENT ME!

updateImages

public boolean updateImages()
Description copied from interface: ViewImageUpdateInterface
This methods calls the componentImage's REPAINT method to redraw the screen. Without LUT changes or image changes

Specified by:
updateImages in interface ViewImageUpdateInterface
Returns:
DOCUMENT ME!

updateImages

public boolean updateImages(boolean flag)
Description copied from interface: ViewImageUpdateInterface
This methods calls the componentImage's update method to redraw the screen. Without LUT changes.

Specified by:
updateImages in interface ViewImageUpdateInterface
Parameters:
flag - forces show to re import image and calc. java image
Returns:
boolean confirming successful update

updateImages

public boolean updateImages(ModelLUT LUTa,
                            ModelLUT LUTb,
                            boolean flag,
                            int interpMode)
Description copied from interface: ViewImageUpdateInterface
This methods calls the componentImage's update method to redraw the screen.

Specified by:
updateImages in interface ViewImageUpdateInterface
Parameters:
LUTa - LUT used to update imageA
LUTb - LUT used to update imageB
flag - forces show to re import image and calc. java image
interpMode - image interpolation method (Nearest or Smooth)
Returns:
boolean confirming a successful update

buildOKButton

protected JButton buildOKButton()
Builds the OK button. Sets it internally as well return the just-built button.

Returns:
OK button.

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable