class LabelApplier {

    public void applyLabel(final FeatureVisualizationStyle style, final boolean containsLabelAction,
            final FeatureVisualizationStyle defaultStyleCopy)
    {
        if (style != null && !containsLabelAction && defaultStyleCopy instanceof AbstractPathVisualizationStyle)
        {
            final AbstractPathVisualizationStyle toCopy = (AbstractPathVisualizationStyle)defaultStyleCopy;
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_ENABLED_PROPERTY_KEY,
                    Boolean.valueOf(toCopy.isLabelEnabled()), this);
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLOR_PROPERTY_KEY, toCopy.getLabelColor(), this);
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLUMN_KEY_PROPERTY_KEY,
                    toCopy.getLabelColumnPropertyName(), this);
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_SIZE_PROPERTY_KEY, Integer.valueOf(toCopy.getLabelSize()),
                    this);
        }
        else if (style != null && !containsLabelAction && defaultStyleCopy instanceof AbstractFeatureVisualizationStyle)
        {
            final AbstractFeatureVisualizationStyle toCopy = (AbstractFeatureVisualizationStyle)defaultStyleCopy;
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_ENABLED_PROPERTY_KEY,
                    Boolean.valueOf(toCopy.isLabelEnabled()), this);
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLOR_PROPERTY_KEY, toCopy.getLabelColor(), this);
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_COLUMN_KEY_PROPERTY_KEY,
                    toCopy.getLabelColumnPropertyName(), this);
            style.setParameter(AbstractFeatureVisualizationStyle.LABEL_SIZE_PROPERTY_KEY, Integer.valueOf(toCopy.getLabelSize()),
                    this);
        }
    }

}