/** * Sets construction step to first step of construction protocol. Note: * showOnlyBreakpoints() is important here */ @Override public void firstStep() { int step = 0; if (cons.showOnlyBreakpoints()) { setConstructionStep(getNextBreakpoint(step)); } else { setConstructionStep(step); } }
/** * Sets construction step to last step of construction protocol. Note: * showOnlyBreakpoints() is important here */ @Override public void lastStep() { int step = getLastConstructionStep(); if (cons.showOnlyBreakpoints()) { setConstructionStep(getPreviousBreakpoint(step)); } else { setConstructionStep(step); } }
public void setConstructionStep(int step) { if (isViewAttached) { kernel.detach(data); } kernel.setConstructionStep(step); if (isViewAttached) { kernel.attach(data); } updateNavBarsAndRepaint(); }
/** * Sets construction step to next step of construction protocol. Note: * showOnlyBreakpoints() is important here */ @Override public void nextStep() { int step = cons.getStep() + 1; if (cons.showOnlyBreakpoints()) { setConstructionStep(getNextBreakpoint(step)); } else { ConstructionElement next = cons.getConstructionElement(step); if (next instanceof GeoElement && ((GeoElement) next).getCorrespondingCasCell() != null) { step++; } setConstructionStep(step); } }
/** * @param i * new step * @param breakpoints * use breakpoints */ public void setConstructionStep(double i, boolean breakpoints) { int step = breakpoints ? kernel.getBreakpointStep((int) i) : (int) i; if (app.getGuiManager() != null) { app.getGuiManager().getConstructionProtocolView() .setConstructionStep(step); } else { kernel.setConstructionStep(step); } }