Package com.pixelmed.display

# Class IconListBrowser

java.lang.Object
com.pixelmed.display.IconListBrowser

public class IconListBrowser extends Object

This class implements a panel of icons of DICOM images inside a parent JScrollPane.

Maintains icons in a pre-defined sorted order based on DICOM attributes as they are added and removed.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`IconListBrowser.OurCellRenderer`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`DEFAULT_ICON_SIZE`
`protected static final String`
`ICON_FILE_PREFIX`
`protected static final String`
`ICON_FILE_SUFFIX`
`protected static final String`
`ICON_FORMAT`
`protected static final int`
`ICON_QUALITY`
`protected int`
`iconSize`
`protected JList`
`list`
`protected DefaultListModel`
`model`
`protected JScrollPane`
`parentScrollPane`

## Constructor Summary

Constructors
Constructor
Description
`IconListBrowser(int iconSize)`
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
`IconListBrowser(Container content, String[] dicomFileNames)`
Build and display a graphical user interface view of a set of DICOM image files.
`IconListBrowser(JFrame frame, String[] dicomFileNames)`
Build and display a graphical user interface view of a set of DICOM image files.
`IconListBrowser(JScrollPane parentScrollPane)`
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
`IconListBrowser(JScrollPane parentScrollPane, int iconSize)`
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
`IconListBrowser(JScrollPane parentScrollPane, String[] dicomFileNames)`
Build and display a graphical user interface view of a set of DICOM image files.

## Method Summary

Modifier and Type
Method
Description
`void`
`add(String dicomFileName)`
Add an annotated icon of a DICOM image.
`void`
`addDicomFiles(String[] dicomFileNames)`
Add a set of DICOM image files.
`static void`
`main(String[] arg)`
Method for testing.
`protected void`
`setParentScrollPane(JScrollPane parentScrollPane)`
Set the parent scoll pane.

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

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

## Field Details

### DEFAULT_ICON_SIZE

public static final int DEFAULT_ICON_SIZE

See Also:
  - Constant Field Values

### ICON_FILE_PREFIX

protected static final String ICON_FILE_PREFIX

See Also:
  - Constant Field Values

### ICON_FORMAT

protected static final String ICON_FORMAT

See Also:
  - Constant Field Values

### ICON_QUALITY

protected static final int ICON_QUALITY

See Also:
  - Constant Field Values

### ICON_FILE_SUFFIX

protected static final String ICON_FILE_SUFFIX

See Also:
  - Constant Field Values

### iconSize

protected int iconSize

### parentScrollPane

protected JScrollPane parentScrollPane

### list

protected JList list

### model

protected DefaultListModel model

## Constructor Details

### IconListBrowser

public IconListBrowser(int iconSize) throws DicomException

Build and display an (initally empty) graphical user interface view of a set of DICOM images.

Parameters:
  `iconSize` - the width and height in pixels of the icons to be created
Throws:
  `DicomException` - thrown if the icons cannot be extracted

### IconListBrowser

public IconListBrowser(JScrollPane parentScrollPane, int iconSize) throws DicomException

Build and display an (initally empty) graphical user interface view of a set of DICOM images.

Parameters:
  `parentScrollPane` - the scrolling pane in which the icons will be rendered
  `iconSize` - the width and height in pixels of the icons to be created
Throws:
  `DicomException` - thrown if the icons cannot be extracted

### IconListBrowser

public IconListBrowser(JScrollPane parentScrollPane) throws DicomException

Build and display an (initally empty) graphical user interface view of a set of DICOM images.

Uses default icon size.

Parameters:
  `parentScrollPane` - the scrolling pane in which the icons will be rendered
Throws:
  `DicomException` - thrown if the icons cannot be extracted

### IconListBrowser

public IconListBrowser(JScrollPane parentScrollPane, String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

Build and display a graphical user interface view of a set of DICOM image files.

Uses default icon size.

Parameters:
  `parentScrollPane` - the scrolling pane in which the icons will be rendered
  `dicomFileNames` - a list of DICOM files
Throws:
  `DicomException` - thrown if the icons cannot be extracted
  `FileNotFoundException` - thrown if a file cannot be found
  `IOException` - thrown if a file cannot be read

### IconListBrowser

public IconListBrowser(Container content, String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

Build and display a graphical user interface view of a set of DICOM image files.

Parameters:
  `content` - a container to which will be added will be added a scrolling pane containing the icon browser
  `dicomFileNames` - a list of DICOM files
Throws:
  `DicomException` - thrown if the icons cannot be extracted
  `FileNotFoundException` - thrown if a file cannot be found
  `IOException` - thrown if a file cannot be read

### IconListBrowser

public IconListBrowser(JFrame frame, String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

Build and display a graphical user interface view of a set of DICOM image files.

Parameters:
  `frame` - a frame to whose content pane will be added a scrolling pane containing the icon browser
  `dicomFileNames` - a list of DICOM files
Throws:
  `DicomException` - thrown if the icons cannot be extracted
  `FileNotFoundException` - thrown if a file cannot be found
  `IOException` - thrown if a file cannot be read

## Method Details

### setParentScrollPane

protected void setParentScrollPane(JScrollPane parentScrollPane)

Set the parent scoll pane.

Used from within constructors.

Parameters:
  `parentScrollPane` -

### addDicomFiles

public void addDicomFiles(String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

Add a set of DICOM image files.

Parameters:
  `dicomFileNames` - a list of DICOM files
Throws:
  `DicomException` - thrown if the icons cannot be extracted
  `FileNotFoundException` - thrown if a file cannot be found
  `IOException` - thrown if a file cannot be read

### add

public void add(String dicomFileName) throws DicomException, FileNotFoundException, IOException

Add an annotated icon of a DICOM image.

Parameters:
  `dicomFileName` - the name of the file containing the DICOM image
Throws:
  `DicomException` - thrown if the icons cannot be extracted
  `FileNotFoundException` - thrown if a file cannot be found
  `IOException` - thrown if a file cannot be read

### main

public static void main(String[] arg)

Method for testing.

Parameters:
  `arg` - a list of DICOM image files from which to extract one icon each and display