Package gov.nih.mipav.view
Class ViewJFrameDICOMQuery
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- gov.nih.mipav.view.ViewJFrameDICOMQuery
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.ComponentListener
,java.awt.event.FocusListener
,java.awt.event.MouseListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.event.ListSelectionListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class ViewJFrameDICOMQuery extends javax.swing.JFrame implements java.awt.event.ActionListener, javax.swing.event.ListSelectionListener, java.awt.event.MouseListener, javax.swing.event.ChangeListener, java.awt.event.ComponentListener, java.awt.event.WindowListener, java.awt.event.FocusListener
GUI for DICOM Query and retreival from DICOM compliant servers. There are three tabbed panels in the GUI. The first one is DICOM Query Panel. It has a panel for entering the query information, a panel for setting the dates of the query, a table that displays the results of the query, and a table that displays the status of any move requests. The user may either double click on the query table, hit the "Send Query" button, or hit the "Down" button to send a query to the next level. To go up a level, the user can click the "Up" button. To move an image from any level, the user can select the item to move on and click the "Move Image" button. At the images level, double clicking on an image will move that image. When a move request is sent, it is put in a separate thread. That thread updates the message table as to the progress of the move request.- Version:
- 1.0
- Author:
- Neva Cherniavsky, Matthew McAuliffe, Ph.D.
- See Also:
DICOM_Query
,DICOM_Move
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ViewJFrameDICOMQuery.MoveRequestInfo
Simple class to support move requests.-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JPanel
aboutPanel
private javax.swing.JButton
activateStore
Buttons used for the host tabprivate javax.swing.JButton
browseButton
DOCUMENT ME!private javax.swing.JButton
cancel
Buttons used for the host tabprivate javax.swing.JButton
cancelQ
DOCUMENT ME!private javax.swing.JButton
create
DOCUMENT ME!private javax.swing.JButton
createStore
Buttons used for the host tabprivate javax.swing.JLabel
currentDateL
DOCUMENT ME!private static int
DEFAULT_MIN_YEAR
DOCUMENT ME!private javax.swing.JButton
delete
DOCUMENT ME!private javax.swing.JButton
deleteStore
Buttons used for the host tabprivate DICOM_Query
dicomQuery
DOCUMENT ME!private javax.swing.JButton
down
DOCUMENT ME!private javax.swing.JButton
edit
DOCUMENT ME!private javax.swing.JButton
editStore
Buttons used for the host tabprivate java.util.Calendar
endCalendar
DOCUMENT ME!private javax.swing.JComboBox
endDayBox
DOCUMENT ME!private javax.swing.JComboBox
endMonthBox
DOCUMENT ME!private javax.swing.JComboBox
endYearBox
DOCUMENT ME!private static java.awt.Font
font12
DOCUMENT ME!private static java.awt.Font
font12B
DOCUMENT ME!private javax.swing.JButton
help1
Buttons used for the host tabprivate javax.swing.JButton
help2
Buttons used for the host tabprivate javax.swing.JButton
help3
Buttons used for the host tabprivate javax.swing.JButton
help4
Buttons used for the host tabprivate static int
IMAGE_LEVEL
DOCUMENT ME!private javax.swing.JPanel
listPanel
DOCUMENT ME!private DICOMDisplayer
messageTable
DOCUMENT ME!private static java.awt.Dimension
MINIMUM_SIZE
DOCUMENT ME!private static java.lang.String[]
monthString
DOCUMENT ME!private javax.swing.JButton
move
DOCUMENT ME!private java.util.Hashtable<java.lang.String,ViewJFrameDICOMQuery.MoveRequestInfo>
moveRequestHash
DOCUMENT ME!private static int
PATIENT_LEVEL
DOCUMENT ME!private javax.swing.JTextField
physText
DOCUMENT ME!private javax.swing.JTextField
ptIDText
DOCUMENT ME!private javax.swing.JTextField
ptNameText
DOCUMENT ME!private javax.swing.JLabel
queryLev
DOCUMENT ME!private int
queryLevel
DOCUMENT ME!private int
queryMsgID
DOCUMENT ME!private DICOM_PDUService
queryPDU
DOCUMENT ME!private javax.swing.JTable
queryResultTable
DOCUMENT ME!private ViewTableModel
queryTableModel
DOCUMENT ME!private javax.swing.JButton
refreshButton
DOCUMENT ME!private javax.swing.JPanel
rootQueryPanel
DOCUMENT ME!private javax.swing.JButton
send
DOCUMENT ME!private javax.swing.JButton
sendButton
DOCUMENT ME!private javax.swing.JComboBox
sendDestCBox
DOCUMENT ME!private ViewTableModel
sendModel
DOCUMENT ME!private javax.swing.JPanel
sendPanel
private java.lang.Thread
sendQueryThread
DOCUMENT ME!private javax.swing.JButton
sendStatusClearButton
DOCUMENT ME!private javax.swing.JTextArea
sendStatusTArea
DOCUMENT ME!private javax.swing.JTable
sendTable
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.private static int
SERIES_LEVEL
DOCUMENT ME!private java.lang.String
seriesInstanceUID
DOCUMENT ME!private ViewTableModel
serverModel
DOCUMENT ME!private javax.swing.JTable
serverTable
DOCUMENT ME!private javax.swing.JButton
set
Buttons used for the host tabprivate javax.swing.JButton
setStore
Buttons used for the host tabprivate java.lang.String
SOPInstanceUID
DOCUMENT ME!private javax.swing.JTextField
sourceTextF
DOCUMENT ME!private java.util.Calendar
startCalendar
DOCUMENT ME!private javax.swing.JComboBox
startDayBox
DOCUMENT ME!private javax.swing.JComboBox
startMonthBox
DOCUMENT ME!private javax.swing.JComboBox
startYearBox
DOCUMENT ME!private ViewTableModel
storageModel
DOCUMENT ME!private javax.swing.JTable
storageTable
DOCUMENT ME!private static int
STUDY_LEVEL
DOCUMENT ME!private java.lang.String
studyInstanceUID
DOCUMENT ME!private javax.swing.JTextField
studyNOText
DOCUMENT ME!private javax.swing.JPanel
subQueryPanel
DOCUMENT ME!private javax.swing.JTabbedPane
tabbedPane
DOCUMENT ME!private javax.swing.JButton
testButton
DOCUMENT ME!private javax.swing.JTextArea
textArea
DOCUMENT ME!private java.util.Calendar
todayCalendar
DOCUMENT ME!private DICOM_UID[]
uids
DOCUMENT ME!private javax.swing.JButton
up
DOCUMENT ME!private javax.swing.JButton
upDirButton
DOCUMENT ME!private static ViewUserInterface
userInterface
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ViewJFrameDICOMQuery()
Constructs three tabbed panels - DICOM Query, Host and Help panels.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.private void
addFiles(java.io.File current, java.util.Vector<java.lang.String> list)
void
appendSendMessage(java.lang.String appMessage)
Appends the text area with the message.private java.util.Calendar
assignCalendar(java.util.Calendar sourceC, java.util.Calendar targetC)
Assign source Calendar to target calendar.private javax.swing.JPanel
buildDatePanel()
Builds the panel that designed for inputing study duration information.private void
buildHelpText()
Constructs the helping manual in the help panel - one of the three panels in the tabbed panel.private javax.swing.JPanel
buildHostPanel()
Builds the host panel by calling methods to build the server and storage panels.private javax.swing.JLabel
buildLabel(java.lang.String s)
Builds the label for the textField, try to standardize the label appearance in the GUI.private javax.swing.JPanel
buildListingPanel()
Builds the listing panel.private javax.swing.JPanel
buildMessagePanel()
Construct the Query retrieval message panel.private javax.swing.JPanel
buildPtInfoPanel()
Constructs the patient information input panel.private javax.swing.JPanel
buildQueryPanel()
Builds the DICOM Query panel, one of the three tabbed Panels in the DICOMQuery GUI.private javax.swing.JRadioButton
buildRadioButton(java.lang.String s, boolean flag)
Constructs the radio button for fast input of study date range.private javax.swing.JPanel
buildSendPanel()
Builds the host panel by calling methods to build the server and storage panels.private javax.swing.JPanel
buildServerPanel()
Builds the panel that contains the server table and four buttons.private javax.swing.JPanel
buildStoragePanel()
Builds the panel that contains the storage table and four buttons.private javax.swing.JPanel
buildTextPanel()
Constructs the panel that contains the query result table.private javax.swing.border.TitledBorder
buildTitledBorder(java.lang.String s)
Constructs the titled border for the panel.boolean
cancelPendingMoves()
Cancels pending moves.boolean
cancelPendingQuery()
Cancels pending query.private java.util.Calendar
checkCalendar(java.util.Calendar date)
To check if the date is a valid date in the calendar.private boolean
checkDate(int year, int month, int day, boolean start)
Checks the date to be sure the user didn't enter the start after the end.void
componentHidden(java.awt.event.ComponentEvent event)
DOCUMENT ME!void
componentMoved(java.awt.event.ComponentEvent event)
DOCUMENT ME!void
componentResized(java.awt.event.ComponentEvent event)
Does not allow component to be smaller than MINIMUM_SIZE.void
componentShown(java.awt.event.ComponentEvent event)
DOCUMENT ME!private java.util.Calendar
copyOfCalendar(java.util.Calendar date)
Constructs and new class and copy the year, month, day paramenters.void
displayQueryResults(int type)
Displays the query results.private int
endOfMonth(java.util.Calendar tmp)
Calculates the last date of the month.void
focusGained(java.awt.event.FocusEvent event)
Unchanged.void
focusLost(java.awt.event.FocusEvent event)
When the user clicks the mouse out of a text field, resets the neccessary variables.private java.util.Calendar
getDaysBefore(java.util.Calendar date, int num)
Returns the new date of num days before date.private java.util.Calendar
getEndCalendar()
Gets all the ending date of the patient's study from the all three comboboxes.private int
getEndDay()
Gets the ending day of the study in the endDayBox combobox.private int
getEndMonth()
Gets the ending month of the study in the endMonthBox combobox.private int
getEndYear()
Gets the ending year of the study in the endYearBox combobox.private java.lang.String[]
getFiles(int[] rows)
private java.util.Calendar
getMonthsBefore(java.util.Calendar tmp, int num)
Returns the new date of num months before date.private java.lang.String
getPhysName()
Gets the physician's name from the physText field.private java.lang.String
getPtID()
Gets the Patient's ID from the ptIDText field.private java.lang.String
getPtName()
Gets the Patient name from the ptNameText field.private java.util.Calendar
getStartCalendar()
Gets all the starting date of the patient's study from the all three comboboxes.private int
getStartDay()
Gets the starting day of the study in the startDayBox combobox.private int
getStartMonth()
Gets the starting Month of the study in the startMonthBox combobox.private int
getStartYear()
Gets the starting year of the study in the startYearBox combobox.private java.lang.String
getStudyNo()
Gets the study id from the studyNOText field.private java.util.Calendar
getYearsBefore(java.util.Calendar tmp, int num)
Returns the new date of num years before date.private int
itemToInteger(java.lang.Object item)
Converts the combo box item to its corresponding integer.private java.lang.String
lastName(java.lang.String name)
Finds the last name of the current patient.private java.lang.String
makeString(java.lang.String[] stuff)
Makes the .preferences string out of the array.void
mouseClicked(java.awt.event.MouseEvent e)
When the user double clicks on a selection, sends a query at the next query level; when the user clicks on a header, sorts the column.void
mouseEntered(java.awt.event.MouseEvent e)
DOCUMENT ME!void
mouseExited(java.awt.event.MouseEvent e)
DOCUMENT ME!void
mousePressed(java.awt.event.MouseEvent e)
DOCUMENT ME!void
mouseReleased(java.awt.event.MouseEvent e)
DOCUMENT ME!private java.lang.String
originalName(java.lang.String name)
Transforms the name from the usual form to the DICOM form.private java.lang.String
parseName(java.lang.String name)
Transforms the name from the DICOM form to a more usual form.private void
sendMoveRequest(int type)
Sends a move request at the current level, setting up the data objects appropriately.private void
sendQuery(int type)
This method sets up the information for the DICOM query depending on the type, sends the query, and parses the information that the server sends back.private void
setColumns()
Sets the columns of the query table to certain values.private void
setEnabled(javax.swing.JButton button, boolean enabled)
Sets the specified button to enabled or disabled, depending on the boolean parameter.private void
setEndCalendar(java.util.Calendar date)
Set the end calendar.private void
setEndDay(int day)
Sets the end day.private void
setEndMonth(int month)
Sets the end month.private void
setEndYear(int year)
Sets the end year.private java.awt.GridBagConstraints
setGBC(int x, int y, int w, int h)
A helper method for adding a component using GridBagLayout, so we don't have to set up the x, y, width, and height over and over again.private void
setStartCalendar(java.util.Calendar date)
Sets the start calender to the calendar given.private void
setStartDay(int day)
Displays the starting day in the startDayBox combobox.private void
setStartMonth(int month)
Displays the starting month in the startMonthBox combobox.private void
setStartYear(int year)
Displays the starting year in the startYearBox combobox.private java.awt.GridBagConstraints
setupComboBoxLayout()
Sets up the gridbag layout of the combo boxes.private java.awt.GridBagConstraints
setupLabelLayout()
Sets up the gridBagLayout of the textField label.private boolean
setupSendFileListing(java.lang.String dir)
Sets ups the send file listing.private void
setupSendTab()
Update Send tab to reflect any changes in hosts.private java.awt.GridBagConstraints
setupTextFieldLayout()
Sets up the gridbaglayout of the textField.private void
sort(ViewTableModel model, int col, boolean reverse)
Sorts the column of the table model.void
stateChanged(javax.swing.event.ChangeEvent e)
ChangeListener************************************************************************* /** Sets values based on knob along slider.void
valueChanged(javax.swing.event.ListSelectionEvent e)
A List Selection Listener event for changes in the tables.void
windowActivated(java.awt.event.WindowEvent event)
Unchanged.void
windowClosed(java.awt.event.WindowEvent event)
Unchanged.void
windowClosing(java.awt.event.WindowEvent event)
Closes frame is requested.void
windowDeactivated(java.awt.event.WindowEvent event)
Unchanged.void
windowDeiconified(java.awt.event.WindowEvent event)
Unchanged.void
windowIconified(java.awt.event.WindowEvent event)
Unchanged.void
windowOpened(java.awt.event.WindowEvent event)
Unchanged.-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
DEFAULT_MIN_YEAR
private static final int DEFAULT_MIN_YEAR
DOCUMENT ME!- See Also:
- Constant Field Values
-
PATIENT_LEVEL
private static final int PATIENT_LEVEL
DOCUMENT ME!- See Also:
- Constant Field Values
-
STUDY_LEVEL
private static final int STUDY_LEVEL
DOCUMENT ME!- See Also:
- Constant Field Values
-
SERIES_LEVEL
private static final int SERIES_LEVEL
DOCUMENT ME!- See Also:
- Constant Field Values
-
IMAGE_LEVEL
private static final int IMAGE_LEVEL
DOCUMENT ME!- See Also:
- Constant Field Values
-
MINIMUM_SIZE
private static final java.awt.Dimension MINIMUM_SIZE
DOCUMENT ME!
-
browseButton
private javax.swing.JButton browseButton
DOCUMENT ME!
-
currentDateL
private javax.swing.JLabel currentDateL
DOCUMENT ME!
-
dicomQuery
private DICOM_Query dicomQuery
DOCUMENT ME!
-
endYearBox
private javax.swing.JComboBox endYearBox
DOCUMENT ME!
-
endMonthBox
private javax.swing.JComboBox endMonthBox
DOCUMENT ME!
-
endDayBox
private javax.swing.JComboBox endDayBox
DOCUMENT ME!
-
font12
private static final java.awt.Font font12
DOCUMENT ME!
-
font12B
private static final java.awt.Font font12B
DOCUMENT ME!
-
listPanel
private javax.swing.JPanel listPanel
DOCUMENT ME!
-
messageTable
private DICOMDisplayer messageTable
DOCUMENT ME!
-
monthString
private static final java.lang.String[] monthString
DOCUMENT ME!
-
moveRequestHash
private java.util.Hashtable<java.lang.String,ViewJFrameDICOMQuery.MoveRequestInfo> moveRequestHash
DOCUMENT ME!
-
ptNameText
private javax.swing.JTextField ptNameText
DOCUMENT ME!
-
ptIDText
private javax.swing.JTextField ptIDText
DOCUMENT ME!
-
studyNOText
private javax.swing.JTextField studyNOText
DOCUMENT ME!
-
physText
private javax.swing.JTextField physText
DOCUMENT ME!
-
queryLev
private javax.swing.JLabel queryLev
DOCUMENT ME!
-
queryLevel
private int queryLevel
DOCUMENT ME!
-
queryMsgID
private int queryMsgID
DOCUMENT ME!
-
aboutPanel
private javax.swing.JPanel aboutPanel
-
queryPDU
private DICOM_PDUService queryPDU
DOCUMENT ME!
-
queryResultTable
private javax.swing.JTable queryResultTable
DOCUMENT ME!
-
queryTableModel
private ViewTableModel queryTableModel
DOCUMENT ME!
-
refreshButton
private javax.swing.JButton refreshButton
DOCUMENT ME!
-
rootQueryPanel
private javax.swing.JPanel rootQueryPanel
DOCUMENT ME!
-
sendButton
private javax.swing.JButton sendButton
DOCUMENT ME!
-
sendDestCBox
private javax.swing.JComboBox sendDestCBox
DOCUMENT ME!
-
sendModel
private ViewTableModel sendModel
DOCUMENT ME!
-
sendQueryThread
private java.lang.Thread sendQueryThread
DOCUMENT ME!
-
sendStatusClearButton
private javax.swing.JButton sendStatusClearButton
DOCUMENT ME!
-
sendStatusTArea
private javax.swing.JTextArea sendStatusTArea
DOCUMENT ME!
-
sendTable
private javax.swing.JTable sendTable
DOCUMENT ME!
-
seriesInstanceUID
private java.lang.String seriesInstanceUID
DOCUMENT ME!
-
serverModel
private ViewTableModel serverModel
DOCUMENT ME!
-
serverTable
private javax.swing.JTable serverTable
DOCUMENT ME!
-
set
private javax.swing.JButton set
Buttons used for the host tab
-
activateStore
private javax.swing.JButton activateStore
Buttons used for the host tab
-
createStore
private javax.swing.JButton createStore
Buttons used for the host tab
-
editStore
private javax.swing.JButton editStore
Buttons used for the host tab
-
deleteStore
private javax.swing.JButton deleteStore
Buttons used for the host tab
-
setStore
private javax.swing.JButton setStore
Buttons used for the host tab
-
cancel
private javax.swing.JButton cancel
Buttons used for the host tab
-
help1
private javax.swing.JButton help1
Buttons used for the host tab
-
help2
private javax.swing.JButton help2
Buttons used for the host tab
-
help3
private javax.swing.JButton help3
Buttons used for the host tab
-
help4
private javax.swing.JButton help4
Buttons used for the host tab
-
SOPInstanceUID
private java.lang.String SOPInstanceUID
DOCUMENT ME!
-
sourceTextF
private javax.swing.JTextField sourceTextF
DOCUMENT ME!
-
startCalendar
private java.util.Calendar startCalendar
DOCUMENT ME!
-
endCalendar
private java.util.Calendar endCalendar
DOCUMENT ME!
-
todayCalendar
private java.util.Calendar todayCalendar
DOCUMENT ME!
-
startYearBox
private javax.swing.JComboBox startYearBox
DOCUMENT ME!
-
startMonthBox
private javax.swing.JComboBox startMonthBox
DOCUMENT ME!
-
startDayBox
private javax.swing.JComboBox startDayBox
DOCUMENT ME!
-
storageModel
private ViewTableModel storageModel
DOCUMENT ME!
-
storageTable
private javax.swing.JTable storageTable
DOCUMENT ME!
-
studyInstanceUID
private java.lang.String studyInstanceUID
DOCUMENT ME!
-
subQueryPanel
private javax.swing.JPanel subQueryPanel
DOCUMENT ME!
-
tabbedPane
private javax.swing.JTabbedPane tabbedPane
DOCUMENT ME!
-
testButton
private javax.swing.JButton testButton
DOCUMENT ME!
-
textArea
private javax.swing.JTextArea textArea
DOCUMENT ME!
-
uids
private DICOM_UID[] uids
DOCUMENT ME!
-
up
private javax.swing.JButton up
DOCUMENT ME!
-
down
private javax.swing.JButton down
DOCUMENT ME!
-
cancelQ
private javax.swing.JButton cancelQ
DOCUMENT ME!
-
send
private javax.swing.JButton send
DOCUMENT ME!
-
move
private javax.swing.JButton move
DOCUMENT ME!
-
create
private javax.swing.JButton create
DOCUMENT ME!
-
edit
private javax.swing.JButton edit
DOCUMENT ME!
-
delete
private javax.swing.JButton delete
DOCUMENT ME!
-
upDirButton
private javax.swing.JButton upDirButton
DOCUMENT ME!
-
sendPanel
private final javax.swing.JPanel sendPanel
-
userInterface
private static final ViewUserInterface userInterface
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Parameters:
event
- event that triggered function
-
getFiles
private java.lang.String[] getFiles(int[] rows)
-
addFiles
private void addFiles(java.io.File current, java.util.Vector<java.lang.String> list)
-
appendSendMessage
public void appendSendMessage(java.lang.String appMessage)
Appends the text area with the message.- Parameters:
appMessage
- the message
-
cancelPendingMoves
public boolean cancelPendingMoves()
Cancels pending moves.- Returns:
- DOCUMENT ME!
-
cancelPendingQuery
public boolean cancelPendingQuery()
Cancels pending query.- Returns:
- DOCUMENT ME!
-
componentHidden
public void componentHidden(java.awt.event.ComponentEvent event)
DOCUMENT ME!- Specified by:
componentHidden
in interfacejava.awt.event.ComponentListener
- Parameters:
event
- DOCUMENT ME!
-
componentMoved
public void componentMoved(java.awt.event.ComponentEvent event)
DOCUMENT ME!- Specified by:
componentMoved
in interfacejava.awt.event.ComponentListener
- Parameters:
event
- DOCUMENT ME!
-
componentResized
public void componentResized(java.awt.event.ComponentEvent event)
Does not allow component to be smaller than MINIMUM_SIZE.- Specified by:
componentResized
in interfacejava.awt.event.ComponentListener
- Parameters:
event
- event that triggered this method
-
componentShown
public void componentShown(java.awt.event.ComponentEvent event)
DOCUMENT ME!- Specified by:
componentShown
in interfacejava.awt.event.ComponentListener
- Parameters:
event
- DOCUMENT ME!
-
displayQueryResults
public void displayQueryResults(int type)
Displays the query results.- Parameters:
type
- indicates the query level
-
focusGained
public void focusGained(java.awt.event.FocusEvent event)
Unchanged.- Specified by:
focusGained
in interfacejava.awt.event.FocusListener
- Parameters:
event
- DOCUMENT ME!
-
focusLost
public void focusLost(java.awt.event.FocusEvent event)
When the user clicks the mouse out of a text field, resets the neccessary variables.- Specified by:
focusLost
in interfacejava.awt.event.FocusListener
- Parameters:
event
- event that triggers this function
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
When the user double clicks on a selection, sends a query at the next query level; when the user clicks on a header, sorts the column.- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Parameters:
e
- event that triggered this method
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
DOCUMENT ME!- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Parameters:
e
- DOCUMENT ME!
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
DOCUMENT ME!- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Parameters:
e
- DOCUMENT ME!
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
DOCUMENT ME!- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Parameters:
e
- DOCUMENT ME!
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
DOCUMENT ME!- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Parameters:
e
- DOCUMENT ME!
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
ChangeListener************************************************************************* /** Sets values based on knob along slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
e
- DOCUMENT ME! event that triggered this function
-
valueChanged
public void valueChanged(javax.swing.event.ListSelectionEvent e)
A List Selection Listener event for changes in the tables. If this is the query table, it will enable the down and move images buttons and set up the UIDs for querying. If this is the server or storage table, it will enable the edit, delete, and set as default buttons.- Specified by:
valueChanged
in interfacejavax.swing.event.ListSelectionListener
- Parameters:
e
- event that triggered this method.
-
windowActivated
public void windowActivated(java.awt.event.WindowEvent event)
Unchanged.- Specified by:
windowActivated
in interfacejava.awt.event.WindowListener
- Parameters:
event
- DOCUMENT ME!
-
windowClosed
public void windowClosed(java.awt.event.WindowEvent event)
Unchanged.- Specified by:
windowClosed
in interfacejava.awt.event.WindowListener
- Parameters:
event
- DOCUMENT ME!
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent event)
Closes frame is requested. The user is notified if there are any pending image move requests. The user is able to- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
- Parameters:
event
- event that triggered this function
-
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent event)
Unchanged.- Specified by:
windowDeactivated
in interfacejava.awt.event.WindowListener
- Parameters:
event
- DOCUMENT ME!
-
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent event)
Unchanged.- Specified by:
windowDeiconified
in interfacejava.awt.event.WindowListener
- Parameters:
event
- DOCUMENT ME!
-
windowIconified
public void windowIconified(java.awt.event.WindowEvent event)
Unchanged.- Specified by:
windowIconified
in interfacejava.awt.event.WindowListener
- Parameters:
event
- DOCUMENT ME!
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent event)
Unchanged.- Specified by:
windowOpened
in interfacejava.awt.event.WindowListener
- Parameters:
event
- DOCUMENT ME!
-
assignCalendar
private java.util.Calendar assignCalendar(java.util.Calendar sourceC, java.util.Calendar targetC)
Assign source Calendar to target calendar.- Parameters:
sourceC
- The source calendartargetC
- The target calendar that will copy the values of the source Calendar.- Returns:
- The target calendar.
-
buildDatePanel
private javax.swing.JPanel buildDatePanel()
Builds the panel that designed for inputing study duration information. It contains a panel of radiobuttons, and two rows of pull down boxes to facilitate the input of information.- Returns:
- The constructed panel.
-
buildHelpText
private void buildHelpText()
Constructs the helping manual in the help panel - one of the three panels in the tabbed panel. Reads the help information from a file "DICOMhelp.txt" that should be in the classpath. If it is not, throws up an error message and displays nothing in the tabbed pane.
-
buildHostPanel
private javax.swing.JPanel buildHostPanel()
Builds the host panel by calling methods to build the server and storage panels.- Returns:
- the panel containing the hosts
-
buildLabel
private javax.swing.JLabel buildLabel(java.lang.String s)
Builds the label for the textField, try to standardize the label appearance in the GUI.- Parameters:
s
- a string which encode the name of the label- Returns:
- the constructed label.
-
buildListingPanel
private javax.swing.JPanel buildListingPanel()
Builds the listing panel.- Returns:
- the server panel
-
buildMessagePanel
private javax.swing.JPanel buildMessagePanel()
Construct the Query retrieval message panel. It contains a table for displaying the information.- Returns:
- The constructed panel.
-
buildPtInfoPanel
private javax.swing.JPanel buildPtInfoPanel()
Constructs the patient information input panel.- Returns:
- the constructed panel.
-
buildQueryPanel
private javax.swing.JPanel buildQueryPanel()
Builds the DICOM Query panel, one of the three tabbed Panels in the DICOMQuery GUI. Inside, there are three different elements: The patient information panel - patient name, ID, study dates ... The Query result panel - display the result of the query The message area - display the status of the query- Returns:
- the DICOM Query Panel which contains the patient info and query result
-
buildRadioButton
private javax.swing.JRadioButton buildRadioButton(java.lang.String s, boolean flag)
Constructs the radio button for fast input of study date range.- Parameters:
s
- The name of the radio button: today, one week, one month ...flag
- Whether the radio button is active by default or not.- Returns:
- The constructed radio button with appropriated attributes attached.
-
buildSendPanel
private final javax.swing.JPanel buildSendPanel()
Builds the host panel by calling methods to build the server and storage panels.- Returns:
- the panel containing
-
buildServerPanel
private javax.swing.JPanel buildServerPanel()
Builds the panel that contains the server table and four buttons. The server table consists of five columns with information the user needs to query the server. The buttons are "Create", which creates a new server; "Edit", which edits the currently selected server; "Delete", which deletes the currently selected server; and "Set As Default", which sets the current server as default. To get the data in the table, the table model reads the .preferences file and parses the data. When changes are made, they are saved to the .preferences file.- Returns:
- the server panel
-
buildStoragePanel
private javax.swing.JPanel buildStoragePanel()
Builds the panel that contains the storage table and four buttons. The storage table consists of five columns with information the user needs to move images. The buttons are "Create", which creates a new destination; "Edit", which edits the currently selected destination; "Delete", which deletes the currently selected destination; and "Set As Default", which sets the current destination as default. To get the data in the table, the table model reads the .preferences file and parses the data. When changes are made, they are saved to the .preferences file.- Returns:
- the storage panel
-
buildTextPanel
private javax.swing.JPanel buildTextPanel()
Constructs the panel that contains the query result table. There are four action-attached buttons to facilitate different levels of query: up, down, send query, and move images. Up moves the query up a level; down moves it down a level; send query sends a query; and move images moves an image or a set of images at that level.- Returns:
- The constructed panel.
-
buildTitledBorder
private javax.swing.border.TitledBorder buildTitledBorder(java.lang.String s)
Constructs the titled border for the panel.- Parameters:
s
- a string carried the name of the border- Returns:
- the constructed titled border
-
checkCalendar
private java.util.Calendar checkCalendar(java.util.Calendar date)
To check if the date is a valid date in the calendar.- Parameters:
date
- The date to be checked.- Returns:
- The new calendar class with correctd date.
-
checkDate
private boolean checkDate(int year, int month, int day, boolean start)
Checks the date to be sure the user didn't enter the start after the end.- Parameters:
year
- year of the date to checkmonth
- month of the date to checkday
- day of the date to checkstart
- flag that says if this is the start date or end date- Returns:
- boolean that tells if the date checked out
-
copyOfCalendar
private java.util.Calendar copyOfCalendar(java.util.Calendar date)
Constructs and new class and copy the year, month, day paramenters.- Parameters:
date
- The source Calendar class which will be copied from.- Returns:
- The newly constructed calendar class with the same info as source.
-
endOfMonth
private int endOfMonth(java.util.Calendar tmp)
Calculates the last date of the month.- Parameters:
tmp
- The calendar to be calculated.- Returns:
- the last date of the month.
-
getDaysBefore
private java.util.Calendar getDaysBefore(java.util.Calendar date, int num)
Returns the new date of num days before date.- Parameters:
date
- the date to get the days before ofnum
- the number of days before- Returns:
- the calendar with the right number of years before
-
getEndCalendar
private java.util.Calendar getEndCalendar()
Gets all the ending date of the patient's study from the all three comboboxes.- Returns:
- a Calendar type stores the ending date information
-
getEndDay
private int getEndDay()
Gets the ending day of the study in the endDayBox combobox.- Returns:
- integer: the ending day of the study
-
getEndMonth
private int getEndMonth()
Gets the ending month of the study in the endMonthBox combobox.- Returns:
- integer: the ending month of the study
-
getEndYear
private int getEndYear()
Gets the ending year of the study in the endYearBox combobox.- Returns:
- integer: the ending year of the study
-
getMonthsBefore
private java.util.Calendar getMonthsBefore(java.util.Calendar tmp, int num)
Returns the new date of num months before date.- Parameters:
tmp
- the date to get the months before ofnum
- the number of months before- Returns:
- the calendar with the right number of months before
-
getPhysName
private java.lang.String getPhysName()
Gets the physician's name from the physText field.- Returns:
- The string that stores the physician's name.
-
getPtID
private java.lang.String getPtID()
Gets the Patient's ID from the ptIDText field.- Returns:
- The string that stores the patient ID.
-
getPtName
private java.lang.String getPtName()
Gets the Patient name from the ptNameText field.- Returns:
- The string that contained the patient's name.
-
getStartCalendar
private java.util.Calendar getStartCalendar()
Gets all the starting date of the patient's study from the all three comboboxes.- Returns:
- a Calendar type stores the starting date information
-
getStartDay
private int getStartDay()
Gets the starting day of the study in the startDayBox combobox.- Returns:
- integer: the starting day of the study
-
getStartMonth
private int getStartMonth()
Gets the starting Month of the study in the startMonthBox combobox.- Returns:
- integer: the starting month of the study
-
getStartYear
private int getStartYear()
Gets the starting year of the study in the startYearBox combobox.- Returns:
- integer: the starting year of the study
-
getStudyNo
private java.lang.String getStudyNo()
Gets the study id from the studyNOText field.- Returns:
- The string that stores the study number.
-
getYearsBefore
private java.util.Calendar getYearsBefore(java.util.Calendar tmp, int num)
Returns the new date of num years before date.- Parameters:
tmp
- the date to get the years before ofnum
- the number of years before- Returns:
- the calendar with the right number of years before
-
itemToInteger
private int itemToInteger(java.lang.Object item)
Converts the combo box item to its corresponding integer. Year and date - are numbers as they represented. Month - will be converted to integer, starting with 0 = January,- Parameters:
item
- DOCUMENT ME!- Returns:
- The appropriated integer number.
-
lastName
private java.lang.String lastName(java.lang.String name)
Finds the last name of the current patient.- Parameters:
name
- patient's name- Returns:
- the last name
-
makeString
private java.lang.String makeString(java.lang.String[] stuff)
Makes the .preferences string out of the array.- Parameters:
stuff
- array to make the string from- Returns:
- the string with the array items separated by semicolons
-
originalName
private java.lang.String originalName(java.lang.String name)
Transforms the name from the usual form to the DICOM form.- Parameters:
name
- the usual name- Returns:
- the DICOM version of the name
-
parseName
private java.lang.String parseName(java.lang.String name)
Transforms the name from the DICOM form to a more usual form.- Parameters:
name
- the original name- Returns:
- the more usual version of the name
-
sendMoveRequest
private void sendMoveRequest(int type)
Sends a move request at the current level, setting up the data objects appropriately. It runs the move request in its own thread.- Parameters:
type
- type of move request: PATIENT, STUDY, SERIES, or IMAGE.
-
sendQuery
private void sendQuery(int type)
This method sets up the information for the DICOM query depending on the type, sends the query, and parses the information that the server sends back. On a study query, it filters out studies before the start date or after the end date.- Parameters:
type
- type of query: PATIENT, STUDY, SERIES, or IMAGE.
-
setColumns
private void setColumns()
Sets the columns of the query table to certain values.
-
setEnabled
private void setEnabled(javax.swing.JButton button, boolean enabled)
Sets the specified button to enabled or disabled, depending on the boolean parameter.- Parameters:
button
- button to setenabled
- true is enabled, false if disabled
-
setEndCalendar
private void setEndCalendar(java.util.Calendar date)
Set the end calendar.- Parameters:
date
- date to set it to
-
setEndDay
private void setEndDay(int day)
Sets the end day.- Parameters:
day
- day to set it to
-
setEndMonth
private void setEndMonth(int month)
Sets the end month.- Parameters:
month
- month to set it to
-
setEndYear
private void setEndYear(int year)
Sets the end year.- Parameters:
year
- year to set it to
-
setGBC
private java.awt.GridBagConstraints setGBC(int x, int y, int w, int h)
A helper method for adding a component using GridBagLayout, so we don't have to set up the x, y, width, and height over and over again.- Parameters:
x
- GridBagConstraints.gridxy
- GridBagConstraints.gridyw
- GridBagContraints.gridwidthh
- GridBagConstraints.gridheight- Returns:
- the grid bag constraints
- See Also:
GridBagConstraints
-
setStartCalendar
private void setStartCalendar(java.util.Calendar date)
Sets the start calender to the calendar given.- Parameters:
date
- calendar to set it to
-
setStartDay
private void setStartDay(int day)
Displays the starting day in the startDayBox combobox.- Parameters:
day
- an integer of the starting date: day
-
setStartMonth
private void setStartMonth(int month)
Displays the starting month in the startMonthBox combobox.- Parameters:
month
- an integer of the starting date: month
-
setStartYear
private void setStartYear(int year)
Displays the starting year in the startYearBox combobox.- Parameters:
year
- an integer of the starting date: year
-
setupComboBoxLayout
private java.awt.GridBagConstraints setupComboBoxLayout()
Sets up the gridbag layout of the combo boxes.- Returns:
- The gbc for the combo boxes
-
setupLabelLayout
private java.awt.GridBagConstraints setupLabelLayout()
Sets up the gridBagLayout of the textField label.- Returns:
- the gbc layout for label
-
setupSendFileListing
private boolean setupSendFileListing(java.lang.String dir)
Sets ups the send file listing.- Parameters:
dir
- the directory from which to build the listing- Returns:
- DOCUMENT ME!
-
setupSendTab
private void setupSendTab()
Update Send tab to reflect any changes in hosts.
-
setupTextFieldLayout
private java.awt.GridBagConstraints setupTextFieldLayout()
Sets up the gridbaglayout of the textField.- Returns:
- The gbc layout for the text field.
-
sort
private void sort(ViewTableModel model, int col, boolean reverse)
Sorts the column of the table model. If reverse is true, sorts in reverse order.- Parameters:
model
- table model to sort oncol
- column to sort onreverse
- whether or not to sort in reverse order.
-
-