Class ImageryLayer

    • Constructor Detail

      • ImageryLayer

        protected ImageryLayer​(ImageryInfo info)
        Constructs a new ImageryLayer.
        Parameters:
        info - imagery info
    • Method Detail

      • getPPD

        public double getPPD()
      • getIcon

        public javax.swing.Icon getIcon()
        Description copied from class: Layer
        Return a representative small image for this layer. The image must not be larger than 64 pixel in any dimension.
        Specified by:
        getIcon in class Layer
        Returns:
        layer icon
      • isMergable

        public boolean isMergable​(Layer other)
        Description copied from class: Layer
        Determines if the other layer can be merged into this layer.
        Specified by:
        isMergable in class Layer
        Parameters:
        other - The other layer that is tested to be mergable with this.
        Returns:
        Whether the other layer can be merged into this layer.
      • mergeFrom

        public void mergeFrom​(Layer from)
        Description copied from class: Layer
        Merges the given layer into this layer. Throws if the layer types are incompatible.
        Specified by:
        mergeFrom in class Layer
        Parameters:
        from - The layer that get merged into this one. After the merge, the other layer is not usable anymore and passing to one others mergeFrom should be one of the last things to do with a layer.
      • getInfoComponent

        public java.lang.Object getInfoComponent()
        Description copied from class: Layer
        Gets the layer information to display to the user. This is used if the user requests information about this layer. It should display a description of the layer content.
        Specified by:
        getInfoComponent in class Layer
        Returns:
        Either a String or a Component describing the layer.
      • createTextField

        protected javax.swing.JComponent createTextField​(java.lang.String text)
      • create

        public static ImageryLayer create​(ImageryInfo info)
        Create a new imagery layer
        Parameters:
        info - The imagery info to use as base
        Returns:
        The created layer
      • getOffsetMenuItem

        public javax.swing.JMenuItem getOffsetMenuItem()
        Create the menu item that should be added to the offset menu. It may have a sub menu of e.g. bookmarks added to it.
        Returns:
        The menu item to add to the imagery menu.
      • getOffsetMenuItem

        public javax.swing.JComponent getOffsetMenuItem​(javax.swing.JComponent subMenu)
        Create the submenu or the menu item to set the offset of the layer.

        If only one menu item for this layer exists, it is returned by this method.

        If there are multiple, this method appends them to the subMenu and then returns the reference to the subMenu.

        Parameters:
        subMenu - The subMenu to use
        Returns:
        A single menu item to adjust the layer or the passed subMenu to which the menu items were appended.
      • getAdjustAction

        protected abstract javax.swing.Action getAdjustAction()
      • addImageProcessor

        public boolean addImageProcessor​(ImageProcessor processor)
        This method adds the ImageProcessor to this Layer if it is not null.
        Parameters:
        processor - that processes the image
        Returns:
        true if processor was added, false otherwise
      • removeImageProcessor

        public boolean removeImageProcessor​(ImageProcessor processor)
        This method removes given ImageProcessor from this layer
        Parameters:
        processor - which is needed to be removed
        Returns:
        true if processor was removed
      • createImageProcessor

        public static ImageProcessor createImageProcessor​(java.awt.image.BufferedImageOp op,
                                                          boolean inPlace)
        Wraps a BufferedImageOp to be used as ImageProcessor.
        Parameters:
        op - the BufferedImageOp
        inPlace - true to apply filter in place, i.e., not create a new BufferedImage for the result (the op needs to support this!)
        Returns:
        the ImageProcessor wrapper
      • applyImageProcessors

        public java.awt.image.BufferedImage applyImageProcessors​(java.awt.image.BufferedImage img)
        Applies all the chosen ImageProcessors to the image
        Parameters:
        img - - image which should be changed
        Returns:
        the new changed image