/** * @param isAngle * whether to return angle * @return construction default for number or angle */ public GeoNumeric getDefaultNumber(boolean isAngle) { return (GeoNumeric) cons.getConstructionDefaults() .getDefaultGeo(isAngle ? ConstructionDefaults.DEFAULT_ANGLE : ConstructionDefaults.DEFAULT_NUMBER); }
/** * Set visual style from defaults * * @param setEuclidianVisible * If eucldianVisible should be set */ final public void setConstructionDefaults(boolean setEuclidianVisible) { if (useVisualDefaults) { final ConstructionDefaults consDef = cons.getConstructionDefaults(); if (consDef != null) { consDef.setDefaultVisualStyles(this, false, setEuclidianVisible); } } }
/** * @param otherKernel * other kernel */ public void setConstructionDefaults(Kernel otherKernel) { getConstruction().getConstructionDefaults().setConstructionDefaults( otherKernel.getConstruction().getConstructionDefaults()); }
/** * Sets labeling style. See the constants in ConstructionDefaults (e.g. * LABEL_VISIBLE_AUTOMATIC) * * @param labelingStyle * labeling style for new objects */ public void setLabelingStyle(int labelingStyle) { this.labelingStyle = labelingStyle; labelingStyleSelected = true; getKernel().getConstruction().getConstructionDefaults() .resetLabelModeDefaultGeos(); }
.getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_NUMBER); if (defNumber != null) {
pt.remove(); pt.setAdvancedVisualStyle(kernel .getConstruction().getConstructionDefaults() .getDefaultGeo( ConstructionDefaults.DEFAULT_POINT_PREVIEW));
consDefaults = parentConstruction.getConstructionDefaults(); } else { newConstructionDefaults();
/** * @param view * view * @param points * start point and end point */ public DrawVector(EuclidianView view, ArrayList<GeoPointND> points) { this.view = view; this.points = points; geo = view.getKernel().getConstruction().getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_VECTOR); updatePreview(); }
/** * Creates a new DrawSegment for preview. * * @param view * view * @param points * preview points */ public DrawRay(EuclidianView view, ArrayList<GeoPointND> points) { this.view = view; this.points = points; geo = view.getKernel().getConstruction().getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_RAY); updatePreview(); }
/** * Creates a new DrawSegment for preview. * * @param view * Euclidian view to be used * @param points * endpoints of the segment */ public DrawSegment(EuclidianView view, ArrayList<GeoPointND> points) { this.view = view; this.points = points; geo = view.getKernel().getConstruction().getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_SEGMENT); updatePreview(); }
/** * Creates a new DrawPolygon for preview. * * @param view * Euclidian view to be used * @param points * vertices */ public DrawPolygon(EuclidianView view, ArrayList<GeoPointND> points) { this.view = view; this.points = points; geo = view.getKernel().getConstruction().getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_POLYGON); updatePreview(); }
/** * Creates a new DrawPolygon for preview. * * @param view * view * @param points * preview points */ public DrawPolyLine(EuclidianView view, ArrayList<? extends GeoPointND> points) { this.view = view; this.points = points; geo = view.getKernel().getConstruction().getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_POLYLINE); updatePreview(); }
/** * @param cons * construction * @param path * path * @param point * point */ public AlgoIntersectPathPoint(Construction cons, Path path, GeoPointND point) { super(cons); this.path = path; this.point = point; // create point on path and compute current location createOutputPoint(cons, path); // for AlgoElement setInputOutput(); P.setVisualStyle(cons.getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_POINT_DEPENDENT)); compute(); }
/** * create a new GeoAngle3D and set its interval (e.g. between 0 and 180 * degrees) as default angle * * @param cons * construction * @return new GeoAngle */ static public GeoAngle3D newAngle3DWithDefaultInterval( Construction cons) { GeoAngle3D ret = new GeoAngle3D(cons); // set the angle interval ret.setHasOrientation(true); ret.setDrawable(true); ret.setAngleStyle(((GeoAngle) cons.getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_ANGLE)) .getAngleStyle()); return ret; }
this.sphereND.setObjColor(cons.getConstructionDefaults().getNextColor());
/** * Creates a new DrawLine for preview. * * @param view * view * @param points * preview points * @param previewMode * preview mode */ public DrawLine(EuclidianView view, ArrayList<GeoPointND> points, PreviewType previewMode) { this.previewMode = previewMode; this.view = view; this.points = points; g = new GeoLine(view.getKernel().getConstruction()); geo = view.getKernel().getConstruction().getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_LINE); updatePreview(); }
/** * Creates a new DrawLine for preview of parallel or perpendicular tool * * @param view * view * @param points * preview points * @param lines * preview lines * @param parallel * true for paralel, false for perpendicular */ public DrawLine(EuclidianView view, ArrayList<GeoPointND> points, ArrayList<GeoLineND> lines, boolean parallel) { if (parallel) { previewMode = PreviewType.PARALLEL; } else { previewMode = PreviewType.PERPENDICULAR; } this.view = view; this.points = points; this.lines = lines; g = new GeoLine(view.getKernel().getConstruction()); geo = view.getKernel().getConstruction().getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_LINE); updatePreview(); }
geo.setVisualStyle(cons.getConstructionDefaults() .getDefaultGeo(ConstructionDefaults.DEFAULT_TEXT)); geo.setObjColor(GColor.RED);
setObjColor(cons.getConstructionDefaults().getNextColor()); } else { objColor = geo.objColor;
/** * @param line * line or conic * @param label * new label * @param info * evaluation flags */ protected void setEquationLabelAndVisualStyle(GeoElementND line, String label, EvalInfo info) { if (app.has(Feature.OBJECT_DEFAULTS_AND_COLOR) && kernel.getApplication().isUnbundledGraphing()) { line.setObjColor(cons.getConstructionDefaults().getNextColor()); line.setLineOpacity( EuclidianStyleConstants.OBJSTYLE_DEFAULT_LINE_OPACITY_EQUATION_GEOMETRY); } if ((info.isForceUserEquation() || !app.getSettings().getCasSettings().isEnabled()) && line instanceof EquationValue) { ((EquationValue) line).setToUser(); } if (app.has(Feature.FIX_EQUATIONS_AND_FUNCTIONS) && AlgebraItem.isEquationFromUser(line)) { line.setFixed(true); } if (info.isLabelOutput()) { line.setLabel(label); } }