Search in sources :

Example 1 with AxesStyle

use of net.sf.latexdraw.models.interfaces.shape.AxesStyle in project latexdraw by arnobl.

the class ViewAxes method updatePath.

public void updatePath(final boolean axes, final boolean ticks, final boolean texts, final boolean arrows) {
    final AxesStyle axesStyle = model.getAxesStyle();
    if (arrows || axes) {
    // viewArrows.update(model.getAxesStyle().supportsArrows());
    }
    if (axes) {
        mainAxes.getElements().clear();
        switch(axesStyle) {
            case AXES:
                updatePathAxes();
                break;
            case FRAME:
                updatePathFrame();
                break;
            case NONE:
                break;
        }
    }
    if (ticks) {
        pathTicks.getElements().clear();
        updatePathTicks();
    }
    if (texts) {
        cleanLabels();
        if (model.getLabelsDisplayed() != PlottingStyle.NONE) {
            labels.setDisable(false);
            updatePathLabels();
        } else {
            labels.setDisable(true);
        }
    }
}
Also used : AxesStyle(net.sf.latexdraw.models.interfaces.shape.AxesStyle)

Example 2 with AxesStyle

use of net.sf.latexdraw.models.interfaces.shape.AxesStyle in project latexdraw by arnobl.

the class TestPencilAxesStyle method testSelectLineStylePencil.

@Test
public void testSelectLineStylePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesAxes, updateIns).execute();
    AxesStyle style = shapeAxes.getSelectionModel().getSelectedItem();
    selectAxeStyle.execute();
    AxesStyle newStyle = shapeAxes.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((IAxesProp) pencil.createShapeInstance()).getAxesStyle());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) AxesStyle(net.sf.latexdraw.models.interfaces.shape.AxesStyle) Test(org.junit.Test)

Example 3 with AxesStyle

use of net.sf.latexdraw.models.interfaces.shape.AxesStyle in project latexdraw by arnobl.

the class TestHandAxeStyle method testSelectLineStyleSelection.

@Test
public void testSelectLineStyleSelection() {
    new CompositeGUIVoidCommand(activateHand, selectionAddAxes, selectionAddRec, selectionAddAxes, updateIns).execute();
    AxesStyle style = shapeAxes.getSelectionModel().getSelectedItem();
    selectAxeStyle.execute();
    AxesStyle newStyle = shapeAxes.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((IAxesProp) drawing.getSelection().getShapeAt(0)).getAxesStyle());
    assertEquals(newStyle, ((IAxesProp) drawing.getSelection().getShapeAt(2)).getAxesStyle());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) AxesStyle(net.sf.latexdraw.models.interfaces.shape.AxesStyle) Test(org.junit.Test)

Aggregations

AxesStyle (net.sf.latexdraw.models.interfaces.shape.AxesStyle)3 CompositeGUIVoidCommand (net.sf.latexdraw.instruments.CompositeGUIVoidCommand)2 Test (org.junit.Test)2