public abstract class AbstractLabelPart extends AbstractContentPart<javafx.scene.Group> implements ITransformableContentPart<javafx.scene.Group>
contentAnchoragesUnmodifiable, contentChildrenUnmodifiable, contentactive, adaptable, adapters, anchoragesUnmodifiable, anchoredsUnmodifiable, childrenUnmodifiable, parent, refreshVisualcontentAnchoragesUnmodifiable, contentChildrenUnmodifiable, contentanchoragesUnmodifiable, anchoredsUnmodifiable, childrenUnmodifiable, parent, refreshVisualadaptersadaptableactiveIAdaptable.Bound<A extends IAdaptable>IAdaptable.Bound.Impl<T extends IAdaptable>| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CSS_CLASS_LABEL
The CSS class that is assigned to the visualization of the
EdgeLabelPart of this EdgePart. |
TRANSFORM_PROVIDER_KEY, TRANSFORM_PROVIDER_ROLECONTENT_ANCHORAGES_PROPERTY, CONTENT_CHILDREN_PROPERTY, CONTENT_PROPERTYANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTYADAPTERS_PROPERTYACTIVE_PROPERTY| Constructor and Description |
|---|
AbstractLabelPart() |
| Modifier and Type | Method and Description |
|---|---|
abstract Point |
computeLabelPosition()
Computes a position for this label.
|
protected javafx.scene.text.Text |
createText()
Creates the text visual.
|
protected void |
doActivate() |
protected void |
doAttachToAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage,
java.lang.String role) |
protected void |
doDeactivate() |
protected void |
doDetachFromAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage,
java.lang.String role) |
protected java.util.List<? extends java.lang.Object> |
doGetContentChildren() |
javafx.util.Pair<? extends org.eclipse.gef.common.attributes.IAttributeStore,java.lang.String> |
getContent() |
javafx.scene.transform.Affine |
getContentTransform() |
Point |
getLabelPosition()
Retrieves the stored position for the label.
|
protected java.lang.String |
getLabelPositionAttributeKey()
Retrieves the position attribute key for the given label role.
|
protected javafx.scene.text.Text |
getText()
Returns the text visual.
|
void |
recomputeLabelPosition()
Recomputes the label position.
|
protected void |
refreshPosition(javafx.scene.Node visual,
Point position)
Adjusts the label's position to fit the given
Point. |
void |
setContentTransform(javafx.scene.transform.Affine transform) |
void |
setLabelPosition(Point computedPosition)
Sets the stored label position to the given value.
|
addContentChild, attachToContentAnchorage, contentAnchoragesUnmodifiableProperty, contentChildrenUnmodifiableProperty, contentProperty, detachFromContentAnchorage, doAddContentChild, doAttachToContentAnchorage, doDetachFromContentAnchorage, doGetContentAnchorages, doRemoveContentChild, doReorderContentChild, getContentAnchoragesUnmodifiable, getContentChildrenUnmodifiable, isFocusable, isSelectable, refreshContentAnchorages, refreshContentChildren, register, registerAtContentPartMap, removeContentChild, reorderContentChild, setContent, unregister, unregisterFromContentPartMapactivate, activateAdapters, activateChildren, activeProperty, adaptableProperty, adaptersProperty, addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, deactivate, deactivateAdapters, deactivateChildren, detachAnchored, detachFromAnchorage, detachFromAnchorage, determineViewer, dispose, doAddChildVisual, doCreateVisual, doRefreshVisual, doRemoveChildVisual, getAdaptable, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getRoot, getVisual, isActive, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, registerAtVisualPartMap, removeChild, removeChildren, reorderChild, setAdaptable, setAdapter, setAdapter, setAdapter, setAdapter, setParent, setRefreshVisual, unregisterFromVisualPartMap, unsetAdapterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVisualTransform, setVisualTransformaddContentChild, attachToContentAnchorage, contentAnchoragesUnmodifiableProperty, contentChildrenUnmodifiableProperty, contentProperty, detachFromContentAnchorage, getContentAnchoragesUnmodifiable, getContentChildrenUnmodifiable, isFocusable, isSelectable, refreshContentAnchorages, refreshContentChildren, removeContentChild, reorderContentChild, setContentaddChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getRoot, getViewer, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setParent, setRefreshVisualadaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapteradaptableProperty, getAdaptable, setAdaptableactivate, activeProperty, deactivate, isActivedisposepublic static final java.lang.String CSS_CLASS_LABEL
EdgeLabelPart of this EdgePart.public abstract Point computeLabelPosition()
GraphPart that contains this label.protected javafx.scene.text.Text createText()
Text.protected void doActivate()
doActivate in class AbstractVisualPart<javafx.scene.Group>protected void doAttachToAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
doAttachToAnchorageVisual in class AbstractVisualPart<javafx.scene.Group>protected void doDeactivate()
doDeactivate in class AbstractVisualPart<javafx.scene.Group>protected void doDetachFromAnchorageVisual(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
doDetachFromAnchorageVisual in class AbstractVisualPart<javafx.scene.Group>protected java.util.List<? extends java.lang.Object> doGetContentChildren()
doGetContentChildren in class AbstractContentPart<javafx.scene.Group>public javafx.util.Pair<? extends org.eclipse.gef.common.attributes.IAttributeStore,java.lang.String> getContent()
getContent in interface IContentPart<javafx.scene.Group>getContent in class AbstractContentPart<javafx.scene.Group>public javafx.scene.transform.Affine getContentTransform()
getContentTransform in interface ITransformableContentPart<javafx.scene.Group>public Point getLabelPosition()
protected java.lang.String getLabelPositionAttributeKey()
protected javafx.scene.text.Text getText()
Text used as visual.public void recomputeLabelPosition()
protected void refreshPosition(javafx.scene.Node visual,
Point position)
Point.visual - This node's visual.position - This node's position.public void setContentTransform(javafx.scene.transform.Affine transform)
setContentTransform in interface ITransformableContentPart<javafx.scene.Group>public void setLabelPosition(Point computedPosition)
computedPosition - The new label position.Copyright (c) 2014 itemis AG and others. All rights reserved.