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:
    java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, CacheListener

      public class CacheComponent
      extends javax.swing.JPanel
      implements java.awt.event.ActionListener, CacheListener, javax.swing.event.ChangeListener

  GUI component for managing a cache.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.JPanel

      `javax.swing.JPanel.AccessibleJPanel`

    - ### Nested classes/interfaces inherited from class javax.swing.JComponent

      `javax.swing.JComponent.AccessibleJComponent`

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `java.awt.Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Cache` | `cache` The cache that this component controls.
    `private java.lang.String` | `id` File name that the cache is working with (debugging only).
    `private int[]` | `lengths` Length of each dimensional axis, obtained from cache strategy.
    `private static org.slf4j.Logger` | `LOGGER`
    `private javax.swing.JComboBox[]` | `order` Combo boxes for choosing planar ordering.
    `protected static int[]` | `ORDER_VALUES`
    `protected static java.lang.String[]` | `ORDERS`
    `protected static java.lang.String[]` | `PRIORITIES`
    `private javax.swing.JComboBox[]` | `priority` Combo boxes for choosing axis priority.
    `protected static int[]` | `PRIORITY_VALUES`
    `private javax.swing.JSpinner[]` | `range` Spinners for choosing range of slices to cache.
    `protected static java.lang.Class[]` | `SOURCE_PARAMS`
    `protected static java.lang.Class[]` | `SOURCE_VALUES`
    `private javax.swing.JComboBox` | `sourceChooser` Combo box for choosing cache source.
    `protected static java.lang.String[]` | `SOURCES`
    `protected static java.lang.String[]` | `STRATEGIES`
    `protected static java.lang.Class[]` | `STRATEGY_PARAMS`
    `protected static java.lang.Class[]` | `STRATEGY_VALUES`
    `private javax.swing.JComboBox` | `strategyChooser` Combo 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_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

    Constructors
    Constructor and Description
    `CacheComponent(Cache cache, java.lang.String[] axisLabels)` Creates a cache GUI component.
    `CacheComponent(Cache cache, java.lang.String[] axisLabels, java.lang.String id)` Creates a cache GUI component with the ability to change between the various source types (mainly for debugging purposes).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent e)` Handles combo box changes.
    `void` | `cacheUpdated(CacheEvent e)` Updates GUI to match latest cache state.
    `void` | `dispose()`
    `Cache` | `getCache()`
    `private int` | `orderIndex(int ord)` Converts enumerated order value to order chooser index.
    `private int` | `orderValue(int index)` Converts order chooser index to enumerated order value.
    `private int` | `priorityIndex(int prio)` Converts enumerated priority value to priority chooser index.
    `private int` | `priorityValue(int index)` Converts priority chooser index to enumerated priority value.
    `private int` | `sourceIndex(ICacheSource s)` Converts cache source to source chooser index.
    `private ICacheSource` | `sourceValue(int index)` Generates a new cache source matching the source chooser index.
    `void` | `stateChanged(javax.swing.event.ChangeEvent e)` Handles range spinner changes.
    `private int` | `strategyIndex(ICacheStrategy s)` Converts cache strategy to strategy chooser index.
    `private ICacheStrategy` | `strategyValue(int index)` Generates a new cache strategy matching the strategy chooser index.
    `private void` | `updateOrder(int index)` Updates cache order to match the state of the GUI.
    `private void` | `updatePriority(int index)` Updates cache priority to match the state of the GUI.
    `private void` | `updateRange(int index)` Updates cache range to match the state of the GUI.
    `private void` | `updateSource()` Updates cache source to match the state of the GUI.
    `private void` | `updateStrategy()` Updates cache strategy to match the state of the GUI.

    - ### 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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

    - #### SOURCES

          protected static final java.lang.String[] SOURCES

    - #### SOURCE_VALUES

          protected static final java.lang.Class[] SOURCE_VALUES

    - #### SOURCE_PARAMS

          protected static final java.lang.Class[] SOURCE_PARAMS

    - #### STRATEGIES

          protected static final java.lang.String[] STRATEGIES

    - #### STRATEGY_VALUES

          protected static final java.lang.Class[] STRATEGY_VALUES

    - #### STRATEGY_PARAMS

          protected static final java.lang.Class[] STRATEGY_PARAMS

    - #### PRIORITIES

          protected static final java.lang.String[] PRIORITIES

    - #### PRIORITY_VALUES

          protected static final int[] PRIORITY_VALUES

    - #### ORDERS

          protected static final java.lang.String[] ORDERS

    - #### ORDER_VALUES

          protected static final int[] ORDER_VALUES

    - #### cache

          private Cache cache

      The cache that this component controls.

    - #### sourceChooser

          private javax.swing.JComboBox sourceChooser

      Combo box for choosing cache source.

    - #### strategyChooser

          private javax.swing.JComboBox strategyChooser

      Combo box for choosing cache strategy.

    - #### range

          private javax.swing.JSpinner[] range

      Spinners for choosing range of slices to cache.

    - #### priority

          private javax.swing.JComboBox[] priority

      Combo boxes for choosing axis priority.

    - #### order

          private javax.swing.JComboBox[] order

      Combo boxes for choosing planar ordering.

    - #### id

          private java.lang.String id

      File name that the cache is working with (debugging only).

    - #### lengths

          private int[] lengths

      Length of each dimensional axis, obtained from cache strategy.

  - ### Constructor Detail

    - #### CacheComponent

          public CacheComponent(Cache cache,
                                java.lang.String[] axisLabels)

      Creates a cache GUI component.

    - #### CacheComponent

          public CacheComponent(Cache cache,
                                java.lang.String[] axisLabels,
                                java.lang.String id)

      Creates a cache GUI component with the ability to change between the various source types (mainly for debugging purposes).

  - ### Method Detail

    - #### getCache

          public Cache getCache()

    - #### dispose

          public void dispose()

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent e)

      Handles combo box changes.
      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`

    - #### cacheUpdated

          public void cacheUpdated(CacheEvent e)

      Updates GUI to match latest cache state.
      Specified by:
        `cacheUpdated` in interface `CacheListener`

    - #### stateChanged

          public void stateChanged(javax.swing.event.ChangeEvent e)

      Handles range spinner changes.
      Specified by:
        `stateChanged` in interface `javax.swing.event.ChangeListener`

    - #### 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

          private int sourceIndex(ICacheSource s)

      Converts cache source to source chooser index.

    - #### sourceValue

          private ICacheSource sourceValue(int index)

      Generates a new cache source matching the source chooser index.

    - #### strategyIndex

          private int strategyIndex(ICacheStrategy s)

      Converts cache strategy to strategy chooser index.

    - #### strategyValue

          private ICacheStrategy strategyValue(int index)

      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.

Copyright © 2026 Open Microscopy Environment