public class HidingBehavior extends AbstractBehavior<javafx.scene.Node> implements java.beans.PropertyChangeListener
HidingBehavior is specific to NodeContentPart. It
registers listeners on the HidingModel upon activation. When the
HidingModel changes, the hidden status of the NodeContentPart
is determined. If the hidden status of the part changed, either
hide() or show() will be called, respectively, to hide/show
the part. Additionally, a HiddenNeighborsPart is managed by this
HidingBehavior. The HiddenNeighborsPart shows the number of
hidden neighbors of the NodeContentPart.pcsACTIVE_PROPERTY| Constructor and Description |
|---|
HidingBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected void |
createHiddenNeighborPart()
Creates the
HiddenNeighborsPart that shows the hidden neighbors
of the NodeContentPart on which this HidingBehavior is
installed. |
void |
deactivate() |
protected HidingModel |
getHidingModel()
|
NodeContentPart |
getHost() |
protected IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> |
getPrunedNeighborsPart()
Returns the
HiddenNeighborsPart that is managed by this
HidingBehavior. |
protected void |
hide()
Hides the
host by setting its visual's visibility to
false and its visual's mouse transparency to
true. |
void |
propertyChange(java.beans.PropertyChangeEvent event) |
protected void |
removeHiddenNeighborPart()
Removes the
HiddenNeighborsPart that is managed by this
HidingBehavior. |
protected void |
show()
Shows the
host by setting its visual's visibility to
true and its visual's mouse transparency to
false. |
protected void |
updateHiddenNeighborPart()
Refreshes the
HiddenNeighborsPart that is managed by this
HidingBehavior. |
addFeedback, addFeedback, addHandles, addHandles, addPropertyChangeListener, getAdaptable, getFeedbackParts, getHandleParts, isActive, removeFeedback, removeHandles, removePropertyChangeListener, setAdaptable, switchAdaptableScopespublic void activate()
activate in interface IActivatableactivate in class AbstractBehavior<javafx.scene.Node>protected void createHiddenNeighborPart()
HiddenNeighborsPart that shows the hidden neighbors
of the NodeContentPart on which this HidingBehavior is
installed.public void deactivate()
deactivate in interface IActivatabledeactivate in class AbstractBehavior<javafx.scene.Node>protected HidingModel getHidingModel()
HidingModel that is installed on the IViewer
of the host.public NodeContentPart getHost()
getHost in interface IBehavior<javafx.scene.Node>getHost in class AbstractBehavior<javafx.scene.Node>protected IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> getPrunedNeighborsPart()
HiddenNeighborsPart that is managed by this
HidingBehavior.HiddenNeighborsPart that is managed by this
HidingBehavior.protected void hide()
host by setting its visual's visibility to
false and its visual's mouse transparency to
true.public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerprotected void removeHiddenNeighborPart()
HiddenNeighborsPart that is managed by this
HidingBehavior.protected void show()
host by setting its visual's visibility to
true and its visual's mouse transparency to
false.protected void updateHiddenNeighborPart()
HiddenNeighborsPart that is managed by this
HidingBehavior.Copyright (c) 2014 itemis AG and others. All rights reserved.