nextobjects-devel Mailing List for devaki-nextobjects
Status: Alpha
Brought to you by:
eflorent
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(41) |
Jun
(41) |
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <gre...@us...> - 2003-07-10 21:31:10
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv21466/nextobjects Modified Files: compile.bat Log Message: Correction de ant-1.5.1 en 1.5.2 Index: compile.bat =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/compile.bat,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** compile.bat 2 Jan 2003 15:20:10 -0000 1.1.1.1 --- compile.bat 10 Jul 2003 21:31:07 -0000 1.2 *************** *** 1,80 **** ! @echo off ! ! rem ! rem Copyright (c) 2002-2005. Emmanuel Florent. All rights reserved. ! rem ! rem This software is published under the GPL GNU General Public License. ! rem This program is free software; you can redistribute it and\or ! rem modify it under the terms of the GNU General Public License ! rem as published by the Free Software Foundation; either version 2 ! rem of the License, or (at your option) any later version. ! rem ! rem This program is distributed in the hope that it will be useful, ! rem but WITHOUT ANY WARRANTY; without even the implied warranty of ! rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! rem GNU General Public License for more details. ! rem ! rem You should have received a copy of the GNU General Public License ! rem along with this program; if not, write to the Free Software ! rem Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! rem ! rem http:\\www.devaki.org ! rem http:\\efl...@de... ! rem ! rem This file can be used to easily build the specified project. ! rem The project's directory must contain a "build.xml" file. ! rem The building is done by the "Ant" tool of the "Jakarta" tool suite. ! @echo off ! rem build.bat: Build devaki-nextobjects using Ant ! rem Usage: build [ant-options] [targets] ! rem Setup: ! rem - you should set JAVA_HOME ! rem - you can set ANT_HOME if you use your own Ant install ! rem - JAVA_OPTS is added to the java command line ! echo. ! echo devaki-nextobjects Build ! echo ------------- ! ! if not "%JAVA_HOME%" == "" goto setant ! :noJavaHome ! rem Default command used to call java.exe; hopefully it's on the path here ! if "%_JAVACMD%" == "" set _JAVACMD=java ! echo. ! echo Warning: JAVA_HOME environment variable is not set. ! echo If build fails because sun.* classes could not be found ! echo you will need to set the JAVA_HOME environment variable ! echo to the installation directory of java. ! echo. ! ! :setant ! rem Default command used to call java.exe or equivalent ! if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java ! ! rem Default _ANT_HOME ! set _ANT_HOME=%ANT_HOME% ! if "%_ANT_HOME%" == "" set _ANT_HOME=. ! ! rem Default locations of jars we depend on to run Ant on our build.xml file ! rem Set our local vars to all start with _underscore ! set _ANT_JAR=%ANT_JAR% ! if "%_ANT_JAR%" == "" set _ANT_JAR=lib\ant-1.5.1.jar ! ! rem Attempt to automatically add system classes to _CLASSPATH ! rem Use _underscore prefix to not conflict with user's settings ! set _CLASSPATH=%CLASSPATH% ! if exist "%JAVA_HOME%\lib\tools.jar" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar ! if exist "%JAVA_HOME%\lib\classes.zip" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\classes.zip ! set _CLASSPATH=%_ANT_JAR%;%_PARSER_JAR%;%_CLASSPATH% ! ! echo "%_JAVACMD%" %JAVA_OPTS% -Dant.home="%ANT_HOME%" -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 ! "%_JAVACMD%" %JAVA_OPTS% -Dant.home="%ANT_HOME%" -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 ! ! goto end ! ! :end ! rem Cleanup environment variables ! set _JAVACMD= ! set _CLASSPATH= ! set _ANT_HOME= ! set _ANT_JAR= ! set _PARSER_JAR= --- 1,160 ---- ! @echo off ! ! ! ! rem ! ! rem Copyright (c) 2002-2005. Emmanuel Florent. All rights reserved. ! ! rem ! ! rem This software is published under the GPL GNU General Public License. ! ! rem This program is free software; you can redistribute it and\or ! ! rem modify it under the terms of the GNU General Public License ! ! rem as published by the Free Software Foundation; either version 2 ! ! rem of the License, or (at your option) any later version. ! ! rem ! ! rem This program is distributed in the hope that it will be useful, ! ! rem but WITHOUT ANY WARRANTY; without even the implied warranty of ! ! rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! ! rem GNU General Public License for more details. ! ! rem ! ! rem You should have received a copy of the GNU General Public License ! ! rem along with this program; if not, write to the Free Software ! ! rem Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! rem ! ! rem http:\\www.devaki.org ! ! rem http:\\efl...@de... ! ! rem ! ! rem This file can be used to easily build the specified project. ! ! rem The project's directory must contain a "build.xml" file. ! ! rem The building is done by the "Ant" tool of the "Jakarta" tool suite. ! ! @echo off ! ! rem build.bat: Build devaki-nextobjects using Ant ! ! rem Usage: build [ant-options] [targets] ! ! rem Setup: ! ! rem - you should set JAVA_HOME ! ! rem - you can set ANT_HOME if you use your own Ant install ! ! rem - JAVA_OPTS is added to the java command line ! ! echo. ! ! echo devaki-nextobjects Build ! ! echo ------------- ! ! ! ! if not "%JAVA_HOME%" == "" goto setant ! ! :noJavaHome ! ! rem Default command used to call java.exe; hopefully it's on the path here ! ! if "%_JAVACMD%" == "" set _JAVACMD=java ! ! echo. ! ! echo Warning: JAVA_HOME environment variable is not set. ! ! echo If build fails because sun.* classes could not be found ! ! echo you will need to set the JAVA_HOME environment variable ! ! echo to the installation directory of java. ! ! echo. ! ! ! ! :setant ! ! rem Default command used to call java.exe or equivalent ! ! if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java ! ! ! ! rem Default _ANT_HOME ! ! set _ANT_HOME=%ANT_HOME% ! ! if "%_ANT_HOME%" == "" set _ANT_HOME=. ! ! ! ! rem Default locations of jars we depend on to run Ant on our build.xml file ! ! rem Set our local vars to all start with _underscore ! ! set _ANT_JAR=%ANT_JAR% ! ! if "%_ANT_JAR%" == "" set _ANT_JAR=lib\ant-1.5.2.jar ! ! ! ! rem Attempt to automatically add system classes to _CLASSPATH ! ! rem Use _underscore prefix to not conflict with user's settings ! ! set _CLASSPATH=%CLASSPATH% ! ! if exist "%JAVA_HOME%\lib\tools.jar" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar ! ! if exist "%JAVA_HOME%\lib\classes.zip" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\classes.zip ! ! set _CLASSPATH=%_ANT_JAR%;%_PARSER_JAR%;%_CLASSPATH% ! ! ! ! echo "%_JAVACMD%" %JAVA_OPTS% -Dant.home="%ANT_HOME%" -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 ! ! "%_JAVACMD%" %JAVA_OPTS% -Dant.home="%ANT_HOME%" -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 ! ! ! ! goto end ! ! ! ! :end ! ! rem Cleanup environment variables ! ! set _JAVACMD= ! ! set _CLASSPATH= ! ! set _ANT_HOME= ! ! set _ANT_JAR= ! ! set _PARSER_JAR= ! |
From: <efl...@us...> - 2003-07-05 13:58:00
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv11638/src/org/devaki/nextobjects/util Modified Files: NOTools.java TorqueWrapper.java Log Message: Fixed default '' bug Index: NOTools.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOTools.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NOTools.java 5 Jul 2003 12:26:10 -0000 1.14 --- NOTools.java 5 Jul 2003 13:57:57 -0000 1.15 *************** *** 61,65 **** public static boolean useLnf = true; // Torque Version ! public static final String TORQUE_VERSION = "3.0"; // Directory of nextObjects // Please refactory APP_HOME --- 61,65 ---- public static boolean useLnf = true; // Torque Version ! public static final String TORQUE_VERSION = "3.1-alpha1"; // Directory of nextObjects // Please refactory APP_HOME *************** *** 76,80 **** public static final String TORQUE_HOME = new StringBuffer().append(USER_HOME) .append(File.separator) ! .append("torque-") .append(TORQUE_VERSION) .toString(); --- 76,80 ---- public static final String TORQUE_HOME = new StringBuffer().append(USER_HOME) .append(File.separator) ! .append("torque-gen-") .append(TORQUE_VERSION) .toString(); Index: TorqueWrapper.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/TorqueWrapper.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** TorqueWrapper.java 8 Jun 2003 09:28:26 -0000 1.18 --- TorqueWrapper.java 5 Jul 2003 13:57:57 -0000 1.19 *************** *** 543,547 **** public static void writeIdTableSchema() { String xml="<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\" ?>"; ! xml+="<!DOCTYPE database SYSTEM \"http://jakarta.apache.org/turbine/dtd/database.dtd\">"; xml+="<database name=\"" + database.getCode() + "\">"; xml+="<table name=\"ID_TABLE\" idMethod=\"idbroker\">"; --- 543,547 ---- public static void writeIdTableSchema() { String xml="<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\" ?>"; ! xml+="<!DOCTYPE database SYSTEM \"http://jakarta.apache.org/turbine/dtd/database_3_1.dtd\">"; xml+="<database name=\"" + database.getCode() + "\">"; xml+="<table name=\"ID_TABLE\" idMethod=\"idbroker\">"; *************** *** 733,737 **** Document doc = new Document(new Element("database")); doc.setDocType(new DocType("database", ! "http://jakarta.apache.org/turbine/dtd/database.dtd")); Element root=doc.getRootElement(); databaseToXML(root,pDatabase); --- 733,737 ---- Document doc = new Document(new Element("database")); doc.setDocType(new DocType("database", ! "http://jakarta.apache.org/turbine/dtd/database_3_1.dtd")); Element root=doc.getRootElement(); databaseToXML(root,pDatabase); *************** *** 784,788 **** // Object Model if (!pCDM.getDefaultIdMethod().equals("none") ! && pCDM.getDefaultIdMethod()!=null) { //root.setAttribute("defaultIdMethod",pCDM.getDefaultIdMethod()); --- 784,789 ---- // Object Model if (!pCDM.getDefaultIdMethod().equals("none") ! && pCDM.getDefaultIdMethod()!=null ! && !pCDM.getDefaultIdMethod().equals("")) { //root.setAttribute("defaultIdMethod",pCDM.getDefaultIdMethod()); *************** *** 928,932 **** Element tmpElementColumn=new Element("column"); tmpElementColumn.setAttribute("name",pColumn.getCode()); ! if (pColumn.getJavaName()!="") { tmpElementColumn.setAttribute("javaName",pColumn.getCode()); } --- 929,933 ---- Element tmpElementColumn=new Element("column"); tmpElementColumn.setAttribute("name",pColumn.getCode()); ! if (!pColumn.getJavaName().equals("")) { tmpElementColumn.setAttribute("javaName",pColumn.getCode()); } *************** *** 947,956 **** tmpElementColumn.setAttribute("javaType",pColumn.getJavaType()); } ! if (pColumn.getSize()!="") { tmpElementColumn.setAttribute("size",pColumn.getSize()); } ! if (pColumn.getDefaultValue()!="") { tmpElementColumn.setAttribute("default",pColumn.getDefaultValue()); } tmpElementColumn.setAttribute("autoIncrement", --- 948,958 ---- tmpElementColumn.setAttribute("javaType",pColumn.getJavaType()); } ! if (!pColumn.getSize().equals("")) { tmpElementColumn.setAttribute("size",pColumn.getSize()); } ! if (!pColumn.getDefaultValue().equals("")) { tmpElementColumn.setAttribute("default",pColumn.getDefaultValue()); + System.out.println("-"+ pColumn.getDefaultValue() + "-" + pColumn.getDefaultValue().length()); } tmpElementColumn.setAttribute("autoIncrement", *************** *** 960,968 **** tmpElementColumn.setAttribute("inputValidator", pColumn.getInputValidator()); //ni ! if (pColumn.getJavaNamingMethod()=="null") { pColumn.setJavaNamingMethod("nochange"); } ! if (pColumn.getJavaNamingMethod().equals("")) { tmpElementColumn.setAttribute("javaNamingMethod", pColumn.getJavaNamingMethod()); --- 962,971 ---- tmpElementColumn.setAttribute("inputValidator", pColumn.getInputValidator()); //ni ! if (pColumn.getJavaNamingMethod()=="null" ! && !pColumn.getJavaNamingMethod().equals("")) { pColumn.setJavaNamingMethod("nochange"); } ! if (!pColumn.getJavaNamingMethod().equals("")) { tmpElementColumn.setAttribute("javaNamingMethod", pColumn.getJavaNamingMethod()); |
From: <efl...@us...> - 2003-07-05 13:58:00
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv11638 Modified Files: build.properties maven.xml Log Message: Fixed default '' bug Index: build.properties =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/build.properties,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** build.properties 26 May 2003 17:15:53 -0000 1.6 --- build.properties 5 Jul 2003 13:57:57 -0000 1.7 *************** *** 12,16 **** project = nextobjects package = org.devaki.${project} ! torque.version= 3.0 build.dir = ./classes build.dest = ${build.dir}/classes --- 12,16 ---- project = nextobjects package = org.devaki.${project} ! torque.version= 3.1-alpha2 build.dir = ./classes build.dest = ${build.dir}/classes Index: maven.xml =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/maven.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** maven.xml 18 Jun 2003 12:25:41 -0000 1.1 --- maven.xml 5 Jul 2003 13:57:57 -0000 1.2 *************** *** 25,29 **** <!-- copy torque dist to /lib --> ! <copy file="lib/torque-3.0.zip" todir="${maven.dist.bin.assembly.dir}/lib" /> --- 25,29 ---- <!-- copy torque dist to /lib --> ! <copy file="lib/torque-gen-3.1-alpha1.zip" todir="${maven.dist.bin.assembly.dir}/lib" /> |
From: <efl...@us...> - 2003-07-05 13:58:00
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/main In directory sc8-pr-cvs1:/tmp/cvs-serv11638/src/org/devaki/nextobjects/ui/main Modified Files: InitHome.java Log Message: Fixed default '' bug Index: InitHome.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/main/InitHome.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InitHome.java 11 Feb 2003 12:04:42 -0000 1.2 --- InitHome.java 5 Jul 2003 13:57:57 -0000 1.3 *************** *** 150,154 **** .append("lib") .append(File.separator) ! .append("torque-") .append(NOTools.TORQUE_VERSION) .append(".zip") --- 150,154 ---- .append("lib") .append(File.separator) ! .append("torque-gen-") .append(NOTools.TORQUE_VERSION) .append(".zip") *************** *** 165,168 **** --- 165,169 ---- { System.out.println(exc.toString()); + System.exit(1); } } |
From: <efl...@us...> - 2003-07-05 13:55:59
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/lib In directory sc8-pr-cvs1:/tmp/cvs-serv11027 Added Files: torque-gen-3.1-alpha1.zip Removed Files: torque-3.0.zip Log Message: Added Files: torque-gen-3.1-alpha1.zip Removed Files: torque-3.0.zip --- NEW FILE: torque-gen-3.1-alpha1.zip --- (This appears to be a binary file; contents omitted.) --- torque-3.0.zip DELETED --- |
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv974/src/org/devaki/nextobjects/ui/workspace/models/objects Modified Files: AssociationEdit.java DataDictionaryEdit.java EntityEdit.java TableEdit.java Log Message: Fixed 'cancel button' bug (XXXEdit.java). Fixed 'label button' behaviour. Fixed remove field number -1 execption. Fixed bung in intelligent FK creation. Index: AssociationEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/AssociationEdit.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AssociationEdit.java 9 Jun 2003 17:43:11 -0000 1.8 --- AssociationEdit.java 5 Jul 2003 12:26:10 -0000 1.9 *************** *** 453,456 **** --- 453,458 ---- public void actionPerformed(ActionEvent e) { + dataDict.model.resetColumns(); + myAssociation.setData(dataDict.model.getColumns()); closingWindow(false); } Index: DataDictionaryEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/DataDictionaryEdit.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DataDictionaryEdit.java 9 Jun 2003 17:43:11 -0000 1.4 --- DataDictionaryEdit.java 5 Jul 2003 12:26:10 -0000 1.5 *************** *** 412,429 **** } ! /* * Unused: Cancel edition if 'DataDictionaryEdit' was * edited in its previous call ! * public void cancelCellEditing() { ! if(this.jTableField.isEditing()) { ! int tmpInt1 = this.jTableField.getEditingRow(); ! int tmpInt2 = this.jTableField.getEditingColumn(); ! this.jTableField.getCellEditor(tmpInt1, tmpInt2).cancelCellEditing(); } } ! */ /** --- 412,429 ---- } ! /** * Unused: Cancel edition if 'DataDictionaryEdit' was * edited in its previous call ! */ public void cancelCellEditing() { ! if(this.jTableColumns.isEditing()) { ! int tmpInt1 = this.jTableColumns.getEditingRow(); ! int tmpInt2 = this.jTableColumns.getEditingColumn(); ! this.jTableColumns.getCellEditor(tmpInt1, tmpInt2).cancelCellEditing(); } } ! /** *************** *** 450,453 **** --- 450,455 ---- public class ObjectColumnsTableModel extends AbstractTableModel { + /** The data stored to be restored with cancel button */ + private Vector oldData=new Vector(); /** * The column name *************** *** 522,525 **** --- 524,535 ---- return this.columns; } + /** + * Reset the TableModel to its old values + */ + public void resetColumns() + { + cancelCellEditing(); + this.columns = new Vector(oldData); + } /** *************** *** 529,532 **** --- 539,549 ---- public void setColumns(Vector pData) { + // store the old data + oldData.removeAllElements(); + for (int i=0;i<pData.size();i++) + { + oldData.addElement(new Column((Column)pData.elementAt(i))); + } + //fix the new data. this.columns = new Vector(pData); } *************** *** 563,570 **** public void removeField(int i) { ! this.columns.removeElementAt(i); ! this.fireTableRowsDeleted( ! this.columns.size() - 1, ! this.columns.size() - 1); } --- 580,590 ---- public void removeField(int i) { ! if (i >= 0 && i < columns.size()) ! { ! this.columns.removeElementAt(i); ! this.fireTableRowsDeleted( ! this.columns.size() - 1, ! this.columns.size() - 1); ! } } Index: EntityEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/EntityEdit.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EntityEdit.java 9 Jun 2003 17:43:11 -0000 1.8 --- EntityEdit.java 5 Jul 2003 12:26:10 -0000 1.9 *************** *** 62,66 **** private Entity myEntity; - /** Components **/ // Labels --- 62,65 ---- *************** *** 316,338 **** } }); - this.jButtonOK.addActionListener(new ActionListener() - { - // When calling 'jButtonOK', save data and close the window - public void actionPerformed(ActionEvent e) - { - closingWindow(true); - } - }); - this.jButtonCancel.addActionListener(new ActionListener() - { - // When calling 'jButtonCancel', close the dialog without saving - public void actionPerformed(ActionEvent e) - { - closingWindow(false); - } - }); - - - /** Assembling components **/ --- 315,318 ---- *************** *** 520,523 **** --- 500,522 ---- GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0)); + + this.jButtonOK.addActionListener(new ActionListener() + { + // When calling 'jButtonOK', save data and close the window + public void actionPerformed(ActionEvent e) + { + closingWindow(true); + } + }); + this.jButtonCancel.addActionListener(new ActionListener() + { + // When calling 'jButtonCancel', close the dialog without saving + public void actionPerformed(ActionEvent e) + { + dataDict.model.resetColumns(); + myEntity.setData(dataDict.model.getColumns()); + closingWindow(false); + } + }); } // End of 'EntityEdit()' *************** *** 572,576 **** // Initialize the local reference of the edited object this.myEntity = pEntity; - // Initialize components values this.jTextFieldName.setText(this.myEntity.getName()); --- 571,574 ---- *************** *** 578,581 **** --- 576,580 ---- 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()); *************** *** 589,593 **** this.jComboBoxJavaNamingMethod .setSelectedItem(this.myEntity.getJavaNamingMethod()); - // Enable/Disable components inside 'jPanelSqlProperites' according to the --- 588,591 ---- Index: TableEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/TableEdit.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TableEdit.java 9 Jun 2003 17:43:11 -0000 1.6 --- TableEdit.java 5 Jul 2003 12:26:10 -0000 1.7 *************** *** 322,326 **** public void actionPerformed(ActionEvent e) { ! closingWindow(false); } }); --- 322,328 ---- public void actionPerformed(ActionEvent e) { ! dataDict.model.resetColumns(); ! myTable.setData(dataDict.model.getColumns()); ! closingWindow(false); } }); |
From: <efl...@us...> - 2003-07-05 12:26:16
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/toolbars In directory sc8-pr-cvs1:/tmp/cvs-serv974/src/org/devaki/nextobjects/ui/toolbars Modified Files: NOToolBar2.java Log Message: Fixed 'cancel button' bug (XXXEdit.java). Fixed 'label button' behaviour. Fixed remove field number -1 execption. Fixed bung in intelligent FK creation. Index: NOToolBar2.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/toolbars/NOToolBar2.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NOToolBar2.java 8 Jun 2003 09:28:26 -0000 1.5 --- NOToolBar2.java 5 Jul 2003 12:26:10 -0000 1.6 *************** *** 192,197 **** "Add a label", "Add a label to the current object.", ! true, ! true); // Button group buttonGroup.add(jToggleButtonTable); --- 192,197 ---- "Add a label", "Add a label to the current object.", ! false, ! false); // Button group buttonGroup.add(jToggleButtonTable); |
From: <efl...@us...> - 2003-07-05 12:26:16
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv974/src/org/devaki/nextobjects/util Modified Files: NOTools.java Log Message: Fixed 'cancel button' bug (XXXEdit.java). Fixed 'label button' behaviour. Fixed remove field number -1 execption. Fixed bung in intelligent FK creation. Index: NOTools.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOTools.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NOTools.java 28 May 2003 21:48:28 -0000 1.13 --- NOTools.java 5 Jul 2003 12:26:10 -0000 1.14 *************** *** 424,430 **** */ public static Column getNewStandardFk(Table pParentTable,Table pChildTable) { Vector pk=pParentTable.getPrimaryKeys(); // at the moment work only with the first PK ! return new Column(((Column)pk.elementAt(0)).getCode(), ((Column)pk.elementAt(0)).getCode(), ((Column)pk.elementAt(0)).getType(), --- 424,447 ---- */ public static Column getNewStandardFk(Table pParentTable,Table pChildTable) { + Column column; Vector pk=pParentTable.getPrimaryKeys(); // at the moment work only with the first PK ! if (pk.size()==0) { ! ((Column)pParentTable.getData().elementAt(0)).setPrimaryKey(true); ! column= new Column(((Column)pParentTable.getData().elementAt(0)).getCode(), ! ((Column)pParentTable.getData().elementAt(0)).getCode(), ! ((Column)pParentTable.getData().elementAt(0)).getType(), ! "", ! "", ! false, true, false, ! "", ! "", ! "", ! "", ! "", ! "", ! pChildTable); ! } else { ! column= new Column(((Column)pk.elementAt(0)).getCode(), ((Column)pk.elementAt(0)).getCode(), ((Column)pk.elementAt(0)).getType(), *************** *** 439,442 **** --- 456,461 ---- "", pChildTable); + } + return column; } |
From: <efl...@us...> - 2003-06-30 18:56:29
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv17593/src/org/devaki/nextobjects/ui/workspace/models/objects Modified Files: LabelEdit.java Log Message: Add serialize labels. Index: LabelEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/LabelEdit.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LabelEdit.java 8 Jun 2003 09:46:30 -0000 1.1 --- LabelEdit.java 30 Jun 2003 18:56:23 -0000 1.2 *************** *** 299,303 **** this.myLabel = pLabel; this.jTextFieldName.setText(pLabel.getName()); ! this.jTextAreaDescription.setText(pLabel.getDescription()); // Set 'General', the active tab when opening the dialog box --- 299,303 ---- this.myLabel = pLabel; this.jTextFieldName.setText(pLabel.getName()); ! this.jTextAreaDescription.setText(pLabel.getNotes()); // Set 'General', the active tab when opening the dialog box *************** *** 318,322 **** { this.myLabel.setName(this.jTextFieldName.getText()); ! this.myLabel.setDescription(this.jTextAreaDescription.getText()); } } --- 318,322 ---- { this.myLabel.setName(this.jTextFieldName.getText()); ! this.myLabel.setNotes(this.jTextAreaDescription.getText()); } } |
From: <efl...@us...> - 2003-06-30 18:56:28
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv17593/src/org/devaki/nextobjects/workspace/models/graphics Modified Files: LabelView.java Log Message: Add serialize labels. Index: LabelView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/LabelView.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LabelView.java 8 Jun 2003 09:28:27 -0000 1.1 --- LabelView.java 30 Jun 2003 18:56:24 -0000 1.2 *************** *** 123,127 **** } sb.delete(0, sb.length()); ! st = new StringTokenizer(myObject.getDescription()); g.setFont( --- 123,127 ---- } sb.delete(0, sb.length()); ! st = new StringTokenizer(myObject.getNotes()); g.setFont( |
From: <efl...@us...> - 2003-06-30 18:56:28
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv17593/src/org/devaki/nextobjects/util Modified Files: MeriseTransform.java ModelMan.java NOXMLFactory.java Log Message: Add serialize labels. Index: MeriseTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/MeriseTransform.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** MeriseTransform.java 8 Jun 2003 09:28:26 -0000 1.22 --- MeriseTransform.java 30 Jun 2003 18:56:23 -0000 1.23 *************** *** 590,594 **** Association pAsso) { ! /* * The table to be created. */ --- 590,594 ---- Association pAsso) { ! /** * The table to be created. */ *************** *** 622,631 **** } ! /* * Column we create */ Column newField; ! /* * Constraint to be created(s) */ --- 622,631 ---- } ! /** * Column we create */ Column newField; ! /** * Constraint to be created(s) */ Index: ModelMan.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/ModelMan.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ModelMan.java 9 Jun 2003 19:06:05 -0000 1.27 --- ModelMan.java 30 Jun 2003 18:56:24 -0000 1.28 *************** *** 516,520 **** /** ! * Conveniency method for the <code>NOClipboard</code> to add a label * @param pModel the model * @param lbl the label --- 516,520 ---- /** ! * Method to add a label * @param pModel the model * @param lbl the label *************** *** 523,528 **** { pModel.getLabels().addElement(lbl.getObjectView()); ! setCurrentObject(lbl); ! NOToolBar2.setCurrentTool(NOToolBar2.TOOL_SELECTION); } --- 523,535 ---- { pModel.getLabels().addElement(lbl.getObjectView()); ! addCurrentObject(lbl); ! NOToolBar2.setCurrentTool(NOToolBar2.TOOL_SELECTION); ! lbl.setMyModel(pModel); ! //((EntityView)pEntity.getObjectView()).setOldLocation(pEntity.getEntityView().getLocation()); ! currentModel.redoLog.log( ! NORedoLog.ACTION_CREATE, ! lbl, ! (int) lbl.getObjectView().getLocation().getX(), ! (int) lbl.getObjectView().getLocation().getY()); } Index: NOXMLFactory.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOXMLFactory.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NOXMLFactory.java 31 May 2003 11:48:34 -0000 1.11 --- NOXMLFactory.java 30 Jun 2003 18:56:24 -0000 1.12 *************** *** 41,44 **** --- 41,45 ---- import org.devaki.nextobjects.workspace.models.columns.ColumnType; import org.devaki.nextobjects.workspace.models.graphics.AssociationLinkView; + import org.devaki.nextobjects.workspace.models.graphics.LabelView; import org.devaki.nextobjects.workspace.models.graphics.LineView; import org.devaki.nextobjects.workspace.models.objects.Association; *************** *** 49,818 **** import org.devaki.nextobjects.workspace.models.objects.InheritanceLink; import org.devaki.nextobjects.workspace.models.objects.Table; [...1894 lines suppressed...] ! * @param pConstraint the constraint to write ! * @return the tree node ! */ ! private static Element writeForeignKey(Constraint pConstraint) ! { ! Element tmpElementForeignKey = new Element("foreign-key"); ! tmpElementForeignKey.setAttribute( ! "foreignTable", ! pConstraint.getParentClass().getCode()); ! Element tmpElementReference = new Element("reference"); ! tmpElementReference.setAttribute( ! "local", ! pConstraint.getAnyField().getCode()); ! tmpElementReference.setAttribute( ! "foreign", ! pConstraint.getUniqueField().getCode()); ! tmpElementForeignKey.addContent(tmpElementReference); ! return tmpElementForeignKey; ! } } |
From: <efl...@us...> - 2003-06-30 18:56:28
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv17593/src/org/devaki/nextobjects/workspace/models/objects Modified Files: Label.java Log Message: Add serialize labels. Index: Label.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/Label.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Label.java 9 Jun 2003 19:06:08 -0000 1.2 --- Label.java 30 Jun 2003 18:56:24 -0000 1.3 *************** *** 44,49 **** { super(pModel); ! this.setName("project note"); ! this.setDescription("Double click to edit"); labelView = new LabelView(this); } --- 44,49 ---- { super(pModel); ! this.setName("project notes"); ! this.setNotes("Double click to edit"); labelView = new LabelView(this); } *************** *** 57,61 **** super(pObject.getMyModel()); this.setName(pObject.getName()); ! this.setDescription(pObject.getDescription()); this.labelView = new LabelView(this); } --- 57,61 ---- super(pObject.getMyModel()); this.setName(pObject.getName()); ! this.setNotes(pObject.getNotes()); this.labelView = new LabelView(this); } |
From: <mpo...@us...> - 2003-06-18 12:26:16
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv15105 Modified Files: .cvsignore Log Message: ignore log files Index: .cvsignore =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 18 Jun 2003 10:57:46 -0000 1.1 --- .cvsignore 18 Jun 2003 12:26:12 -0000 1.2 *************** *** 1 **** --- 1,2 ---- target + *.log |
From: <mpo...@us...> - 2003-06-18 12:25:46
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv14984 Added Files: maven.xml Log Message: make maven generated dist work out of the box --- NEW FILE: maven.xml --- <project default="jar:jar" xmlns:deploy="deploy"> <!-- Allow any user specific values to override the defaults --> <property file="${user.home}/build.properties" /> <!-- Allow user defaults for this project --> <property file="build.properties" /> <!-- Set default values for the build --> <property file="default.properties" /> <!-- ================================================================== --> <!-- D I S T : B U I L D _ B I N P R E G O A L --> <!-- ================================================================== --> <!-- copies jars, templates, ... to the ${maven.dist.bin.assembly.dir} --> <!-- to include them in the binary dists --> <!-- ================================================================== --> <preGoal name="dist:build-bin"> <!-- include listed dependencies --> <deploy:copy-deps todir="${maven.dist.bin.assembly.dir}/lib"/> <!-- move jar to /lib --> <move file="${maven.dist.bin.assembly.dir}/${maven.final.name}.jar" todir="${maven.dist.bin.assembly.dir}/lib" /> <!-- copy torque dist to /lib --> <copy file="lib/torque-3.0.zip" todir="${maven.dist.bin.assembly.dir}/lib" /> <!-- copy shell scripts to dist --> <copy todir="${maven.dist.bin.assembly.dir}"> <fileset dir="bin" /> </copy> </preGoal> </project> |
From: <mpo...@us...> - 2003-06-18 12:25:46
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/bin In directory sc8-pr-cvs1:/tmp/cvs-serv14984/bin Added Files: nextobjects.sh nextobjects.bat Log Message: make maven generated dist work out of the box --- NEW FILE: nextobjects.sh --- #!/bin/sh # # version 0.1 NEXTOBJECTS_HOME=. #CLASSPATH=$CLASSPATH:./classes/ if test -d /usr/share/nextobjects/ ; then NEXTOBJECTS_HOME=/usr/share/nextobjects/ fi # Allow .nextobjectsrc to specifiy flags to java cmd if [ "$JAVACMD" = "" ] ; then JAVACMD=java fi # try to locate JAVA_HOME if not set [ -z "$JAVA_HOME" ] && export JAVA_HOME=$(dirname $(dirname $(which java))) for i in ${NEXTOBJECTS_HOME}/lib/*.jar ; do LOCALCLASSPATH=${LOCALCLASSPATH}:$i done #if [ "$JAVA_HOME" != "" && "$CLASSPATH"==""] ; then if test -f $JAVA_HOME/lib/tools.jar ; then LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar fi if test -f $JAVA_HOME/jre/lib/rt.jar ; then LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/jre/lib/rt.jar fi if test -f $JAVA_HOME/lib/classes.zip ; then LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip fi #fi echo $LOCALCLASSPATH $JAVACMD -Dnextobjects.home=$NEXTOBJECTS_HOME -classpath $LOCALCLASSPATH:$CLASSPATH org.devaki.nextobjects.NextObjects $@ --- NEW FILE: nextobjects.bat --- rem on some win98 version it seems to be neccessary to increase memory in "command ms-dos" properties. set NEXTOBJECTS_HOME=. set LOCALCLASSPATH=%NEXTOBJECTS_HOME%\lib\devaki-nextobjects-0.3-RC3.jar; set LCP2=%NEXTOBJECTS_HOME%\lib\xmlParserAPIs.jar;%NEXTOBJECTS_HOME%\lib\xercesImpl.jar; set LCP3=%NEXTOBJECTS_HOME%\lib\ant-1.5.2.jar;%NEXTOBJECTS_HOME%\lib\log4j-1.2.7.jar; set LCP4=%NEXTOBJECTS_HOME%\lib\jdom.jar; java -Dnextobjects.home=%NEXTOBJECTS_HOME% -cp "%LOCALCLASSPATH%;%LCP2%;%LCP3%;%LCP4%" org.devaki.nextobjects.NextObjects |
From: <mpo...@us...> - 2003-06-18 12:24:43
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/bin In directory sc8-pr-cvs1:/tmp/cvs-serv14761/bin Log Message: Directory /cvsroot/nextobjects/nextobjects/nextobjects/bin added to the repository |
From: <mpo...@us...> - 2003-06-18 10:57:49
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv2004 Added Files: .cvsignore Log Message: ignore target --- NEW FILE: .cvsignore --- target |
From: <mpo...@us...> - 2003-06-18 10:57:17
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv1904 Modified Files: project.properties Log Message: set mainclass in MANIFEST Index: project.properties =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/project.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** project.properties 11 Feb 2003 11:44:13 -0000 1.1 --- project.properties 18 Jun 2003 10:57:11 -0000 1.2 *************** *** 16,17 **** --- 16,18 ---- maven.xdoc.version = ${pom.currentVersion} + maven.jar.mainclass = org.devaki.nextobjects.NextObjects \ No newline at end of file |
From: Heiko W. <hw...@we...> - 2003-06-17 15:03:24
|
From: <efl...@us...> - 2003-06-13 17:23:12
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv21894/src/org/devaki/nextobjects/workspace/models/graphics Modified Files: AssociationLinkView.java BaseModelView.java ConstraintView.java InheritanceLinkView.java ModelTitleView.java PhysicalView.java Log Message: Made very big models a little bit faster. Index: AssociationLinkView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/AssociationLinkView.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AssociationLinkView.java 4 Jun 2003 19:29:42 -0000 1.5 --- AssociationLinkView.java 13 Jun 2003 17:23:08 -0000 1.6 *************** *** 101,105 **** public void paint(Graphics g) { ! Point p0=((ConceptualView)myObject.getMyModel().getPanel()).getRectangle().getLocation(); Point p1=selectionPoints[0].getPoint(); --- 101,106 ---- public void paint(Graphics g) { ! //Point p0=((ConceptualView)myObject.getMyModel().getPanel()).getRectangle().getLocation(); ! Point p0=myObject.getMyModel().getModelView().jScrollPane.getViewport().getViewPosition(); Point p1=selectionPoints[0].getPoint(); Index: BaseModelView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/BaseModelView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BaseModelView.java 8 Jun 2003 09:28:26 -0000 1.2 --- BaseModelView.java 13 Jun 2003 17:23:08 -0000 1.3 *************** *** 145,149 **** } ! public Image makeImage(int x, int y) { Graphics2D big; --- 145,149 ---- } ! public Image makeImage(Rectangle pRect) { Graphics2D big; *************** *** 152,169 **** ObjectView[] tmp = getVisibleObjectView(); ! ! Rectangle rect; ! calculateRectangle(); ! rect = getRectangle(); bi = (BufferedImage) drawingArea.createImage( ! rect.width, ! rect.height); big = bi.createGraphics(); big.setColor(CstGraphics.MODEL_BACKGROUND_COLOR); ! big.fillRect(0, 0, rect.width, rect.height); for (int k = 0; k < tmp.length; k++) --- 152,167 ---- ObjectView[] tmp = getVisibleObjectView(); ! //TODO try getVisibleObjectView(pRect); ! //ObjectView[] tmp = getVisibleObjectView(pRect); bi = (BufferedImage) drawingArea.createImage( ! pRect.width, ! pRect.height); big = bi.createGraphics(); big.setColor(CstGraphics.MODEL_BACKGROUND_COLOR); ! big.fillRect(0, 0, pRect.width, pRect.height); for (int k = 0; k < tmp.length; k++) *************** *** 188,193 **** big.drawImage( bi2, ! l.x - getRectangle().x, ! l.y - getRectangle().y, this); } --- 186,191 ---- big.drawImage( bi2, ! l.x - pRect.x, ! l.y - pRect.y, this); } *************** *** 195,212 **** } ! /* ! bi2 = ! (BufferedImage) drawingArea.createImage( ! modelTitleView.getSize().width, ! modelTitleView.getSize().height); ! bi2g = bi2.createGraphics(); ! modelTitleView.paint(bi2g); ! ! big.drawImage( ! bi2, ! modelTitleView.getLocation().x - getRectangle().x, ! modelTitleView.getLocation().y - getRectangle().y, ! this); ! */ return bi; } --- 193,197 ---- } ! return bi; } *************** *** 220,233 **** BufferedImage bi2; Graphics2D bi2g; if (fullRefresh) { bi = ! (BufferedImage) makeImage(getRectangle().height, ! getRectangle().width); fullRefresh = false; } ! g2.drawImage(bi, getRectangle().x, getRectangle().y, this); // loop/paint selected objects objects toviewPort panel. --- 205,219 ---- BufferedImage bi2; Graphics2D bi2g; + Rectangle rect=jScrollPane.getViewport().getViewRect(); + if (fullRefresh) { bi = ! (BufferedImage) makeImage(rect); fullRefresh = false; } ! g2.drawImage(bi, rect.x, rect.y, this); // loop/paint selected objects objects toviewPort panel. *************** *** 266,271 **** Graphics tmpClip = g2.create( ! getRectangle().x, ! getRectangle().y, getViewSize().width, getViewSize().height); --- 252,257 ---- Graphics tmpClip = g2.create( ! rect.x, ! rect.y, getViewSize().width, getViewSize().height); *************** *** 327,331 **** rectangle = calculateRectangle(); } ! if (rectangle.x == 999990) { --- 313,317 ---- rectangle = calculateRectangle(); } ! if (rectangle.x == 999990) { Index: ConstraintView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/ConstraintView.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ConstraintView.java 4 Jun 2003 19:29:42 -0000 1.9 --- ConstraintView.java 13 Jun 2003 17:23:08 -0000 1.10 *************** *** 75,79 **** public void paint(Graphics g) { ! Point p0=((PhysicalView)myObject.getMyModel().getPanel()).getRectangle().getLocation(); --- 75,80 ---- public void paint(Graphics g) { ! //Point p0=((PhysicalView)myObject.getMyModel().getPanel()).getRectangle().getLocation(); ! Point p0=myObject.getMyModel().getModelView().jScrollPane.getViewport().getViewPosition(); Index: InheritanceLinkView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/InheritanceLinkView.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** InheritanceLinkView.java 4 Jun 2003 19:29:42 -0000 1.8 --- InheritanceLinkView.java 13 Jun 2003 17:23:08 -0000 1.9 *************** *** 68,72 **** { ! Point p0=((BaseModelView)myObject.getMyModel().getPanel()).getRectangle().getLocation(); Point p1 = selectionPoints[0].getPoint(); --- 68,73 ---- { ! //Point p0=((BaseModelView)myObject.getMyModel().getPanel()).getRectangle().getLocation(); ! Point p0=myObject.getMyModel().getModelView().jScrollPane.getViewport().getViewPosition(); Point p1 = selectionPoints[0].getPoint(); Index: ModelTitleView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/ModelTitleView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ModelTitleView.java 9 Jun 2003 19:06:07 -0000 1.2 --- ModelTitleView.java 13 Jun 2003 17:23:08 -0000 1.3 *************** *** 40,44 **** /** * Constructor ! * @param pLabel a dummy label who give a context */ public ModelTitleView(ModelTitle pObject) --- 40,44 ---- /** * Constructor ! * @param pObject the model title */ public ModelTitleView(ModelTitle pObject) Index: PhysicalView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/PhysicalView.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PhysicalView.java 8 Jun 2003 09:28:27 -0000 1.22 --- PhysicalView.java 13 Jun 2003 17:23:08 -0000 1.23 *************** *** 21,28 **** import java.io.Serializable; - import java.awt.BorderLayout; import java.awt.Cursor; import java.awt.Dimension; - import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Color; --- 21,26 ---- *************** *** 30,41 **** import java.awt.Polygon; import java.awt.Rectangle; - import java.awt.image.BufferedImage; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; - import javax.swing.JPanel; - import javax.swing.JScrollPane; import javax.swing.event.MouseInputAdapter; - import javax.swing.event.ChangeListener; - import javax.swing.event.ChangeEvent; import org.devaki.nextobjects.constants.CstGraphics; import org.devaki.nextobjects.ui.menus.ModelPopupMenu; --- 28,34 ---- *************** *** 75,225 **** super(theDatabase); this.setVisible(true); - - /** Components **/ - // Main Panel - this.setLayout(new BorderLayout()); - // Construct the drawing area - drawingArea = new JPanel() - { - /** - * Draw all components - * @param g the graphics - */ - public void paint(Graphics g) - { - update(g); - } - - public BufferedImage makeImage(int x,int y) - { - // collect our objects. - Graphics2D big; - BufferedImage bi2; - Graphics2D bi2g; - - ObjectView[] tmp = getVisibleObjectView(); - - Rectangle rect; - calculateRectangle(); - rect = getRectangle(); - - - bi=(BufferedImage) drawingArea.createImage(rect.width,rect.height); - - big = bi.createGraphics(); - - big.setColor(CstGraphics.MODEL_BACKGROUND_COLOR); - big.fillRect(0, 0, rect.width, rect.height); - - for (int k = 0; k < tmp.length; k++) - { - // Clears the rectangle that was previously drawn. - Dimension d = tmp[k].getSize(); - Point l = tmp[k].getLocation(); - - if (tmp[k] instanceof LineView) - { - tmp[k].paint(big); - } else - { // classview ?! - if (d.height > 0 && d.width > 0) - { - bi2 =(BufferedImage)drawingArea.createImage(d.width,d.height); - bi2g = bi2.createGraphics(); - tmp[k].paint(bi2g); - big.drawImage( - bi2, - l.x - getRectangle().x, - l.y - getRectangle().y, - this); - } - } - } - return bi; - } - - public void update(Graphics g) - { - Graphics2D g2 = (Graphics2D) g; - // blank fill, clean ... - super.paintComponent(g2); - //Rectangle area; - BufferedImage bi2; - Graphics2D bi2g; - - if (fullRefresh) - { - bi = (BufferedImage) makeImage(getRectangle().height,getRectangle().width); - fullRefresh = false; - } - - g2.drawImage(bi,getRectangle().x, getRectangle().y,this); - - // loop/paint selected objects objects toviewPort panel. - for (int j = 0; j < ModelMan.getCurrentObjects().size(); j++) - { - ObjectView tmpObjectView = - ((BaseObject) ModelMan - .getCurrentObjects() - .elementAt(j)) - .getObjectView(); - Dimension d2 = tmpObjectView.getSize(); - Point p2 = tmpObjectView.getLocation(); - - if (tmpObjectView instanceof ClassView) - { - g2.setColor(CstGraphics.MODEL_BACKGROUND_COLOR); - Rectangle r = - ((ClassView) tmpObjectView).getOldrectangle(); - g2.fillRect(r.x, r.y, r.width, r.height); - bi2 = - (BufferedImage) drawingArea.createImage( - d2.width, - d2.height); - bi2g = bi2.createGraphics(); - tmpObjectView.paint(bi2g); - - ((BaseObject) ModelMan - .getCurrentObjects() - .elementAt(j)) - .getObjectView() - .paint( - bi2g); - g2.drawImage(bi2, p2.x, p2.y, this); - } else - { - Graphics tmpClip =g2.create(getRectangle().x, - getRectangle().y, - getViewSize().width, - getViewSize().height); - } - ((BaseObject) ModelMan.getCurrentObjects().elementAt(j)).getObjectView().renderSelected(g); - } - } - }; - // Define the color of the background - this.drawingArea.setBackground(CstGraphics.MODEL_BACKGROUND_COLOR); - this.drawingArea.setPreferredSize(CstGraphics.MODEL_DIMENSION); - // Mouse Listeners this.drawingArea.addMouseListener(new MyMouseListener()); this.drawingArea.addMouseMotionListener(new MyMouseMotionListener()); ! ! // Assembling components ! this.jScrollPane = new JScrollPane(this.drawingArea); ! this.add(jScrollPane, BorderLayout.CENTER); ! ! // Initialize scrolling position ! jScrollPane.getViewport().setViewPosition( ! CstGraphics.MODEL_INITIAL_POSITION); ! ! //will update the buffered image in case viewport have changed. ! this.jScrollPane.getViewport().addChangeListener(new ChangeListener() ! { ! public void stateChanged(ChangeEvent e) ! { ! fullRefresh = true; ! } ! }); } --- 68,75 ---- super(theDatabase); this.setVisible(true); // Mouse Listeners this.drawingArea.addMouseListener(new MyMouseListener()); this.drawingArea.addMouseMotionListener(new MyMouseMotionListener()); ! } *************** *** 903,907 **** * @return the objects views */ ! public ObjectView[] getVisibleObjectView() { ObjectView[] b = new ObjectView[((PhysicalModel)myModel).getInheritanceLinks().size() --- 753,758 ---- * @return the objects views */ ! public ObjectView[] getVisibleObjectView() ! { ObjectView[] b = new ObjectView[((PhysicalModel)myModel).getInheritanceLinks().size() |
From: <efl...@us...> - 2003-06-13 17:23:12
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv21894/src/org/devaki/nextobjects/util Modified Files: NOClipboard.java NOImageTransform.java Log Message: Made very big models a little bit faster. Index: NOClipboard.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOClipboard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NOClipboard.java 9 Jun 2003 19:06:06 -0000 1.6 --- NOClipboard.java 13 Jun 2003 17:23:07 -0000 1.7 *************** *** 274,280 **** if (pCurrentObjects.elementAt(i) instanceof Label) { ! Label tObject =new Label((Label) pCurrentObjects.elementAt(i)); v.addElement(tObject); ! } } ObjectSelection contents = new ObjectSelection(v); --- 274,280 ---- if (pCurrentObjects.elementAt(i) instanceof Label) { ! Label tObject = new Label((Label) pCurrentObjects.elementAt(i)); v.addElement(tObject); ! } } ObjectSelection contents = new ObjectSelection(v); *************** *** 335,339 **** newObject); ModelMan.addCurrentObject(newObject); - } else if (clippedObject instanceof Association) { --- 335,338 ---- *************** *** 357,369 **** newObject.getObjectView().setLocation(new Point(x, y)); ModelMan.addCurrentObject(newObject); ! } else if (clippedObject instanceof Label) ! { ! Label newObject = ! new Label((Label) clippedObject); - ModelMan.addLabel(ModelMan.getCurrentModel(),newObject); - newObject.getObjectView().setLocation(new Point(x, y)); - ModelMan.addCurrentObject(newObject); - } else if (ModelMan.getCurrentModel() instanceof PhysicalModel) { --- 356,370 ---- newObject.getObjectView().setLocation(new Point(x, y)); ModelMan.addCurrentObject(newObject); ! } else if (clippedObject instanceof Label) ! { ! Label newObject = new Label((Label) clippedObject); ! ! ModelMan.addLabel( ! ModelMan.getCurrentModel(), ! newObject); ! newObject.getObjectView().setLocation(new Point(x, y)); ! ModelMan.addCurrentObject(newObject); ! } } else if (ModelMan.getCurrentModel() instanceof PhysicalModel) { *************** *** 389,582 **** } else if (clippedObject instanceof Label) { ! Label newObject = ! new Label((Label) clippedObject); ModelMan.addLabel( ((PhysicalModel) ModelMan.getCurrentModel()), newObject); ! newObject.getObjectView().setLocation(new Point(x, y)); ModelMan.addCurrentObject(newObject); - } } } ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } } ! /** ! * Paste a field contained in the clipboard ! * @param object the column to paste ! */ ! public static void pasteColumn(BaseObject object) { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! Column clippedObject = ! (Column) clipboardContent.getTransferData(Column.fieldFlavor); ! clippedObject.setParent(object); ! // Add element to the given object ! object.getData().addElement(clippedObject); ! // Reload tree from the parent node ! NOTreeView.reloadBaseClassChildrens( ! clippedObject.getParent().getDynamicTreeNode()); ! // Repaint associate model only if it is the current model ! if (clippedObject.getParent().getMyModel().getPanel().isShowing()) ! { ! ModelMan.getCurrentModel().getPanel().repaint(); ! } ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); } } ! /** ! * Paste clipped style ! * @param pEntityView clipped style ! */ ! public static void pasteEntityStyle(EntityView pEntityView) { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! EntityStyle clippedObject = ! (EntityStyle) clipboardContent.getTransferData( ! EntityStyle.fieldFlavor); ! pEntityView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } } ! /** ! * Paste clipped style ! * @param pTableView clipped style ! */ ! public static void pasteTableStyle(TableView pTableView) { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! TableStyle clippedObject = ! (TableStyle) clipboardContent.getTransferData( ! TableStyle.fieldFlavor); ! pTableView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } } ! /** ! * Paste clipped style ! * @param pAssociationView clipped style ! */ ! public static void pasteAssociationStyle(AssociationView pAssociationView) { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! AssociationStyle clippedObject = ! (AssociationStyle) clipboardContent.getTransferData( ! AssociationStyle.fieldFlavor); ! pAssociationView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } } ! /** ! * Paste clipped style ! * @param pAssociationLinkView clipped style ! */ ! public static void pasteAssociationLinkStyle(AssociationLinkView pAssociationLinkView) { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! AssociationLinkStyle clippedObject = ! (AssociationLinkStyle) clipboardContent.getTransferData( ! AssociationLinkStyle.fieldFlavor); ! pAssociationLinkView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } } ! /** ! * Paste clipped style ! * @param pInheritanceLinkView clipped style ! */ ! public static void pasteInheritanceLinkStyle(InheritanceLinkView pInheritanceLinkView) { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! InheritanceLinkStyle clippedObject = ! (InheritanceLinkStyle) clipboardContent.getTransferData( ! InheritanceLinkStyle.fieldFlavor); ! pInheritanceLinkView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } } ! /** ! * Paste clipped style ! * @param pConstraintView clipped style ! */ ! public static void pasteConstraintStyle(ConstraintView pConstraintView) { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! ConstraintStyle clippedObject = ! (ConstraintStyle) clipboardContent.getTransferData( ! ConstraintStyle.fieldFlavor); ! pConstraintView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } } } --- 390,573 ---- } else if (clippedObject instanceof Label) { ! Label newObject = new Label((Label) clippedObject); ModelMan.addLabel( ((PhysicalModel) ModelMan.getCurrentModel()), newObject); ! newObject.getObjectView().setLocation(new Point(x, y)); ModelMan.addCurrentObject(newObject); } } ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } ! /** ! * Paste a field contained in the clipboard ! * @param object the column to paste ! */ ! public static void pasteColumn(BaseObject object) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try { ! Column clippedObject = ! (Column) clipboardContent.getTransferData(Column.fieldFlavor); ! clippedObject.setParent(object); ! // Add element to the given object ! object.getData().addElement(clippedObject); ! // Reload tree from the parent node ! NOTreeView.reloadBaseClassChildrens( ! clippedObject.getParent().getDynamicTreeNode()); ! // Repaint associate model only if it is the current model ! if (clippedObject.getParent().getMyModel().getPanel().isShowing()) { ! ModelMan.getCurrentModel().getPanel().repaint(); } + } catch (IOException ioe) + { + logger.error("IOException : Cannot get transfer data"); + } catch (UnsupportedFlavorException ufe) + { + logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } ! /** ! * Paste clipped style ! * @param pEntityView clipped style ! */ ! public static void pasteEntityStyle(EntityView pEntityView) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try { ! EntityStyle clippedObject = ! (EntityStyle) clipboardContent.getTransferData( ! EntityStyle.fieldFlavor); ! pEntityView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } ! /** ! * Paste clipped style ! * @param pTableView clipped style ! */ ! public static void pasteTableStyle(TableView pTableView) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try { ! TableStyle clippedObject = ! (TableStyle) clipboardContent.getTransferData( ! TableStyle.fieldFlavor); ! pTableView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } ! /** ! * Paste clipped style ! * @param pAssociationView clipped style ! */ ! public static void pasteAssociationStyle(AssociationView pAssociationView) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try { ! AssociationStyle clippedObject = ! (AssociationStyle) clipboardContent.getTransferData( ! AssociationStyle.fieldFlavor); ! pAssociationView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } ! /** ! * Paste clipped style ! * @param pAssociationLinkView clipped style ! */ ! public static void pasteAssociationLinkStyle(AssociationLinkView pAssociationLinkView) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try { ! AssociationLinkStyle clippedObject = ! (AssociationLinkStyle) clipboardContent.getTransferData( ! AssociationLinkStyle.fieldFlavor); ! pAssociationLinkView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } ! /** ! * Paste clipped style ! * @param pInheritanceLinkView clipped style ! */ ! public static void pasteInheritanceLinkStyle(InheritanceLinkView pInheritanceLinkView) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try { ! InheritanceLinkStyle clippedObject = ! (InheritanceLinkStyle) clipboardContent.getTransferData( ! InheritanceLinkStyle.fieldFlavor); ! pInheritanceLinkView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } ! /** ! * Paste clipped style ! * @param pConstraintView clipped style ! */ ! public static void pasteConstraintStyle(ConstraintView pConstraintView) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try { ! ConstraintStyle clippedObject = ! (ConstraintStyle) clipboardContent.getTransferData( ! ConstraintStyle.fieldFlavor); ! pConstraintView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error("UnsupportedFlavorException : Cannot get transfer data"); } + } } Index: NOImageTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOImageTransform.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NOImageTransform.java 8 Jun 2003 09:28:26 -0000 1.7 --- NOImageTransform.java 13 Jun 2003 17:23:07 -0000 1.8 *************** *** 30,36 **** import org.apache.log4j.Logger; import org.devaki.nextobjects.workspace.models.BaseModel; - import org.devaki.nextobjects.workspace.models.PhysicalModel; - import org.devaki.nextobjects.workspace.models.ConceptualModel; - import org.devaki.nextobjects.workspace.models.objects.BaseObject; import org.devaki.nextobjects.workspace.models.graphics.ObjectView; import org.devaki.nextobjects.workspace.models.graphics.ClassView; --- 30,33 ---- *************** *** 103,136 **** panel.paint(g2); //dispose of the graphics content ! return bi; } /** ! * Write Conceptual Model the model to a PNG file ! * @param pCDM the context model * @param file the file to write * @return success */ ! public static boolean writeImage(ConceptualModel pCDM, File file) { boolean success = false; ! Point oldP = pCDM.getModelView().getRectangle().getLocation(); // this is a hack, the model is moved to top left corner in // order to avoid drawing the whole 5000*5000 drawingArea. // then the model is returned to old position. // by that time it havn't been redrawed ... ! translateModel(pCDM, oldP.x, oldP.y); ! pCDM.getModelView().calculateRectangle(); ! pCDM.getModelView().setFullRefresh(true); // the rectangle give the offfset. ! Rectangle rect = pCDM.getModelView().getRectangle(); ! pCDM.getModelView().setFullRefresh(true); BufferedImage bi = getImage( ! pCDM.getModelView().drawingArea, rect.width, rect.height); --- 100,135 ---- panel.paint(g2); //dispose of the graphics content ! g2.dispose(); return bi; } /** ! * Write Base Model the model to a PNG file ! * @param pModel the context model * @param file the file to write * @return success */ ! public static boolean writeImage(BaseModel pModel, File file) { boolean success = false; ! Point oldP = pModel.getModelView().getRectangle().getLocation(); // this is a hack, the model is moved to top left corner in // order to avoid drawing the whole 5000*5000 drawingArea. // then the model is returned to old position. // by that time it havn't been redrawed ... ! translateModel(pModel, oldP.x, oldP.y); ! pModel.getModelView().calculateRectangle(); ! pModel.getModelView().setFullRefresh(true); // the rectangle give the offfset. ! Rectangle rect = pModel.getModelView().getRectangle(); ! pModel.getModelView().jScrollPane.getViewport().setViewPosition(rect.getLocation()); ! pModel.getModelView().jScrollPane.getViewport().setViewSize(rect.getSize()); ! pModel.getModelView().setFullRefresh(true); BufferedImage bi = getImage( ! pModel.getModelView().drawingArea, rect.width, rect.height); *************** *** 145,199 **** e.printStackTrace(); } ! translateModel(pCDM, -oldP.x, -oldP.y); ! pCDM.getModelView().calculateRectangle(); ! pCDM.getModelView().setFullRefresh(true); ! pCDM.getModelView().repaint(); ! pCDM.getModelView().repaint(); ! return success; ! } ! ! /** ! * Write Physical Model the model to a PNG file ! * @param pPDM the context model ! * @param file the file to write ! * @return success ! */ ! public static boolean writeImage(PhysicalModel pPDM, File file) ! { ! boolean success = false; ! ! Point oldP = pPDM.getModelView().getRectangle().getLocation(); ! // this is a hack, the model is moved to top left corner in ! // order to avoid drawing the whole 5000*5000 drawingArea. ! // then the model is returned to old position. ! // by that time it havn't been redrawed ... ! translateModel(pPDM, oldP.x, oldP.y); ! pPDM.getModelView().calculateRectangle(); ! pPDM.getModelView().setFullRefresh(true); ! // the rectangle give the offfset. ! Rectangle rect = pPDM.getModelView().getRectangle(); ! ! try ! { ! BufferedImage bi = ! getImage( ! pPDM.getModelView().drawingArea, ! rect.width, ! rect.height); ! success = javax.imageio.ImageIO.write(bi, "PNG", file); ! ! } catch (Exception e) ! { ! logger.error(e.getMessage()); ! // most often lacks of jdk1.4 ! e.printStackTrace(); ! } ! // return to the old offset. ! translateModel(pPDM, -oldP.x, -oldP.y); ! pPDM.getModelView().calculateRectangle(); ! pPDM.getModelView().setFullRefresh(true); ! pPDM.getModelView().repaint(); ! return success; } ! } \ No newline at end of file --- 144,153 ---- e.printStackTrace(); } ! translateModel(pModel, -oldP.x, -oldP.y); ! pModel.getModelView().calculateRectangle(); ! pModel.getModelView().setFullRefresh(true); ! pModel.getModelView().jScrollPane.getViewport().setViewPosition(oldP); ! pModel.getModelView().repaint(); return success; } ! } |
From: <efl...@us...> - 2003-06-09 19:06:14
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv2512/src/org/devaki/nextobjects/util Modified Files: ModelMan.java NOClipboard.java NORedoLog.java Log Message: Added cut/paste labels. Index: ModelMan.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/ModelMan.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** ModelMan.java 8 Jun 2003 09:28:26 -0000 1.26 --- ModelMan.java 9 Jun 2003 19:06:05 -0000 1.27 *************** *** 504,508 **** /** ! * Conveniency method for the ConceptualView.java to add an InheritanceLink. * @param pModel the model * @param p the point --- 504,508 ---- /** ! * method for the <code>ModelView</code> to add a label * @param pModel the model * @param p the point *************** *** 512,515 **** --- 512,525 ---- Label lbl = new Label(currentModel); lbl.getObjectView().setLocation(p); + addLabel(currentModel,lbl); + } + + /** + * Conveniency method for the <code>NOClipboard</code> to add a label + * @param pModel the model + * @param lbl the label + */ + public static void addLabel(BaseModel pModel, Label lbl) + { pModel.getLabels().addElement(lbl.getObjectView()); setCurrentObject(lbl); *************** *** 935,938 **** --- 945,949 ---- } resetCurrentObjects(); + currentModel.getModelView().setFullRefresh(true); currentModel.getModelView().repaint(); } Index: NOClipboard.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOClipboard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NOClipboard.java 27 Apr 2003 17:05:27 -0000 1.5 --- NOClipboard.java 9 Jun 2003 19:06:06 -0000 1.6 *************** *** 47,50 **** --- 47,51 ---- import org.devaki.nextobjects.workspace.models.objects.InheritanceLink; import org.devaki.nextobjects.workspace.models.objects.Table; + import org.devaki.nextobjects.workspace.models.objects.Label; import org.devaki.nextobjects.workspace.models.styles.AssociationLinkStyle; import org.devaki.nextobjects.workspace.models.styles.AssociationStyle; *************** *** 55,511 **** /** [...963 lines suppressed...] ! public static void pasteConstraintStyle(ConstraintView pConstraintView) ! { ! Transferable clipboardContent = clipboard.getContents(myClipboard); ! try ! { ! ConstraintStyle clippedObject = ! (ConstraintStyle) clipboardContent.getTransferData( ! ConstraintStyle.fieldFlavor); ! pConstraintView.setStyle(clippedObject); ! } catch (IOException ioe) ! { ! logger.error("IOException : Cannot get transfer data"); ! } catch (UnsupportedFlavorException ufe) ! { ! logger.error( ! "UnsupportedFlavorException : Cannot get transfer data"); ! } ! } } Index: NORedoLog.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NORedoLog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NORedoLog.java 31 May 2003 11:48:34 -0000 1.3 --- NORedoLog.java 9 Jun 2003 19:06:07 -0000 1.4 *************** *** 32,36 **** import java.awt.Dimension; ! /* * This class is in charge of most of the Undo/Redo stuff. * The model was inspired from the gimp dual stack system. --- 32,36 ---- import java.awt.Dimension; ! /** * This class is in charge of most of the Undo/Redo stuff. * The model was inspired from the gimp dual stack system. *************** *** 40,320 **** */ ! public class NORedoLog { ! /* ! * Actions Delete ! */ ! public final static int ACTION_DELETE=0; ! /* ! * Actions Move ! */ ! public final static int ACTION_MOVE=1; ! /* ! * Actions Resize ! */ ! public final static int ACTION_RESIZE=2; ! /* ! * Actions Create ! */ ! public final static int ACTION_CREATE=3; ! /* ! * Log Type descriptorfor the undo stack ! */ ! public final static int LOG_UNDOLOG=0; ! /* ! * Log Type Descriptor for redo stack ! */ ! public final static int LOG_REDOLOG=1; ! /* ! * Log Size ! */ ! public final static int REDOLOG_SIZE=25; ! /* ! * The redo stack ! */ ! Stack redoLog=new Stack(); ! /* ! * The undo stack ! */ ! Stack undoLog=new Stack(); ! /* ! * A flag to know the current stack ! */ ! private static int currentStack=LOG_UNDOLOG; ! public NORedoLog() { ! } ! /* ! * Log all possible action coming from ModelMan.java ! */ ! public void log(int pAction,BaseObject pTarget, int pX, int pY) { ! NORedoItem redoItem=new NORedoItem(pAction,pTarget,pX,pY); ! switch (currentStack) { ! case LOG_REDOLOG: ! redoLog.push(redoItem); ! currentStack=LOG_UNDOLOG; ! if (redoLog.size()>REDOLOG_SIZE) ! { ! redoLog.removeElementAt(0); ! } ! break; ! default: ! undoLog.push(redoItem); ! if (undoLog.size()>REDOLOG_SIZE) ! { ! undoLog.removeElementAt(0); ! } ! break; ! } ! } ! /* ! * An <code>undo</code> call switch the current stack and call ! * each of the action executers for the last action ! * of the undo stack ! */ ! public void undo() { ! currentStack=LOG_REDOLOG; ! NORedoItem redoItem=null; ! if (undoLog.size()>0) { ! redoItem=(NORedoItem)undoLog.pop(); ! } else { ! NOMenuBar.jMenuItemUndo.setEnabled(false); ! } ! if (redoItem!=null ) { ! ModelMan.setCurrentObject(redoItem.target); ! switch (redoItem.action) { ! case ACTION_DELETE: ! redoDelete(redoItem); ! break; ! case ACTION_MOVE: ! redoMove(redoItem); ! break; ! case ACTION_RESIZE: ! redoResize(redoItem); ! break; ! case ACTION_CREATE: ! redoCreate(); ! break; ! default : ! //logger.debug("undoing unknow action!"); ! break; ! } ! } ! // else { ! // logger.warn("Nothing to undo!"); ! //} ! ModelMan.getCurrentModel().getPanel().repaint(); ! } ! /* ! * An <code>redo</code> call switch the current stack and call ! * each of the action executers for the last action ! * of the redo stack ! */ ! public void redo() { ! NORedoItem redoItem=null; ! if (redoLog.size()>0) ! { ! redoItem=(NORedoItem)redoLog.pop(); ! } else { ! NOMenuBar.jMenuItemRedo.setEnabled(false); ! } ! if (redoItem!=null ) ! { ! ModelMan.setCurrentObject(redoItem.target); ! switch (redoItem.action) { ! case ACTION_DELETE: ! redoDelete(redoItem); ! break; ! case ACTION_MOVE: ! redoMove(redoItem); ! break; ! case ACTION_RESIZE: ! redoResize(redoItem); ! break; ! case ACTION_CREATE: ! redoCreate(); ! break; ! default : ! //logger.debug("redoing unknow action!"); ! break; ! } ! } ! ModelMan.getCurrentModel().getPanel().repaint(); ! } ! /* ! * Redo Move action ! * @param redoItem the item to redo ! */ ! private void redoMove(NORedoItem redoItem) ! { ! ModelMan.moveCurrentObject(redoItem.x * (-1),redoItem.y * (-1)); ! } ! /* ! * Redo Resize action ! * @param redoItem the item to redo ! */ ! private static void redoResize(NORedoItem redoItem) ! { ! redoItem.target.getObjectView().setSize(new Dimension(redoItem.x,redoItem.y)); ! } ! /* ! * Redo Create action ! * @param redoItem the item to redo ! */ ! private static void redoCreate() ! { ! ModelMan.delete(); ! } ! /* ! * Redo Delete action ! * @param redoItem the item to redo ! */ ! private static void redoDelete(NORedoItem redoItem) ! { ! if (ModelMan.getCurrentModel() instanceof ConceptualModel) ! { ! if (redoItem.target instanceof Entity) ! { ! ModelMan.addEntity((ConceptualModel)ModelMan.getCurrentModel(), ! (Entity)redoItem.target); ! } ! if (redoItem.target instanceof Association) ! { ! ModelMan.addAssociation((ConceptualModel)ModelMan.getCurrentModel(), ! (Association)redoItem.target); ! } ! if (redoItem.target instanceof AssociationLink) ! { ! ModelMan.addAssociationLink((ConceptualModel)ModelMan.getCurrentModel(), ! (AssociationLink)redoItem.target); ! } ! } else if (ModelMan.getCurrentModel() instanceof PhysicalModel) ! { ! if (redoItem.target instanceof Table) ! { ! ModelMan.addTable((PhysicalModel)ModelMan.getCurrentModel(), ! (Table)redoItem.target); ! } ! if (redoItem.target instanceof Constraint) ! { ! ModelMan.addConstraint((PhysicalModel)ModelMan.getCurrentModel(), ! (Constraint)redoItem.target); ! } ! } ! } ! /* ! * This class represent a singe item to be redoed. ! * an action item which is made of : ! * @param pTarget flag describing the action ! * @param pTarget the object ! * @param pX optional X coordinate parameter ! * @para pY optional Y coordinate parameter ! * @author Emmanuel Florent ! */ ! class NORedoItem { ! /* a flag describing the action */ ! int action; ! /* the object */ ! BaseObject target; ! /* optional X coordinate */ ! int x; ! /* optional Y coordiante */ ! int y; ! /* ! * standard constructor ! */ ! public NORedoItem(int pAction, BaseObject pTarget, int pX, int pY) { ! action=pAction; ! target=pTarget; ! x=pX; ! y=pY; ! } ! /* ! * this function is used for debuging purpose. ! *@ return ! */ ! public String toString() ! { ! String actionName; ! switch (action) { ! case NORedoLog.ACTION_CREATE: ! actionName="ACTION_CREATE"; ! break; ! case NORedoLog.ACTION_DELETE: ! actionName="ACTION_DELETE"; ! break; ! case NORedoLog.ACTION_MOVE: ! actionName="ACTION_MOVE"; ! break; ! case NORedoLog.ACTION_RESIZE: ! actionName="ACTION_RESIZE"; ! break; ! default: ! actionName="unknow action"; ! break; ! } ! return new StringBuffer(actionName) ! .append(" ") ! .append(target) ! .append(" ") ! .append(x) ! .append("-") ! .append(y).toString(); ! } ! } // end of class RedoItem } // End of class NORedoLog --- 40,365 ---- */ ! public class NORedoLog ! { ! /** ! * Actions Delete ! */ ! public final static int ACTION_DELETE = 0; ! /** ! * Actions Move ! */ ! public final static int ACTION_MOVE = 1; ! /** ! * Actions Resize ! */ ! public final static int ACTION_RESIZE = 2; ! /** ! * Actions Create ! */ ! public final static int ACTION_CREATE = 3; ! /** ! * Log Type descriptorfor the undo stack ! */ ! public final static int LOG_UNDOLOG = 0; ! /** ! * Log Type Descriptor for redo stack ! */ ! public final static int LOG_REDOLOG = 1; ! /** ! * Log Size ! */ ! public final static int REDOLOG_SIZE = 25; ! /** ! * The redo stack ! */ ! private Stack redoLog = new Stack(); ! /** ! * The undo stack ! */ ! private Stack undoLog = new Stack(); ! /** ! * A flag to know the current stack ! */ ! private static int currentStack = LOG_UNDOLOG; ! /** ! * Dummy constructor. ! * Should never be used. ! * ! */ ! public NORedoLog() ! { ! } ! /** ! * Log all possible action coming from ModelMan.java ! * @param pAction flag describing the action ! * @param pTarget the object ! * @param pX optional X coordinate parameter ! * @param pY optional Y coordinate parameter ! */ ! public void log(int pAction, BaseObject pTarget, int pX, int pY) ! { ! NORedoItem redoItem = new NORedoItem(pAction, pTarget, pX, pY); ! switch (currentStack) ! { ! case LOG_REDOLOG : ! redoLog.push(redoItem); ! currentStack = LOG_UNDOLOG; ! if (redoLog.size() > REDOLOG_SIZE) ! { ! redoLog.removeElementAt(0); ! } ! break; ! default : ! undoLog.push(redoItem); ! if (undoLog.size() > REDOLOG_SIZE) ! { ! undoLog.removeElementAt(0); ! } ! break; ! } ! } ! /** ! * An <code>undo</code> call switch the current stack and call ! * each of the action executers for the last action ! * of the undo stack ! */ ! public void undo() ! { ! currentStack = LOG_REDOLOG; ! NORedoItem redoItem = null; ! if (undoLog.size() > 0) ! { ! redoItem = (NORedoItem) undoLog.pop(); ! } else ! { ! NOMenuBar.jMenuItemUndo.setEnabled(false); ! } ! if (redoItem != null) ! { ! ModelMan.setCurrentObject(redoItem.target); ! switch (redoItem.action) ! { ! case ACTION_DELETE : ! redoDelete(redoItem); ! break; ! case ACTION_MOVE : ! redoMove(redoItem); ! break; ! case ACTION_RESIZE : ! redoResize(redoItem); ! break; ! case ACTION_CREATE : ! redoCreate(); ! break; ! default : ! //logger.debug("undoing unknow action!"); ! break; ! } ! } ! // else { ! // logger.warn("Nothing to undo!"); ! //} ! ModelMan.getCurrentModel().getModelView().setFullRefresh(true); ! ModelMan.getCurrentModel().getModelView().repaint(); ! } ! /** ! * An <code>redo</code> call switch the current stack and call ! * each of the action executers for the last action ! * of the redo stack ! */ ! public void redo() ! { ! NORedoItem redoItem = null; ! if (redoLog.size() > 0) ! { ! redoItem = (NORedoItem) redoLog.pop(); ! } else ! { ! NOMenuBar.jMenuItemRedo.setEnabled(false); ! } ! if (redoItem != null) ! { ! ModelMan.setCurrentObject(redoItem.target); ! switch (redoItem.action) ! { ! case ACTION_DELETE : ! redoDelete(redoItem); ! break; ! case ACTION_MOVE : ! redoMove(redoItem); ! break; ! case ACTION_RESIZE : ! redoResize(redoItem); ! break; ! case ACTION_CREATE : ! redoCreate(); ! break; ! default : ! //logger.debug("redoing unknow action!"); ! break; ! } ! } ! ModelMan.getCurrentModel().getModelView().setFullRefresh(true); ! ModelMan.getCurrentModel().getModelView().repaint(); ! } + /** + * Redo Move action + * @param redoItem the item to redo + */ + private void redoMove(NORedoItem redoItem) + { + ModelMan.moveCurrentObject(redoItem.x * (-1), redoItem.y * (-1)); + } ! /** ! * Redo Resize action ! * @param redoItem the item to redo ! */ ! private static void redoResize(NORedoItem redoItem) ! { ! redoItem.target.getObjectView().setSize( ! new Dimension(redoItem.x, redoItem.y)); ! } ! /** ! * Redo Create action ! */ ! private static void redoCreate() ! { ! ModelMan.delete(); ! } ! /** ! * Redo Delete action ! * @param redoItem the item to redo ! */ ! private static void redoDelete(NORedoItem redoItem) ! { ! if (ModelMan.getCurrentModel() instanceof ConceptualModel) ! { ! if (redoItem.target instanceof Entity) ! { ! ModelMan.addEntity( ! (ConceptualModel) ModelMan.getCurrentModel(), ! (Entity) redoItem.target); ! } ! if (redoItem.target instanceof Association) ! { ! ModelMan.addAssociation( ! (ConceptualModel) ModelMan.getCurrentModel(), ! (Association) redoItem.target); ! } ! if (redoItem.target instanceof AssociationLink) ! { ! ModelMan.addAssociationLink( ! (ConceptualModel) ModelMan.getCurrentModel(), ! (AssociationLink) redoItem.target); ! } ! } else if (ModelMan.getCurrentModel() instanceof PhysicalModel) ! { ! if (redoItem.target instanceof Table) ! { ! ModelMan.addTable( ! (PhysicalModel) ModelMan.getCurrentModel(), ! (Table) redoItem.target); ! } ! if (redoItem.target instanceof Constraint) ! { ! ModelMan.addConstraint( ! (PhysicalModel) ModelMan.getCurrentModel(), ! (Constraint) redoItem.target); ! } ! } ! } ! /** ! * This class represent a singe item to be redoed. ! * an action item which is made of : ! * @param pTarget flag describing the action ! * @param pTarget the object ! * @param pX optional X coordinate parameter ! * @para pY optional Y coordinate parameter ! * @author Emmanuel Florent ! */ ! class NORedoItem ! { ! /** ! * a flag describing the action ! */ ! private int action; ! /** ! * the object ! */ ! private BaseObject target; ! /** ! * optional X coordinate ! * */ ! private int x; ! /** ! * optional Y coordiante ! */ ! private int y; ! /** ! * standard constructor ! * @param pAction the action kind flag ! * @param pTarget the changed object ! * @param pX optional x param ! * @param pY optional y param ! */ ! public NORedoItem(int pAction, BaseObject pTarget, int pX, int pY) ! { ! action = pAction; ! target = pTarget; ! x = pX; ! y = pY; ! } ! /* ! * this function is used for debuging purpose. ! *@ return debug string ! * ! public String toString() ! { ! String actionName; ! switch (action) ! { ! case NORedoLog.ACTION_CREATE : ! actionName = "ACTION_CREATE"; ! break; ! case NORedoLog.ACTION_DELETE : ! actionName = "ACTION_DELETE"; ! break; ! case NORedoLog.ACTION_MOVE : ! actionName = "ACTION_MOVE"; ! break; ! case NORedoLog.ACTION_RESIZE : ! actionName = "ACTION_RESIZE"; ! break; ! default : ! actionName = "unknow action"; ! break; ! } ! return new StringBuffer(actionName) ! .append(" ") ! .append(target) ! .append(" ") ! .append(x) ! .append("-") ! .append(y) ! .toString(); ! } ! */ ! } // end of class RedoItem } // End of class NORedoLog |
From: <efl...@us...> - 2003-06-09 19:06:14
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv2512/src/org/devaki/nextobjects/workspace/models/objects Modified Files: Label.java Log Message: Added cut/paste labels. Index: Label.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/Label.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Label.java 8 Jun 2003 09:28:27 -0000 1.1 --- Label.java 9 Jun 2003 19:06:08 -0000 1.2 *************** *** 24,31 **** import org.devaki.nextobjects.workspace.models.graphics.ObjectView; import org.devaki.nextobjects.workspace.models.graphics.LabelView; ! import org.devaki.nextobjects.ui.workspace.models.objects.*; /** * This class is responsible for having labels * @author eflorent */ public class Label extends BaseObject --- 24,32 ---- import org.devaki.nextobjects.workspace.models.graphics.ObjectView; import org.devaki.nextobjects.workspace.models.graphics.LabelView; ! /** * This class is responsible for having labels * @author eflorent + * TODO serialize project notes - labels. */ public class Label extends BaseObject *************** *** 38,51 **** /** * Constructor ! * @param pModel */ public Label(BaseModel pModel) { super(pModel); ! this.setName("new label"); this.setDescription("Double click to edit"); labelView = new LabelView(this); } ! /** * get the label view --- 39,63 ---- /** * Constructor ! * @param pModel the context model */ public Label(BaseModel pModel) { super(pModel); ! this.setName("project note"); this.setDescription("Double click to edit"); labelView = new LabelView(this); } ! ! /** ! * Construct a new 'Label' object ! * @param pObject the label to clone ! */ ! public Label(Label pObject) ! { ! super(pObject.getMyModel()); ! this.setName(pObject.getName()); ! this.setDescription(pObject.getDescription()); ! this.labelView = new LabelView(this); ! } /** * get the label view |
From: <efl...@us...> - 2003-06-09 19:06:13
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv2512/src/org/devaki/nextobjects/workspace/models/graphics Modified Files: ModelTitleView.java Log Message: Added cut/paste labels. Index: ModelTitleView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/ModelTitleView.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ModelTitleView.java 8 Jun 2003 09:30:59 -0000 1.1 --- ModelTitleView.java 9 Jun 2003 19:06:07 -0000 1.2 *************** *** 45,49 **** { super(pObject); ! Point p = new Point(5010, 2510); this.setLocation(p); this.setSize(CstGraphics.DEFAULT_MODELTITLE_SIZE); --- 45,49 ---- { super(pObject); ! Point p = new Point(5050, 2550); this.setLocation(p); this.setSize(CstGraphics.DEFAULT_MODELTITLE_SIZE); |
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()); |