public static boolean isEmpty(Jc jc) { return (jc == null) || (jc.getVal() == null); }
@Override public void setXslFO(Element foElement) { if (((Jc)this.getObject()).getVal()==null) { log.error("justification missing value"); return; } String val = ((Jc)this.getObject()).getVal().value(); if (val.equals("left") || val.equals("center") || val.equals("right")) { foElement.setAttribute(FO_NAME, val); } else if (val.equals("both")) { foElement.setAttribute(FO_NAME, "justify"); } // ignore the other possibilities for now }
@Override public String getCssProperty() { String val = ((Jc)this.getObject()).getVal().value(); if (val.equals("left") || val.equals("center") || val.equals("right")) { return composeCss(CSS_NAME, val); } else if (val.equals("both")) { return composeCss(CSS_NAME, "justify"); // IE only: text-justify:inter-ideograph;" ); } // ignore the other possibilities for now else { return CSS_NULL; } }
public static Jc apply(Jc source, Jc destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createJc(); destination.setVal(source.getVal()); //enum } return destination; }
&& effectiveJc.getVal().equals(JcEnumeration.LEFT))
public Jc getCopy(Jc copy, boolean whenNull) { if (copy != null) { Jc result = myFactory.createJc(); result.setVal(copy.getVal()); return result; } if (whenNull) { return myFactory.createJc(); } return null; }
public static boolean isEmpty(Jc jc) { return (jc == null) || (jc.getVal() == null); }
@Override public void setXslFO(Element foElement) { if (((Jc)this.getObject()).getVal()==null) { log.error("justification missing value"); return; } String val = ((Jc)this.getObject()).getVal().value(); if (val.equals("left") || val.equals("center") || val.equals("right")) { foElement.setAttribute(FO_NAME, val); } else if (val.equals("both")) { foElement.setAttribute(FO_NAME, "justify"); } // ignore the other possibilities for now }
@Override public String getCssProperty() { String val = ((Jc)this.getObject()).getVal().value(); if (val.equals("left") || val.equals("center") || val.equals("right")) { return composeCss(CSS_NAME, val); } else if (val.equals("both")) { return composeCss(CSS_NAME, "justify"); // IE only: text-justify:inter-ideograph;" ); } // ignore the other possibilities for now else { return CSS_NULL; } }
public static Jc apply(Jc source, Jc destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createJc(); destination.setVal(source.getVal()); //enum } return destination; }
&& effectiveJc.getVal().equals(JcEnumeration.LEFT))