public class IltEditLabelInteractor extends IlvEditLabelInteractor
It can work in three different modes:
When this interactor is installed on a view, clicking on an object that
implements the IlvLabelInterface
opens
an editor in which the object can be edited.
Clicking on the background of the view also
opens an editor, and a graphic object
of the class IlvLabel
is created when you validate the edition.
When the text field opens, validate by pressing
RETURN
or click somewhere else on the view.
The edition is validated when the edition field looses the keyboard focus.
Any graphic object displaying a label can be edited with this
interactor, provided that it implements the interface
IlvLabelInterface
.
You can also create any type of labeled
graphic object by setting a factory of labeled objects.
IlvEditLabelInteractor
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
IltEditLabelInteractor.Gesture
This class enumerates the possible gestures recognized by this interactor.
|
Constructor and Description |
---|
IltEditLabelInteractor()
Creates the interactor.
|
IltEditLabelInteractor(IlpAttribute labelAttribute)
Creates the interactor associated with the given business attribute.
|
IltEditLabelInteractor(String labelAttributeName)
Creates the interactor associated with the given business attribute.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(IlvGraphic obj)
Verifies whether editing of the object is allowed.
|
IlpAttribute |
getLabelAttribute()
Returns the attribute that is being edited.
|
String |
getLabelAttributeName()
Returns the label attribute name used by this interactor
|
void |
setLabelAttributeName(String name)
Sets the label attribute name used by this interactor
|
void |
updateLabel(IlpViewsViewInteractor interactor,
IlpGraphic graphic,
String label)
Called when
IlvEditLabelInteractor has accepted a new label
from the user. |
addObject, attach, createEditComponent, detach, editObject, ensureEditAreaInView, getEditingAreaBBox, getEditionFont, getFont, getForeground, getLabelBBox, getObjectFactory, getObjectLabel, isCreationAllowed, isCreationInSubManagersAllowed, isEditionAllowed, isGrapherMode, isPermanent, makeObject, processMouseEvent, setCreationAllowed, setCreationInSubManagersAllowed, setEditionAllowed, setFont, setForeground, setGrapherMode, setObjectFactory, setObjectLabel, setPermanent, supportMultiline
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, handleExpose, isXORGhost, processEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
public IltEditLabelInteractor(String labelAttributeName)
The label can only be edited if the object contains an attribute that corresponds to the given name.
labelAttributeName
- The attribute to be edited.public IltEditLabelInteractor(IlpAttribute labelAttribute)
labelAttribute
- The attribute to be edited.public IltEditLabelInteractor()
This interactor edits the value of the attribute "name".
public IlpAttribute getLabelAttribute()
public void setLabelAttributeName(String name)
public String getLabelAttributeName()
public void updateLabel(IlpViewsViewInteractor interactor, IlpGraphic graphic, String label)
IlvEditLabelInteractor
has accepted a new label
from the user.protected boolean accept(IlvGraphic obj)
obj
can be edited.
The current implementation only allows the
editing of objects that contain the label attribute and that
implement the IlvLabelInterface
.accept
in class IlvEditLabelInteractor
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.