baseproperties.java

来自「exTreme taglib的使用」· Java 代码 · 共 87 行

JAVA
87
字号
/* * Copyright 2004 original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *    http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.extremecomponents.table.core;import java.io.IOException;import java.io.InputStream;import java.util.Properties;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * @author phorn */public abstract class BaseProperties extends Properties {    private static Log logger = LogFactory.getLog(BaseProperties.class);    public final static String EXTREMECOMPONENTS_PROPERTIES = "extremecomponents.properties";    public final static String AUTO_INCLUDE_PARAMETERS = "autoIncludeParameters";    public final static String USE_SESSION_FILTER_SORT = "useSessionFilterSortParam";    public final static String IMAGE_PATH = "imagePath";    public final static String FORMAT = "format_";    public final static String BORDER = "border";    public final static String CELL = "cell_";    public final static String FILTER_CELL = "filterCell_";    public final static String HEADER_CELL = "headerCell_";    public final static String CELLPADDING = "cellpadding";    public final static String CELLSPACING = "cellspacing";    public final static String EXPORTABLE = "exportable";    public final static String FILTERABLE = "filterable";    public final static String FILTER_ROWS_CALLBACK = "filterRowsCallback";    public final static String HEADER_CLASS = "headerClass";    public final static String HEADER_SORT_CLASS = "headerSortClass";    public final static String HIGHLIGHT_CLASS = "highlightClass";    public final static String HIGHLIGHT_ROW = "highlightRow";    public final static String ROWS_DISPLAYED = "rowsDisplayed";    public final static String MEDIAN_ROWS_DISPLAYED = "medianRowsDisplayed";    public final static String MAX_ROWS_DISPLAYED = "maxRowsDisplayed";    public final static String METHOD = "method";    public final static String SHOW_PAGINATION = "showPagination";    public final static String SHOW_EXPORTS = "showExports";    public final static String SHOW_STATUS_BAR = "showStatusBar";    public final static String PARSE = "parse_";    public final static String RETRIEVE_ROWS_CALLBACK = "retrieveRowsCallback";    public final static String SORTABLE = "sortable";    public final static String SORT_ROWS_CALLBACK = "sortRowsCallback";    public final static String STYLE_CLASS = "styleClass";    public final static String VIEW = "view_";    public final static String WIDTH = "width";    public final static String LOCALE = "locale";    protected BaseModel model;    public BaseProperties(BaseModel model) {        this.model = model;    }    void init(String defaultProperties) {        try {            load(this.getClass().getResourceAsStream(defaultProperties));            String propertiesLocation = model.getTableHandler().getTable().getPropertiesLocation();            InputStream input = this.getClass().getResourceAsStream(propertiesLocation);            if (input != null) {                load(input);            }        } catch (IOException e) {            logger.error("Could not load the eXtremeTable resource bundle.", e);        }    }    public abstract void init();    public abstract String getProperty(String name);}

⌨️ 快捷键说明

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