private void initKernelVars() { this.kernel = origKernel; this.parser = origParser; this.cons = origKernel.getConstruction(); }
/************************************************* * Constructs a GeoPlot instance */ public StatGeo(App app, ICreateColor listener) { kernel = app.getKernel(); cons = kernel.getConstruction(); this.listener = listener; }
/**************************************************** * Constructs a StatDialogController * * @param app * application */ public DataAnalysisController(App app) { this.cons = app.getKernel().getConstruction(); }
static public void removeNoPropertiesGeoFromList(App app, List<GeoElement> fromList, List<GeoElement> toList) { Construction cons = app.getKernel().getConstruction(); toList.clear(); for (GeoElement geo : fromList) { if (cons.isConstantElement(geo) == Construction.Constants.NOT && !(geo instanceof GeoBoolean || geo instanceof GeoButton)) { toList.add(geo); } } }
/** * @param otherKernel * other kernel */ public void setConstructionDefaults(Kernel otherKernel) { getConstruction().getConstructionDefaults().setConstructionDefaults( otherKernel.getConstruction().getConstructionDefaults()); }
/** * * * /** Select last geo of the construction. */ public void addLastGeoSelected() { GeoElement geo = kernel.getConstruction().getGeoSetLabelOrder().last(); if (geo != null) { addSelectedGeo(geo); } }
@Override public boolean isValid() { return kernel.getConstruction().getGeoSetNameDescriptionOrder() .contains(getGeoBoolean()); }
/** * Creates new relation * * @param kernel * kernel */ public RelationNumerical(Kernel kernel) { app = kernel.getApplication(); loc = app.getLocalization(); cons = kernel.getConstruction(); reports = new HashSet<>(); }
/** * @param en * expression * @param fv * variable */ public GeoFunction(ExpressionNode en, FunctionVariable fv) { this(en.getKernel().getConstruction(), new Function(en, fv)); }
/************************************************* * Construct the panel * * @param app * @param listener */ public StatTableModel(App app, StatTableListener listener) { this.setListener(listener); this.app = app; cons = app.getKernel().getConstruction(); }
@Override public GeoFunction getGeoFunction() { GeoFunction gf = new GeoFunction(kernel.getConstruction()); gf.setFunction(this); return gf; }
public void storeUndoInfo() { if (app != null) { app.getKernel().getConstruction().getUndoManager() .storeUndoInfo(false); } } }
public CellRangeProcessor(MyTable table, App app) { this.table = table; this.app = app; loc = app.getLocalization(); tableModel = app.getSpreadsheetTableModel(); cons = app.getKernel().getConstruction(); }
/** * @param app * application */ public GeoGebraExport(App app) { this.app = app; this.kernel = app.getKernel(); this.construction = kernel.getConstruction(); this.euclidianView = app.getActiveEuclidianView(); this.tpl = StringTemplate.printFigures(StringType.PSTRICKS, 12, false); initBounds(); }
private GeoPointND customTextPosition() { return new GeoPoint(kernel.getConstruction(), textRectangleShape.getX(), textRectangleShape.getY() + app.getFontSize() + EuclidianStatic.EDITOR_MARGIN, 1); }
@Override protected GeoElement ray(String label, GeoPointND a, GeoVectorND v) { if (a.isGeoElement3D() || v.isGeoElement3D()) { AlgoRayPointVector3D algo = new AlgoRayPointVector3D( kernel.getConstruction(), label, a, v); return algo.getLine(); } return super.ray(label, a, v); }
/** * Create list of points from selected cells */ public void cmdListOfPoints() { GeoElement newGeo = cp.createPointGeoList(selectedCellRanges, false, true, true, true, true); app.getKernel().getConstruction() .addToConstructionList(newGeo.getParentAlgorithm(), true); newGeo.setLabel(null); }
@Override public TableValues getTableValuesView() { if (tableValues == null) { tableValues = createTableValuesView(); kernel.attach(tableValues); TableValuesModel model = tableValues.getTableValuesModel(); tableValuesPoints = new TableValuesPointsImpl(kernel.getConstruction(), model); model.registerListener(tableValuesPoints); } return tableValues; }
@Override protected GeoElement midpoint(GeoPointND p1, GeoPointND p2) { if (p1.isGeoElement3D() || p2.isGeoElement3D()) { AlgoMidpoint3D algo = new AlgoMidpoint3D( ec.getKernel().getConstruction(), p1, p2); return algo.getPoint(); } return super.midpoint(p1, p2); }
private GeoElement getJoinPointsSegment(GeoPoint first, GeoPoint last) { Construction cons = app.getKernel().getConstruction(); AlgoJoinPointsSegment algo = new AlgoJoinPointsSegment(cons, null, first, last); first.setEuclidianVisible(false); last.setEuclidianVisible(false); GeoElement line = algo.getOutput(0); line.updateRepaint(); line.setIsShape(true); line.setLabelVisible(false); return line; }