[Schmitzm-commits] r1605 - in trunk/schmitzm-core: . src/main/java/de/schmitzm/swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jun 8 18:16:09 CEST 2011


Author: mojays
Date: 2011-06-08 18:16:08 +0200 (Wed, 08 Jun 2011)
New Revision: 1605

Modified:
   trunk/schmitzm-core/pom.xml
   trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingUtil.java
Log:
Added dependency to jCalendar library
Handle JDateChooser in SwingUtil.setEditable(.)

Modified: trunk/schmitzm-core/pom.xml
===================================================================
--- trunk/schmitzm-core/pom.xml	2011-06-08 13:37:58 UTC (rev 1604)
+++ trunk/schmitzm-core/pom.xml	2011-06-08 16:16:08 UTC (rev 1605)
@@ -58,6 +58,14 @@
 			<classifier>swing</classifier>
 			<scope>compile</scope>
 		</dependency>
+		
+		<dependency>
+			<groupId>com.toedter</groupId>
+			<artifactId>jcalendar</artifactId>
+			<version>1.3.3</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
 
 		<dependency>
 			<groupId>net.jini</groupId>

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingUtil.java	2011-06-08 13:37:58 UTC (rev 1604)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingUtil.java	2011-06-08 16:16:08 UTC (rev 1605)
@@ -100,6 +100,8 @@
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 
+import com.toedter.calendar.JDateChooser;
+
 import de.schmitzm.io.IOUtil;
 import de.schmitzm.lang.LangUtil;
 import de.schmitzm.lang.ResourceProvider;
@@ -827,6 +829,10 @@
         ((JComboBox)component).setEnabled(editable);
       if ( component instanceof JCheckBox )
         ((JCheckBox)component).setEnabled(editable);
+      if ( component instanceof JCheckBox )
+        ((JCheckBox)component).setEnabled(editable);
+      if ( component instanceof JDateChooser )
+        ((JDateChooser)component).setEnabled(editable);
       
       // recursive components
       if ( component instanceof javax.swing.JPanel )



More information about the Schmitzm-commits mailing list