Java 类com.lowagie.text.pdf.HyphenationEvent 实例源码

项目:itext2    文件:FactoryProperties.java   
/**
 * Gets a HyphenationEvent based on a String.
 * For instance "en_UK,3,2" returns new HyphenationAuto("en", "UK", 3, 2);
 * @param   s a String, for instance "en_UK,2,2"
 * @return  a HyphenationEvent
 * @since   2.1.2
 */
public static HyphenationEvent getHyphenation(String s) {
    if (s == null || s.length() == 0) {
        return null;
    }
    String lang = s;
    String country = null;
    int leftMin = 2;
    int rightMin = 2;

    int pos = s.indexOf('_');
    if (pos == -1) {
        return new HyphenationAuto(lang, country, leftMin, rightMin);
    }
    lang = s.substring(0, pos);
    country = s.substring(pos + 1);
    pos = country.indexOf(',');
    if (pos == -1) {
        return new HyphenationAuto(lang, country, leftMin, rightMin);
    }
    s = country.substring(pos + 1);
    country = country.substring(0, pos);
    pos = s.indexOf(',');
    if (pos == -1) {
        leftMin = Integer.parseInt(s);
    } else {
        leftMin = Integer.parseInt(s.substring(0, pos));
        rightMin = Integer.parseInt(s.substring(pos + 1));
    }
    return new HyphenationAuto(lang, country, leftMin, rightMin);
}
项目:DroidText    文件:FactoryProperties.java   
/**
 * Gets a HyphenationEvent based on a String.
 * For instance "en_UK,3,2" returns new HyphenationAuto("en", "UK", 3, 2);
 * @param   s a String, for instance "en_UK,2,2"
 * @return  a HyphenationEvent
 * @since   2.1.2
 */
public static HyphenationEvent getHyphenation(String s) {
    if (s == null || s.length() == 0) {
        return null;
    }
    String lang = s;
    String country = null;
    int leftMin = 2;
    int rightMin = 2;

    int pos = s.indexOf('_');
    if (pos == -1) {
        return new HyphenationAuto(lang, country, leftMin, rightMin);
    }
    lang = s.substring(0, pos);
    country = s.substring(pos + 1);
    pos = country.indexOf(',');
    if (pos == -1) {
        return new HyphenationAuto(lang, country, leftMin, rightMin);
    }
    s = country.substring(pos + 1);
    country = country.substring(0, pos);
    pos = s.indexOf(',');
    if (pos == -1) {
        leftMin = Integer.parseInt(s);
    } else {
        leftMin = Integer.parseInt(s.substring(0, pos));
        rightMin = Integer.parseInt(s.substring(pos + 1));
    }
    return new HyphenationAuto(lang, country, leftMin, rightMin);
}
项目:itext2    文件:Chunk.java   
/**
    * Returns the hyphenation (if present).
    * @since    2.1.2
 */
   public HyphenationEvent getHyphenation() {
       if (attributes == null) return null;
       return (HyphenationEvent) attributes.get(Chunk.HYPHENATION);
}
项目:DroidText    文件:Chunk.java   
/**
    * Returns the hyphenation (if present).
    * @since    2.1.2
 */
   public HyphenationEvent getHyphenation() {
       if (attributes == null) return null;
       return (HyphenationEvent) attributes.get(Chunk.HYPHENATION);
}
项目:itext2    文件:Chunk.java   
/**
 * sets the hyphenation engine to this <CODE>Chunk</CODE>.
 * 
 * @param hyphenation
 *            the hyphenation engine
 * @return this <CODE>Chunk</CODE>
 */
public Chunk setHyphenation(HyphenationEvent hyphenation) {
    return setAttribute(HYPHENATION, hyphenation);
}
项目:itext2    文件:Phrase.java   
/**
    * Getter for the hyphenation settings.
    * @return   a HyphenationEvent
    * @since    2.1.2
    */
   public HyphenationEvent getHyphenation() {
    return hyphenation;
}
项目:itext2    文件:Phrase.java   
/**
    * Setter for the hyphenation.
    * @param    hyphenation a HyphenationEvent instance
    * @since    2.1.2
    */
public void setHyphenation(HyphenationEvent hyphenation) {
    this.hyphenation = hyphenation;
}
项目:itext2    文件:FactoryProperties.java   
/**
 * Gets a HyphenationEvent based on the hyphenation entry in ChainedProperties.
 * @param   props   ChainedProperties
 * @return  a HyphenationEvent
 * @since   2.1.2
 */
public static HyphenationEvent getHyphenation(ChainedProperties props) {
    return getHyphenation(props.getProperty("hyphenation"));
}
项目:itext2    文件:FactoryProperties.java   
/**
 * Gets a HyphenationEvent based on the hyphenation entry in a HashMap.
 * @param   props   a HashMap with properties
 * @return  a HyphenationEvent
 * @since   2.1.2
 */
public static HyphenationEvent getHyphenation(HashMap props) {
    return getHyphenation((String) props.get("hyphenation"));
}
项目:DroidText    文件:Chunk.java   
/**
 * sets the hyphenation engine to this <CODE>Chunk</CODE>.
 * 
 * @param hyphenation
 *            the hyphenation engine
 * @return this <CODE>Chunk</CODE>
 */
public Chunk setHyphenation(HyphenationEvent hyphenation) {
    return setAttribute(HYPHENATION, hyphenation);
}
项目:DroidText    文件:Phrase.java   
/**
    * Getter for the hyphenation settings.
    * @return   a HyphenationEvent
    * @since    2.1.2
    */
   public HyphenationEvent getHyphenation() {
    return hyphenation;
}
项目:DroidText    文件:Phrase.java   
/**
    * Setter for the hyphenation.
    * @param    hyphenation a HyphenationEvent instance
    * @since    2.1.2
    */
public void setHyphenation(HyphenationEvent hyphenation) {
    this.hyphenation = hyphenation;
}
项目:DroidText    文件:FactoryProperties.java   
/**
 * Gets a HyphenationEvent based on the hyphenation entry in ChainedProperties.
 * @param   props   ChainedProperties
 * @return  a HyphenationEvent
 * @since   2.1.2
 */
public static HyphenationEvent getHyphenation(ChainedProperties props) {
    return getHyphenation(props.getProperty("hyphenation"));
}
项目:DroidText    文件:FactoryProperties.java   
/**
 * Gets a HyphenationEvent based on the hyphenation entry in a HashMap.
 * @param   props   a HashMap with properties
 * @return  a HyphenationEvent
 * @since   2.1.2
 */
public static HyphenationEvent getHyphenation(HashMap props) {
    return getHyphenation((String) props.get("hyphenation"));
}
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteArchive    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }
项目:MesquiteCore    文件:Chunk.java   
/** sets the hyphenation engine to this <CODE>Chunk</CODE>.
* @param hyphenation the hyphenation engine
* @return this <CODE>Chunk</CODE>
*/
   public Chunk setHyphenation(HyphenationEvent hyphenation) {
       return setAttribute(HYPHENATION, hyphenation);
   }