public class RotationalFitModel extends ListenerManager
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLOSE_SELECTION_BUTTON_EVENT |
static java.lang.String |
DISPLAY_BUTTON_EVENT |
static java.lang.String |
DISPLAY_SELECTION_ANNOTATION_EVENT |
static java.lang.String |
DISPLAY_SELECTION_EVENT |
static java.lang.String |
DO_DISPLAY_BUTTON_CLICK_EVENT |
static java.lang.String |
ERROR_FIT |
static java.lang.String |
MULTI_SELECTION_ALLOWED_EVENT |
static java.lang.String |
RESET_SELECTION_BUTTON_EVENT |
| Constructor and Description |
|---|
RotationalFitModel(FitInterface fitInterface)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFitRectangle(FitRotationalRectangle rec)
Add a fit rectangle selection to the current selection.
|
void |
clearAllSelections()
Clear all selections.
|
java.util.List<XYSeriesFitBorder> |
clearCurrentSelection()
Clear the current selection.
|
void |
closeSelection()
Close the current selection.
|
java.util.List<XYSeriesFitBorder> |
createSerieRectangle(java.awt.Color selectionColor,
int numSelection,
int i)
Create the
XYSeriesFitBorder associated with a selection. |
void |
displayFitPlot()
Display selections
|
void |
displayRectangle(double xLeft,
double yBottom,
double xRight,
double yTop)
Display a rectangle.
|
static double[] |
fitData(RotationalFitComponent rfc)
Compute the fit.
|
int |
getAllSelectionsSize()
Return the number of selection.
|
java.util.List<FitRotationalRectangle> |
getCurrentSelection()
Return the list of rectangles of the current selection.
|
java.lang.String |
getLastFitErrorsMessage()
Create then return an error message for the last fit.
|
int |
getNbCurrentSelection()
Return the number of "Rectangle" on the current selection.
|
int |
getNbSelection()
Return the number of selection.
|
int |
getNumSubSelection()
Return the number of rectangle in current selection.
|
void |
hideSeries()
Hide all fit "data" series (not the rectangle of the selection).
|
boolean |
isCloseSelected()
Return if close is selected.
|
boolean |
isFirstFitTrace()
Return if the first fit is traced.
|
boolean |
isLastFit()
Return if the fit is traced.
|
boolean |
isMultiSelectionAllowed()
Return if the multi selection is allowed.
|
boolean |
isRectTrace()
Return if a rectangle is traced.
|
boolean |
isSelectionAnnotationVisible()
Return if the selection annotation is visible.
|
boolean |
isSelectionVisible()
Return if the selection is visible.
|
void |
removeAllFitSeries()
Removes all fit series.
|
void |
removeLastSelection()
Remove the last selection.
|
void |
reset()
Reset the model.
|
void |
resetAllSelections()
Reset all selections.
|
void |
resetLastSelection()
Reset the last selection.
|
void |
setDisplayError(boolean display)
Set if a fit error will trigger an event (in order to be displayed on GUI).
|
void |
setMultiSelectionAllowed(boolean val)
Set the new allowed state of the multi selection.
|
void |
setRectTrace(boolean b)
Change the value of rectTrace.
|
void |
setSelectionAnnotationVisible(boolean visible)
Change the visibility of the selection annotation.
|
void |
setSelectionVisible(boolean visible)
Change the visibility of the selection.
|
addModelListener, clone, fireDataChanged, removeAllListener, removeModelListenerpublic static final java.lang.String CLOSE_SELECTION_BUTTON_EVENT
public static final java.lang.String RESET_SELECTION_BUTTON_EVENT
public static final java.lang.String DISPLAY_BUTTON_EVENT
public static final java.lang.String DO_DISPLAY_BUTTON_CLICK_EVENT
public static final java.lang.String ERROR_FIT
public static final java.lang.String DISPLAY_SELECTION_EVENT
public static final java.lang.String DISPLAY_SELECTION_ANNOTATION_EVENT
public static final java.lang.String MULTI_SELECTION_ALLOWED_EVENT
public RotationalFitModel(FitInterface fitInterface)
fitInterface - The FitInterface.public void reset()
public void clearAllSelections()
public void closeSelection()
public java.util.List<XYSeriesFitBorder> clearCurrentSelection()
public int getAllSelectionsSize()
public int getNbSelection()
public void removeLastSelection()
public int getNbCurrentSelection()
public java.util.List<FitRotationalRectangle> getCurrentSelection()
public void addFitRectangle(FitRotationalRectangle rec)
rec - The rectangle to add.public java.util.List<XYSeriesFitBorder> createSerieRectangle(java.awt.Color selectionColor, int numSelection, int i)
XYSeriesFitBorder associated with a selection.selectionColor - The color of the selection.numSelection - Number of the selection.i - Number of the current selection.XYSeriesFitBorder associated with the selection.public void displayRectangle(double xLeft,
double yBottom,
double xRight,
double yTop)
xLeft - The X left value.yBottom - The Y bottom value.xRight - The X right value.yTop - The Y top value.public void resetLastSelection()
public void resetAllSelections()
public void displayFitPlot()
public static double[] fitData(RotationalFitComponent rfc) throws java.lang.Exception
rfc - The RotationalFitComponent for the fit.java.lang.Exceptionpublic void setRectTrace(boolean b)
b - public boolean isSelectionVisible()
public void setSelectionVisible(boolean visible)
visible - The new visibility of the selection.public boolean isRectTrace()
public boolean isCloseSelected()
public boolean isLastFit()
public boolean isFirstFitTrace()
public int getNumSubSelection()
public java.lang.String getLastFitErrorsMessage()
public void setDisplayError(boolean display)
display - if a fit error will trigger an event.public void hideSeries()
public void removeAllFitSeries()
public boolean isSelectionAnnotationVisible()
public void setSelectionAnnotationVisible(boolean visible)
visible - The new visibility of the selection annotation.public void setMultiSelectionAllowed(boolean val)
val - the new allowed state of the multi selection.public boolean isMultiSelectionAllowed()