public static boolean areEqual(Jc jc1, Jc jc2) { return (jc1 == jc2) || ((jc1 != null) && (jc2 != null) && ((jc1.getVal() == jc2.getVal()) || ((jc1.getVal() != null) && (jc1.getVal().equals(jc2.getVal())) ) ) ); }
@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 }
public static JcEnumeration fromValue(String v) { for (JcEnumeration c: JcEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); }
public Jc keepDiff(Jc orig, Jc from) { if (from != null && orig != null) { if (orig.getVal() != null && from.getVal() != null && orig.getVal().compareTo(from.getVal()) == 0) orig.setVal(null); } return StyleUtil.isEmpty(orig) ? null : orig; }
@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 JcEnumeration fromValue(String v) { for (JcEnumeration c: JcEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); }
&& effectiveJc.getVal().equals(JcEnumeration.LEFT))
@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 }
public static boolean areEqual(Jc jc1, Jc jc2) { return (jc1 == jc2) || ((jc1 != null) && (jc2 != null) && ((jc1.getVal() == jc2.getVal()) || ((jc1.getVal() != null) && (jc1.getVal().equals(jc2.getVal())) ) ) ); }
@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; } }
&& effectiveJc.getVal().equals(JcEnumeration.LEFT))