Package boofcv.gui
Class StandardAlgConfigPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
boofcv.gui.StandardAlgConfigPanel
- All Implemented Interfaces:
JConfigLength.Listener
,ActionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,ChangeListener
- Direct Known Subclasses:
BaseImageControlPanel
,CalibrationModelPanel
,CalibrationModelPanel.KannalaBrandtPanel
,CalibrationTargetPanel
,ControlPanelAssociateGreedy
,ControlPanelAssociateNearestNeighbor
,ControlPanelDdaTracker.ControlTracker
,ControlPanelDescribeBrief
,ControlPanelDescribeSift
,ControlPanelDescribeTemplate
,ControlPanelDetDescAssocBase
,ControlPanelDisparityDense
,ControlPanelDisparityDense.ControlsBlockMatching
,ControlPanelDisparityDense.ControlsSemiGlobal
,ControlPanelDisparityDisplay
,ControlPanelDisparitySparse
,ControlPanelDisparitySparse.ControlsBlockMatching
,ControlPanelExtractor
,ControlPanelFastCorner
,ControlPanelFastHessian
,ControlPanelGeneralCorner
,ControlPanelHybridTracker.ControlTracker
,ControlPanelPinhole
,ControlPanelPointCloud
,ControlPanelPointDetector
,ControlPanelPointTrackerKlt
,ControlPanelPointTrackers
,ControlPanelSiftDetector
,ControlPanelSiftScaleSpace
,ControlPanelStereoDualTrackPnP.StereoControls
,ControlPanelStereoQuadPnP.ControlPanelAssociate
,ControlPanelStereoQuadPnP.ControlPanelMotion
,ControlPanelSurfDescribe
,ControlPanelVisOdomTrackPnP
,GlobalSettingsControls
,MeshViewerPreferencePanel
,OpenWebcamDialog
,ViewedImageInfoPanel
public class StandardAlgConfigPanel
extends JPanel
implements ActionListener, ChangeListener, JConfigLength.Listener
Common base class for panels used for configuring the algorithms.
- See Also:
-
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
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addAlignCenter
(JComponent target) void
addAlignCenter
(JComponent target, String tooltip) static void
addAlignCenter
(JComponent target, JPanel owner) void
addAlignLeft
(JComponent target) void
addAlignLeft
(JComponent target, String tooltip) static void
addAlignLeft
(JComponent target, JPanel owner) void
addAlignRight
(JComponent target) void
addAlignRight
(JComponent target, String tooltip) static void
addAlignRight
(JComponent target, JPanel owner) void
addCenterLabel
(String text) void
addCenterLabel
(String text, JPanel owner) void
addHorizontalGlue
(JPanel owner) void
addLabeled
(JComponent target, String text) void
addLabeled
(JComponent target, String text, @Nullable String tooltip) static void
addLabeled
(JComponent target, String text, @Nullable String tooltip, JPanel owner) void
addLabeledV
(JComponent target, String text) static void
addLabeledV
(JComponent target, String text, JPanel owner) void
void
addSeparator
(int width) protected void
addToolTip
(JComponent component, String toolTip) void
static void
addVerticalGlue
(JPanel owner) button
(String name, boolean enabled, ActionListener listener) buttonIcon
(String name, boolean enabled) void
changeConfigLength
(JConfigLength source, double fraction, double length) checkboxWrap
(String text, boolean value) combo
(ActionListener listener, int initial, Object... items) configLength
(ConfigLength initial, double min, double max) configLength
(ConfigLength initial, double min, double max, BoofLambdas.ProcessCall listener) void
configureSpinnerFloat
(JSpinner spinner, int integerDigits, int fractionDigits) void
controlChanged
(Object source) In almost all situations we just need to know that the state of a control has changed.static JPanel
createHorizontalPanel
(Component... children) static JPanel
fillHorizontally
(JPanel panel) Wraps the input panel inside another panel that will fill the control panel horizontallystatic void
group
(AbstractButton... buttons) Creates aButtonGroup
for the buttonsprotected static void
removeChildAndPrevious
(JComponent root, JComponent target) Searches inside the children of "root" for 'target'.protected static void
removeChildInsidePanel
(JComponent root, JComponent target) Searches inside the children of "root" for a component that's a JPanel.protected void
setEnabled
(int index, boolean enabled) slider
(int min, int max, int initial, int widgetWidth) spinner
(double initial, double minimum, double maximum, double stepSize) spinner
(double initial, double minimum, double maximum, double stepSize, int integerDigits, int fractionDigits) spinner
(double initial, double minimum, double maximum, double stepSize, String formatString, int digits) Creates a spiner for double data type.spinner
(int initial, int minimum, int maximum, int stepSize) spinner
(int initial, int minimum, int maximum, int stepSize, ChangeListener listener) spinnerWrap
(double initial, double minimum, double maximum, double stepSize) spinnerWrap
(int initial, int minimum, int maximum, int stepSize) void
textfield
(double value, double min, double max, int panelWidth) 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, 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, 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, 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, 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
-
Constructor Details
-
StandardAlgConfigPanel
public StandardAlgConfigPanel()
-
-
Method Details
-
textfield
-
fillHorizontally
Wraps the input panel inside another panel that will fill the control panel horizontally -
addToolTip
-
configLength
-
configLength
public JConfigLength configLength(ConfigLength initial, double min, double max, BoofLambdas.ProcessCall listener) -
buttonIcon
-
button
-
button
-
slider
-
combo
-
combo
-
spinner
-
spinner
public JSpinner spinner(int initial, int minimum, int maximum, int stepSize, ChangeListener listener) -
spinner
-
spinner
-
spinner
public JSpinner spinner(double initial, double minimum, double maximum, double stepSize, int integerDigits, int fractionDigits) -
spinnerWrap
-
spinnerWrap
-
spinner
public JSpinner spinner(double initial, double minimum, double maximum, double stepSize, String formatString, int digits) Creates a spiner for double data type.- Parameters:
formatString
- Example of a format. "0.0E0". SeeDecimalFormat
-
configureSpinnerFloat
-
checkbox
-
checkbox
-
radio
-
group
Creates aButtonGroup
for the buttons -
checkboxWrap
-
addAlignLeft
-
addAlignRight
-
addAlignCenter
-
addAlignLeft
-
addAlignRight
-
addAlignCenter
-
addAlignLeft
-
addAlignRight
-
addAlignCenter
-
addCenterLabel
-
addCenterLabel
-
addSeparator
public void addSeparator(int width) -
addSeparator
public void addSeparator() -
addLabeled
-
addLabeled
-
addLabeled
public static void addLabeled(JComponent target, String text, @Nullable @Nullable String tooltip, JPanel owner) -
createHorizontalPanel
-
addLabeledV
-
addLabeledV
-
addVerticalGlue
public void addVerticalGlue() -
addVerticalGlue
-
addHorizontalGlue
-
setEnabled
protected void setEnabled(int index, boolean enabled) -
removeChildInsidePanel
Searches inside the children of "root" for a component that's a JPanel. Then inside the JPanel it looks for the target. If the target is inside the JPanel the JPanel is removed from root. -
removeChildAndPrevious
Searches inside the children of "root" for 'target'. If found it is removed and the previous component. -
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
stateChanged
- Specified by:
stateChanged
in interfaceChangeListener
-
changeConfigLength
- Specified by:
changeConfigLength
in interfaceJConfigLength.Listener
-
controlChanged
In almost all situations we just need to know that the state of a control has changed. No need to implement seperate listeners for all
-