/** Sets the label beneath the canvas */ public void setCurveLabel() { String s; if (points == null) { s = Messages.getString("ECView.NoCurve"); // $NON-NLS-1$ } else s = curve.toString(); lblCurve.setText(s); }
public void setPointQ(FpPoint q) { if (q == null) { pointQ = null; lblQ.setText(""); // $NON-NLS-1$ setPointR(null); } else { pointQ = q; lblQ.setText( "(" + ((double) pointQ.x / 100) + "|" + ((double) pointQ.y / 100) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ btnDeletePoints.setEnabled(true); view.log( Messages.getString("ECView.Point") + " Q = " + "(" + ((double) pointQ.x / 100) + "|" + ((double) pointQ.y / 100) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ setPointR(curve.addPoints(pointP, pointQ)); } updateCurve(false); }
/** This method controls all the parameters that need to be updated */ public void updateCurve(boolean full) { if (full) { pointSelect = null; pointP = null; pointQ = null; pointR = null; setPointP(null); if (curve == null) curve = new EC(); curve.updateCurve( spnrA.getSelection(), spnrB.getSelection(), 50 - sliderZoom.getSelection(), canvasCurve.getSize()); points = curve.getPoints(); setCurveLabel(); } canvasCurve.redraw(); }