public class IconListBrowser
extends java.lang.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 java.lang.String |
ICON_FILE_PREFIX |
protected static java.lang.String |
ICON_FILE_SUFFIX |
protected static java.lang.String |
ICON_FORMAT |
protected static int |
ICON_QUALITY |
protected int |
iconSize |
protected javax.swing.JList |
list |
protected javax.swing.DefaultListModel |
model |
protected javax.swing.JScrollPane |
parentScrollPane |
| Constructor and Description |
|---|
IconListBrowser(java.awt.Container content,
java.lang.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(javax.swing.JFrame frame,
java.lang.String[] dicomFileNames)
Build and display a graphical user interface view of a set of DICOM image files.
|
IconListBrowser(javax.swing.JScrollPane parentScrollPane)
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
|
IconListBrowser(javax.swing.JScrollPane parentScrollPane,
int iconSize)
Build and display an (initally empty) graphical user interface view of a set of DICOM images.
|
IconListBrowser(javax.swing.JScrollPane parentScrollPane,
java.lang.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(java.lang.String dicomFileName)
Add an annotated icon of a DICOM image.
|
void |
addDicomFiles(java.lang.String[] dicomFileNames)
Add a set of DICOM image files.
|
static void |
main(java.lang.String[] arg)
Method for testing.
|
protected void |
setParentScrollPane(javax.swing.JScrollPane parentScrollPane)
Set the parent scoll pane.
|
public static final int DEFAULT_ICON_SIZE
protected static final java.lang.String ICON_FILE_PREFIX
protected static final java.lang.String ICON_FORMAT
protected static final int ICON_QUALITY
protected static final java.lang.String ICON_FILE_SUFFIX
protected int iconSize
protected javax.swing.JScrollPane parentScrollPane
protected javax.swing.JList list
protected javax.swing.DefaultListModel model
public 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(javax.swing.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(javax.swing.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(javax.swing.JScrollPane parentScrollPane,
java.lang.String[] dicomFileNames)
throws DicomException,
java.io.FileNotFoundException,
java.io.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 extractedjava.io.FileNotFoundException - thrown if a file cannot be foundjava.io.IOException - thrown if a file cannot be readpublic IconListBrowser(java.awt.Container content,
java.lang.String[] dicomFileNames)
throws DicomException,
java.io.FileNotFoundException,
java.io.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 extractedjava.io.FileNotFoundException - thrown if a file cannot be foundjava.io.IOException - thrown if a file cannot be readpublic IconListBrowser(javax.swing.JFrame frame,
java.lang.String[] dicomFileNames)
throws DicomException,
java.io.FileNotFoundException,
java.io.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 extractedjava.io.FileNotFoundException - thrown if a file cannot be foundjava.io.IOException - thrown if a file cannot be readprotected void setParentScrollPane(javax.swing.JScrollPane parentScrollPane)
Set the parent scoll pane.
Used from within constructors.
parentScrollPane - public void addDicomFiles(java.lang.String[] dicomFileNames)
throws DicomException,
java.io.FileNotFoundException,
java.io.IOException
Add a set of DICOM image files.
dicomFileNames - a list of DICOM filesDicomException - thrown if the icons cannot be extractedjava.io.FileNotFoundException - thrown if a file cannot be foundjava.io.IOException - thrown if a file cannot be readpublic void add(java.lang.String dicomFileName)
throws DicomException,
java.io.FileNotFoundException,
java.io.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 extractedjava.io.FileNotFoundException - thrown if a file cannot be foundjava.io.IOException - thrown if a file cannot be readpublic static void main(java.lang.String[] arg)
Method for testing.
arg - a list of DICOM image files from which to extract one icon each and display