Class IconListBrowser
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected static final String
protected static final String
protected static final String
protected static final int
protected int
protected JList
protected DefaultListModel
protected JScrollPane
-
Constructor Summary
ConstructorsConstructorDescriptionIconListBrowser
(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 TypeMethodDescriptionvoid
Add an annotated icon of a DICOM image.void
addDicomFiles
(String[] dicomFileNames) Add a set of DICOM image files.static void
Method for testing.protected void
setParentScrollPane
(JScrollPane parentScrollPane) Set the parent scoll pane.
-
Field Details
-
DEFAULT_ICON_SIZE
public static final int DEFAULT_ICON_SIZE- See Also:
-
ICON_FILE_PREFIX
- See Also:
-
ICON_FORMAT
- See Also:
-
ICON_QUALITY
protected static final int ICON_QUALITY- See Also:
-
ICON_FILE_SUFFIX
- See Also:
-
iconSize
protected int iconSize -
parentScrollPane
-
list
-
model
-
-
Constructor Details
-
IconListBrowser
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
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 renderediconSize
- the width and height in pixels of the icons to be created- Throws:
DicomException
- thrown if the icons cannot be extracted
-
IconListBrowser
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 rendereddicomFileNames
- a list of DICOM files- Throws:
DicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- 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 browserdicomFileNames
- a list of DICOM files- Throws:
DicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- 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 browserdicomFileNames
- a list of DICOM files- Throws:
DicomException
- thrown if the icons cannot be extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be read
-
-
Method Details
-
setParentScrollPane
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 extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be read
-
add
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 extractedFileNotFoundException
- thrown if a file cannot be foundIOException
- thrown if a file cannot be read
-
main
Method for testing.
- Parameters:
arg
- a list of DICOM image files from which to extract one icon each and display
-