[Previous] [Main] [Next]

Edit Column Descriptions

Once you have finished with the Class Description options, you can choose this screen to edit the columns in a table. The table you chose in the CREATE screen already be selected so that you shold only see column that belong to that table/class. The columns from the table you are working with will be in the scrolling list of fields at the bottom of the JGuiGen screen. Once you do this, the table description components will become non-ediatable and the column description options will become editable. (Note: If you have not chosen a table name from the combobox near the top of the screen, the scrolling list will contain all of the columns in all of the tables.)

Top of the Edit Column Description Screen

The first few components describing a column are not editable. These describe the column type, width, decimals, default value and nullable status from the SQL table metadata.

1. Buttons - Note the standard JGuiGen Buttons at the top of the screen. This screen was generated with JGuiGen.

2. Combobox - choose a table/class name here. This will filter the columns shown in the scrolling table at the bottom of the screen.

3. Tabs - You can click on the Table Desc tab, but there is nothing activated here.

4 Column Name - The column name cannot be changed except to indicate which letters should be capticalized when generaing variable names using this column name. This is called camel casing. The usual java convention is to lowercase the first word and uppercase the first letter of each new word that might be included in a column name (e.g. lastchangedby becomes lastChangedBy).

5. SQL INFORMATION - the other information shown here (greyed out) is taken from the SQL table metadata. This describes how the table actually exists in your SQL database. You cannot edit these here. You would have to change the structure of the SQL table and rerun the CHECK option before these would change.

Middle of the Column Edit Screen

1. Description - Describe what goes into this field here. This text is used for ToolTips describing the component used to edit or display this field. It is also used for the accessibility description (A11y).

2. Data Source - Use this field to indicate how the column receives its data. Some columns are edited by users, some are automatically filled in by your system. You can manually fill in this field or choose from several option in the drop-down combobox. NOTE: several JGuiGen features require that you indicate special fields using the drop-down box. The options available in the drop-down are as follows:
·Filled in by users using a Data entry Screen - this option indicates the column gets its data from a edit screen.  
·1. Auto Fill with User Name on Update- LastChangedBy - If you include a char(20) column and mark it with this description, JGuiGen will automatically fill in the user name of the person who last changed the row.  
·2. Auto Fill with Date/Time on Update- LastChangedDate - If you include a timestamp field and mark it with this description JGuiGen will automatically fill it with the date/time the row was last updated. This column will also be used to avoid multi-user conflicts and to help determine the id number of a row just entered if the database being used does not have a function to return the ID created by an auto-incremented column.  
·3. User Checks to mark inactive records- rowInactive - If you include a boolean column or char(1) column and mark it with this description, JGuiGen will ignore row marked inActive during all queries and updates of the table. You can view these rows using the Query Builder.  
·4. Auto Fill with a serial id- Primary KeyField - use this to mark rows that should NOT be inserted in the table, your database will automatically assign values to them. (This is currently for information only. The Checkbox for indicating a column is the Primary Key is the active component when JGuiGen generates an applicaiton.)  
·Auto Fill with next # within one ID # - use this to mark an column that should be filled with the next available number within a subset of the table. For example you may be logging documents generated by one user. The next available document number of apply only to the current user. (e.g. if the current user has 10 documents, the next one would be number 11.) This option is not tested at this time.  
·Other automatic use by System - This is a generic label used to describe system fields.  
·5. Field not in use at this time - database like postgreSQL do not let you easily remove a column that is no longer in use. Mark these columns with this description and JGuiGen will ignore them when generating the GUI code.  
3. Label and Rpt Header - This defaults to the column name. You should edit it to make it more useful as a JTable Column Header or very short desciprtion of the column. This is used for the label beside this column in the edit screen.

Report Col Width - This will be used by report writers. Some columns are very wide but usually do not have have much data in them. You can shorten their width in a report using this field.  

