Class MVTLayer.EnableLayerAction

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Consumer<java.lang.String> consumer  
      private java.lang.String layer  
      private java.util.function.BooleanSupplier state  
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Constructor Summary

      Constructors 
      Constructor Description
      EnableLayerAction​(java.lang.String layer, java.util.function.BooleanSupplier state, java.util.function.Consumer<java.lang.String> consumer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)  
      java.awt.Component createMenuComponent()
      Creates and return the menu component.
      boolean supportLayers​(java.util.List<Layer> layers)
      Determines if this action supports a given list of layers.
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Field Detail

      • layer

        private final java.lang.String layer
      • consumer

        private final java.util.function.Consumer<java.lang.String> consumer
      • state

        private final java.util.function.BooleanSupplier state
    • Constructor Detail

      • EnableLayerAction

        EnableLayerAction​(java.lang.String layer,
                          java.util.function.BooleanSupplier state,
                          java.util.function.Consumer<java.lang.String> consumer)
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • supportLayers

        public boolean supportLayers​(java.util.List<Layer> layers)
        Description copied from interface: Layer.LayerAction
        Determines if this action supports a given list of layers.
        Specified by:
        supportLayers in interface Layer.LayerAction
        Parameters:
        layers - list of layers
        Returns:
        true if this action supports the given list of layers, false otherwise