use of net.sf.latexdraw.handlers.ScaleHandler in project latexdraw by arnobl.
the class Border method initialize.
@Override
public void initialize(final URL location, final ResourceBundle resources) {
scaleHandlers.add(new ScaleHandler(Position.NW, canvas.getSelectionBorder()));
scaleHandlers.add(new ScaleHandler(Position.NORTH, canvas.getSelectionBorder()));
scaleHandlers.add(new ScaleHandler(Position.NE, canvas.getSelectionBorder()));
scaleHandlers.add(new ScaleHandler(Position.WEST, canvas.getSelectionBorder()));
scaleHandlers.add(new ScaleHandler(Position.EAST, canvas.getSelectionBorder()));
scaleHandlers.add(new ScaleHandler(Position.SW, canvas.getSelectionBorder()));
scaleHandlers.add(new ScaleHandler(Position.SOUTH, canvas.getSelectionBorder()));
scaleHandlers.add(new ScaleHandler(Position.SE, canvas.getSelectionBorder()));
rotHandler = new RotationHandler(canvas.getSelectionBorder());
scaleHandlers.forEach(handler -> canvas.addToWidgetLayer(handler));
canvas.addToWidgetLayer(rotHandler);
canvas.addToWidgetLayer(arcHandlerStart);
canvas.addToWidgetLayer(arcHandlerEnd);
canvas.getDrawing().getSelection().getShapes().addListener((ListChangeListener.Change<? extends IShape> evt) -> setActivated(!canvas.getDrawing().getSelection().isEmpty()));
setActivated(false);
}
Aggregations