/** * return all points of the current construction * * @return points in construction */ public TreeSet<GeoElement> getPointSet() { return getConstruction().getGeoSetLabelOrder(GeoClass.POINT); }
private int countSliders() { int count = 0; // get all number and angle sliders TreeSet<GeoElement> numbers = cons .getGeoSetLabelOrder(GeoClass.NUMERIC); TreeSet<GeoElement> angles = cons.getGeoSetLabelOrder(GeoClass.ANGLE); numbers.addAll(angles); Iterator<GeoElement> it = numbers.iterator(); while (it.hasNext()) { GeoNumeric num = (GeoNumeric) it.next(); if (num.isSlider()) { count++; } } return count; }
/** return all points of the current construction */ @Override public TreeSet<GeoElement> getPointSet() { TreeSet<GeoElement> t3d = getConstruction() .getGeoSetLabelOrder(GeoClass.POINT3D); TreeSet<GeoElement> t = super.getPointSet(); t.addAll(t3d); // TODO add super.getPointSet() return t; }
private int countComboBoxes() { int count = 0; // get all number and angle sliders TreeSet<GeoElement> lists = cons.getGeoSetLabelOrder(GeoClass.LIST); if (lists != null) { Iterator<GeoElement> it = lists.iterator(); while (it.hasNext()) { GeoList list = (GeoList) it.next(); if (list.isEuclidianVisible() && list.drawAsComboBox()) { count++; } } } return count; }
/** * * * /** Select last geo of the construction. */ public void addLastGeoSelected() { GeoElement geo = kernel.getConstruction().getGeoSetLabelOrder().last(); if (geo != null) { addSelectedGeo(geo); } }
private int countCheckboxes() { int count = 0; // get all number and angle sliders TreeSet<GeoElement> bools = cons.getGeoSetLabelOrder(GeoClass.BOOLEAN); if (bools != null) { Iterator<GeoElement> it = bools.iterator(); while (it.hasNext()) { GeoBoolean num = (GeoBoolean) it.next(); if (num.isIndependent() && num.isEuclidianVisible()) { count++; } } } return count; }
/** * Select objects that were not selected so far and vice versa. */ final public void invertSelection() { Iterator<GeoElement> it = kernel.getConstruction().getGeoSetLabelOrder() .iterator(); while (it.hasNext()) { GeoElement geo = it.next(); if (selectedGeos.contains(geo)) { removeSelectedGeo(geo, false, false); } else { addSelectedGeo(geo, false, false); } } kernel.notifyRepaint(); updateSelection(); }
/** * Selects all geos in given layer * * @param layer * 0 - 9 for particular layer, -1 for all layers (Michael * Borcherds, 2008-03-03) */ final public void selectAll(int layer) { clearSelectedGeos(false); Iterator<GeoElement> it = kernel.getConstruction().getGeoSetLabelOrder() .iterator(); while (it.hasNext()) { GeoElement geo = it.next(); if ((layer == -1) || (geo.getLayer() == layer)) { addSelectedGeo(geo, false, false); } } kernel.notifyRepaint(); updateSelection(); }
.getGeoSetLabelOrder().iterator(); ArrayList<GeoElement> set = new ArrayList<>(); while (it.hasNext()) {
TreeSet<GeoElement> geos = cons1.getGeoSetLabelOrder(); if (geos == null) { return;
.getGeoSetLabelOrder(GeoClass.FUNCTION); boolean hasFunctions = hasVisibleObjects(allFunctions); .getGeoSetLabelOrder(GeoClass.CURVE_CARTESIAN); boolean hasCurves = hasVisibleObjects(allCurves);
/** * 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(); }