From 535a04fa05f739ec16dd81666e3b0f82dfbd442d Mon Sep 17 00:00:00 2001 From: tknall Date: Wed, 9 Jan 2013 15:41:29 +0000 Subject: pdf-as-lib maven project files moved to pdf-as-lib git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/pdf-as/trunk@926 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../at/knowcenter/wag/egov/egiz/table/Entry.java | 235 +++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/table/Entry.java (limited to 'pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/table/Entry.java') diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/table/Entry.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/table/Entry.java new file mode 100644 index 0000000..289a7f6 --- /dev/null +++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/table/Entry.java @@ -0,0 +1,235 @@ +/** + * Copyright 2006 by Know-Center, Graz, Austria + * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a + * joint initiative of the Federal Chancellery Austria and Graz University of + * Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + * + * $Id: Entry.java,v 1.3 2006/08/25 17:08:19 wprinz Exp $ + */ +package at.knowcenter.wag.egov.egiz.table; + +import java.io.Serializable; + +/** + * This class implements a table entry for different types. A table entry can be + * styled and setting there column dimensions. The default value for the column + * dimension is 1. To declare the type of the entry use the public + * TYPE_ definitions. + * + * @author wlackner + */ +public class Entry implements Serializable +{ + + /** + * SVUID. + */ + private static final long serialVersionUID = -7952755200668528348L; + + /** + * Type for a text entry. + */ + public final static int TYPE_CAPTION = 0; + + /** + * Type for a text entry. + */ + public final static int TYPE_VALUE = 1; + + /** + * Type for an image entry. + */ + public final static int TYPE_IMAGE = 2; + + /** + * Type for a table entry. + */ + public final static int TYPE_TABLE = 3; + + /** + * The type info holder, default value is 0! + */ + private int type_ = 0; + + /** + * The entry value. + */ + private Object value_ = null; + + /** + * The key value + */ + private String key_ = null; + + /** + * The entry style information. + */ + private Style style_ = null; + + /** + * The column dimension. + */ + private int colSpan_ = 1; + + /** + * Text wrap indicator, default is false. + */ + private boolean noWrap_ = false; + + /** + * The empty constructor. + */ + public Entry() + { + } + + /** + * A constructor setting the type and the value. + * + * @param type + * the entry type to set + * @param value + * the entry value to set + */ + public Entry(int type, Object value, String key) + { + type_ = type; + value_ = value; + key_ = key; + } + + /** + * @return Returns the entry style. + */ + public Style getStyle() + { + return style_; + } + + /** + * @param style + * The style to set. + */ + public void setStyle(Style style) + { + style_ = style; + } + + /** + * @return Returns the entry type. + */ + public int getType() + { + return type_; + } + + /** + * @param type + * The type to set. + */ + public void setType(int type) + { + type_ = type; + } + + /** + * @return Returns the entry value. + */ + public Object getValue() + { + return value_; + } + + /** + * @param value + * The value to set. + */ + public void setValue(Object value) + { + value_ = value; + } + + /** + * @return Returns the key. + */ + + public String getKey() + { + return key_; + } + + /** + * @param key + * The key to set. + */ + public void setKey(String key) + { + key_ = key; + } + + /** + * @return Returns the colSpan. + */ + public int getColSpan() + { + return colSpan_; + } + + /** + * @param colSpan + * The colSpan to set. + */ + public void setColSpan(int colSpan) + { + colSpan_ = colSpan; + } + + /** + * @return Returns the wrap indicator. + */ + public boolean isNoWrap() + { + return noWrap_; + } + + /** + * @param noWrap + * The wrap indicator to set. + */ + public void setNoWrap(boolean noWrap) + { + noWrap_ = noWrap; + } + + /** + * The toString method, used for tests or debugging. + */ + public String toString() + { + Object obj = getValue(); + String value = null; + if (obj != null) + { + value = obj.toString(); + } + return "Type:" + getType() + " Value:" + value + " ColSpan:" + getColSpan(); + } + +} \ No newline at end of file -- cgit v1.2.3