4. Editable Column - this is a small combo box with several options that describe how the column is to be handled. If it is marked as "Editable", the column will be included in the generated GUI. It is it marked as "Display Only", the column will be included on the screen, but it will not be editble. The other two options are "Do Not Display" and "Part of JList" Columns marked as "Do Not Display" do not appear on the generated screen at all. They may still be part of the scrolling JTable at the bottom of the screen. The JList option will be described later.

5. Use In Query? - JGuiGen has a simple SQL Query Builder. Check the columns you would like to be included in the screen that pop-up for the user to find specific rows in the SQL table. By default all columns are part of the Query Builder.

Use in Jtable - You can indicate that you do not want a column to be included in the scrolling table at the bottom of the screen by unchecking this box.

6. Display Mask - JGuiGen uses JFormattedTextfields when possible to force the format of data entry. Use the Display Mask to tell JGuiGen when a column belongs to one of the standard types that it knows how to handle. The JFormattedTextFields have two types of masks: regular expressions and field masks. Field masks are used whenever possible. The types currently in the system are as follows:
·Default - this (or a blank) indicates that JGuiGen should use the column "type" to determine which component to use to display/edit the column. For example char columns are edited with a JBoundedTextfield that limits the number a characters a user can place in a column to the width of the column (e.g. a char(30) would be limited to 30 characters.) Boolean column default to a checkbox. Dates default to a pop-up screen.  
·Telephone - the "mask" is read from the resource bundle so that it can be changed for different countries. The default for the US is (###) ###-####. This is filled with a default phone number of (000) 000-0000 which the user types over.  
·Time (12:30 AM) - This assumes that the time is being stored in a char field. The default format is ##;## AM This format is a stored as a regular expression and is stored in the resource bundle so that it can be modified.  
·SSN - the default mask is ###-##-####  
·State - The component used to enter the state portion of city/state/zip is a look ahead JCombobox. When a user types the first letter of a State, the combobox finds the first state with that letters and completes the field. The field is forced to upper case. The states are stored in the resource bundle as |AL|AZ|... You can change or add to the states by changing this list.  
·IP Number - This is formatted using a regular expression that makes surethat there are four numbers, each between 0 and 255.  
·Email Address - This is formatted with a regular expression. It is not checked until the user tries to save the data.  
·Money - this formatter is not finished.  
·RadioButton - this option is used when the developer wishes to save data in a char field and have the user pick one of a limited number of options. The options are stored in the Codes Bank and read in when the application is generated. The Codes Bank contains fields for the prompt - what the user sees - and the data base code that is stored in the SQL database if the corresponding radio button is pressed. The Gender field in the userlogdata demo is an example of this option.  
·CheckBox - when a column stores a simple Y/N or T/F in a char column, this option allows the developer to present the column to the user as a checkbox. The letters to be stored in the SQL database are placed in the Codes Bank. There is an example of a Y/N column called parttime in the userlogdata demo. The Codes Bank contains "Y" if checked and "N" if not checked.  
·ComboBox - when there are several options the user can select from a combobox, this option allows the developer to place those options in the Codes Bank. JGuiGen will compile these into the application as an array and fill the combobox on the screen. The "Department" column in userlogdata is an example of this option. Again the Codes Bank contain the prompts that the user sees and the corresponding value to be saved in the SQL table when an option is chosen.  
·Editable ComboBox - When this option is chosen, the data saved in the SQL database must be the same as the prompt the user sees.  
·Integer with Positive and Negative Values - when the column type for a column is integer you will be asked to indicate if negative values are allowed. All characters except 0-9 and "-" are rejected. The "-" can be changed for different international locales.  
·Integer with Positive Only - If you choose this option a negative sign will be rejected when the user tries to enter it.  
·All Capitals - this option forces a field to uppercase by placing all of the lowercase letters to be excluded into the resource bundle file. This allows you to have a field which contains spaces and punctuation, but no lowercase letters.  
·All Lowercase - this option is the reverse of the previous one.  
·Two Decidmal number - when the user should enter a number and have two decimals saved, this is the mask to use.  
·Three Decimal number - when the user should enter a number and have three decimals saved, this is the mask to use.  
·Other Decimal number - not finished  
·JSpinner - work in progress  
·Generic Format Mask - a JFormatted Text field with a Format Mask that you provide.  
·Generic RegEx - A JformattedTextField with a Regular Expression that you provide.  
·URL with Browse Button - This option generates a text field with a button beside it marked "View". Clicking on the button lauches a web browser and views the URL in the text field.  
·Doc Path with Word Proc Button - This is similar to the URL with a Browse button. It causes a word processor to open the document in the text field.  
·JList - Multiple Select Combobox - This option assumes that several different columns in the SQL table are to be selected via one multiple select combobox. You mark one of the Columns with this option (leave the other blank) and mark all of them as "Part of a JList" in the Editable column above.  
·Date only (from DateTime) - some databases (like MS Access and SQL Server) store all date and time fields in a timestamp column. Use this option to tell JGuiGen that you only want the Date portion of the field to be displayed or edited.  
·Time only (from DateTime) - this is the same as the previous mask, except it only displays or edits the Time portion.  

7. Border the Field - stands for Titled Border. This option will place a border around the component and put the value in the "Report header" field in the title of this border. This can be used to put Given Name, Middle Name and Family Name on one line and indicate which JTextField should be filled with the Family Name and which should contain the Given Name. The standard order for these fields varies from country to country.

8. Codes Bank Code - Several of the masks listed above (checkbox, combobox, JList, and radio button) require additional information before JGuiGen can properly generate the code for the component. This data is placed in the Codes Bank table associated with this application. Indicate the word here that should be used as the code to be used to mark these records in the Codes Bank Table. See the discussion of the field "parttime" above in the checkbox mask discussion. Another example is the radio button in userlogdata. The Codes Bank code of "Gender" is used to extract the columns needed for the radio button. There are three rows - one for male, one for female, and one for Unknown.

8. Required Column - If this is checked, JGuiGen will make sure the component generated to edit this column has data in it before a row is saved.

10.Encrypt - when this is finished you will be able to indicate columns that should be saved in you database in encrypted form.  

11. Validation Type - This is a combo box with five options A) None (not exactly true -required field and length of columns, positive/negative integers are enforced) B) Min - Max Range, C) Length of Response D) Against Pattern, and E) Against RegEx. The minimum and maximum option is active for character and numeric fields. The others are not currently finished.

