|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.pushingpixels.flamingo.api.common.JCommandButtonPanel
org.pushingpixels.flamingo.api.common.AbstractFileViewPanel<T>
T - Type tag.public abstract class AbstractFileViewPanel<T>
Panel that hosts file-related command buttons with progress indication and cancellation capabilities.
| Nested Class Summary | |
|---|---|
static class |
AbstractFileViewPanel.Leaf
Information on the specific file. |
| Nested classes/interfaces inherited from class org.pushingpixels.flamingo.api.common.JCommandButtonPanel |
|---|
JCommandButtonPanel.LayoutKind |
| 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 | |
|---|---|
protected Map<String,JCommandButton> |
buttonMap
Maps from file name to the buttons. |
protected Set<JCommandButton> |
loadedSet
Contains the buttons with completely loaded images. |
protected ProgressListener |
progressListener
Progress listener to report back on loaded images. |
| Fields inherited from class org.pushingpixels.flamingo.api.common.JCommandButtonPanel |
|---|
buttonGroup, buttons, currDimension, currState, groupTitles, isSingleSelectionMode, layoutKind, maxButtonColumns, maxButtonRows, toShowGroupLabels, uiClassID |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, 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 |
|---|
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 | |
|---|---|
AbstractFileViewPanel(CommandButtonDisplayState startingState,
ProgressListener progressListener)
Creates a new panel. |
|
AbstractFileViewPanel(int startingDimension,
ProgressListener progressListener)
Creates a new panel. |
|
| Method Summary | |
|---|---|
void |
cancelMainWorker()
Cancels the pending processing. |
protected abstract void |
configureCommandButton(AbstractFileViewPanel.Leaf leaf,
JCommandButton button,
ResizableIcon icon)
Configures the specified command button. |
Map<String,JCommandButton> |
getButtonMap()
Returns the button map. |
protected abstract InputStream |
getLeafContent(T leaf)
Returns the input stream with the file contents. |
int |
getLoadedIconCount()
Returns the number of loaded icons. |
protected abstract ResizableIcon |
getResizableIcon(AbstractFileViewPanel.Leaf leaf,
InputStream stream,
CommandButtonDisplayState state,
Dimension dimension)
Returns the icon for the specified parameters. |
void |
setFolder(List<StringValuePair<T>> leafs)
Sets the current entries to show. |
protected abstract boolean |
toShowFile(StringValuePair<T> pair)
Returns indication whether the specified file should be shown on this panel. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, paramString, setUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,JCommandButton> buttonMap
protected ProgressListener progressListener
protected Set<JCommandButton> loadedSet
| Constructor Detail |
|---|
public AbstractFileViewPanel(int startingDimension,
ProgressListener progressListener)
startingDimension - Initial dimension for icons.progressListener - Progress listener to report back on loaded icons.
public AbstractFileViewPanel(CommandButtonDisplayState startingState,
ProgressListener progressListener)
startingState - Initial state for icons.progressListener - Progress listener to report back on loaded icons.| Method Detail |
|---|
public void setFolder(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 Map<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 ResizableIcon getResizableIcon(AbstractFileViewPanel.Leaf leaf,
InputStream stream,
CommandButtonDisplayState state,
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,
ResizableIcon icon)
leaf - Information on the file "behind" the button.button - Button to configure.icon - Button icon.protected abstract InputStream getLeafContent(T leaf)
leaf - Leaf (file behind a command button on this panel).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||