[Nextobjects-devel] nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects A
Status: Alpha
Brought to you by:
eflorent
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv1111/src/org/devaki/nextobjects/ui/workspace/models/objects Modified Files: AssociationEdit.java ConstraintEdit.java DataDictionaryEdit.java EntityEdit.java TableEdit.java Log Message: checkstyle Index: AssociationEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/AssociationEdit.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AssociationEdit.java 8 Jun 2003 09:45:16 -0000 1.7 --- AssociationEdit.java 9 Jun 2003 17:43:11 -0000 1.8 *************** *** 971,975 **** this.jTextFieldAlias.setText(this.myAssociation.getAlias()); this.jTextAreaDescription.setText(this.myAssociation.getDescription()); ! this.dataDict.model.setData(this.myAssociation.getData()); this.jTextAreaNotes.setText(this.myAssociation.getNotes()); this.jCheckBoxGenerateSQL.setSelected(!this.myAssociation.getSkipSql()); --- 971,975 ---- this.jTextFieldAlias.setText(this.myAssociation.getAlias()); this.jTextAreaDescription.setText(this.myAssociation.getDescription()); ! this.dataDict.model.setColumns(this.myAssociation.getData()); this.jTextAreaNotes.setText(this.myAssociation.getNotes()); this.jCheckBoxGenerateSQL.setSelected(!this.myAssociation.getSkipSql()); *************** *** 1014,1018 **** this.myAssociation.setAlias(this.jTextFieldAlias.getText()); this.myAssociation.setDescription(this.jTextAreaDescription.getText()); ! this.myAssociation.setData(this.dataDict.model.getData()); this.myAssociation.setNotes(this.jTextAreaNotes.getText()); this.myAssociation.setSkipSql(!this.jCheckBoxGenerateSQL.isSelected()); --- 1014,1018 ---- this.myAssociation.setAlias(this.jTextFieldAlias.getText()); this.myAssociation.setDescription(this.jTextAreaDescription.getText()); ! this.myAssociation.setData(this.dataDict.model.getColumns()); this.myAssociation.setNotes(this.jTextAreaNotes.getText()); this.myAssociation.setSkipSql(!this.jCheckBoxGenerateSQL.isSelected()); Index: ConstraintEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/ConstraintEdit.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConstraintEdit.java 24 May 2003 18:50:47 -0000 1.4 --- ConstraintEdit.java 9 Jun 2003 17:43:11 -0000 1.5 *************** *** 47,342 **** import org.devaki.nextobjects.workspace.models.columns.Column; public class ConstraintEdit extends JDialog { - /** Variables **/ - // Local reference of the edited object - private Constraint myConstraint; ! /** Components **/ ! // Labels ! private JLabel jLabelName = new JLabel("Name"); ! private JLabel jLabelDescription = new JLabel("Description"); ! private JLabel jLabelParent = new JLabel("Primary Key"); ! private JLabel jLabelChild = new JLabel("Foreign Key"); ! // Text Fields ! private CustomTextField jTextFieldName = new CustomTextField("", ! "Name of the constraint in the schema", ! true); ! private CustomTextArea jTextAreaDescription = new CustomTextArea("", ! "Description of the contraint", ! true, ! true); ! private CustomTextArea jTextAreaNotes = new CustomTextArea("", ! "Notes about the constraint", ! true, ! true); ! // Buttons ! private CustomButton jButtonOK = new CustomButton("OK", "", true, false); ! private CustomButton jButtonCancel = new CustomButton("Cancel", "", true, ! false); ! // Combo Box ! private CustomComboBox jComboBoxParent ! = new CustomComboBox("Change Primary Key", ! true); ! private CustomComboBox jComboBoxChild ! = new CustomComboBox("Change Foreign Key", ! true); ! // Panels ! private JTabbedPane jTabbedPane = new JTabbedPane(SwingConstants.TOP); ! private JPanel jPanelGeneral = new JPanel(new GridBagLayout()); ! private JPanel jPanelGeneralProperties = new JPanel(new GridBagLayout()); ! private JPanel jPanelGeneralConstraint = new JPanel(new GridBagLayout()); ! private JPanel jPanelNotes = new JPanel(new GridBagLayout()); ! /** ! * Construct a new 'ConstraintEdit' object ! */ ! public ConstraintEdit() ! { ! super(NextObjects.getReference()); ! /** Initialization **/ ! // Define the size of the window ! this.setSize(new Dimension(457, 500)); ! // Center the window ! this.setLocationRelativeTo(null); ! // Specify that the window is modal ! this.setModal(true); ! // Specify that the window is not resizable ! this.setResizable(false); ! // Define what to do when closing this window ! this.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); ! /** Components properties **/ ! // Panels ! this.getContentPane().setLayout(new GridBagLayout()); ! this.jPanelGeneralProperties.setBorder(BorderFactory ! .createTitledBorder("Properties")); ! this.jPanelGeneralConstraint.setBorder(BorderFactory ! .createTitledBorder("Constraint")); ! /** Listeners **/ ! // ACTION ! this.jButtonOK.addActionListener(new ActionListener() ! { ! public void actionPerformed(ActionEvent e) ! { ! closingWindow(true); ! } ! }); ! this.jButtonCancel.addActionListener(new ActionListener() ! { ! public void actionPerformed(ActionEvent e) ! { ! closingWindow(false); ! } ! }); ! // FOCUS ! this.jTextFieldName.addFocusListener(new FocusAdapter() ! { ! // Select the content of 'jTextFieldName' when it gained focus ! public void focusGained(FocusEvent e) ! { ! jTextFieldName.selectAll(); ! } ! }); ! // DOCUMENT ! this.jTextFieldName.getDocument().addDocumentListener(new DocumentListener() ! { ! // Not implemented ! public void changedUpdate(DocumentEvent e) ! {} ! // When inserting text, call 'enablingOKButton' ! public void insertUpdate(DocumentEvent e) ! { ! enablingOKButton(); ! } ! // When removing text, call 'enablingOKButton' ! public void removeUpdate(DocumentEvent e) ! { ! enablingOKButton(); ! } ! }); ! /** Assembling components **/ ! // 'jPanelGeneralProperties' ! this.jPanelGeneralProperties.add(this.jLabelName, ! new GridBagConstraints(0, 0, 1, 1, 0.0, ! 0.0, ! GridBagConstraints.WEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 0, 5), 0, 0)); ! this.jPanelGeneralProperties.add(this.jTextFieldName, ! new GridBagConstraints(1, 0, 1, 1, 0.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(5, 0, 0, 5), 0, 0)); ! this.jPanelGeneralProperties.add(this.jLabelDescription, ! new GridBagConstraints(0, 1, 1, 1, 0.0, ! 0.0, ! GridBagConstraints.NORTHWEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 0, 5), 0, 0)); ! this.jPanelGeneralProperties.add(new JScrollPane(this.jTextAreaDescription), ! new GridBagConstraints(1, 1, 1, 1, 1.0, ! 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 0, 5, 5), 0, 0)); ! // 'jPanelGeneralConstraint' ! this.jPanelGeneralConstraint.add(this.jLabelParent, ! new GridBagConstraints(0, 0, 1, 1, 0.0, ! 0.0, ! GridBagConstraints.WEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 0, 5), 0, 0)); ! this.jPanelGeneralConstraint.add(this.jComboBoxParent, ! new GridBagConstraints(1, 0, 1, 1, 1.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(5, 0, 0, 5), 0, 0)); ! this.jPanelGeneralConstraint.add(this.jLabelChild, ! new GridBagConstraints(0, 1, 1, 1, 0.0, ! 0.0, ! GridBagConstraints.WEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 5, 5), 0, 0)); ! this.jPanelGeneralConstraint.add(this.jComboBoxChild, ! new GridBagConstraints(1, 1, 1, 1, 1.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(5, 0, 5, 5), 0, 0)); ! // 'jPanelGeneral' ! this.jPanelGeneral.add(this.jPanelGeneralProperties, ! new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 0, 5), 0, 0)); ! this.jPanelGeneral.add(this.jPanelGeneralConstraint, ! new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 5, 5), 0, 0)); ! // 'jPanelNotes' ! this.jPanelNotes.add(new JScrollPane(this.jTextAreaNotes), ! new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 5, 5), 0, 0)); ! // 'jTabbedPane' ! this.jTabbedPane.add(this.jPanelGeneral, "General"); ! this.jTabbedPane.add(this.jPanelNotes, "Notes"); ! // Content Panel ! this.getContentPane().add(this.jTabbedPane, ! new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0, ! GridBagConstraints.NORTH, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 0, 5), 0, 0)); ! this.getContentPane().add(this.jButtonOK, ! new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, ! GridBagConstraints.EAST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 5, 5), 0, 0)); ! this.getContentPane().add(this.jButtonCancel, ! new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.NONE, ! new Insets(5, 0, 5, 5), 0, 0)); ! } ! /** ! * What to do before closing the window ! * @param isOK ! */ ! private void closingWindow(boolean isOK) ! { ! // Save data if this method follows an action on 'jButtonOK' ! if(isOK) ! { ! this.saveData(); ! } ! // Dispose window (unallocate resources) - show() must be call to set the ! // window visible again ! this.dispose(); ! } ! /** ! * Enable or disable the 'OK' button depending on the length of ! * 'jTextFieldName' ! */ ! private void enablingOKButton() ! { ! if(this.jTextFieldName.getText().length() != 0) ! { ! // Both text fields length are different from zero, so enable 'jButtonOK' ! this.jButtonOK.setEnabled(true); ! } ! // One or both text fields length are equal to zero, so diable 'jButtonOK' ! else ! { ! this.jButtonOK.setEnabled(false); ! } ! } ! /** ! * Get the informations from the selected constraint ! * @param pConstraint ! */ ! public void setData(Constraint pConstraint) ! { ! // Define title of the window ! this.setTitle(new StringBuffer() ! .append("Properties of '") ! .append(pConstraint.getName()) ! .append("' - nextObjects") ! .toString()); ! // Initialize the local 'Constraint' object ! // with the 'Constraint' object to edit ! this.myConstraint = pConstraint; ! // Initialize components values ! this.jTextFieldName.setText(this.myConstraint.getName()); ! this.jComboBoxParent.setData(((Table)myConstraint.getParentClass()). ! getPrimaryKeys()); ! this.jComboBoxParent.setSelectedItem(this.myConstraint.getUniqueField()); ! this.jComboBoxChild.setData(((Table)myConstraint.getChildClass()).getData()); ! this.jComboBoxChild.setSelectedItem(this.myConstraint.getAnyField()); ! // Set 'jButtonOK' as the default button ! this.getRootPane().setDefaultButton(this.jButtonOK); ! // Make the window visible ! this.show(); ! } ! /** ! * Set the informations to the selected constraint ! */ ! private void saveData() ! { ! this.myConstraint.setName(this.jTextFieldName.getText()); ! this.myConstraint.setDescription(this.jTextAreaDescription.getText()); ! this.myConstraint.setNotes(this.jTextAreaNotes.getText()); ! this.myConstraint.setUniqueField((Column)this.jComboBoxParent ! .getSelectedItem()); ! this.myConstraint.setAnyField((Column)this.jComboBoxChild.getSelectedItem()); ! } } --- 47,523 ---- import org.devaki.nextobjects.workspace.models.columns.Column; + + /** + * This class is responsible for editing a constraint + * @author eflorent & Laurent Thevenet + * + */ public class ConstraintEdit extends JDialog { ! /** ! * The context constraint ! */ ! private Constraint myConstraint; ! /** ! * the label to introduce the name ! */ ! private JLabel jLabelName = new JLabel("Name"); ! /** ! * The label to introduce the description ! */ ! private JLabel jLabelDescription = new JLabel("Description"); ! /** ! * The label to intrroduce primary key ! */ ! private JLabel jLabelParent = new JLabel("Primary Key"); ! /** ! * The label to introduce the foreign key ! */ ! private JLabel jLabelChild = new JLabel("Foreign Key"); ! /** ! * The textfield for setting an human readable name ! */ ! private CustomTextField jTextFieldName = ! new CustomTextField("", "Name of the constraint in the schema", true); ! /** ! * The textarea for setting a description ! */ ! private CustomTextArea jTextAreaDescription = ! new CustomTextArea("", "Description of the contraint", true, true); ! /** ! * The textarea for setting notes ! */ ! private CustomTextArea jTextAreaNotes = ! new CustomTextArea("", "Notes about the constraint", true, true); ! /** ! * The OK button ! */ ! private CustomButton jButtonOK = new CustomButton("OK", "", true, false); ! /** ! * The cancel button ! */ ! private CustomButton jButtonCancel = ! new CustomButton("Cancel", "", true, false); ! /** ! * Combobox for setting the primary key ! */ ! private CustomComboBox jComboBoxParent = ! new CustomComboBox("Change Primary Key", true); ! /** ! * Combobox for setting the foreign key ! */ ! private CustomComboBox jComboBoxChild = ! new CustomComboBox("Change Foreign Key", true); ! /** ! * The main tabbed pane ! */ ! private JTabbedPane jTabbedPane = new JTabbedPane(SwingConstants.TOP); ! /** ! * The general panel ! */ ! private JPanel jPanelGeneral = new JPanel(new GridBagLayout()); ! /** ! * The properties panel ! */ ! private JPanel jPanelGeneralProperties = new JPanel(new GridBagLayout()); ! /** ! * The constraint panel ! */ ! private JPanel jPanelGeneralConstraint = new JPanel(new GridBagLayout()); ! /** ! * The notes panel ! */ ! private JPanel jPanelNotes = new JPanel(new GridBagLayout()); ! /** ! * Construct a new 'ConstraintEdit' object ! */ ! public ConstraintEdit() ! { ! super(NextObjects.getReference()); ! /** Initialization **/ ! // Define the size of the window ! this.setSize(new Dimension(457, 500)); ! // Center the window ! this.setLocationRelativeTo(null); ! // Specify that the window is modal ! this.setModal(true); ! // Specify that the window is not resizable ! this.setResizable(false); ! // Define what to do when closing this window ! this.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); ! /** Components properties **/ ! // Panels ! this.getContentPane().setLayout(new GridBagLayout()); ! this.jPanelGeneralProperties.setBorder( ! BorderFactory.createTitledBorder("Properties")); ! this.jPanelGeneralConstraint.setBorder( ! BorderFactory.createTitledBorder("Constraint")); ! /** Listeners **/ ! // ACTION ! this.jButtonOK.addActionListener(new ActionListener() ! { ! public void actionPerformed(ActionEvent e) ! { ! closingWindow(true); ! } ! }); ! this.jButtonCancel.addActionListener(new ActionListener() ! { ! public void actionPerformed(ActionEvent e) ! { ! closingWindow(false); ! } ! }); ! // FOCUS ! this.jTextFieldName.addFocusListener(new FocusAdapter() ! { ! // Select the content of 'jTextFieldName' when it gained focus ! public void focusGained(FocusEvent e) ! { ! jTextFieldName.selectAll(); ! } ! }); ! // DOCUMENT ! this ! .jTextFieldName ! .getDocument() ! .addDocumentListener(new DocumentListener() ! { ! // Not implemented ! public void changedUpdate(DocumentEvent e) ! { ! } ! // When inserting text, call 'enablingOKButton' ! public void insertUpdate(DocumentEvent e) ! { ! enablingOKButton(); ! } ! // When removing text, call 'enablingOKButton' ! public void removeUpdate(DocumentEvent e) ! { ! enablingOKButton(); ! } ! }); ! /** Assembling components **/ ! // 'jPanelGeneralProperties' ! this.jPanelGeneralProperties.add( ! this.jLabelName, ! new GridBagConstraints( ! 0, ! 0, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.WEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 0, 5), ! 0, ! 0)); ! this.jPanelGeneralProperties.add( ! this.jTextFieldName, ! new GridBagConstraints( ! 1, ! 0, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(5, 0, 0, 5), ! 0, ! 0)); ! this.jPanelGeneralProperties.add( ! this.jLabelDescription, ! new GridBagConstraints( ! 0, ! 1, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.NORTHWEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 0, 5), ! 0, ! 0)); ! this.jPanelGeneralProperties.add( ! new JScrollPane(this.jTextAreaDescription), ! new GridBagConstraints( ! 1, ! 1, ! 1, ! 1, ! 1.0, ! 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 0, 5, 5), ! 0, ! 0)); ! ! // 'jPanelGeneralConstraint' ! this.jPanelGeneralConstraint.add( ! this.jLabelParent, ! new GridBagConstraints( ! 0, ! 0, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.WEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 0, 5), ! 0, ! 0)); ! this.jPanelGeneralConstraint.add( ! this.jComboBoxParent, ! new GridBagConstraints( ! 1, ! 0, ! 1, ! 1, ! 1.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(5, 0, 0, 5), ! 0, ! 0)); ! this.jPanelGeneralConstraint.add( ! this.jLabelChild, ! new GridBagConstraints( ! 0, ! 1, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.WEST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 5, 5), ! 0, ! 0)); ! this.jPanelGeneralConstraint.add( ! this.jComboBoxChild, ! new GridBagConstraints( ! 1, ! 1, ! 1, ! 1, ! 1.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(5, 0, 5, 5), ! 0, ! 0)); ! ! // 'jPanelGeneral' ! this.jPanelGeneral.add( ! this.jPanelGeneralProperties, ! new GridBagConstraints( ! 0, ! 0, ! 1, ! 1, ! 1.0, ! 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 0, 5), ! 0, ! 0)); ! this.jPanelGeneral.add( ! this.jPanelGeneralConstraint, ! new GridBagConstraints( ! 0, ! 1, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 5, 5), ! 0, ! 0)); ! ! // 'jPanelNotes' ! this.jPanelNotes.add( ! new JScrollPane(this.jTextAreaNotes), ! new GridBagConstraints( ! 0, ! 0, ! 1, ! 1, ! 1.0, ! 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 5, 5), ! 0, ! 0)); ! ! // 'jTabbedPane' ! this.jTabbedPane.add(this.jPanelGeneral, "General"); ! this.jTabbedPane.add(this.jPanelNotes, "Notes"); ! ! // Content Panel ! this.getContentPane().add( ! this.jTabbedPane, ! new GridBagConstraints( ! 0, ! 0, ! 2, ! 1, ! 1.0, ! 1.0, ! GridBagConstraints.NORTH, ! GridBagConstraints.BOTH, ! new Insets(5, 5, 0, 5), ! 0, ! 0)); ! this.getContentPane().add( ! this.jButtonOK, ! new GridBagConstraints( ! 0, ! 1, ! 1, ! 1, ! 1.0, ! 0.0, ! GridBagConstraints.EAST, ! GridBagConstraints.NONE, ! new Insets(5, 5, 5, 5), ! 0, ! 0)); ! this.getContentPane().add( ! this.jButtonCancel, ! new GridBagConstraints( ! 1, ! 1, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.NONE, ! new Insets(5, 0, 5, 5), ! 0, ! 0)); ! } ! ! /** ! * What to do before closing the window ! * @param isOK save it ! */ ! private void closingWindow(boolean isOK) ! { ! // Save data if this method follows an action on 'jButtonOK' ! if (isOK) ! { ! this.saveData(); ! } ! // Dispose window (unallocate resources) - show() must be call to set the ! // window visible again ! this.dispose(); ! } ! ! /** ! * Enable or disable the 'OK' button depending on the length of ! * 'jTextFieldName' ! */ ! private void enablingOKButton() ! { ! if (this.jTextFieldName.getText().length() != 0) ! { ! // Both text fields length are different from zero, so enable 'jButtonOK' ! this.jButtonOK.setEnabled(true); ! } ! // One or both text fields length are equal to zero, so diable 'jButtonOK' ! else ! { ! this.jButtonOK.setEnabled(false); ! } ! } ! ! /** ! * Get the informations from the selected constraint ! * @param pConstraint the context constraint ! */ ! public void setData(Constraint pConstraint) ! { ! // Define title of the window ! this.setTitle( ! new StringBuffer() ! .append("Properties of '") ! .append(pConstraint.getName()) ! .append("' - nextObjects") ! .toString()); ! ! // Initialize the local 'Constraint' object ! // with the 'Constraint' object to edit ! this.myConstraint = pConstraint; ! ! // Initialize components values ! this.jTextFieldName.setText(this.myConstraint.getName()); ! this.jComboBoxParent.setData( ! ((Table) myConstraint.getParentClass()).getPrimaryKeys()); ! this.jComboBoxParent.setSelectedItem( ! this.myConstraint.getUniqueField()); ! this.jComboBoxChild.setData( ! ((Table) myConstraint.getChildClass()).getData()); ! this.jComboBoxChild.setSelectedItem(this.myConstraint.getAnyField()); ! ! // Set 'jButtonOK' as the default button ! this.getRootPane().setDefaultButton(this.jButtonOK); ! ! // Make the window visible ! this.show(); ! } ! ! /** ! * Set the informations to the selected constraint ! */ ! private void saveData() ! { ! this.myConstraint.setName(this.jTextFieldName.getText()); ! this.myConstraint.setDescription(this.jTextAreaDescription.getText()); ! this.myConstraint.setNotes(this.jTextAreaNotes.getText()); ! this.myConstraint.setUniqueField( ! (Column) this.jComboBoxParent.getSelectedItem()); ! this.myConstraint.setAnyField( ! (Column) this.jComboBoxChild.getSelectedItem()); ! } } Index: DataDictionaryEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/DataDictionaryEdit.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DataDictionaryEdit.java 25 May 2003 20:21:10 -0000 1.3 --- DataDictionaryEdit.java 9 Jun 2003 17:43:11 -0000 1.4 *************** *** 35,825 **** ! public class DataDictionaryEdit extends JPanel { ! ! // Selected row in the jTable ! private int selectedRow = -1; ! private CustomComboBox jComboBoxType = new CustomComboBox(NOTools. ! TORQUE_TYPES, ! -1, [...1704 lines suppressed...] + * @param table table + * @param value value + * @param isSelected is selected + * @param row row + * @param column column + * @return the component + */ + public Component getTableCellEditorComponent( + JTable table, + Object value, + boolean isSelected, + int row, + int column) + { + ((CodeRenderer) this.editorComponent).setText(value.toString()); + return this.editorComponent; + } + } // End of class 'CodeEditor' } Index: EntityEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/EntityEdit.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EntityEdit.java 24 May 2003 18:50:47 -0000 1.7 --- EntityEdit.java 9 Jun 2003 17:43:11 -0000 1.8 *************** *** 578,582 **** this.jTextFieldAlias.setText(this.myEntity.getAlias()); this.jTextAreaDescription.setText(this.myEntity.getDescription()); ! this.dataDict.model.setData(this.myEntity.getData()); this.jTextAreaNotes.setText(this.myEntity.getNotes()); this.jCheckBoxGenerateSQL.setSelected(!this.myEntity.getSkipSql()); --- 578,582 ---- this.jTextFieldAlias.setText(this.myEntity.getAlias()); this.jTextAreaDescription.setText(this.myEntity.getDescription()); ! this.dataDict.model.setColumns(this.myEntity.getData()); this.jTextAreaNotes.setText(this.myEntity.getNotes()); this.jCheckBoxGenerateSQL.setSelected(!this.myEntity.getSkipSql()); *************** *** 619,623 **** this.myEntity.setAlias(this.jTextFieldAlias.getText()); this.myEntity.setDescription(this.jTextAreaDescription.getText()); ! this.myEntity.setData(this.dataDict.model.getData()); this.myEntity.setNotes(this.jTextAreaNotes.getText()); this.myEntity.setSkipSql(!this.jCheckBoxGenerateSQL.isSelected()); --- 619,623 ---- this.myEntity.setAlias(this.jTextFieldAlias.getText()); this.myEntity.setDescription(this.jTextAreaDescription.getText()); ! this.myEntity.setData(this.dataDict.model.getColumns()); this.myEntity.setNotes(this.jTextAreaNotes.getText()); this.myEntity.setSkipSql(!this.jCheckBoxGenerateSQL.isSelected()); Index: TableEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/TableEdit.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TableEdit.java 5 Apr 2003 10:34:24 -0000 1.5 --- TableEdit.java 9 Jun 2003 17:43:11 -0000 1.6 *************** *** 569,573 **** this.jTextFieldAlias.setText(this.myTable.getAlias()); this.jTextAreaDescription.setText(this.myTable.getDescription()); ! this.dataDict.model.setData(this.myTable.getData()); this.jTextAreaNotes.setText(this.myTable.getNotes()); this.jCheckBoxGenerateSQL.setSelected(!this.myTable.getSkipSql()); --- 569,573 ---- this.jTextFieldAlias.setText(this.myTable.getAlias()); this.jTextAreaDescription.setText(this.myTable.getDescription()); ! this.dataDict.model.setColumns(this.myTable.getData()); this.jTextAreaNotes.setText(this.myTable.getNotes()); this.jCheckBoxGenerateSQL.setSelected(!this.myTable.getSkipSql()); *************** *** 607,611 **** this.myTable.setCode(this.jTextFieldCode.getText()); this.myTable.setAlias(this.jTextFieldAlias.getText()); ! this.myTable.setData(this.dataDict.model.getData()); this.myTable.setNotes(this.jTextAreaNotes.getText()); this.myTable.setSkipSql(!this.jCheckBoxGenerateSQL.isSelected()); --- 607,611 ---- this.myTable.setCode(this.jTextFieldCode.getText()); this.myTable.setAlias(this.jTextFieldAlias.getText()); ! this.myTable.setData(this.dataDict.model.getColumns()); this.myTable.setNotes(this.jTextAreaNotes.getText()); this.myTable.setSkipSql(!this.jCheckBoxGenerateSQL.isSelected()); |