Package gov.nih.mipav.view.dialogs
Class JDialogLightBox
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
gov.nih.mipav.view.dialogs.JDialogBase
gov.nih.mipav.view.dialogs.JDialogLightBox
- All Implemented Interfaces:
DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
This class builds the control dialog used in ViewJFrameLightbox class. Widgets are created and added to the panel and
the listener. This dialog will allow the user to set the number of rows or columns, the color of the borders and the
background, the magnification of the images and if its a 4D image, the 4th dimension slider.
- Version:
- 1.0 June 31st, 1999
- Author:
- Matthew J. McAuliffe, Ph.D. annd Tun Jie, M.D.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classdoes nothing at the moment.(package private) classpick up the selected color and call method to change the grid color.(package private) classPick up the selected color and change the image border color For use by the color chooser.Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested 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 TypeFieldDescriptionprivate JButtonDOCUMENT ME!private ColorDOCUMENT ME!private JButtonDOCUMENT ME!private ColorDOCUMENT ME!private intDOCUMENT ME!private JLabelDOCUMENT ME!private JTextFieldDOCUMENT ME!private intDOCUMENT ME!private JLabelDOCUMENT ME!private ViewJColorChooserDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private JTextFieldDOCUMENT ME!private FontDOCUMENT ME!private FontDOCUMENT ME!private ViewJFrameLightBoxDOCUMENT ME!private intDOCUMENT ME!private JLabelDOCUMENT ME!private JTextFieldDOCUMENT ME!private intprivate JLabelprivate JTextFieldprivate static intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intprivate intDOCUMENT ME!private booleanDOCUMENT ME!private floatDOCUMENT ME!private JWindowDOCUMENT ME!private JSliderDOCUMENT ME!DOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JButtonDOCUMENT ME!private intDOCUMENT ME!private booleanDOCUMENT ME!private booleanvalues obtained from settings.private JLabelDOCUMENT ME!private JPanelDOCUMENT ME!private JTextFieldDOCUMENT ME!private static intDOCUMENT ME!private static final longUse serialVersionUID for interoperability.private JLabelDOCUMENT ME!private JSliderDOCUMENT ME!DOCUMENT ME!private JPanelDOCUMENT ME!private static intdefinitions indicating that user input has been validated.Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManagerFields 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
ConstructorsConstructorDescriptionJDialogLightBox(ViewJFrameLightBox _frame) constructs new control dialog of the Lightbox View. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) DOCUMENT ME!private voidbuilds the controls to set the color of the border the and color of the background.voidsetup the lightbox's control dialog.private voidbuilds the image magnification slider.private voidbuildMagSliderLabels(float min, float max) builds labels used by the magnification slider.private voidsets up the row and column panel.private voidbuilds the time (4th dimension) slider.private voidbuildTSliderLabels(int min, int max) builds labels used by the time slider.private intcheck border size of the frame, range (0,10).private intchecks the settings of grid size controls.private intcheck border size of the frame, range (0,10).private intchecks the settings of light box row/column controls.voidResets the values to match the current lightbox.voidsetTSlider(int tSlice) method to set the time (4th dimension) slider if it exists.voidsetValues(boolean row_dependent, int row, int col) method to set the row, col, and row_dependent values.voidsets values based on knob along slider.Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, focusLost, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, itemStateChanged, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setLeftHandSystem, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, setWCSystem, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods 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, 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:
-
VALID_INPUT
private static int VALID_INPUTdefinitions indicating that user input has been validated. -
SAME_INPUT
private static int SAME_INPUTDOCUMENT ME! -
INVALID_INPUT
private static int INVALID_INPUTDOCUMENT ME! -
bgColor
DOCUMENT ME! -
borderB
DOCUMENT ME! -
backgroundB
DOCUMENT ME! -
borderColor
DOCUMENT ME! -
borderSize
private int borderSizeDOCUMENT ME! -
bordersizeL
DOCUMENT ME! -
bordersizeText
DOCUMENT ME! -
incrementText
-
incrementLabel
-
increment
private int increment -
lastIncrement
private int lastIncrement -
col
private int colDOCUMENT ME! -
colLabel
DOCUMENT ME! -
colorChooser
DOCUMENT ME! -
colorPanel
DOCUMENT ME! -
colPanel
DOCUMENT ME! -
colText
DOCUMENT ME! -
font12
DOCUMENT ME! -
font12B
DOCUMENT ME! -
frame
DOCUMENT ME! -
gridSize
private int gridSizeDOCUMENT ME! -
gridsizeL
DOCUMENT ME! -
gridsizeText
DOCUMENT ME! -
lastBorderSize
private int lastBorderSizeDOCUMENT ME! -
lastCol
private int lastColDOCUMENT ME! -
lastGridSize
private int lastGridSizeDOCUMENT ME! -
lastRow
private int lastRowDOCUMENT ME! -
lastRowBFlag
private boolean lastRowBFlagDOCUMENT ME! -
magnification
private float magnificationDOCUMENT ME! -
magniWindow
DOCUMENT ME! -
magSlider
DOCUMENT ME! -
magSliderDictionary
DOCUMENT ME! -
magSliderPanel
DOCUMENT ME! -
panelRowColumn
DOCUMENT ME! -
radioColumn
DOCUMENT ME! -
radioRow
DOCUMENT ME! -
resetButton
DOCUMENT ME! -
row
private int rowDOCUMENT ME! -
row_dependent
private boolean row_dependentDOCUMENT ME! -
rowBFlag
private boolean rowBFlagvalues obtained from settings. -
rowLabel
DOCUMENT ME! -
rowPanel
DOCUMENT ME! -
rowText
DOCUMENT ME! -
toolTip
DOCUMENT ME! -
tSlider
DOCUMENT ME! -
tSliderDictionary
DOCUMENT ME! -
tSliderPanel
DOCUMENT ME!
-
-
Constructor Details
-
JDialogLightBox
constructs new control dialog of the Lightbox View.- Parameters:
_frame- reference to the lightbox frame
-
-
Method Details
-
actionPerformed
DOCUMENT ME!- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
event- event that triggers function
-
buildDialog
public void buildDialog()setup the lightbox's control dialog. Sets the row/column selector, color, magnification slider, and, if needed, 4th dimension slider. -
resetValues
public void resetValues()Resets the values to match the current lightbox. The magnification and time slider are not reset, since changes to those fields automatically update in the lightbox frame. -
setTSlider
public void setTSlider(int tSlice) method to set the time (4th dimension) slider if it exists.- Parameters:
tSlice- time slice that the slider should be set to.
-
setValues
public void setValues(boolean row_dependent, int row, int col) method to set the row, col, and row_dependent values.- Parameters:
row_dependent- DOCUMENT ME!row- DOCUMENT ME!col- DOCUMENT ME!
-
stateChanged
sets values based on knob along slider.- Specified by:
stateChangedin interfaceChangeListener- Parameters:
e- event that triggered this function
-
buildColorPanel
private void buildColorPanel()builds the controls to set the color of the border the and color of the background. -
buildMagSlider
private void buildMagSlider()builds the image magnification slider. -
buildMagSliderLabels
private void buildMagSliderLabels(float min, float max) builds labels used by the magnification slider.- Parameters:
min- minimum value for the slidermax- maximum value for the slider
-
buildRowColPanel
private void buildRowColPanel()sets up the row and column panel. Displays the current setting of rows and columns in the light box takes input from the text field, radio buttons determine which parameter to be changed modifies the layout of lightbox. -
buildTSlider
private void buildTSlider()builds the time (4th dimension) slider. -
buildTSliderLabels
private void buildTSliderLabels(int min, int max) builds labels used by the time slider.- Parameters:
min- minimum value for the slidermax- maximum value for the slider
-
checkBSTextField
private int checkBSTextField()check border size of the frame, range (0,10).- Returns:
- DOCUMENT ME!
-
checkIncrementTextField
private int checkIncrementTextField()check border size of the frame, range (0,10).- Returns:
- DOCUMENT ME!
-
checkGSTextField
private int checkGSTextField()checks the settings of grid size controls.- Returns:
- DOCUMENT ME!
-
checkRCTextField
private int checkRCTextField()checks the settings of light box row/column controls.- Returns:
- DOCUMENT ME!
-