public abstract class AbstractLabelPart extends AbstractFXContentPart<javafx.scene.Group> implements ITransformableContentPart<javafx.scene.Node,javafx.scene.Group>
contentAnchoragesUnmodifiable, contentChildrenUnmodifiable, contentactive, adapters, anchoragesUnmodifiable, anchoredsUnmodifiable, children, parent, refreshVisualcontentAnchoragesUnmodifiable, contentChildrenUnmodifiable, contentanchoragesUnmodifiable, anchoredsUnmodifiable, children, parent, refreshVisualadaptersactiveIAdaptable.Bound<A 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. |
CONTENT_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 |
|---|---|
protected void |
attachToAnchorageVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> anchorage,
java.lang.String role) |
abstract Point |
computeLabelPosition()
Computes a position for this label.
|
protected javafx.scene.text.Text |
createText()
Creates the text visual.
|
protected void |
detachFromAnchorageVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> anchorage,
java.lang.String role) |
protected void |
doActivate() |
protected void |
doDeactivate() |
protected java.util.List<? extends java.lang.Object> |
doGetContentChildren() |
javafx.util.Pair<? extends org.eclipse.gef4.common.attributes.IAttributeStore,java.lang.String> |
getContent() |
java.lang.String |
getLabelPositionAttributeKey()
Retrieves the position attribute key for the given label role.
|
Point |
getStoredLabelPosition()
Retrieves the stored position for the label.
|
protected javafx.scene.text.Text |
getText()
Returns the text visual.
|
protected void |
refreshPosition(javafx.scene.Node visual,
Point position)
Adjusts the label's position to fit the given
Point. |
void |
setStoredLabelPosition(Point computedPosition)
Sets the stored label position to the given value.
|
void |
transformContent(AffineTransform transform) |
addContentChild, attachToContentAnchorage, contentAnchoragesUnmodifiableProperty, contentChildrenUnmodifiableProperty, contentProperty, detachFromContentAnchorage, doAddContentChild, doAttachToContentAnchorage, doDetachFromContentAnchorage, doGetContentAnchorages, doRemoveContentChild, doReorderContentChild, getContentAnchoragesUnmodifiable, getContentChildrenUnmodifiable, isFocusable, isSelectable, onContentChanged, refreshContentAnchorages, refreshContentChildren, register, registerAtContentPartMap, removeContentChild, reorderContentChild, setContent, unregister, unregisterFromContentPartMapactivate, activateChildren, activeProperty, adaptersProperty, addChild, addChild, addChildren, addChildren, addChildVisual, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenProperty, createVisual, deactivate, deactivateChildren, detachAnchored, detachFromAnchorage, detachFromAnchorage, determineViewer, dispose, doRefreshVisual, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getParent, getPolicies, getRoot, getViewer, getVisual, isActive, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, registerAtVisualPartMap, removeChild, removeChildren, removeChildVisual, reorderChild, setAdapter, setAdapter, setAdapter, setAdapter, setParent, setRefreshVisual, unregisterFromVisualPartMap, unsetAdapterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddContentChild, attachToContentAnchorage, contentAnchoragesUnmodifiableProperty, contentChildrenUnmodifiableProperty, contentProperty, detachFromContentAnchorage, getContentAnchoragesUnmodifiable, getContentChildrenUnmodifiable, isFocusable, isSelectable, refreshContentAnchorages, refreshContentChildren, removeContentChild, reorderContentChild, setContentaddChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getParent, getPolicies, getRoot, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setParent, setRefreshVisualadaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapteractivate, activeProperty, deactivate, isActivedisposepublic static final java.lang.String CSS_CLASS_LABEL
EdgeLabelPart of this EdgePart.protected void attachToAnchorageVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> anchorage, java.lang.String role)
attachToAnchorageVisual in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>public abstract Point computeLabelPosition()
GraphPart that contains this label.protected javafx.scene.text.Text createText()
Text.protected void detachFromAnchorageVisual(IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> anchorage, java.lang.String role)
detachFromAnchorageVisual in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>protected void doActivate()
doActivate in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>protected void doDeactivate()
doDeactivate in class AbstractVisualPart<javafx.scene.Node,javafx.scene.Group>protected java.util.List<? extends java.lang.Object> doGetContentChildren()
doGetContentChildren in class AbstractContentPart<javafx.scene.Node,javafx.scene.Group>public javafx.util.Pair<? extends org.eclipse.gef4.common.attributes.IAttributeStore,java.lang.String> getContent()
getContent in interface IContentPart<javafx.scene.Node,javafx.scene.Group>getContent in class AbstractContentPart<javafx.scene.Node,javafx.scene.Group>public java.lang.String getLabelPositionAttributeKey()
public Point getStoredLabelPosition()
protected javafx.scene.text.Text getText()
Text used as visual.protected void refreshPosition(javafx.scene.Node visual,
Point position)
Point.visual - This node's visual.position - This node's position.public void setStoredLabelPosition(Point computedPosition)
computedPosition - The new label position.public void transformContent(AffineTransform transform)
transformContent in interface ITransformableContentPart<javafx.scene.Node,javafx.scene.Group>Copyright (c) 2014 itemis AG and others. All rights reserved.