Update of /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21926
Modified Files:
DTProperties.java
Log Message:
remove getControlPanels to factory
Index: DTProperties.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DTProperties.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DTProperties.java 13 May 2004 00:30:44 -0000 1.2
--- DTProperties.java 13 May 2004 17:00:32 -0000 1.3
***************
*** 178,212 ****
return (String)h.get(propertyName);
}
-
- /**
- * Get the panels containing the controls needed to adjust all of the properties.
- * This assumes that the only DataTypes that want to put up control panels
- * are the ones that have properties to be adjusted.
- * We do not assume that all properties require a panel.
- * When this method calls the DataType class to get the panel, the class may return null.
- */
- public static JPanel[] getControlPanels() {
- ArrayList panelList = new ArrayList();
-
- // get a unique set of names of classes with properties
- Iterator classNames = dataTypes.keySet().iterator();
- // run through the list getting the panel from each of the named classes
- while (classNames.hasNext()) {
- String className = (String)classNames.next();
- Class[] parameterTypes = new Class[0];
- try {
- Method panelMethod =
- Class.forName(className).getMethod("getControlPanel", parameterTypes);
-
- JPanel panel = (JPanel)panelMethod.invoke(null, null);
- panelList.add(panel);
- }
- catch (Exception e) {
- // assume that errors here are not fatal and ignore them??
- }
- }
-
- return (JPanel[])panelList.toArray(new JPanel[0]);
- }
}
--- 178,181 ----
|