Package gui.page
Class Selection
java.lang.Object
gui.page.Selection
Perform bulk operations on GUIMedia within the same Page.
A Selection is created for a Page. Then, GUIMedia from that Page can be added to the Selection.
The GUIMedia within a Selection can then be moved, renamed, rotated, etc. all together.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given GUIMedia to the selection.boolean
Return whether or not the given GUIMedia is selected.void
delete()
Delete the selected Media from the page.double
getAngle()
Return an angle for the selection.javafx.collections.ObservableSet<GUIMedia<?>>
getMedia()
getName()
Return a name for the selection.int
Return a Z-Index for the selection.void
move
(javafx.geometry.Point2D displacement) Increment the positions of the selected Media by the given displacement.void
Empty the selection.void
removeMedia
(GUIMedia<?>... media) Remove the given GUIMedia from the selection.void
Rename the selected Media to the given name.void
rotate
(double angle) Set the angle of rotation of the selected Media to the given angle.void
setZindex
(int zIndex) Set the Z-index of the selected Media to the given Z-index.
-
Constructor Details
-
Selection
Create a new Selection for the given Page.The given selectedEffect will be added to GUIMedia in the selection to visually indicate their membership.
-
-
Method Details
-
addMedia
Add the given GUIMedia to the selection. -
removeMedia
Remove the given GUIMedia from the selection. -
removeAllMedia
public void removeAllMedia()Empty the selection. -
getMedia
-
contains
Return whether or not the given GUIMedia is selected. -
move
public void move(javafx.geometry.Point2D displacement) Increment the positions of the selected Media by the given displacement. -
delete
public void delete()Delete the selected Media from the page. -
rename
Rename the selected Media to the given name. -
rotate
public void rotate(double angle) Set the angle of rotation of the selected Media to the given angle. -
setZindex
public void setZindex(int zIndex) Set the Z-index of the selected Media to the given Z-index. -
getName
Return a name for the selection.If every selected Media has the same name, that name is returned. If the selection is empty, or the selected Media do not share the same name, the empty string is returned.
-
getAngle
public double getAngle()Return an angle for the selection.The mean average of the angles of rotation of the selected Media is returned.
-
getZindex
public int getZindex()Return a Z-Index for the selection.The maximum Z-Index of the selected Media is returned.
-