Refine search
/** * Add the alias to the SetNestedPropertiesRule object created by the * enclosing <set-nested-properties-rule> tag. */ @Override public void begin(Attributes attributes) { String attrName = attributes.getValue("attr-name"); String propName = attributes.getValue("prop-name"); SetNestedPropertiesRule rule = (SetNestedPropertiesRule) digester.peek(); rule.addAlias(attrName, propName); } }
/** * */ public Object createObject(Attributes atts) { JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2); JRDesignRectangle rectangle = new JRDesignRectangle(jasperDesign); String radius = atts.getValue(JRXmlConstants.ATTRIBUTE_radius); if (radius != null && radius.length() > 0) { rectangle.setRadius(Integer.parseInt(radius)); } return rectangle; }
/** * Add the alias to the SetPropertiesRule object created by the * enclosing <set-properties-rule> tag. */ @Override public void begin(Attributes attributes) { String attrName = attributes.getValue("attr-name"); String propName = attributes.getValue("prop-name"); SetPropertiesRule rule = (SetPropertiesRule) digester.peek(); rule.addAlias(attrName, propName); } }
/** * */ public Object createObject(Attributes atts) { JasperPrint jasperPrint = (JasperPrint)digester.peek(digester.getCount() - 2); JRBasePrintRectangle rectangle = new JRBasePrintRectangle(jasperPrint.getDefaultStyleProvider()); String radius = atts.getValue(JRXmlConstants.ATTRIBUTE_radius); if (radius != null && radius.length() > 0) { rectangle.setRadius(Integer.parseInt(radius)); } return rectangle; }
/** * <p>Create or retrieve a <code>FormSet</code> for the specified * attributes.</p> * * @param attributes The sax attributes for the formset element. * @return The FormSet for a locale. * @throws Exception If an error occurs creating the FormSet. */ @Override public Object createObject(Attributes attributes) throws Exception { ValidatorResources resources = (ValidatorResources)digester.peek(0); String language = attributes.getValue("language"); String country = attributes.getValue("country"); String variant = attributes.getValue("variant"); return createFormSet(resources, language, country, variant); }
/** * */ public Object createObject(Attributes atts) { JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2); JRDesignBreak breakElement = new JRDesignBreak(jasperDesign); Byte type = (Byte)JRXmlConstants.getBreakTypeMap().get(atts.getValue(JRXmlConstants.ATTRIBUTE_type)); if (type != null) { breakElement.setType(type.byteValue()); } return breakElement; }
/** * */ public Object createObject(Attributes atts) { JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2); JRDesignLine line = new JRDesignLine(jasperDesign); Byte direction = (Byte)JRXmlConstants.getDirectionMap().get(atts.getValue(JRXmlConstants.ATTRIBUTE_direction)); if (direction != null) { line.setDirection(direction.byteValue()); } return line; }
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { // Create the Arg Arg arg = new Arg(); arg.setKey(attributes.getValue("key")); arg.setName(attributes.getValue("name")); if ("false".equalsIgnoreCase(attributes.getValue("resource"))) { arg.setResource(false); } try { final int length = "arg".length(); // skip the arg prefix arg.setPosition(Integer.parseInt(name.substring(length))); } catch (Exception ex) { getLog().error("Error parsing Arg position: " + name + " " + arg + " " + ex); } // Add the arg to the parent field ((Field)getDigester().peek(0)).addArg(arg); } };
/** * */ public Object createObject(Attributes atts) { JasperPrint jasperPrint = (JasperPrint)digester.peek(digester.getCount() - 2); JRBasePrintLine line = new JRBasePrintLine(jasperPrint.getDefaultStyleProvider()); Byte direction = (Byte)JRXmlConstants.getDirectionMap().get(atts.getValue(JRXmlConstants.ATTRIBUTE_direction)); if (direction != null) { line.setDirection(direction.byteValue()); } return line; }
/** {@inheritDoc} */ @Override public void begin(String namespace, String name, Attributes attributes) { Attribute attribute = (Attribute) digester.peek(0); Definition definition = (Definition) digester.peek(1); definition.putAttribute(attributes.getValue("name"), attribute, "true".equals(attributes.getValue("cascade"))); } }