001 /** 002 * This library is free software; you can redistribute it and/or modify it 003 * under the terms of the GNU Lesser General Public License (LGPL) as 004 * published by the Free Software Foundation; either version 3.0 of the 005 * License, or (at your option) any later version. 006 * 007 * This library is distributed in the hope that it will be useful, but 008 * WITHOUT ANY WARRANTY; without even the implied warranty of 009 * MERCHANTABILITY of FITNESS FOR A PARTICULAR PURPOSE. See the GNU 010 * Lesser General Public License for more details. 011 */ 012 013 /** 014 * Title: JBarcodeBean 015 * Description: Barcode JavaBeans Component 016 * Copyright: Copyright (C) 2004 017 * Company: Dafydd Walters 018 */ 019 package net.sourceforge.jbarcodebean.model; 020 021 /** 022 * This class, which implements the {@link BarcodeStrategy} interface, 023 * knows how to encode the 3:1 (wide) 024 * variant of the Code 3 of 9 barcode type. 025 */ 026 public class Code39 extends BaseCode39 implements java.io.Serializable { 027 028 /** 029 * This implementation of <tt>getCodes</tt> returns {@link BaseCode39#codes}. 030 */ 031 protected CharacterCode[] getCodes() { 032 return BaseCode39.codes; 033 } 034 035 /** 036 * Returns an UPPER CASE version of the <tt>text</tt> parameter. 037 */ 038 protected String preprocess(String text) { 039 return text.toUpperCase(); 040 } 041 042 /** 043 * Returns an UPPER CASE version of the <tt>text</tt> parameter. 044 */ 045 protected String getBarcodeLabelText(String text) { 046 return text.toUpperCase(); 047 } 048 } 049