⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fieldtypes.java

📁 java 写的一个新闻发布系统
💻 JAVA
字号:
////  FieldTypes//  EV      18.11.2000////package org.jahia.data.fields;import java.util.*;                 // Hashtablepublic class FieldTypes {    public  static  final   int     UNDEFINED       = 0;    public  static  final   int     INTEGER         = 1;    public  static  final   int     SMALLTEXT       = 2;    public  static  final   int     BIGTEXT         = 3;    public  static  final   int     DATE            = 4;    public  static  final   int     PAGE            = 5;    public  static  final   int     FILE            = 6;    // public  static  final   int     IMAGE           = 7;    // public  static  final   int     AUDIOCLIP       = 8;    // public  static  final   int     VIDEOCLIP       = 9;    public  static  final   int     APPLICATION     = 10;    public  static  final   int     FLOAT           = 11;    public  static  final   int     BOOLEAN         = 12;    public  static  final   int     COLOR        	= 13;        public static final String typeName[] = {"Undefined", "Integer", "Small text", "Big text",                                             "Date", "Page", "File", "Image",                                             "Audio clip", "Video clip", "Application", "Float",                                             "Boolean", "Color"};    private static  FieldTypes      theObject;    /**     * @associates Integer      */    private         Hashtable       fieldTypes;    /**     * @associates String      */    private         Hashtable       fieldClassNames;    /***        * constructor        *        */    protected FieldTypes()    {        fieldTypes = new Hashtable();        fieldTypes.put( "Integer number", new Integer(INTEGER) );        fieldTypes.put( "Limited text", new Integer(SMALLTEXT) );        fieldTypes.put( "Free text", new Integer(BIGTEXT) );        fieldTypes.put( "Date", new Integer(DATE) );        fieldTypes.put( "Page", new Integer(PAGE) );        fieldTypes.put( "File", new Integer(FILE) );        fieldTypes.put( "Application", new Integer(APPLICATION) );        fieldTypes.put( "Float number", new Integer(FLOAT) );        fieldTypes.put( "Boolean", new Integer(BOOLEAN) );        fieldTypes.put( "Color", new Integer(COLOR) );        fieldClassNames = new Hashtable();        fieldClassNames.put( new Integer(UNDEFINED), "org.jahia.data.fields.JahiaUndefinedField");        fieldClassNames.put( new Integer(INTEGER), "org.jahia.data.fields.JahiaIntegerField");        fieldClassNames.put( new Integer(SMALLTEXT), "org.jahia.data.fields.JahiaSmallTextField");        fieldClassNames.put( new Integer(BIGTEXT), "org.jahia.data.fields.JahiaBigTextField");        fieldClassNames.put( new Integer(PAGE), "org.jahia.data.fields.JahiaPageField");        fieldClassNames.put( new Integer(FILE), "org.jahia.data.fields.JahiaFileFieldWrapper");        fieldClassNames.put( new Integer(APPLICATION), "org.jahia.data.fields.JahiaApplicationField");        fieldClassNames.put( new Integer(FLOAT), "org.jahia.data.fields.JahiaFloatField");        fieldClassNames.put( new Integer(BOOLEAN), "org.jahia.data.fields.JahiaBooleanField");        fieldClassNames.put( new Integer(DATE), "org.jahia.data.fields.JahiaDateField");        fieldClassNames.put( new Integer(COLOR), "org.jahia.data.fields.JahiaColorField");    } // end constructor    /***        * returns a single instance of the object        *        */    public static synchronized FieldTypes getInstance()    {        if (theObject == null) {            theObject = new FieldTypes();        }        return theObject;    } // end getInstance    /***        * gets available field types        *        */    public Hashtable getFieldTypes()    {        Hashtable out = (Hashtable) fieldTypes.clone();        return out;    } // end getFieldTypes    /***        * gets fieldClassName        *        */    public Hashtable getFieldClassNames()    {        Hashtable ret = (Hashtable) fieldClassNames.clone();        return ret;    } // end getFieldTypes} // end FieldTypes

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -