/*
 * @(#)FigureAttributeEditorHandler.java
 * 
 * Copyright (c) 2009-2010 by the original authors of JHotDraw and all its
 * contributors. All rights reserved.
 * 
 * You may not use, copy or modify this file, except in compliance with the 
 * license agreement you entered into with the copyright holders. For details
 * see accompanying license terms.
 */
package org.jhotdraw.draw.event;

import org.jhotdraw.gui.*;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import org.jhotdraw.draw.AttributeKey;
import org.jhotdraw.draw.DrawingEditor;
import org.jhotdraw.draw.Figure;

/**
 * FigureAttributeEditorHandler mediates between an AttributeEditor and the
 * currently selected Figure's in a DrawingEditor.
 *
 * @author Werner Randelshofer
 * @version $Id: FigureAttributeEditorHandler.java 717 2010-11-21 12:30:57Z rawcoder $
 */
public class FigureAttributeEditorHandler extends AbstractAttributeEditorHandler {

    public FigureAttributeEditorHandler(AttributeKey key, AttributeEditor attributeEditor, DrawingEditor drawingEditor) {
        super(key, attributeEditor, drawingEditor);
    }

    public FigureAttributeEditorHandler(AttributeKey key, AttributeEditor attributeEditor, DrawingEditor drawingEditor, boolean updateDrawingEditorDefaults) {
        super(key, attributeEditor, drawingEditor, updateDrawingEditorDefaults);
    }
    public FigureAttributeEditorHandler(AttributeKey key, Map defaultAttributes, AttributeEditor attributeEditor, DrawingEditor drawingEditor, boolean updateDrawingEditorDefaults) {
        super(key, defaultAttributes, attributeEditor, drawingEditor, updateDrawingEditorDefaults);
    }

    @Override
    @SuppressWarnings("unchecked")
    protected Set
getEditedFigures() { return (Set
) ((activeView == null) ? Collections.emptySet() : activeView.getSelectedFigures()); } }

Ads help maintain this website.