Package de.gsi.dataset
Interface EditConstraints
-
public interface EditConstraintsinterface describing possible constraints on data set modifications- Author:
- rstein
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanAdd(int index)default booleancanChange(int index)Determines if the specified data point can be modified.booleancanDelete(int index)default booleanisAcceptable(int index, double newX, double newY)Determines if the specified point can be accepted by the data set.booleanisXEditable()booleanisYEditable()
-
-
-
Method Detail
-
canDelete
boolean canDelete(int index)
- Parameters:
index- data set point index- Returns:
- true: if the specified data point can be deleted.
-
canAdd
boolean canAdd(int index)
- Parameters:
index- data set point index- Returns:
- true: if a new data point can be added at the specified data point.
-
canChange
default boolean canChange(int index)
Determines if the specified data point can be modified.- Parameters:
index- data point index- Returns:
- default is true
-
isXEditable
boolean isXEditable()
- Returns:
- true: if the horizontal values can be modified
-
isYEditable
boolean isYEditable()
- Returns:
- true: if the vertical values can be modified
-
isAcceptable
default boolean isAcceptable(int index, double newX, double newY)Determines if the specified point can be accepted by the data set. The specified point may be a new point (in this case index should be -1) or existing point. This method can be used e.g. to make sure that the new point doesn't have the same X coordinate as existing point.- Parameters:
index- index of the point being modified or -1 if it is a new pointnewX- X coordinate of the considered pointnewY- Y coordinate of the considered point- Returns:
trueif the point is acceptable by the data set,falseotherwise
-
-