1 51 package org.apache.fop.layout.hyphenation; 52 53 import java.io.Serializable ; 54 55 67 68 public class Hyphen implements Serializable { 69 public String preBreak; 70 public String noBreak; 71 public String postBreak; 72 73 Hyphen(String pre, String no, String post) { 74 preBreak = pre; 75 noBreak = no; 76 postBreak = post; 77 } 78 79 Hyphen(String pre) { 80 preBreak = pre; 81 noBreak = null; 82 postBreak = null; 83 } 84 85 public String toString() { 86 if (noBreak == null && postBreak == null && preBreak != null 87 && preBreak.equals("-")) 88 return "-"; 89 StringBuffer res = new StringBuffer ("{"); 90 res.append(preBreak); 91 res.append("}{"); 92 res.append(postBreak); 93 res.append("}{"); 94 res.append(noBreak); 95 res.append('}'); 96 return res.toString(); 97 } 98 99 } 100 | Popular Tags |