Class JPanelPixelExclusionSelector
- All Implemented Interfaces:
ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classThis class listens to excluder options, changing the available statistics calculation options depending on whether all contours are still closed.static enumNested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested 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 JTextFieldThe lower bound of the exclusionprivate JTextFieldThe upper bound of the exclusionprivate JTextFieldThe lower blue bound of the exclusionprivate JTextFieldThe lower green bound of the exclusionprivate JTextFieldThe lower red bound of the exclusionprivate JTextFieldThe upper blue bound of the exclusionprivate JTextFieldThe upper green bound of the exclusionprivate JTextFieldThe upper red bound of the exclusionprivate final JPanelStatisticsListA reference to the JDialogVOIStatistic or JDialogVOIStats check box panel.private final booleanprivate final JComboBoxLists available exclusion typesprivate FloatThe lower limit of the exclusionprivate Floatprivate Floatprivate Floatprivate final JCheckBoxWhether pixels will be excluded from a calculation based on intensity valuesThe range type that this pixel exclusion selector covers.private static final longUse serialVersionUID for interoperability.private Floatheld for switching between states of the exclusion.private Floatprivate Floatprivate FloatFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionJPanelPixelExclusionSelector(JPanelStatisticsList checkBoxPanel, boolean doColor) Creates an exclusion panel which has a checkbox to make the range controls available, a selector to choose the range controls ("Between", "Above" and "Below"), and the range inputs for these controls. -
Method Summary
Modifier and TypeMethodDescriptionvoidWhen state changes in some elements of the panel, the panel must make display changes; these changes are registered here.Returns the lower bound text as a number.Returns the lower bound text as a number.Returns the lower bound text as a number.Returns the lower bound text as a number.Returns the upper bound text as a number.Returns the upper bound text as a number.Returns the upper bound text as a number.Returns the upper bound text as a number.voidSets the fields' value and accessability based on the state of the drop-down.voidsetLowerBound(String floatValue) Set the lower bound from the script dialog.voidsetLowerBoundB(String floatValue) Set the lower blue bound from the script dialog.voidsetLowerBoundG(String floatValue) Set the lower green bound from the script dialog.voidsetLowerBoundR(String floatValue) Set the lower red bound from the script dialog.voidsetUpperBound(String floatValue) Set the upper bound from the script dialog.voidsetUpperBoundB(String floatValue) Set the upper blue bound from the script dialog.voidsetUpperBoundG(String floatValue) Set the upper green bound from the script dialog.voidsetUpperBoundR(String floatValue) Set the upper red bound from the script dialog.protected voidTries to store the values held in the text areas to temporary storage.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, updateMethods 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, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
boundA
The lower bound of the exclusion -
boundB
The upper bound of the exclusion -
boundLR
The lower red bound of the exclusion -
boundUR
The upper red bound of the exclusion -
boundLG
The lower green bound of the exclusion -
boundUG
The upper green bound of the exclusion -
boundLB
The lower blue bound of the exclusion -
boundUB
The upper blue bound of the exclusion -
excludeSelection
Lists available exclusion types -
lowerLimit
The lower limit of the exclusion -
lowerLimitR
-
lowerLimitG
-
lowerLimitB
-
permitExclusion
Whether pixels will be excluded from a calculation based on intensity values -
upperLimit
held for switching between states of the exclusion. -
upperLimitR
-
upperLimitG
-
upperLimitB
-
rangeFlag
The range type that this pixel exclusion selector covers. -
checkBoxPanel
A reference to the JDialogVOIStatistic or JDialogVOIStats check box panel. -
doColor
private final boolean doColor
-
-
Constructor Details
-
JPanelPixelExclusionSelector
Creates an exclusion panel which has a checkbox to make the range controls available, a selector to choose the range controls ("Between", "Above" and "Below"), and the range inputs for these controls.
-
-
Method Details
-
actionPerformed
When state changes in some elements of the panel, the panel must make display changes; these changes are registered here. When state the state of the checkbox changes (from checked to un- or vice-versa), the excluded selection's state is changed and the Exclusion range property is reset.Checks state of:
- Enables or disables the exclusion drop-down and the text boxes based on the state of the checkbox
- Changes the visibility of the text-boxes based on the state of the exclusion dropdown; "Between" displays both text boxes, "Above" only displays the lower cutoff box, and "Below" displays only the upper cutoff box.
- Specified by:
actionPerformedin interfaceActionListener- Parameters:
e- the ChangeEvent to watch.
-
getLowerBound
Returns the lower bound text as a number. May be too negative for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the lower bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- lower bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
getLowerBoundR
Returns the lower bound text as a number. May be too negative for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the lower bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- lower bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
getLowerBoundG
Returns the lower bound text as a number. May be too negative for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the lower bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- lower bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
getLowerBoundB
Returns the lower bound text as a number. May be too negative for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the lower bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- lower bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
getRangeFlag
- Returns:
- the range type
-
getUpperBound
Returns the upper bound text as a number. May be too positive for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the upper bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- upper bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
getUpperBoundR
Returns the upper bound text as a number. May be too positive for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the upper bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- upper bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
getUpperBoundG
Returns the upper bound text as a number. May be too positive for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the upper bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- upper bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
getUpperBoundB
Returns the upper bound text as a number. May be too positive for some applications.There is a side-effect in that when the permitExclusion checkbox is unchecked, the upper bound returned is
null. This means that relying on the upperbound also means relying on the text fields being editable as well.- Returns:
- upper bound text as a Float; null is returned if the panel is not set to be used or one of the text entries is empty or not a number.
-
selectRangeInput
public void selectRangeInput()Sets the fields' value and accessability based on the state of the drop-down. "Above" will display an uneditable "max" value and the lesser of the two values, "Below" will display an uneditable "min" value and the larger of the two values and "Between" will display the largest possible values, if the fields have not been set, or will reset the fields to the stored values. -
setLowerBound
Set the lower bound from the script dialog.- Parameters:
floatValue- lower bound string
-
setLowerBoundR
Set the lower red bound from the script dialog.- Parameters:
floatValue- lower red bound string
-
setLowerBoundG
Set the lower green bound from the script dialog.- Parameters:
floatValue- lower green bound string
-
setLowerBoundB
Set the lower blue bound from the script dialog.- Parameters:
floatValue- lower blue bound string
-
setUpperBound
Set the upper bound from the script dialog.- Parameters:
floatValue- Maximum value string
-
setUpperBoundR
Set the upper red bound from the script dialog.- Parameters:
floatValue- Maximum red value string
-
setUpperBoundG
Set the upper green bound from the script dialog.- Parameters:
floatValue- Maximum green value string
-
setUpperBoundB
Set the upper blue bound from the script dialog.- Parameters:
floatValue- Maximum blue value string
-
storeLimitValues
protected void storeLimitValues()Tries to store the values held in the text areas to temporary storage. It only does so if there are valid (that is, numbers and that they are neither infinite nor at the maximum or minimum value.- See Also:
-