@Override public synchronized String[] getAllObjectNames() { Construction cons = kernel.getConstruction(); TreeSet<GeoElement> geoSet = cons.getGeoSetConstructionOrder(); int size = geoSet.size(); // build objNames array String[] objNames = new String[size]; int i = 0; Iterator<GeoElement> it = geoSet.iterator(); while (it.hasNext()) { GeoElement geo = it.next(); objNames[i] = geo.getLabelSimple(); i++; } return objNames; }
@Override public synchronized String[] getAllObjectNames(String type) { Construction cons = kernel.getConstruction(); TreeSet<GeoElement> geoSet = cons.getGeoSetConstructionOrder(); int size = geoSet.size(); // build objNames array ArrayList<String> objList = new ArrayList<>(size / 2); Iterator<GeoElement> it = geoSet.iterator(); while (it.hasNext()) { GeoElement geo = it.next(); if (StringUtil.empty(type) || type.equalsIgnoreCase(geo.getTypeString())) { objList.add(geo.getLabelSimple()); } } return objList.toArray(new String[objList.size()]); }
/** * Load all tracing geos into the TraceGeoCollection. Called by * SpreadsheetView after undo or load file. */ public void loadTraceGeoCollection() { // Application.debug("loading trace geos"); traceGeoCollection.clear(); TreeSet<GeoElement> ts = app.getKernel().getConstruction() .getGeoSetConstructionOrder(); for (GeoElement geo : ts) { if (geo.getSpreadsheetTrace()) { traceGeoCollection.put(geo, geo.getTraceSettings()); // System.out.println("load this geo: " + geo.toString()); } } app.repaintSpreadsheet(); }
TreeSet<GeoElement> geos = cons.getGeoSetConstructionOrder(); Iterator<GeoElement> it = geos.iterator();
TreeSet<GeoElement> geoSet = cons.getGeoSetConstructionOrder();
private void getIntersectsBetween(GeoElement geo, ArrayList<GeoElementND> retList) { Construction cons = kernel.getConstruction(); GeoLine xAxisLine = kernel.getXAxis(); GeoLine yAxisLine = kernel.getYAxis(); if (geo == xAxisLine || geo == yAxisLine) { return; } Command cmd = new Command(kernel, "Intersect", false); CmdIntersect intersect = new CmdIntersect(kernel); boolean wasSuppressLabelActive = cons.isSuppressLabelsActive(); cons.setSuppressLabelCreation(true); Set<GeoElement> elements = new TreeSet<>(cons.getGeoSetConstructionOrder()); for (GeoElement element: elements) { if (hasIntersectsBetween(element) && element != geo && element.isEuclidianVisible()) { getSpecialPointsIntersect(geo, element, intersect, cmd, retList); } } cons.setSuppressLabelCreation(wasSuppressLabelActive); }
private static GeoLine line(GeoPoint P1, GeoPoint P2, Construction cons) { TreeSet<GeoElement> ges = cons.getGeoSetConstructionOrder(); Iterator<GeoElement> it = ges.iterator();
private static GeoSegment segment(GeoPoint P1, GeoPoint P2, Construction cons) { TreeSet<GeoElement> ges = cons.getGeoSetConstructionOrder(); Iterator<GeoElement> it = ges.iterator();
.getGeoSetConstructionOrder()) { if (geo1.isGeoPoint() && geo1.isVisibleInView3D() && !geo1.isChildOf(geo)) {
/** * TODO add support for layer / object type sorting of AV * * @return set over which TAB iterates: either alphabetical or construction * order */ public TreeSet<GeoElement> getTabbingSet() { if (this.kernel.getApplication().getGuiManager() != null && this.kernel .getApplication().getGuiManager().hasAlgebraViewShowing()) { if (this.kernel.getApplication().getSettings().getAlgebra() .getTreeMode() == SortMode.ORDER) { return kernel.getConstruction().getGeoSetConstructionOrder(); } } return kernel.getConstruction().getGeoSetLabelOrder(); }
if (app.getSelectionManager().getSelectedGeos().size() == 0) { it = app.getKernel().getConstruction().getGeoSetConstructionOrder() .iterator(); } else {
private boolean checkResetOrAnimationHit(int x, int y) { if (hitResetIcon()) { app.reset(); return true; } else if (view.hitAnimationButton(x, y) || this.animationButtonPressed) { this.animationButtonPressed = false; if (kernel.isAnimationRunning()) { kernel.getAnimatonManager().stopAnimation(); } else { kernel.getAnimatonManager().startAnimation(); } if (app.getGuiManager() != null && app.getGuiManager().hasAlgebraView()) { for (GeoElement geo : kernel.getConstruction() .getGeoSetConstructionOrder()) { if (geo instanceof GeoNumeric) { geo.updateRepaint(); } } } view.repaintView(); app.setUnsaved(); return true; } return false; }
.getGeoSetConstructionOrder().iterator(); ArrayList<GeoList> lists = new ArrayList<>(); while (it.hasNext()) {
.getGeoSetConstructionOrder(); Iterator<GeoElement> it = objects.iterator(); while (it.hasNext()) {