Class JPanelClip_WM
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
gov.nih.mipav.view.renderer.WildMagic.Interface.JPanelClip_WM
- All Implemented Interfaces:
ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
JInterfaceBase.CancelListener, JInterfaceBase.DrawingPanel, JInterfaceBase.OkColorListenerNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprivate JButton[]private JLabel[]private JPanel[]private JSlider[]private JTextField[]private int[]private JCheckBox[]private JCheckBox[]private JButton[]private JLabel[]private JLabel[]private JLabel[]static final intprivate JScrollPaneThe scroll pane holding the panel content.private JPanelScroll panel that holding all the control components.private static final longUse serialVersionUID for interoperability.private JTabbedPaneTabbed Panel that hold the each clipping planes control box.private JSliderFields inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
cancelButton, colorChooser, m_kVolumeViewer, mainPanel, OKButton, rayBasedRenderWMFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionJPanelClip_WM(VolumeTriPlanarInterface kVolumeViewer) 3D clipping dialog control.JPanelClip_WM(VolumeTriPlanarRender rayBasedRenderWM) 3D clipping dialog control. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Changes color of slices box frame and button if color button was pressed; turns bounding box on and off if checkbox was pressed.private voidaddControlPanel(JPanel panel, Component c, GridBagConstraints gbc, int x, int y, int w, int h) Helper method that adds components to the control panel for the grid bag layout.voidbuildPanel(int i, String kName, int iMax, Color kColor) Build x slider control panel.voidDisable the 6 clipping planes.voidDisable the arbitrary clipping.voidDisable clipping planes when dialog window closed.voidDisable arbitrary clipping planes.private voiddisplayClip(int i) voidDispose memory.private voidenableClip(int i) private voidenableListeners(boolean listen) booleanReturn check box arbitrary selection value.Color[]boolean[]boolean[]int[]voidinit()Initializes GUI components.voidInvokes all the 6 clipping when 6 clipping checkbox is checked.voidresizePanel(int panelWidth, int frameHeight) Resizig the control panel with ViewJFrameVolumeView's frame width and height.voidsetButtonColor(JButton _button, Color _color) Set the color of the button.voidsetClipColor(int i, Color color) voidsetClipColors(Color[] akColors) voidsetClipDisplayed(boolean[] abDisplayed) voidsetClipEnabled(boolean[] abEnabled) voidsetClipValues(int[] newValues) voidsetRenderer(VolumeTriPlanarRender rayBasedRenderWM) voidsetRenderer(VolumeTriPlanarRender rayBasedRenderWM, boolean rebuild) voidsetSliderEnabled(int i, boolean flag) Sets the x slider and the labels beside and beneath it to the state given byflag.voidSets how the image plane should be displayed depending on value of slider.voidClosing the mouse recorder window frame.Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
buildCancelButton, buildOKButton, buildTitledBorder, getMainPanel, updateColorButtonMethods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
CLIP_X
public static final int CLIP_X- See Also:
-
CLIP_X_INV
public static final int CLIP_X_INV- See Also:
-
CLIP_Y
public static final int CLIP_Y- See Also:
-
CLIP_Y_INV
public static final int CLIP_Y_INV- See Also:
-
CLIP_Z
public static final int CLIP_Z- See Also:
-
CLIP_Z_INV
public static final int CLIP_Z_INV- See Also:
-
CLIP_EYE
public static final int CLIP_EYE- See Also:
-
CLIP_EYE_INV
public static final int CLIP_EYE_INV- See Also:
-
CLIP_A
public static final int CLIP_A- See Also:
-
MAX_CLIP_PLANES
public static final int MAX_CLIP_PLANES- See Also:
-
clipValue
private int[] clipValue -
enableClip
-
displayClip
-
clipSlider
-
clipColor
-
thicknessSlider
-
extract
-
clipPanel
-
clipText
-
clipLabel
-
labelStart
-
labelMid
-
labelEnd
-
scroller
The scroll pane holding the panel content. Used when the screen is small. -
scrollPanel
Scroll panel that holding all the control components. -
tabbedPane
Tabbed Panel that hold the each clipping planes control box.
-
-
Constructor Details
-
JPanelClip_WM
3D clipping dialog control.- Parameters:
kVolumeViewer- parent frame.
-
JPanelClip_WM
3D clipping dialog control.- Parameters:
kVolumeViewer- parent frame.
-
-
Method Details
-
actionPerformed
Changes color of slices box frame and button if color button was pressed; turns bounding box on and off if checkbox was pressed.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- Event that triggered function.
-
buildPanel
Build x slider control panel. -
disable6Planes
public void disable6Planes()Disable the 6 clipping planes. -
enableListeners
private void enableListeners(boolean listen) -
disableClipA
public void disableClipA()Disable the arbitrary clipping. -
disableClipPlanes
public void disableClipPlanes()Disable clipping planes when dialog window closed. -
disableClipPlanesArbi
public void disableClipPlanesArbi()Disable arbitrary clipping planes. -
displayClip
private void displayClip(int i) -
enableClip
private void enableClip(int i) -
disposeLocal
public void disposeLocal()Dispose memory. -
getClipEnabled
public boolean[] getClipEnabled() -
setClipEnabled
public void setClipEnabled(boolean[] abEnabled) -
getClipDisplayed
public boolean[] getClipDisplayed() -
setClipDisplayed
public void setClipDisplayed(boolean[] abDisplayed) -
getClipValues
public int[] getClipValues() -
setClipValues
public void setClipValues(int[] newValues) -
getClipColors
-
setClipColors
-
getAVisible
public boolean getAVisible()Return check box arbitrary selection value.- Returns:
- boxA.isSelected() box arbitrary selection value.
-
init
public void init()Initializes GUI components. -
invokeClippingPlanes
public void invokeClippingPlanes()Invokes all the 6 clipping when 6 clipping checkbox is checked. -
resizePanel
public void resizePanel(int panelWidth, int frameHeight) Resizig the control panel with ViewJFrameVolumeView's frame width and height.- Parameters:
panelWidth- panel widthframeHeight- parent frame height.
-
setClipColor
- Parameters:
i- index.color- new color.
-
setRenderer
-
setRenderer
-
setSliderEnabled
public void setSliderEnabled(int i, boolean flag) Sets the x slider and the labels beside and beneath it to the state given byflag.- Parameters:
flag- iftrueenable, otherwise disable.
-
stateChanged
Sets how the image plane should be displayed depending on value of slider.- Specified by:
stateChangedin interfaceChangeListener- Parameters:
e- Event that triggered this function.
-
windowClosing
Closing the mouse recorder window frame.- Parameters:
e- Window event.
-
setButtonColor
Description copied from class:JInterfaceBaseSet the color of the button. Derived classes may also perform other functions.- Overrides:
setButtonColorin classJInterfaceBase- Parameters:
_button- button._color- color.
-
addControlPanel
private void addControlPanel(JPanel panel, Component c, GridBagConstraints gbc, int x, int y, int w, int h) Helper method that adds components to the control panel for the grid bag layout.- Parameters:
panel- control panel.c- Component added to the control panel.gbc- GridBagConstraints of added component.x- Gridx locationy- Gridy locationw- Gridwidthh- Gridheight
-