gt: 		JRDesignAreaPlot jrElement = (JRDesignAreaPlot) getValue();
context: /*******************************************************************************
   * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
   * http://www.jaspersoft.com.
   * 
   * Unless you have purchased  a commercial license agreement from Jaspersoft,
   * the following license terms  apply:
   * 
   * This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
   * which accompanies this distribution, and is available at
   * http://www.eclipse.org/legal/epl-v10.html
   ******************************************************************************/
  package com.jaspersoft.studio.components.chart.model.plot;
  
  import java.util.List;
  import java.util.Map;
  
  import net.sf.jasperreports.charts.JRAreaPlot;
  import net.sf.jasperreports.charts.design.JRDesignAreaPlot;
  import net.sf.jasperreports.engine.JRConstants;
  
  import org.eclipse.ui.views.properties.IPropertyDescriptor;
  
  import com.jaspersoft.studio.components.chart.messages.Messages;
  import com.jaspersoft.studio.help.HelpReferenceBuilder;
  import com.jaspersoft.studio.model.text.MFont;
  import com.jaspersoft.studio.model.text.MFontUtil;
  import com.jaspersoft.studio.property.descriptor.NullEnum;
  import com.jaspersoft.studio.property.descriptor.checkbox.CheckBoxPropertyDescriptor;
  import com.jaspersoft.studio.property.descriptor.color.ColorPropertyDescriptor;
  import com.jaspersoft.studio.property.descriptor.expression.ExprUtil;
  import com.jaspersoft.studio.property.descriptor.expression.JRExpressionPropertyDescriptor;
  import com.jaspersoft.studio.property.descriptor.text.FontPropertyDescriptor;
  import com.jaspersoft.studio.property.descriptor.text.NTextPropertyDescriptor;
  import com.jaspersoft.studio.property.descriptors.DegreePropertyDescriptor;
  import com.jaspersoft.studio.property.descriptors.DoublePropertyDescriptor;
  import com.jaspersoft.studio.utils.AlfaRGB;
  import com.jaspersoft.studio.utils.Colors;
  
  public class MAreaPlot extends MChartPlot {
  	public static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
  
  	public MAreaPlot(JRAreaPlot value) {
  		super(value);
  	}
  
  	@Override
  	public String getDisplayText() {
  		return Messages.MAreaPlot_area_plot;
  	}
  
  	private static IPropertyDescriptor[] descriptors;
  	private static Map<String, Object> defaultsMap;
  
  	@Override
  	public Map<String, Object> getDefaultsMap() {
  		return defaultsMap;
  	}
  
  	@Override
  	public IPropertyDescriptor[] getDescriptors() {
  		return descriptors;
  	}
  
  	@Override
  	public void setDescriptors(IPropertyDescriptor[] descriptors1, Map<String, Object> defaultsMap1) {
  		descriptors = descriptors1;
  		defaultsMap = defaultsMap1;
  	}
  
  	@Override
  	public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
  		super.createPropertyDescriptors(desc, defaultsMap);
  
  		JRExpressionPropertyDescriptor catAxisLabelExprD = new JRExpressionPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LABEL_EXPRESSION, Messages.common_category_axis_label_expression);
  		catAxisLabelExprD.setDescription(Messages.MAreaPlot_category_axis_label_expression_description);
  		desc.add(catAxisLabelExprD);
  		catAxisLabelExprD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#categoryAxisLabelExpression"));
  
  		ColorPropertyDescriptor valAxisLabelColorD = new ColorPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LABEL_COLOR, Messages.common_value_axis_label_color, NullEnum.NULL);
  		valAxisLabelColorD.setDescription(Messages.MAreaPlot_value_axis_label_color_description);
  		desc.add(valAxisLabelColorD);
  
  		JRExpressionPropertyDescriptor valAxisLabelExprD = new JRExpressionPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LABEL_EXPRESSION, Messages.common_category_value_axis_label_expression);
  		valAxisLabelExprD.setDescription(Messages.MAreaPlot_category_value_axis_label_expression_description);
  		desc.add(valAxisLabelExprD);
  		valAxisLabelExprD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#valueAxisLabelExpression"));
  
  		FontPropertyDescriptor valAxisLabelFontD = new FontPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LABEL_FONT, Messages.common_value_axis_label_font);
  		valAxisLabelFontD.setDescription(Messages.MAreaPlot_value_axis_label_font_description);
  		desc.add(valAxisLabelFontD);
  		valAxisLabelFontD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#labelFont"));
  
  		ColorPropertyDescriptor valAxisTickLabelColorD = new ColorPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR, Messages.common_value_axis_tick_label_color, NullEnum.NULL);
  		valAxisTickLabelColorD.setDescription(Messages.MAreaPlot_value_axis_tick_label_color_description);
  		desc.add(valAxisTickLabelColorD);
  
  		FontPropertyDescriptor valAxisTickLabelFontD = new FontPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_TICK_LABEL_FONT, Messages.common_value_axis_tick_label_font);
  		valAxisTickLabelFontD.setDescription(Messages.MAreaPlot_value_axis_tick_label_font_description);
  		desc.add(valAxisTickLabelFontD);
  		valAxisTickLabelFontD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#tickLabelFont"));
  
  		ColorPropertyDescriptor valAxisLineColorD = new ColorPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LINE_COLOR, Messages.common_value_axis_line_color, NullEnum.NULL);
  		valAxisLineColorD.setDescription(Messages.MAreaPlot_value_axis_line_color_description);
  		desc.add(valAxisLineColorD);
  
  		JRExpressionPropertyDescriptor rangeAxisMinExprD = new JRExpressionPropertyDescriptor(JRDesignAreaPlot.PROPERTY_RANGE_AXIS_MINVALUE_EXPRESSION, Messages.common_range_axis_minvalue_expression);
  		rangeAxisMinExprD.setDescription(Messages.MAreaPlot_range_axis_minvalue_expression_description);
  		desc.add(rangeAxisMinExprD);
  		rangeAxisMinExprD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#rangeAxisMinValueExpression"));
  
  		JRExpressionPropertyDescriptor rangeAxisMaxExprD = new JRExpressionPropertyDescriptor(JRDesignAreaPlot.PROPERTY_RANGE_AXIS_MAXVALUE_EXPRESSION, Messages.common_range_axis_maxvalue_expression);
  		rangeAxisMaxExprD.setDescription(Messages.MAreaPlot_range_axis_maxvalue_expression_description);
  		desc.add(rangeAxisMaxExprD);
  		rangeAxisMaxExprD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#rangeAxisMaxValueExpression"));
  
  		JRExpressionPropertyDescriptor domainAxisMinExprD = new JRExpressionPropertyDescriptor(JRDesignAreaPlot.PROPERTY_DOMAIN_AXIS_MINVALUE_EXPRESSION, Messages.common_domain_axis_minvalue_expression);
  		domainAxisMinExprD.setDescription(Messages.MAreaPlot_domain_axis_minvalue_expression_description);
  		desc.add(domainAxisMinExprD);
  		domainAxisMinExprD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#domainAxisMinValueExpression"));
  
  		JRExpressionPropertyDescriptor domainAxisMaxExprD = new JRExpressionPropertyDescriptor(JRDesignAreaPlot.PROPERTY_DOMAIN_AXIS_MAXVALUE_EXPRESSION, Messages.common_domain_axis_maxvalue_expression);
  		domainAxisMaxExprD.setDescription(Messages.MAreaPlot_domain_axis_maxvalue_expression_description);
  		desc.add(domainAxisMaxExprD);
  		domainAxisMaxExprD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#domainAxisMaxValueExpression"));
  
  		CheckBoxPropertyDescriptor valAxisVertTickLabelD = new CheckBoxPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_VERTICAL_TICK_LABELS, Messages.common_value_axis_vertical_tick_labels,
  				NullEnum.NULL);
  		valAxisVertTickLabelD.setDescription(Messages.MAreaPlot_value_axis_vertical_tick_labels_description);
  		valAxisVertTickLabelD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#axisFormat_verticalTickLabels"));
  		desc.add(valAxisVertTickLabelD);
  
  		NTextPropertyDescriptor valAxisTickLabelMaskD = new NTextPropertyDescriptor(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_TICK_LABEL_MASK, Messages.common_value_axis_tick_label_mask);
  		valAxisTickLabelMaskD.setDescription(Messages.MAreaPlot_value_axis_tick_label_mask_description);
  		valAxisTickLabelMaskD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#axisFormat_tickLabelMask"));
  		desc.add(valAxisTickLabelMaskD);
  
  		DoublePropertyDescriptor catAxisTickLabelRotation = new DegreePropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_ROTATION, Messages.common_category_axis_tick_label_rotation);
  		catAxisTickLabelRotation.setDescription(Messages.MAreaPlot_category_axis_tick_label_rotation_description);
  		desc.add(catAxisTickLabelRotation);
  		catAxisTickLabelRotation.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#categoryAxisFormat_labelRotation"));
  
  		CheckBoxPropertyDescriptor catAxisVertTickLabelD = new CheckBoxPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_VERTICAL_TICK_LABELS, Messages.common_category_axis_vertical_tick_labels,
  				NullEnum.NULL);
  		catAxisVertTickLabelD.setDescription(Messages.MAreaPlot_category_axis_vertical_tick_labels_description);
  		catAxisVertTickLabelD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#axisFormat_verticalTickLabels"));
  		desc.add(catAxisVertTickLabelD);
  
  		NTextPropertyDescriptor catAxisTickLabelMaskD = new NTextPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_MASK, Messages.common_category_axis_tick_label_mask);
  		catAxisTickLabelMaskD.setDescription(Messages.MAreaPlot_category_axis_tick_label_mask_description);
  		catAxisTickLabelMaskD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#axisFormat_tickLabelMask"));
  		desc.add(catAxisTickLabelMaskD);
  
  		FontPropertyDescriptor catAxisLabelFontD = new FontPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LABEL_FONT, Messages.common_category_axis_label_font);
  		catAxisLabelFontD.setDescription(Messages.MAreaPlot_category_axis_label_font_description);
  		desc.add(catAxisLabelFontD);
  		catAxisLabelFontD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#labelFont"));
  
  		ColorPropertyDescriptor catAxisTickLabelColorD = new ColorPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_COLOR, Messages.common_category_axis_tick_label_color,
  				NullEnum.NULL);
  		catAxisTickLabelColorD.setDescription(Messages.MAreaPlot_category_axis_tick_label_color_description);
  		desc.add(catAxisTickLabelColorD);
  
  		FontPropertyDescriptor catAxisTickLabelFontD = new FontPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_FONT, Messages.common_category_axis_tick_label_font);
  		catAxisTickLabelFontD.setDescription(Messages.MAreaPlot_category_axis_tick_label_font_description);
  		desc.add(catAxisTickLabelFontD);
  		catAxisTickLabelFontD.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#tickLabelFont"));
  
  		ColorPropertyDescriptor catAxisLineColorD = new ColorPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LINE_COLOR, Messages.common_category_axis_line_color, NullEnum.NULL);
  		catAxisLineColorD.setDescription(Messages.MAreaPlot_category_axis_line_color_description);
  		desc.add(catAxisLineColorD);
  
  		ColorPropertyDescriptor catAxisLabelColorD = new ColorPropertyDescriptor(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LABEL_COLOR, Messages.common_category_axis_label_color, NullEnum.NULL);
  		catAxisLabelColorD.setDescription(Messages.MAreaPlot_category_axis_label_color_description);
  		desc.add(catAxisLabelColorD);
  
  		setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#axisFormat");
  
  		catAxisLabelColorD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisTickLabelMaskD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisVertTickLabelD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisLineColorD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisLabelColorD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisLabelExprD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisLabelFontD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisTickLabelColorD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisTickLabelFontD.setCategory(Messages.MAreaPlot_category_axis);
  		catAxisTickLabelRotation.setCategory(Messages.MAreaPlot_category_axis);
  	}
  
  	/*
  	 * (non-Javadoc)
  	 * 
  	 * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java
  	 * .lang.Object)
  	 */
  	@Override
  	public Object getPropertyValue(Object id) {
  		JRDesignAreaPlot jrElement = (JRDesignAreaPlot) getValue();
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LABEL_COLOR))
  			return Colors.getSWTRGB4AWTGBColor(jrElement.getOwnCategoryAxisLabelColor());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_COLOR))
  			return Colors.getSWTRGB4AWTGBColor(jrElement.getOwnCategoryAxisTickLabelColor());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LINE_COLOR))
  			return Colors.getSWTRGB4AWTGBColor(jrElement.getOwnCategoryAxisLineColor());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LABEL_COLOR))
  			return Colors.getSWTRGB4AWTGBColor(jrElement.getOwnValueAxisLabelColor());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR))
  			return Colors.getSWTRGB4AWTGBColor(jrElement.getOwnValueAxisTickLabelColor());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LINE_COLOR))
  			return Colors.getSWTRGB4AWTGBColor(jrElement.getOwnValueAxisLineColor());
  
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_VERTICAL_TICK_LABELS))
  			return jrElement.getCategoryAxisVerticalTickLabels();
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_VERTICAL_TICK_LABELS))
  			return jrElement.getValueAxisVerticalTickLabels();
  
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_MASK))
  			return jrElement.getCategoryAxisTickLabelMask();
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_TICK_LABEL_MASK))
  			return jrElement.getValueAxisTickLabelMask();
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_ROTATION))
  			return jrElement.getCategoryAxisTickLabelRotation();
  
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LABEL_EXPRESSION))
  			return ExprUtil.getExpression(jrElement.getCategoryAxisLabelExpression());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LABEL_EXPRESSION))
  			return ExprUtil.getExpression(jrElement.getValueAxisLabelExpression());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_RANGE_AXIS_MAXVALUE_EXPRESSION))
  			return ExprUtil.getExpression(jrElement.getRangeAxisMaxValueExpression());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_RANGE_AXIS_MINVALUE_EXPRESSION))
  			return ExprUtil.getExpression(jrElement.getRangeAxisMinValueExpression());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_DOMAIN_AXIS_MAXVALUE_EXPRESSION))
  			return ExprUtil.getExpression(jrElement.getDomainAxisMaxValueExpression());
  		if (id.equals(JRDesignAreaPlot.PROPERTY_DOMAIN_AXIS_MINVALUE_EXPRESSION))
  			return ExprUtil.getExpression(jrElement.getDomainAxisMinValueExpression());
  
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_LABEL_FONT)) {
  			clFont = MFontUtil.getMFont(clFont, jrElement.getCategoryAxisLabelFont(), null, this);
  			return clFont;
  		}
  		if (id.equals(JRDesignAreaPlot.PROPERTY_CATEGORY_AXIS_TICK_LABEL_FONT)) {
  			ctFont = MFontUtil.getMFont(ctFont, jrElement.getCategoryAxisTickLabelFont(), null, this);
  			return ctFont;
  		}
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_LABEL_FONT)) {
  			vlFont = MFontUtil.getMFont(vlFont, jrElement.getValueAxisLabelFont(), null, this);
  			return vlFont;
  		}
  		if (id.equals(JRDesignAreaPlot.PROPERTY_VALUE_AXIS_TICK_LABEL_FONT)) {
  			vtFont = MFontUtil.getMFont(vtFont, jrElement.getValueAxisTickLabelFont(), null, this);
  			return vtFont;
  		}
  
  		return super.getPropertyValue(id);
  	}
  
  	private MFont clFont;
  	private MFont ctFont;
  	private MFont vlFont;
  	private MFont vtFont;
  
  	/*
  	 * (non-Javadoc)
  	 * 
  	 * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java
  	 * .lang.Object, java.lang.Object)
  	 */
  	@Override
  	public void setPropertyValue(Object id, Object value) {
  