Browse Source

Checkstyle fixes


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@601433 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_95beta
Adrian Cumiskey 16 years ago
parent
commit
fd3fa2af76
1 changed files with 27 additions and 27 deletions
  1. 27
    27
      src/java/org/apache/fop/render/afp/fonts/CharacterSet.java

+ 27
- 27
src/java/org/apache/fop/render/afp/fonts/CharacterSet.java View File



import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;


import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
/** /**
* The code page to which the character set relates * The code page to which the character set relates
*/ */
protected String _codePage;
protected String codePage;


/** /**
* The encoding used for the code page * The encoding used for the code page
*/ */
protected String _encoding;
protected String encoding;


/** /**
* The character set relating to the font * The character set relating to the font
*/ */
protected String _name;
protected String name;


/** /**
* The name of the character set as EBCIDIC bytes * The name of the character set as EBCIDIC bytes
*/ */
private byte[] _nameBytes;
private byte[] nameBytes;


/** /**
* The path to the installed fonts * The path to the installed fonts
*/ */
protected String _path;
protected String path;


/** /**
* Indicator as to whether to metrics have been loaded * Indicator as to whether to metrics have been loaded
*/ */
private boolean _isMetricsLoaded = false;
private boolean isMetricsLoaded = false;


/** /**
* The current orientation (currently only 0 is suppoted by FOP) * The current orientation (currently only 0 is suppoted by FOP)
*/ */
private String _currentOrientation = "0";
private String currentOrientation = "0";


/** /**
* The collection of objects for each orientation * The collection of objects for each orientation
*/ */
private HashMap _characterSetOrientations;
private Map characterSetOrientations = null;


/** /**
* Constructor for the CharacterSetMetric object, the character set is used * Constructor for the CharacterSetMetric object, the character set is used
} }


if (name.length() < 8) { if (name.length() < 8) {
_name = StringUtils.rpad(name, ' ', 8);
this.name = StringUtils.rpad(name, ' ', 8);
} else { } else {
_name = name;
this.name = name;
} }


try { try {


_nameBytes = name.getBytes(AFPConstants.EBCIDIC_ENCODING);
this.nameBytes = name.getBytes(AFPConstants.EBCIDIC_ENCODING);


} catch (UnsupportedEncodingException usee) { } catch (UnsupportedEncodingException usee) {


_nameBytes = name.getBytes();
this.nameBytes = name.getBytes();
log.warn( log.warn(
"Constructor:: UnsupportedEncodingException translating the name " "Constructor:: UnsupportedEncodingException translating the name "
+ name); + name);


} }


_codePage = codePage;
_encoding = encoding;
_path = path;
_characterSetOrientations = new HashMap(4);
this.codePage = codePage;
this.encoding = encoding;
this.path = path;
this.characterSetOrientations = new HashMap(4);


} }


*/ */
public void addCharacterSetOrientation(CharacterSetOrientation cso) { public void addCharacterSetOrientation(CharacterSetOrientation cso) {


_characterSetOrientations.put(
characterSetOrientations.put(
String.valueOf(cso.getOrientation()), String.valueOf(cso.getOrientation()),
cso); cso);


* @return the path where the font resources are installed * @return the path where the font resources are installed
*/ */
public String getPath() { public String getPath() {
return _path;
return path;
} }


/** /**
*/ */
private void load() { private void load() {


if (!_isMetricsLoaded) {
if (!isMetricsLoaded) {


AFPFontReader afpFontReader = new AFPFontReader(); AFPFontReader afpFontReader = new AFPFontReader();
afpFontReader.loadCharacterSetMetric(this); afpFontReader.loadCharacterSetMetric(this);
_isMetricsLoaded = true;
isMetricsLoaded = true;


} }


* @return String * @return String
*/ */
public String getName() { public String getName() {
return _name;
return name;
} }


/** /**
* @return byte[] * @return byte[]
*/ */
public byte[] getNameBytes() { public byte[] getNameBytes() {
return _nameBytes;
return nameBytes;
} }


/** /**
* @return String * @return String
*/ */
public String getCodePage() { public String getCodePage() {
return _codePage;
return codePage;
} }


/** /**
* @return String * @return String
*/ */
public String getEncoding() { public String getEncoding() {
return _encoding;
return encoding;
} }


/** /**
*/ */
private CharacterSetOrientation getCharacterSetOrientation() { private CharacterSetOrientation getCharacterSetOrientation() {


CharacterSetOrientation c =
(CharacterSetOrientation) _characterSetOrientations.get(
_currentOrientation);
CharacterSetOrientation c
= (CharacterSetOrientation) characterSetOrientations.get(currentOrientation);
return c; return c;


} }

Loading…
Cancel
Save