public class HideOnTypePolicy extends AbstractFXOnTypePolicy
HideOnTypePolicy
is an AbstractFXOnTypePolicy
that
hides/shows its host
NodeContentPart
upon the
press of a button:
KeyCode.P
: hides the host
NodeContentPart
KeyCode.E
: shows all hidden neighbors of the host
NodeContentPart
Constructor and Description |
---|
HideOnTypePolicy() |
Modifier and Type | Method and Description |
---|---|
NodeContentPart |
getHost() |
void |
pressed(javafx.scene.input.KeyEvent event) |
protected void |
prune()
|
void |
released(javafx.scene.input.KeyEvent event) |
protected void |
unprune()
Shows all hidden neighbors of the
host
NodeContentPart by iterating over the
hidden neighbors and
individually using the HideNodePolicy to show them. |
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, init, setAdaptable
public NodeContentPart getHost()
getHost
in interface IPolicy<javafx.scene.Node>
getHost
in class AbstractPolicy<javafx.scene.Node>
public void pressed(javafx.scene.input.KeyEvent event)
pressed
in class AbstractFXOnTypePolicy
protected void prune()
public void released(javafx.scene.input.KeyEvent event)
released
in class AbstractFXOnTypePolicy
protected void unprune()
host
NodeContentPart
by iterating over the
hidden neighbors
and
individually using the HideNodePolicy
to show them.Copyright (c) 2014 itemis AG and others. All rights reserved.