站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

InplaceEditorProvider (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.action
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
static interface InplaceEditorProvider.EditorController
          This is an interface of editor action supplied to the methods in the provider.
static class InplaceEditorProvider.ExpansionDirection
          Represents possible directions for expansion of an editor component.
 
Method Summary
 C createEditorComponent(InplaceEditorProvider.EditorController controller, Widget widget)
          Creates an in-place editor component for a specified widget.
 EnumSet<InplaceEditorProvider.ExpansionDirection> getExpansionDirections(InplaceEditorProvider.EditorController controller, Widget widget, C editor)
          Called to obtain directions where an editor component can expand to.
 Rectangle 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 Detail

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

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 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

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.