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);
}
}
}
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);
}
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);
}
Aggregations