Class Canvas
- All Implemented Interfaces:
Serializable, Iterable<Layer>, Collection<Layer>, List<Layer>, SequencedCollection<Layer>, ListModel<Layer>
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanbooleanbooleanbooleanbooleanvoidenableCustomPreview(boolean drawPreview) voidenablePreview(boolean drawPreview) voidfloatingCheck(Layer layer) Checks if the layer is floating and updates the floating layer.intReturns the selection.getShape()intintgetWidth()booleanbooleanbooleanmergeDown(int selectedID) booleanbooleanbooleanmoveDown(int index) booleanmoveUp(int index) remove(int index) booleanremoveNR(int index) Removes the layer at the specified index without adding a revision (hence NR - No Revision).voidsetHeight(int height) voidsetSize(int width, int height) voidvoidsetWidth(int width) voidupdate(int index) voidvoidupdateCustomPreview(MouseEvent event, Image image) voidupdateCustomPreview(MouseEvent event, Shape shape, int size) Methods inherited from class ArrayListListModel
addAll, addAll, clear, contains, containsAll, get, getElementAt, getSize, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, retainAll, size, subList, switchElements, toArray, toArrayMethods inherited from class AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
Canvas
-
-
Method Details
-
add
-
add
-
add
- Specified by:
addin interfaceCollection<Layer>- Specified by:
addin interfaceList<Layer>- Overrides:
addin classArrayListListModel<Layer>
-
addOnTop
-
addOnTop
-
add
-
floatingCheck
Checks if the layer is floating and updates the floating layer.- Parameters:
layer- the layer to check
-
getFloatingLayer
-
getSelection
-
set
-
remove
-
remove
-
remove
-
remove
- Specified by:
removein interfaceCollection<Layer>- Specified by:
removein interfaceList<Layer>- Overrides:
removein classArrayListListModel<Layer>
-
removeNR
Removes the layer at the specified index without adding a revision (hence NR - No Revision).- Parameters:
index- the index of the layer to remove- Returns:
- the removed layer
-
moveUp
public boolean moveUp(int index) - Overrides:
moveUpin classArrayListListModel<Layer>
-
moveDown
public boolean moveDown(int index) - Overrides:
moveDownin classArrayListListModel<Layer>
-
mergeDown
public boolean mergeDown(int selectedID) -
mergeDown
-
consolidateFloating
public boolean consolidateFloating() -
mergeSelectedDown
public boolean mergeSelectedDown() -
update
-
update
public void update(int index) -
getWidth
public int getWidth() -
setWidth
public void setWidth(int width) -
getHeight
public int getHeight() -
setHeight
public void setHeight(int height) -
updateCustomPreview
-
enablePreview
public void enablePreview(boolean drawPreview) -
updateCustomPreview
-
enableCustomPreview
public void enableCustomPreview(boolean drawPreview) -
isDrawPreview
public boolean isDrawPreview() -
getPreviewEvent
-
getShape
-
getToolSize
public int getToolSize() -
getPreviewImage
-
isDrawCustomPreview
public boolean isDrawCustomPreview() -
setSize
-
setSize
public void setSize(int width, int height) -
getImageMakerView
-