public class GUITab
extends java.lang.Object
Constructor and Description |
---|
GUITab(GUIPanel gp,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addGUIelement(GUIelement ge)
Append the provided
GUIelement to the end of the GUIList |
void |
addGUIelement(GUIelement ge,
int position)
Insert a GUIelement provided at the given position in the
GUIList . |
void |
applyFilter(int setOperation)
calls
GUIelement.applyFilter(int) on all the elements of the
GUIList . |
void |
applySelection(int setOperation)
calls
GUIelement.applySelection(int) on all the elements of the
GUIList . |
void |
editCurrentComponent(boolean interactive)
Start editing the currently focused GUI element.
|
void |
focusGUIelement(GUIelement ge)
Defocus the currently focused element and focus the given element in the
GUIList . |
void |
focusGUIelement(int index)
Defocus the currently focused element and focus the element, given its
index in the GUIList.
|
GUIelement |
getFocusedGUIElement() |
int |
getFocusedGUIElementIndex() |
int |
getGUIElementIndex(GUIelement ge) |
java.util.ArrayList<GUIelement> |
getGUIList() |
int |
getGUIListSize() |
GUIPanel |
getGUIPanel() |
void |
insertGUIelement(int currentGUIElementIndex,
java.lang.String name,
boolean copy)
Insert a GUIelement, defined by the UniqueName provided, at the position
provided, copying it first, if desired, and inserting the copy instead.
|
void |
jumpToMark(java.lang.String mark)
Focus the element, which was previously assigned a mark.
|
void |
jumpToPercent(IRepetitionCounter irc)
Deprecated.
@param irc
|
GUIelement |
makeCopy() |
void |
paintGUIelements()
Paint all the visible elements on this tab by calling their
GUIelement.paint(javafx.scene.canvas.GraphicsContext, double, double) method. |
void |
removeGUIelement(int index)
Remove the GUIelement on the provided index in GUIList if any; ignore
otherwise.
|
void |
setGUIList(java.util.ArrayList<GUIelement> currentList)
sets the
GUIList to be the one provided. |
void |
setGUIPanel(GUIPanel gp)
Set the GUI panel this tab is on to the one provided.
|
void |
setMark(java.lang.String mark)
Adds the mark with a letter, determined by the string, to the currently
focused GUI element.
|
void |
setPreviewRegex(java.lang.String regex,
int setOperation)
calls
GUIelement.setPreviewRegex(java.lang.String, int) on all
the elements of the GUIList . |
void |
traverseElements(boolean forward)
Unfocus the currently focused element; then focus the next element (if
the provided argument was true) or the previous one otherwise.
|
void |
traverseElements(int steps)
Unfocus the currently focused element; then focus the nth next element
after the one currently focused.
|
public GUITab(GUIPanel gp, java.lang.String name)
public void setMark(java.lang.String mark)
mark
- the mark letter to addpublic void jumpToMark(java.lang.String mark)
mark
- #setMark(Java.lang.String mark)
public GUIelement getFocusedGUIElement()
public int getFocusedGUIElementIndex()
GUIList
of the currently focused element.public int getGUIElementIndex(GUIelement ge)
ge
- the GUIelement in question.GUIList
of the provided element.public void insertGUIelement(int currentGUIElementIndex, java.lang.String name, boolean copy)
currentGUIElementIndex
- where to insert the element; This is the
exact position in the GUIList on which it will be placed. The GUIelement
previously on this position and all the subsequent ones will be shifted
to the right (1 will be added to their indices).name
- the UniqueName of the element which should be insertedcopy
- whether a copy should be inserted instead (true) or not
(false)GUIelement.makeCopy()
,
#addGUIelement(chartadvancedpie.GUIelement, int)
,
GUIelement.getUniqueName()
public GUIelement makeCopy()
public void addGUIelement(GUIelement ge)
GUIelement
to the end of the GUIList
ge
- the element to append.public void addGUIelement(GUIelement ge, int position)
GUIList
. This method is safe, in that it adds the provided
GUIelement to the beginning of the GUIList if the position provided is
less than 0, or to the end, if it is greater than GUIList.size()
.ge
- the GUIelement to insertposition
- where to insert the element; This is the exact position
in the GUIList on which it will be placed. The GUIelement previously on
this position and all the subsequent ones will be shifted to the right (1
will be added to their indices).public void removeGUIelement(int index)
index
- public void applySelection(int setOperation)
GUIelement.applySelection(int)
on all the elements of the
GUIList
.setOperation
- public void applyFilter(int setOperation)
GUIelement.applyFilter(int)
on all the elements of the
GUIList
.setOperation
- public void setPreviewRegex(java.lang.String regex, int setOperation)
GUIelement.setPreviewRegex(java.lang.String, int)
on all
the elements of the GUIList
.setOperation
- public void paintGUIelements()
GUIelement.paint(javafx.scene.canvas.GraphicsContext, double, double)
method.public void editCurrentComponent(boolean interactive)
interactive
- public void focusGUIelement(int index)
index
- the index of the element in GUIList
to focus.public void focusGUIelement(GUIelement ge)
GUIList
. Ignore if null or no such element exists in the
GUIList
.ge
- the GUIelement
to focuspublic int getGUIListSize()
GUIList.size()
public java.util.ArrayList<GUIelement> getGUIList()
ArrayList
of {GUIelement}s, where all the elements of
this tab are stored.public void jumpToPercent(IRepetitionCounter irc)
public void traverseElements(int steps)
GUIList
. Wrap around when the bounds of GUIList
are met.steps
- npublic void traverseElements(boolean forward)
GUIList
are met.forward
- whether the next element (true) or the previous one
(false) should be focused.public final void setGUIPanel(GUIPanel gp)
gp
- The GUIPanel this tab is on.public GUIPanel getGUIPanel()
public void setGUIList(java.util.ArrayList<GUIelement> currentList)
GUIList
to be the one provided.currentList
- the new GUIList