All Implemented Interfaces:
Serializable, Iterable<Layer>, Collection<Layer>, List<Layer>, SequencedCollection<Layer>, ListModel<Layer>

public class Canvas extends ArrayListListModel<Layer>
See Also:
  • Constructor Details

  • Method Details

    • add

      public boolean add(Layer layer, UUID group)
    • add

      public boolean add(Layer layer, int index, UUID group)
    • add

      public boolean add(Layer layer)
      Specified by:
      add in interface Collection<Layer>
      Specified by:
      add in interface List<Layer>
      Overrides:
      add in class ArrayListListModel<Layer>
    • addOnTop

      public boolean addOnTop(Layer layer, UUID group)
    • addOnTop

      public boolean addOnTop(Layer layer)
    • add

      public void add(int index, Layer element)
      Specified by:
      add in interface List<Layer>
      Overrides:
      add in class ArrayListListModel<Layer>
    • floatingCheck

      public void floatingCheck(Layer layer)
      Checks if the layer is floating and updates the floating layer.
      Parameters:
      layer - the layer to check
    • getFloatingLayer

      public Layer getFloatingLayer()
    • getSelection

      public Selection getSelection()
      Returns the selection.
      Returns:
      the selection
    • set

      public Layer set(int index, Layer layer)
      Specified by:
      set in interface List<Layer>
      Overrides:
      set in class ArrayListListModel<Layer>
    • remove

      public Layer remove(int index, UUID group)
    • remove

      public Layer remove(int index, UUID group, int toSelect)
    • remove

      public Layer remove(int index)
      Specified by:
      remove in interface List<Layer>
      Overrides:
      remove in class ArrayListListModel<Layer>
    • remove

      public boolean remove(Object o)
      Specified by:
      remove in interface Collection<Layer>
      Specified by:
      remove in interface List<Layer>
      Overrides:
      remove in class ArrayListListModel<Layer>
    • removeNR

      public Layer removeNR(int index)
    • moveUp

      public boolean moveUp(int index)
      Overrides:
      moveUp in class ArrayListListModel<Layer>
    • moveDown

      public boolean moveDown(int index)
      Overrides:
      moveDown in class ArrayListListModel<Layer>
    • mergeDown

      public boolean mergeDown(int selectedID)
    • mergeDown

      public boolean mergeDown(int selectedID, UUID uuid)
    • consolidateFloating

      public boolean consolidateFloating()
    • mergeSelectedDown

      public boolean mergeSelectedDown()
    • update

      public void update(Layer layer)
    • 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)
    • getCanvasRenderer

      public CanvasRenderer getCanvasRenderer()
    • updateCustomPreview

      public void updateCustomPreview(MouseEvent event, Shape shape, int size)
    • enablePreview

      public void enablePreview(boolean drawPreview)
    • updateCustomPreview

      public void updateCustomPreview(MouseEvent e, Image image)
    • enableCustomPreview

      public void enableCustomPreview(boolean drawPreview)
    • isDrawPreview

      public boolean isDrawPreview()
    • getPreviewEvent

      public MouseEvent getPreviewEvent()
    • getShape

      public Shape getShape()
    • getToolSize

      public int getToolSize()
    • getPreviewImage

      public Image getPreviewImage()
    • isDrawCustomPreview

      public boolean isDrawCustomPreview()
    • selected

      public Layer selected()
    • getLayerPanel

      public LayerPanel getLayerPanel()
    • getVersionManager

      public VersionManager getVersionManager()
    • setSize

      public void setSize(int width, int height, UUID group)
    • setSize

      public void setSize(int width, int height)