Interface InplaceEditorProvider<C extends JComponent>


public interface InplaceEditorProvider<C extends JComponent>
This interface controls an in-place editor of an in-place editor action.
  • Method Details

    • notifyOpened

      void notifyOpened(InplaceEditorProvider.EditorController controller, Widget widget, C editor)
      Called to notify about opening an in-place editor.
      Parameters:
      controller - the editor controller
      widget - the widget where the editor is opened
      editor - the editor component
    • notifyClosing

      void notifyClosing(InplaceEditorProvider.EditorController controller, Widget widget, C editor, boolean commit)
      Called to notify about closing an in-place editor.
      Parameters:
      controller - the editor controller
      widget - the widget where the editor is opened
      editor - the editor component
      commit - true, if the current value is approved by user and should be used; false if the current value is discarded by an user
    • createEditorComponent

      C createEditorComponent(InplaceEditorProvider.EditorController controller, Widget widget)
      Creates an in-place editor component for a specified widget. Called to acquire the component which should be added into the scene.
      Parameters:
      controller - the editor controller
      widget - the widget where the editor is going to be opened
      Returns:
      the editor component
    • getInitialEditorComponentBounds

      Rectangle getInitialEditorComponentBounds(InplaceEditorProvider.EditorController controller, Widget widget, C editor, Rectangle viewBounds)
      Called to obtain the initial boundary editor component in view coordination system.
      Parameters:
      controller - the editor controller
      widget - the widget where the editor is going to be opened
      editor - the editor component
      viewBounds - the precalculated boundary of the editor component
      Returns:
      the boundary of editor component in view coordination system; if null, then the viewBounds are automatically used
    • getExpansionDirections

      Called to obtain directions where an editor component can expand to.
      Parameters:
      controller - the editor controller
      widget - the widget where the editor is going to be opened
      editor - the editor component
      Returns:
      the set of directions where the editor component can expand to; if null, then the editor component is not expanded to any direction