Search in sources :

Example 1 with ScaleHandler

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);
}
Also used : ScaleHandler(net.sf.latexdraw.handlers.ScaleHandler) IShape(net.sf.latexdraw.models.interfaces.shape.IShape) RotationHandler(net.sf.latexdraw.handlers.RotationHandler)

Aggregations

RotationHandler (net.sf.latexdraw.handlers.RotationHandler)1 ScaleHandler (net.sf.latexdraw.handlers.ScaleHandler)1 IShape (net.sf.latexdraw.models.interfaces.shape.IShape)1