T - Type tag.public abstract class AbstractFileViewPanel<T> extends JCommandButtonPanel
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AbstractFileViewPanel.Leaf |
Information on the specific file.
|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyjava.awt.Container.AccessibleAWTContainerJCommandButtonPanel.LayoutKind| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Map<java.lang.String,JCommandButton> |
buttonMap |
Maps from file name to the buttons.
|
protected java.util.Set<JCommandButton> |
loadedSet |
Contains the buttons with completely loaded images.
|
protected ProgressListener |
progressListener |
Progress listener to report back on loaded images.
|
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHbuttonGroup, buttons, currDimension, currState, groupTitles, isSingleSelectionMode, layoutKind, maxButtonColumns, maxButtonRows, toShowGroupLabels, uiClassID| Constructor | Description |
|---|---|
AbstractFileViewPanel(int startingDimension) |
Creates a new panel.
|
AbstractFileViewPanel(CommandButtonDisplayState startingState) |
Creates a new panel.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
cancelMainWorker() |
Cancels the pending processing.
|
protected abstract void |
configureCommandButton(AbstractFileViewPanel.Leaf leaf,
JCommandButton button,
org.pushingpixels.neon.icon.ResizableIcon icon) |
Configures the specified command button.
|
java.util.Map<java.lang.String,JCommandButton> |
getButtonMap() |
Returns the button map.
|
protected abstract java.io.InputStream |
getLeafContent(T leaf) |
Returns the input stream with the file contents.
|
int |
getLoadedIconCount() |
Returns the number of loaded icons.
|
ProgressListener |
getProgressListener() |
|
protected abstract org.pushingpixels.neon.icon.ResizableIcon |
getResizableIcon(AbstractFileViewPanel.Leaf leaf,
java.io.InputStream stream,
CommandButtonDisplayState state,
java.awt.Dimension dimension) |
Returns the icon for the specified parameters.
|
void |
setFolder(java.util.List<StringValuePair<T>> leafs) |
Sets the current entries to show.
|
void |
setProgressListener(ProgressListener progressListener) |
|
protected abstract boolean |
toShowFile(StringValuePair<T> pair) |
Returns indication whether the specified file should be shown on this panel.
|
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, transferFocusUpCycleadd, 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, validateTreeaddButtonGroup, addButtonGroup, addButtonToGroup, addButtonToGroup, addButtonToLastGroup, addChangeListener, fireStateChanged, getButtonCount, getGroupButtons, getGroupCount, getGroupTitleAt, getLayoutKind, getMaxButtonColumns, getMaxButtonRows, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedButton, getUIClassID, isToShowGroupLabels, removeAllGroups, removeButtonFromGroup, removeButtonGroup, removeChangeListener, setIconDimension, setIconState, setLayoutKind, setMaxButtonColumns, setMaxButtonRows, setSingleSelectionMode, setToShowGroupLabels, updateUIaddAncestorListener, 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, updateprotected java.util.Map<java.lang.String,JCommandButton> buttonMap
protected ProgressListener progressListener
protected java.util.Set<JCommandButton> loadedSet
public AbstractFileViewPanel(int startingDimension)
startingDimension - Initial dimension for icons.public AbstractFileViewPanel(CommandButtonDisplayState startingState)
startingState - Initial state for icons.public void setProgressListener(ProgressListener progressListener)
public ProgressListener getProgressListener()
public void setFolder(java.util.List<StringValuePair<T>> leafs)
toShowFile(StringValuePair) call, a new
JCommandButton hosting an the matching implementation of ResizableIcon is
added to the panel.leafs - Information on the entries to show in the panel.public int getLoadedIconCount()
public void cancelMainWorker()
public java.util.Map<java.lang.String,JCommandButton> getButtonMap()
protected abstract boolean toShowFile(StringValuePair<T> pair)
pair - Information on the file.true if the specified file should be shown on this panel,
false otherwise.protected abstract org.pushingpixels.neon.icon.ResizableIcon getResizableIcon(AbstractFileViewPanel.Leaf leaf, java.io.InputStream stream, CommandButtonDisplayState state, java.awt.Dimension dimension)
leaf - Information on the file.stream - Input stream with the file contents.state - Icon state.dimension - Icon dimension.protected abstract void configureCommandButton(AbstractFileViewPanel.Leaf leaf, JCommandButton button, org.pushingpixels.neon.icon.ResizableIcon icon)
leaf - Information on the file "behind" the button.button - Button to configure.icon - Button icon.protected abstract java.io.InputStream getLeafContent(T leaf)
leaf - Leaf (file behind a command button on this panel).