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.
Modifier and Type | Class and Description |
---|---|
protected class |
IconListBrowser.OurCellRenderer |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ICON_SIZE |
protected static String |
ICON_FILE_PREFIX |
protected static String |
ICON_FILE_SUFFIX |
protected static String |
ICON_FORMAT |
protected static int |
ICON_QUALITY |
protected int |
iconSize |
protected JList |
list |
protected DefaultListModel |
model |
protected JScrollPane |
parentScrollPane |
Constructor and Description |
---|
IconListBrowser(Container content,
String[] dicomFileNames)
Build and display a graphical user interface view of a set of DICOM image files.
|
IconListBrowser(int iconSize)
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
|
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.
|
Modifier and Type | Method and 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.
|
public 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
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.
content
- a container to which will be added will be added a scrolling pane containing the icon browserdicomFileNames
- a list of DICOM filesDicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be readpublic IconListBrowser(int iconSize) throws DicomException
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
iconSize
- the width and height in pixels of the icons to be createdDicomException
- thrown if the icons cannot be extractedpublic IconListBrowser(JFrame frame, String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException
Build and display a graphical user interface view of a set of DICOM image files.
frame
- a frame to whose content pane will be added a scrolling pane containing the icon browserdicomFileNames
- a list of DICOM filesDicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be readpublic 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.
parentScrollPane
- the scrolling pane in which the icons will be renderedDicomException
- thrown if the icons cannot be extractedpublic IconListBrowser(JScrollPane parentScrollPane, int iconSize) throws DicomException
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
parentScrollPane
- the scrolling pane in which the icons will be renderediconSize
- the width and height in pixels of the icons to be createdDicomException
- thrown if the icons cannot be extractedpublic 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.
parentScrollPane
- the scrolling pane in which the icons will be rendereddicomFileNames
- a list of DICOM filesDicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be readpublic void add(String dicomFileName) throws DicomException, FileNotFoundException, IOException
Add an annotated icon of a DICOM image.
dicomFileName
- the name of the file containing the DICOM imageDicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be readpublic void addDicomFiles(String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException
Add a set of DICOM image files.
dicomFileNames
- a list of DICOM filesDicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be readpublic static void main(String[] arg)
Method for testing.
arg
- a list of DICOM image files from which to extract one icon each and displayprotected void setParentScrollPane(JScrollPane parentScrollPane)
Set the parent scoll pane.
Used from within constructors.
parentScrollPane
-