com.dlsc.flexgantt.swing.layer.system

## Class EditingLayer

- java.lang.Object
- - com.dlsc.flexgantt.swing.layer.AbstractLayer
  - - com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer
    - - com.dlsc.flexgantt.swing.layer.system.EditingLayer

- All Implemented Interfaces:
    ITimelineObjectEditorListener, MouseListener, EventListener

      public class EditingLayer
      extends AbstractSystemLayer
      implements MouseListener, ITimelineObjectEditorListener

  The editing layer manages the editing of timeline objects via editors that implement the `ITimelineObjectEditor` interface. Editors can be registered in the `AbstractGanttChart`. The layer will manage the editors in such a way that always only one editor is visible at any time.
  Since:
    1.0
  Version:
    $Revision: 1.10 $
  Author:
    Dirk Lemmermann

- - ### Field Summary

    - ### Fields inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `alpha, changeSupport, ganttChart, layerContainer, PROPERTY_ALPHA, PROPERTY_VISIBLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EditingLayer(LayerContainer lc)` Constructs a new editing layer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `editingCanceled(ChangeEvent e)` Callback method that gets invoked if the user canceled the editing of a timeline object.
    `void` | `editingStopped(ChangeEvent e)` Callback method that gets invoked if the user stopped the editing of a timeline object.
    `TimelineObjectPath` | `getEditedTimelineObject()` Returns the path to the currently edited timeline object.
    `Component` | `getEditorComponent()` Returns the user interface component that is currently being used to edit a timeline object.
    `ITimelineObjectEditor` | `getTimelineObjectEditor()` Returns the currently used timeline object editor.
    `boolean` | `isEditing()` Returns TRUE if a timeline object is currently being edited.
    `void` | `mouseClicked(MouseEvent e)`
    `void` | `mouseEntered(MouseEvent e)`
    `void` | `mouseExited(MouseEvent e)`
    `void` | `mousePressed(MouseEvent e)`
    `void` | `mouseReleased(MouseEvent e)`
    `void` | `removeEditor()` Discards the editor object and frees the real estate.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `addPropertyChangeListener, getAlpha, getDateline, getEventline, getGanttChart, getHeight, getLayerContainer, getLayerPolicyProvider, getModel, getName, getStartRow, getTimeAt, getTimeline, getTimeLocation, getTimeSpanUsed, getToolTipText, getTreeTable, getTreeTablePolicyProvider, getWidth, isVisible, paintLayer, removePropertyChangeListener, repaint, repaint, repaint, setAlpha, setVisible, tearDown`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EditingLayer

          public EditingLayer(LayerContainer lc)

      Constructs a new editing layer.
      Parameters:
        `lc` - the layer container to which the editing layer belongs
      Since:
        1.0

  - ### Method Detail

    - #### mouseEntered

          public void mouseEntered(MouseEvent e)

      Specified by:
        `mouseEntered` in interface `MouseListener`

    - #### mouseExited

          public void mouseExited(MouseEvent e)

      Specified by:
        `mouseExited` in interface `MouseListener`

    - #### mousePressed

          public void mousePressed(MouseEvent e)

      Specified by:
        `mousePressed` in interface `MouseListener`

    - #### mouseReleased

          public void mouseReleased(MouseEvent e)

      Specified by:
        `mouseReleased` in interface `MouseListener`

    - #### mouseClicked

          public void mouseClicked(MouseEvent e)

      Specified by:
        `mouseClicked` in interface `MouseListener`

    - #### removeEditor

          public void removeEditor()

      Discards the editor object and frees the real estate.
      Since:
        1.0
      See Also:
        `getTimelineObjectEditor()`

    - #### getEditorComponent

          public Component getEditorComponent()

      Returns the user interface component that is currently being used to edit a timeline object.
      Returns:
        the editor user interface component
      Since:
        1.0

    - #### isEditing

          public boolean isEditing()

      Returns TRUE if a timeline object is currently being edited.
      Returns:
        TRUE if the user is currently editing a timeline object
      Since:
        1.0

    - #### getTimelineObjectEditor

          public ITimelineObjectEditor getTimelineObjectEditor()

      Returns the currently used timeline object editor. This is the editor that the layer seemed most appropriate to use for editing the user selected timeline object. The editor was chosen based on the object type of the current timeline object.
      Returns:
        the timeline object editor that is currently being used
      Since:
        1.0

    - #### getEditedTimelineObject

          public TimelineObjectPath getEditedTimelineObject()

      Returns the path to the currently edited timeline object.
      Returns:
        the path to the timeline object that is currently being edited
      Since:
        1.1

    - #### editingStopped

          public void editingStopped(ChangeEvent e)

      Description copied from interface: `ITimelineObjectEditorListener`
      Callback method that gets invoked if the user stopped the editing of a timeline object.
      Specified by:
        `editingStopped` in interface `ITimelineObjectEditorListener`
      Parameters:
        `e` - the change event with information about the source of the callback call

    - #### editingCanceled

          public void editingCanceled(ChangeEvent e)

      Description copied from interface: `ITimelineObjectEditorListener`
      Callback method that gets invoked if the user canceled the editing of a timeline object.
      Specified by:
        `editingCanceled` in interface `ITimelineObjectEditorListener`
      Parameters:
        `e` - the change event with information about the source of the callback call

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.