Interface InplaceEditorProvider<C extends JComponent>
public interface InplaceEditorProvider<C extends JComponent>
This interface controls an in-place editor of an in-place editor action.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
This is an interface of editor action supplied to the methods in the provider.static enum
Represents a type of in-place editor action invocation.static enum
Represents possible directions for expansion of an editor component.static interface
This is an interface that extends EditorController for ability to query for invocation type. -
Method Summary
Modifier and TypeMethodDescriptioncreateEditorComponent
(InplaceEditorProvider.EditorController controller, Widget widget) Creates an in-place editor component for a specified widget.getExpansionDirections
(InplaceEditorProvider.EditorController controller, Widget widget, C editor) Called to obtain directions where an editor component can expand to.getInitialEditorComponentBounds
(InplaceEditorProvider.EditorController controller, Widget widget, C editor, Rectangle viewBounds) Called to obtain the initial boundary editor component in view coordination system.void
notifyClosing
(InplaceEditorProvider.EditorController controller, Widget widget, C editor, boolean commit) Called to notify about closing an in-place editor.void
notifyOpened
(InplaceEditorProvider.EditorController controller, Widget widget, C editor) Called to notify about opening an in-place editor.
-
Method Details
-
notifyOpened
Called to notify about opening an in-place editor.- Parameters:
controller
- the editor controllerwidget
- the widget where the editor is openededitor
- 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 controllerwidget
- the widget where the editor is openededitor
- the editor componentcommit
- true, if the current value is approved by user and should be used; false if the current value is discarded by an user
-
createEditorComponent
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 controllerwidget
- 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 controllerwidget
- the widget where the editor is going to be openededitor
- the editor componentviewBounds
- 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
EnumSet<InplaceEditorProvider.ExpansionDirection> getExpansionDirections(InplaceEditorProvider.EditorController controller, Widget widget, C editor) Called to obtain directions where an editor component can expand to.- Parameters:
controller
- the editor controllerwidget
- the widget where the editor is going to be openededitor
- 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
-