org.jhotdraw8.draw.action.DistributeVerticallyAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.jhotdraw8.draw Show documentation
Show all versions of org.jhotdraw8.draw Show documentation
JHotDraw8 Drawing Framework
The newest version!
/*
* @(#)DistributeVerticallyAction.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.draw.action;
import javafx.event.ActionEvent;
import javafx.geometry.Bounds;
import javafx.scene.transform.Translate;
import org.jhotdraw8.application.resources.Resources;
import org.jhotdraw8.draw.DrawLabels;
import org.jhotdraw8.draw.DrawingEditor;
import org.jhotdraw8.draw.DrawingView;
import org.jhotdraw8.draw.figure.Figure;
import org.jhotdraw8.draw.model.DrawingModel;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class DistributeVerticallyAction extends AbstractDrawingViewAction {
public static final String ID = "edit.distributeVertically";
/**
* Creates a new instance.
*
* @param editor the drawing editor
*/
@SuppressWarnings("this-escape")
public DistributeVerticallyAction(DrawingEditor editor) {
super(editor);
Resources labels
= DrawLabels.getResources();
labels.configureAction(this, ID);
}
@Override
protected void onActionPerformed(ActionEvent e, DrawingView drawingView) {
final Set