Package jmri.jmrit.logixng
Interface Clipboard
-
- All Known Implementing Classes:
DefaultClipboard
public interface Clipboard
The clipboard with actions and expressions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(MaleSocket maleSocket, java.util.List<java.lang.String> errors)
Add an item to the clipboard.MaleSocket
fetchTopItem()
Get the top item on the clipboard and remove it from the clipboard.FemaleSocket
getFemaleSocket()
Get the female socket root of the clipboard tree.MaleSocket
getTopItem()
Get the top item on the clipboard without removing it from the clipboard.boolean
isEmpty()
Is the clipboard empty?void
moveItemToTop(MaleSocket maleSocket)
Moves an item on the clipboard to the top of the clipboard.void
setup()
Setup this object and its children.
-
-
-
Method Detail
-
isEmpty
boolean isEmpty()
Is the clipboard empty?- Returns:
- true if empty, false otherwise
-
add
boolean add(MaleSocket maleSocket, java.util.List<java.lang.String> errors)
Add an item to the clipboard.The last added item is on the top of the clipboard.
- Parameters:
maleSocket
- the item to add on the clipboarderrors
- a list of potential errors- Returns:
- true if success, false otherwise
-
fetchTopItem
MaleSocket fetchTopItem()
Get the top item on the clipboard and remove it from the clipboard.The top item is the last item put on the clipboard
- Returns:
- the top item
-
getTopItem
MaleSocket getTopItem()
Get the top item on the clipboard without removing it from the clipboard.The top item is the last item put on the clipboard
- Returns:
- the top item
-
getFemaleSocket
FemaleSocket getFemaleSocket()
Get the female socket root of the clipboard tree.- Returns:
- the root female socket
-
moveItemToTop
void moveItemToTop(MaleSocket maleSocket)
Moves an item on the clipboard to the top of the clipboard.If an item on the clipboard that is not the top item is cut, it's placed as the top item on the clipboard until it's pasted elsewhere.
- Parameters:
maleSocket
- the male socket to put on the top
-
setup
void setup()
Setup this object and its children. This method is used to lookup system names for child sockets.
-
-