·OverRide- If a validation is chosen and the Over Ride checkbox is checked, the user will be notified that the value they have entered is outside of the "suggested" range. They will be allowed to override this suggestion and save their data with the "bad" value. If the Over Ride checkbox is not checked then the validation will concider the bad data an error and will not allow it to be saved into the table in your database. You can use this to help catch errors. For example, most people the date they are hired into a company would be close to the current date. A date two years ago is almost certainly an typographical error. However, in rare situations you might need to enter a date two years ago to correct problems in your table or to re-enter accidentally deleted data. In this case you would want the user to be able to override the limits.  

·Minimum Value - This is used if the "Min - Max Range" option is chosen under validations.  

·Maximum Value - This is used if the "Min - Max Range" option is chosen under validations.  

12. Primary key - check this box for the column that is the primary key for the table.

13. Mergecode and mergeable are used for the mail merge application which is under development.

14. In Which Tab - shows three radio buttons that let you indicate which tab this columns should be displayed in (if you chose to create a Tabbed Pane in the Table Description options.)

15. Notes - JGuigen automatically fills in some notes here. You can manually enter notes that describe things that programmers should know about how a field is used in applications.

Elements at the bottom of the Column Edit Screen

1. The Scrolling table of Columns -
click on a row and you will edit the information about that row.

Once you have filled in these values click on the SAVE button.

If you attempt to generate the JGuiGen code without filling in this data for all the columns, JGuiGen will generate a warning. Since this data is used (at the very least) for ToolTips, the application will be incomplete if it is generated before the data is entered. The HTML output generated by the CREATE DATA DICT option will list all columns that do not have the "Description" field filled in.