| java.lang.Object org.netbeans.modules.visualweb.designer.InlineEditor
All known Subclasses: org.netbeans.modules.visualweb.designer.FormComponentEditor, org.netbeans.modules.visualweb.designer.AttributeInlineEditor,
InlineEditor | abstract public class InlineEditor (Code) | |
Editor for inline-editing text of components.
The UI for this is specified in
http://ucsd.sfbay/projects/developer-tools/projects/RAVE/reef/UISpecs/designer-03.html
One of the complications of inline editing is that (as the above spec calls for)
it is invoked if you click on an already selected component. However, DOUBLE
clicking on such a component should instead open the default event handler of
the component. But note that a double click includes a single click, so if you
double click on a selected component you immediately enter inline
editing and the second click is then handled by the inline editor. At this point
it needs to see if this click is a double click that was initiated before inline
editing started, and if so, attempt to do event edits.
author: Tor Norbye |
Method Summary | |
protected void | checkInitialDoubleClick(MouseEvent e) | abstract public boolean | checkPosition(DomPosition pos) Return true if the given position is a position within
this editor's range. | abstract public Transferable | copyText(boolean cut) | public void | cycleEditableProperty(boolean cancel) If the edited bean supports multiple fields to be inline edited, switch to
editing the next property
Parameters: cancel - If true, cancel the current value before cycling. | abstract void | finish(boolean cancel) Stop inline editing. | public DomPosition | getBegin() | public DomPosition | getEnd() | static InlineEditor | getInlineEditor(WebForm webform, CssBox box, Element componentRootElement, String propertyName, boolean useDefault) Return an inline editor for the given bean, if it supports one. | abstract public void | invokeDeleteNextCharAction(ActionEvent evt) XXX Invokes delete next char action.
FIXME There shouldn't be an action invocation, but rather utility method call. | public boolean | isDocumentEditor() Return true if this editor is editing document positions that our outside
of the document (e.g. | public boolean | isEdited(CssBox box) Return true iff the box passed in is within the box being edited
by this inline editor. | public boolean | isEditing(Element componentRootElement, String propertyName) | abstract public boolean | isEscaped() | abstract public boolean | isMultiLine() Report whether this inline editor is in multi line mode. | public void | paint(Graphics2D g2d) | abstract public void | start(boolean selectText, String initialEdit) Initiate inline editing. |
checkInitialDoubleClick | protected void checkInitialDoubleClick(MouseEvent e)(Code) | | This method checks whether the given mouse event represents a double click
that occurred immediately in an inline editor - if so, we should cancel out
of inline editing and initiate event editing (if any)
|
checkPosition | abstract public boolean checkPosition(DomPosition pos)(Code) | | Return true if the given position is a position within
this editor's range.
|
copyText | abstract public Transferable copyText(boolean cut)(Code) | | Get the currently edited & selected text in the editor
|
cycleEditableProperty | public void cycleEditableProperty(boolean cancel)(Code) | | If the edited bean supports multiple fields to be inline edited, switch to
editing the next property
Parameters: cancel - If true, cancel the current value before cycling. If false, commit value. |
finish | abstract void finish(boolean cancel)(Code) | | Stop inline editing. If cancel is true, throw away changes,
otherwise commit them.
|
getBegin | public DomPosition getBegin()(Code) | | Report the start position being edited in the inline editor
(or Position.NONE if we're not inline editing.)
|
getEnd | public DomPosition getEnd()(Code) | | Report the end position being edited in the inline editor
(or Position.NONE if we're not inline editing.)
|
getInlineEditor | static InlineEditor getInlineEditor(WebForm webform, CssBox box, Element componentRootElement, String propertyName, boolean useDefault)(Code) | | Return an inline editor for the given bean, if it supports one.
Returns null otherwise.
Parameters: webform - The webform being edited Parameters: box - The box corresponding to the component click, if any Parameters: bean - The component to be inline edited Parameters: propertyName - May be null; if so, either the property corresponding to the box clicked should be edited,or the default property provided allow default is true Parameters: useDefault - If true, start editing the property marked default (if any) (marked with a "*" in the metadata) An InlineEditor for editing the chosen property, or null if none apply |
invokeDeleteNextCharAction | abstract public void invokeDeleteNextCharAction(ActionEvent evt)(Code) | | XXX Invokes delete next char action.
FIXME There shouldn't be an action invocation, but rather utility method call.
|
isDocumentEditor | public boolean isDocumentEditor()(Code) | | Return true if this editor is editing document positions that our outside
of the document (e.g. typically in a rendered fragment). If this is the
case document positions won't be adjusted outwards to the nearest surrounding
document position.
|
isEdited | public boolean isEdited(CssBox box)(Code) | | Return true iff the box passed in is within the box being edited
by this inline editor.
|
isEditing | public boolean isEditing(Element componentRootElement, String propertyName)(Code) | | Return true iff this inline editor is editing the given property on the given bean
|
isEscaped | abstract public boolean isEscaped()(Code) | | |
isMultiLine | abstract public boolean isMultiLine()(Code) | | Report whether this inline editor is in multi line mode.
Pressing Enter in a multiline mode should add a element,
whereas in a single line editor it will complete input.
|
start | abstract public void start(boolean selectText, String initialEdit)(Code) | | Initiate inline editing.
Parameters: selectText - If true, select the text in the inline editing context,else it will simply put the caret at the end of the text range. Parameters: initialEdit - If a non empty string, set the edited value to this stringas if the user had typed the characters at the beginning of the editingoperation. |
|
|