public class SampleController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
INDEX_REPRESENTING_NO_SAMPLES |
private static int |
selectedSampleIndex |
Constructor and Description |
---|
SampleController() |
Modifier and Type | Method and Description |
---|---|
static void |
changeSampleFirstYear(int inFirstYear)
Adjusts the sample's first year to the value of the input parameter.
|
static void |
changeSampleLastYear(int inLastYear)
Adjusts the sample's last year to the value of the input parameter.
|
static void |
changeSampleName(java.lang.String inName)
Changes the name of the sample.
|
static void |
deleteSample()
Deletes a sample from the data.
|
static void |
deleteSample(int index)
Deletes the sample at the specified index.
|
static int |
getSelectedSampleIndex()
Gets the index of the selected sample.
|
static int |
getYearOfFirstEventInSelectedSample()
Gets the year of the first event in the sample.
|
static int |
getYearOfLastEventInSelectedSample()
Gets the year of the last event in the sample.
|
static void |
saveNewSample(FHX2_Sample inSample)
Saves a new sample to the FHX file.
|
static boolean |
selectedSampleHasEvents()
Checks if a sample contains any events.
|
static void |
setSampleBark(boolean inBark)
Sets the sample's bark status to true or false as determined by the input parameter.
|
static void |
setSamplePith(boolean inPith)
Sets the sample's pith status to true or false as determined by the input parameter.
|
static void |
setSelectedSampleIndex(int i)
Sets the index of the selected sample based on the input parameter.
|
static void |
swapSamples(int moveindex,
int replaceindex)
Performs a swap action on the two samples at the input indices.
|
static void |
updateAllSampleOpeningAndClosingChars()
Updates the closing characters of all the samples.
|
public static final int INDEX_REPRESENTING_NO_SAMPLES
private static int selectedSampleIndex
public static int getSelectedSampleIndex()
public static void setSelectedSampleIndex(int i)
i
- public static int getYearOfFirstEventInSelectedSample()
public static int getYearOfLastEventInSelectedSample()
public static void setSampleBark(boolean inBark)
inBark
- public static void setSamplePith(boolean inPith)
inPith
- public static void changeSampleName(java.lang.String inName)
inName
- public static void changeSampleFirstYear(int inFirstYear)
inFirstYear
- public static void changeSampleLastYear(int inLastYear)
inLastYear
- public static void updateAllSampleOpeningAndClosingChars()
public static void saveNewSample(FHX2_Sample inSample)
inSample
- public static void deleteSample()
public static void deleteSample(int index)
index
- public static boolean selectedSampleHasEvents()
public static void swapSamples(int moveindex, int replaceindex)
moveindex
- replaceindex
-