org.jhotdraw8.draw.action.SelectSameAction 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!
/*
* @(#)SelectSameAction.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.draw.action;
import javafx.collections.ObservableSet;
import javafx.event.ActionEvent;
import org.jhotdraw8.application.action.Action;
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.icollection.readonly.ReadOnlySet;
import org.jspecify.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* SelectSameAction.
*
* @author Werner Randelshofer
*/
public class SelectSameAction extends AbstractDrawingViewAction {
public static final String ID = "edit.selectSame";
/**
* Creates a new instance.
*
* @param editor the drawing editor
*/
public SelectSameAction(DrawingEditor editor) {
super(editor);
Resources labels = DrawLabels.getResources();
set(Action.ID_KEY, ID);
labels.configureAction(this, ID);
}
@Override
protected void onActionPerformed(ActionEvent e, DrawingView dview) {
ObservableSet