Package loci.formats.gui
Class CacheComponent
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
loci.formats.gui.CacheComponent
- All Implemented Interfaces:
ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,CacheListener
GUI component for managing a cache.
- See Also:
-
Nested Class Summary
Nested 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 CacheThe cache that this component controls.private StringFile name that the cache is working with (debugging only).private int[]Length of each dimensional axis, obtained from cache strategy.private static final org.slf4j.Loggerprivate JComboBox[]Combo boxes for choosing planar ordering.protected static final int[]protected static final String[]protected static final String[]private JComboBox[]Combo boxes for choosing axis priority.protected static final int[]private JSpinner[]Spinners for choosing range of slices to cache.protected static final Class[]protected static final Class[]private JComboBoxCombo box for choosing cache source.protected static final String[]protected static final String[]protected static final Class[]protected static final Class[]private JComboBoxCombo box for choosing cache strategy.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_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
ConstructorsConstructorDescriptionCacheComponent(Cache cache, String[] axisLabels) Creates a cache GUI component.CacheComponent(Cache cache, String[] axisLabels, String id) Creates a cache GUI component with the ability to change between the various source types (mainly for debugging purposes). -
Method Summary
Modifier and TypeMethodDescriptionvoidHandles combo box changes.voidUpdates GUI to match latest cache state.voiddispose()getCache()private intorderIndex(int ord) Converts enumerated order value to order chooser index.private intorderValue(int index) Converts order chooser index to enumerated order value.private intpriorityIndex(int prio) Converts enumerated priority value to priority chooser index.private intpriorityValue(int index) Converts priority chooser index to enumerated priority value.private intConverts cache source to source chooser index.private ICacheSourcesourceValue(int index) Generates a new cache source matching the source chooser index.voidHandles range spinner changes.private intConverts cache strategy to strategy chooser index.private ICacheStrategystrategyValue(int index) Generates a new cache strategy matching the strategy chooser index.private voidupdateOrder(int index) Updates cache order to match the state of the GUI.private voidupdatePriority(int index) Updates cache priority to match the state of the GUI.private voidupdateRange(int index) Updates cache range to match the state of the GUI.private voidUpdates cache source to match the state of the GUI.private voidUpdates cache strategy to match the state of the GUI.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
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SOURCES
-
SOURCE_VALUES
-
SOURCE_PARAMS
-
STRATEGIES
-
STRATEGY_VALUES
-
STRATEGY_PARAMS
-
PRIORITIES
-
PRIORITY_VALUES
protected static final int[] PRIORITY_VALUES -
ORDERS
-
ORDER_VALUES
protected static final int[] ORDER_VALUES -
cache
The cache that this component controls. -
sourceChooser
Combo box for choosing cache source. -
strategyChooser
Combo box for choosing cache strategy. -
range
Spinners for choosing range of slices to cache. -
priority
Combo boxes for choosing axis priority. -
order
Combo boxes for choosing planar ordering. -
id
File name that the cache is working with (debugging only). -
lengths
private int[] lengthsLength of each dimensional axis, obtained from cache strategy.
-
-
Constructor Details
-
CacheComponent
Creates a cache GUI component. -
CacheComponent
Creates a cache GUI component with the ability to change between the various source types (mainly for debugging purposes).
-
-
Method Details
-
getCache
-
dispose
public void dispose() -
actionPerformed
Handles combo box changes.- Specified by:
actionPerformedin interfaceActionListener
-
cacheUpdated
Updates GUI to match latest cache state.- Specified by:
cacheUpdatedin interfaceCacheListener
-
stateChanged
Handles range spinner changes.- Specified by:
stateChangedin interfaceChangeListener
-
updateSource
private void updateSource()Updates cache source to match the state of the GUI. -
updateStrategy
private void updateStrategy()Updates cache strategy to match the state of the GUI. -
updateRange
private void updateRange(int index) Updates cache range to match the state of the GUI. -
updatePriority
private void updatePriority(int index) Updates cache priority to match the state of the GUI. -
updateOrder
private void updateOrder(int index) Updates cache order to match the state of the GUI. -
sourceIndex
Converts cache source to source chooser index. -
sourceValue
Generates a new cache source matching the source chooser index. -
strategyIndex
Converts cache strategy to strategy chooser index. -
strategyValue
Generates a new cache strategy matching the strategy chooser index. -
priorityIndex
private int priorityIndex(int prio) Converts enumerated priority value to priority chooser index. -
priorityValue
private int priorityValue(int index) Converts priority chooser index to enumerated priority value. -
orderIndex
private int orderIndex(int ord) Converts enumerated order value to order chooser index. -
orderValue
private int orderValue(int index) Converts order chooser index to enumerated order value.
-