![]() |
|||
DateContainer.javaGo to the documentation of this file.00001 /* 00002 * DateDimensionClient.java 00003 * 00004 * Created on 20 mars 2003, 10:52 00005 * Copyright (C) 2003 Philippe MOULIN 00006 * www.net2map.org 00007 * 00008 * This program is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU General Public License 00010 * as published by the Free Software Foundation; either version 2 00011 * of the License, or (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00021 */ 00022 00025 package org.net2map.pov.dimension.date; 00026 00027 import java.beans.*; 00028 import org.apache.lucene.document.DateField; 00029 import java.util.Date; 00030 00031 00035 public class DateContainer 00036 extends org.net2map.pov.dimension.Container 00037 //implements java.io.Serializable 00038 { 00039 private static org.apache.log4j.Logger logger = 00040 org.apache.log4j.Logger.getLogger(DateContainer.class.getName()); 00042 private PropertyChangeSupport propertySupport; 00043 00045 public DateContainer() 00046 { 00047 logger.setLevel((org.apache.log4j.Level)org.apache.log4j.Priority.DEBUG); 00048 logger.warn("Creating..."); 00049 propertySupport = new PropertyChangeSupport ( this ); 00050 theGUI = new DateGUI(this); 00051 theSubset = new DateSubset(this); 00052 theGUI.addPropertyChangeListener (DateGUI.PROP_EARLIEST_DATE_PROPERTY, 00053 (PropertyChangeListener)theSubset); 00054 theGUI.addPropertyChangeListener (DateGUI.PROP_LATEST_DATE_PROPERTY, 00055 (PropertyChangeListener)theSubset); 00056 logger.warn("...Created"); 00057 } 00058 00059 public String getName() 00060 { 00061 return(java.util.ResourceBundle.getBundle("org/net2map/pov/dimension/date/properties").getString("date")); 00062 } 00063 00064 public long criteriaValueToMapPosition(String paramCriteriaValue) 00065 { 00066 long result = 0; 00067 try 00068 { 00069 result = DateField.stringToTime(paramCriteriaValue); 00070 } 00071 catch(Exception theException) 00072 { 00073 logger.fatal( "Exception: Couldn't translate\"" + 00074 paramCriteriaValue + 00075 "\"", 00076 theException); 00077 } 00078 return(result); 00079 } 00080 00081 public String getAxisName() 00082 { 00083 return(java.util.ResourceBundle.getBundle("org/net2map/pov/dimension/date/properties").getString("Date")); 00084 } 00085 00086 } |
|||
|
Accueil | Téléchargement | Manuel
| Doc. technique | Sources CVS |
Faq | Nous contacter
©2003 - All Rights Reserved |
|||