001/* 002 * Copyright (c) 2009 The openGion Project. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016package org.opengion.hayabusa.db; 017 018/** 019 * DBCell の具象クラスで、カラムのデータを表示する場合に使用するクラスです。 020 * 021 * カラムの表示に必要な属性は, DBColumn オブジェクト より取り出します。 022 * このクラスは、DBColumn オブジェクト毎に1つ作成されます。 023 * 024 * @og.group データ表示 025 * 026 * @version 4.0 027 * @author Kazuhiko Hasegawa 028 * @since JDK5.0, 029 */ 030public abstract class AbstractRenderer implements CellRenderer { 031 032 /** 033 * データの表示用文字列を返します。 034 * 035 * @param value 入力値 036 * 037 * @return データの表示用文字列 038 */ 039 public String getValue( final String value ) { 040 return value; 041 } 042 043 /** 044 * name属性を変えた、データ表示/編集用のHTML文字列を作成します。 045 * テーブル上の name に 行番号を付加して、名前_行番号 で登録するキーを作成し, 046 * リクエスト情報を1つ毎のフィールドで処理できます。 047 * 048 * @param row 行番号 049 * @param value 入力値 050 * 051 * @return データ表示/編集用の文字列 052 */ 053 public String getValue( final int row,final String value ) { 054 return getValue( value ); 055 } 056}