Class ALcyLayerCustomizerPanel

All Implemented Interfaces:
ILcdUndoableSource, ILcyCustomizerPanel, ILcdPropertyChangeSource, ImageObserver, MenuContainer, Serializable, Accessible

public abstract class ALcyLayerCustomizerPanel extends ALcyCustomizerPanel

Abstract class that facilitates the implementation of ILcyCustomizerPanel for layers. This class by default can be used to edit instances of TLcyLayerContext.

This class provides several convenience methods to acces the layer and the view in which it is contained.

See Also:
  • Constructor Details

  • Method Details

    • getView

      protected ILcdView getView()
      Convenience method to return the ILcdView that was set by setting a TLcyLayerContext using setObject.
      Returns:
      Null if no TLcyLayerContext is set, the ILcdView related to that context object otherwise.
    • getLayer

      protected ILcdLayer getLayer()
      Convenience method to return the ILcdLayer that was set by setting a TLcyLayerContext using setObject.
      Returns:
      Null if no TLcyLayerContext is set, the ILcdLayer related to that context object otherwise.
    • getModel

      protected ILcdModel getModel()
      Convenience method to return the ILcdModel that was set by setting a TLcyLayerContext using setObject.
      Returns:
      Null if no TLcyLayerContext is set, the ILcdModel related to that context object otherwise.
    • getLayerContext

      protected final TLcyLayerContext getLayerContext()

      Returns the TLcyLayerContext object that was set on this customizer. This context object can be used to retrieve the layer and the view in which it is contained.

      Returns:
      The set TLcyLayerContext. This object can be null when this customizer was deinitialized (with setObject(null)).
    • canSetObject

      public boolean canSetObject(Object aObject)
      Description copied from class: ALcyCustomizerPanel
      Returns true if and only if setObject would not throw an IllegalArgumentException.

      Only accepts null or objects that pass the object filter. If the filter itself is null, all objects are accepted.

      Specified by:
      canSetObject in interface ILcyCustomizerPanel
      Overrides:
      canSetObject in class ALcyCustomizerPanel
      Parameters:
      aObject - The object to check.
      Returns:
      true if setObject would accept the object, false if it would throw an exception.
    • updateCustomizerPanelFromObject

      protected abstract void updateCustomizerPanelFromObject()
      This means updating the user interface state according to the current state of the set Object.

      E.g. consider that a ILcdLayer is set and a new label text is entered in a text field. When this method is called, the new label text should be cleared and the original label of the ILcdLayer (getLabel()) should be put in the text field.

      Specified by:
      updateCustomizerPanelFromObject in class ALcyCustomizerPanel