Public Member Functions | |
void | paint (Graphics graphics) |
paint() overwrites the paint method of the JPanel. | |
DaqPanel (JRootPane root) | |
Constructor. | |
void | updateConnectionStatus () |
Updates the connection status with the DAQ. | |
Package Attributes | |
boolean | isConnected = false |
A boolean variable to determine the connection status. | |
DaqTests | daqTests |
A class that will open and test the connection with the DAQ. | |
JRootPane | rootPane |
Needed to acces the rootPane. | |
JScrollBar | scroller |
JScrollBar to scrolled through results or debugging information. | |
ConnectionPanel | connectPanel |
A JPanel that handles the connection status and port. | |
TestPanel | testPanel |
A JPanel to perform all the testing. | |
final SSPanel | sspanel |
A JPanel that displays all the results and debugging information. | |
ResetDebugPanel | rDPanel |
A JPanel that is use to reset sspanel or the entire DaqDriverTest::daqPanel. | |
Hashtable | openPorts |
Hash table that keeps track if there are any open ports. | |
Static Package Attributes | |
DaqPanel | curDaqPanel |
A variable used so the private classes can access methods within DaqPanel. |
It extends a JPanel to be able to put swing components for a GUI. It uses two private classes DaqPanel::ConnectionPanel and DaqPanel::TestPanel to lay out the components.
Definition at line 26 of file DaqPanel.java.
|
Constructor. It adds the testPanel the sspanel and the connectPanel to the JPanel extended by DaqPanel. This constructor is the one that does most of the job to set up the GUI. It creates and instance of testmodule::DaqTests, and adds the correct behavior to the individual components of each panel. It adds an ActionListener every component that needs it mainly buttons. And a MouseWheelListeners and AdjustemtnListeners to the scroller. It also adds some ChangeListeners to some buttons to be set as default when their status changes to focus or when they rollover.
Definition at line 309 of file DaqPanel.java. References connectPanel, curDaqPanel, openPorts, rootPane, scroller, dndtester::SSPanel::setScroller(), dndtester::SSPanel::setTopIndexByPixelValue(), sspanel, and testPanel. |
|
paint() overwrites the paint method of the JPanel. This allows to find out if the scroll bar should be shown. And when is shown it calculates the increment when the scroll is moved. Definition at line 286 of file DaqPanel.java. References dndtester::SSPanel::getPreferredSize(), dndtester::SSPanel::getUnitHeight(), scroller, and sspanel. |
|
Updates the connection status with the DAQ. Every time a connection is establish or lost it must set isConnected to true if there is a connection or false if there is no connection. And sets the label connectStat to Connected or offline to let the user know if there is a connection. Definition at line 976 of file DaqPanel.java. |