Public Member Functions | |
PatternDlg (java.awt.Frame parent, boolean modal) | |
void | actionPerformed (ActionEvent event) |
void | itemStateChanged (ItemEvent event) |
void | mousePressed (MouseEvent e) |
void | mouseReleased (MouseEvent e) |
void | mouseClicked (MouseEvent e) |
void | mouseEntered (MouseEvent e) |
void | mouseExited (MouseEvent e) |
void | checkTableEditing () |
Static Public Member Functions | |
void | main (String args[]) |
Private Member Functions | |
void | displayStroke () |
void | enableWidget (boolean b) |
void | buildStrokePanel (String strokeType) |
void | ratioBrowseButtons () |
void | saveCurrentStroke () |
void | initComponents () |
void | onStrokesTF () |
void | onStrokesTFFocus () |
void | closeDialog (java.awt.event.WindowEvent evt) |
void | onBeginButton () |
void | onLessButton () |
void | onAddButton () |
void | onRemoveButton () |
void | onMoreButton () |
void | onEndButton () |
void | onDone () |
void | onAddTableRow () |
void | onAddBeforeTableRow () |
void | onAddAfterTableRow () |
void | onMoveUpTableRow () |
void | onMoveDownTableRow () |
void | checkPopup (MouseEvent e) |
Private Attributes | |
Vector | Strokes = new Vector() |
int | currentStroke = 0 |
JButton | addB = new JButton() |
JButton | beginB = new JButton() |
JPanel | browsePanel = new JPanel() |
JPanel | jPanel1 = new JPanel() |
JSeparator | jSeparator1 = new JSeparator() |
JButton | lessB = new JButton() |
JButton | endB = new JButton() |
JButton | moreB = new JButton() |
JButton | removeB = new JButton() |
JTextField | strokesTF = new JTextField() |
JPanel | jPanel3 = new JPanel() |
JSeparator | jSeparator2 = new JSeparator() |
JPanel | buttonPanel = new JPanel() |
JButton | applyButton = new JButton() |
JButton | doneButton = new JButton() |
JPanel | strokePanel = new JPanel() |
JComboBox | modeCB = new JComboBox() |
JLabel | modeL = new JLabel() |
JLabel | timeL = new JLabel() |
JTextField | timeTF = new JTextField() |
JLabel | orientationL = new JLabel() |
JTextField | orientationTF = new JTextField() |
JLabel | X0L = new JLabel() |
JTextField | X0TF = new JTextField() |
JLabel | X1L = new JLabel() |
JTextField | X1TF = new JTextField() |
JLabel | Y0L = new JLabel() |
JTextField | Y0TF = new JTextField() |
JLabel | Y1L = new JLabel() |
JTextField | Y1TF = new JTextField() |
JLabel | longCenterL = new JLabel() |
JLabel | latCenterL = new JLabel() |
JLabel | polarOrientL = new JLabel() |
JTextField | longCenterTF = new JTextField() |
JTextField | latCenterTF = new JTextField() |
JTextField | polarOrientTF = new JTextField() |
DefaultTableModel | tableModel |
JTable | arrayT = new JTable(tableModel) |
JScrollPane | scrollPane = new JScrollPane(arrayT) |
JPopupMenu | arrayPM = new JPopupMenu() |
int | rowPressed = -1 |
int | colPressed = -1 |
JMenuItem | addBeforeMI = new JMenuItem("Add row before") |
JMenuItem | addAfterMI = new JMenuItem("Add row after") |
JMenuItem | addMI = new JMenuItem("Add row") |
JMenuItem | moveUpMI = new JMenuItem("Move Up") |
JMenuItem | moveDownMI = new JMenuItem("Move Down") |
JMenuItem | editMI = new JMenuItem("Edit cell") |
The window is divided in three areas: 1. The button to navigate, add and remove the strokes 2. The fields of the current stoke 3. The buttons to terminate (Done, Apply)
While the first and the last area are fixed, the second one depends on the type of the stroke
Strokes.size()>=0
currentStroke>=0 && currentStroke<=Strokes.size()
|
Creates new (dialog) PatternDlg
|
|
Receive and dispatches the ActionEvents generated by the user
event!=null event.getActionCommand()!=null event.getSource()!=null @ assert arrayT!=null |
|
Build the panel with the right fields for each kind of stroke (it selects the items but doesn't fill their fields)
|
|
If the pop menu has to be shown, this method visualizes and hides the items depending on the position where the mouse button was pressed and then it alsoi shows the menu
e!=null rowPressed>=-1 colPressed>=-1 arrayT!=null |
|
Check if the user was editing a cell of the table and eventually terminate the editing (acquiring the data) arrayT!=null editor!=null |
|
Closes the dialog
|
|
Display the current stroke stroke!=null arrayT!=null model!=null |
|
Enable or disable the widgets of the window It manages the fields but not the browse buttons
|
|
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. |
|
Manages the event generated when the user changes the type of the stroke It build the panel for the right stroke panel This method is executed when the item changed (the change may be generated either by the user or the process) event!=null |
|
|
|
The user clicked a mouse button
|
|
The mouse enters a component
|
|
The mouse exited a component
|
|
The user pressed the mouse button
|
|
The user released the mouse button
|
|
The user wants to add a new row after the row over the mouse pointer
arrayT!=null model!=null |
|
The user wants to add a new row before the row over the mouse pointer
arrayT!=null model!=null |
|
Executed when the user create a new stroke It instatiates a new (empty) stroke that insert into the vector at the requested position then the new stroke is shown
arrayT!=null model!=null |
|
The user wants to add a new row
arrayT!=null model!=null |
|
Save the current item and go to the beginning of the list
|
|
The user has just terminated |
|
Save the current item and go to the end
|
|
Save the current item and go to the previous item
|
|
Save the current item and go to the next item
|
|
The user wants to move down a row of the table
|
|
The user wants to move up a row of the table
|
|
The user wants to remove the stroke
|
|
Read the value inserted by the user and display the requested item |
|
Select the text into the field |
|
Enable or disable the navigation buttons depending on the available strokes and the displayed stroke |
|
Save the currently displayed stroke in the Stroke vector The type of the stroke created and stored into the vector depends from the tipe chosen by the user in the combobox
model!=null v!=null row!=null |
|
The popup menu item to add a row after that above the mouse pointer |
|
The add button |
|
The popup menu item to add a row before that above the mouse pointer |
|
The popup menu item to append a new row |
|
The apply button |
|
The popup menu that apperas when the user press the right mouse button over tha table |
|
The table that displays the arrays |
|
The begin button |
|
The panel that contains all the buttons to navigate through the strokes |
|
A panel for the buttons |
|
Remember the table col over which the user pressed a mouse button |
|
The index of the currently displayed stroke (0 doesn't exist) It is always between 1 and Strokes.size() |
|
The Done button |
|
The popup menu item to edit the cell under the mouse pointer |
|
The button to move to the last stroke |
|
Support panel for the buttons to browse the strokes |
|
Another (support) panel for the apply and done buttons |
|
The separator (just a line) between the buttons to navigate the strokes and the rest of the panel |
|
A separator (just a line) upon the Apply and Done buttons |
|
The label for the latitude center |
|
The text field for the latitude center |
|
The less button (move to the previous stroke) |
|
The label for the longitude center |
|
The text field for the longitude center |
|
The mode (combo box) |
|
The mode (label) |
|
The button to move to the next stroke |
|
The popup menu item to move down the current line |
|
The popup menu item to move up the current line |
|
The label for orientation |
|
The text field for orientation |
|
The label for the polar orientation |
|
The text field for the polar orientation |
|
The button to delete the current stroke |
|
Remember the table row over which the user pressed a mouse button |
|
The scroll bar of the table of arrays |
|
|
|
The vector of patterns (empty at startup) |
|
The text field to insert the number of the stroke to move to |
|
Initial value: The table model for the table of arrays (it stores the values inserted by the user) |
|
The label for the time |
|
The text field for the time |
|
Tha label for xArray[0] |
|
The text field for xArray[0] |
|
The label for xArray[1] |
|
The text field for xArray[1] |
|
The label for yArray[0] |
|
The text field for yArra[0] |
|
The label for yArray[1] |
|
The text field for yArray[1] |