ingo@1990: package de.intevation.flys.exports;
ingo@1990: 
ingo@1990: 
ingo@1990: /**
felix@3148:  * Settings regarding legend of chart.
ingo@1990:  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
ingo@1990:  */
ingo@2058: public class LegendSection extends TypeSection {
ingo@1990: 
felix@3148:     public static final String VISIBILITY_ATTR  = "visibility";
felix@3148:     public static final String FONTSIZE_ATTR    = "font-size";
felix@3148:     public static final String AGGREGATION_ATTR = "aggregation-threshold";
ingo@1990: 
ingo@1990: 
ingo@1990:     public LegendSection() {
ingo@1990:         super("legend");
ingo@1990:     }
ingo@1990: 
ingo@1990: 
felix@3148:     /** Register font size attribute and value. */
ingo@1990:     public void setFontSize(int fontSize) {
ingo@1990:         if (fontSize <= 0) {
ingo@1990:             return;
ingo@1990:         }
ingo@1990: 
ingo@2058:         setIntegerValue(FONTSIZE_ATTR, fontSize);
ingo@1990:     }
ingo@1990: 
ingo@1990: 
ingo@2046:     public Integer getFontSize() {
ingo@2058:         return getIntegerValue(FONTSIZE_ATTR);
ingo@2046:     }
ingo@2046: 
ingo@2046: 
felix@3148:     public Integer getAggregationThreshold() {
felix@3148:         return getIntegerValue(AGGREGATION_ATTR);
felix@3148:     }
felix@3148: 
felix@3148: 
felix@3148:     public void setAggregationThreshold(int aggregationThreshold) {
felix@3148:         setIntegerValue(AGGREGATION_ATTR, Math.abs(aggregationThreshold));
felix@3148:     }
felix@3148: 
felix@3148: 
ingo@1990:     public void setVisibility(boolean visibility) {
ingo@2058:         setBooleanValue(VISIBILITY_ATTR, visibility);
ingo@1990:     }
ingo@2046: 
ingo@2046: 
ingo@2046:     public Boolean getVisibility() {
ingo@2058:         return getBooleanValue(VISIBILITY_ATTR);
ingo@2046:     }
ingo@1990: }
ingo@1990: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :