本文整理了Java中javafx.scene.Node.isVisible()
方法的一些代码示例,展示了Node.isVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.isVisible()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:isVisible
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
protected double computePrefWidth(double height) {
double width = 0.0F;
for (Node child : getChildren()) {
if (child instanceof TabHeaderContainer
&& child.isVisible()
&& (measureClosingTabs || !((TabHeaderContainer) child).isClosing)) {
width += child.prefWidth(height);
}
}
return snapSize(width) + snappedLeftInset() + snappedRightInset();
}
代码示例来源:origin: jfoenixadmin/JFoenix
Text text = ((Text) node);
final int beginIndex = text.getText().toLowerCase().indexOf(query.toLowerCase());
if (beginIndex > -1 && node.isVisible()) {
ArrayList<Bounds> boundingBoxes = getMatchingBounds(query, text);
ArrayList<Rectangle> rectangles = new ArrayList<>();
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
protected void layoutChildren(double x, double y, double w, double h) {
updateDisclosureNode();
double disclosureWidth = 0;
Node disclosureNode = ((JFXTreeTableCell<S, T>) getSkinnable()).getDisclosureNode();
if (disclosureNode.isVisible()) {
Pos alignment = getSkinnable().getAlignment();
alignment = alignment == null ? Pos.CENTER_LEFT : alignment;
layoutInArea(disclosureNode, x + 8, y, w, h, 0, Insets.EMPTY, false, false, HPos.LEFT, VPos.CENTER);
disclosureWidth = disclosureNode.getLayoutBounds().getWidth() + 18;
}
super.layoutChildren(x + disclosureWidth, y, w - disclosureWidth, h);
}
}
代码示例来源:origin: org.testfx/testfx-internal-java9
public static boolean isNotVisible(Node node) {
return !node.isVisible();
}
代码示例来源:origin: org.testfx/testfx-internal-java8
@SuppressWarnings("deprecated")
public static boolean isNotVisible(Node node) {
return !node.isVisible() || !node.impl_isTreeVisible();
}
代码示例来源:origin: org.jfxtras/jfxtras-common
/**
* Determine if a node is effectively visible.
* This means that if the node or any of its parents are not visible, the node is effectively not visible.
* Otherwise it is visible.
*
* @param n
* @return
*/
static public boolean isEffectivelyVisible(Node n) {
while (n != null) {
if (!n.isVisible()) {
return false;
}
n = n.getParent();
}
return true;
}
代码示例来源:origin: org.fxmisc.flowless/flowless
public C getVisibleCell(int itemIndex) {
C cell = cellManager.getPresentCell(itemIndex);
if(cell.getNode().isVisible()) {
return cell;
} else {
throw new NoSuchElementException(
"Cell " + itemIndex + " is not visible");
}
}
代码示例来源:origin: org.fxmisc.flowless/flowless
public Optional<C> getCellIfVisible(int itemIndex) {
return cellManager.getCellIfPresent(itemIndex)
.filter(c -> c.getNode().isVisible());
}
代码示例来源:origin: org.jfxtras/jfxtras-test-support
protected void assertNotVisible(String string) {
Node lNode = find(string);
if (lNode.isVisible()) {
Assert.fail("Should not have found '" + string + "', but did anyway");
}
}
代码示例来源:origin: org.loadui/testFx
@SuppressWarnings("deprecation")
public static boolean isNodeVisible(Node node)
{
if(!node.isVisible() || !node.impl_isTreeVisible())
return false;
return isNodeWithinSceneBounds(node);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
*
*/
@Override
public void validate() {
if(getDisplay().isVisible()){
editInputComponent.validate();
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
*
*/
@Override
public boolean isNotValid() {
if(getDisplay().isVisible()){
return editInputComponent.isNotValid();
}
else {
return false;
}
}
代码示例来源:origin: stackoverflow.com
for( Node node: parent.getChildrenUnmodifiable()) {
if( node.isVisible() && !node.isDisabled() && node.isFocusTraversable())
return node;
}
return null;
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
*
*/
@Override
public void displayError() {
if(getDisplay().isVisible()) {
editInputComponent().displayError();
}
}
代码示例来源:origin: org.fxmisc.flowless/flowless
public OptionalInt lastVisibleBefore(int position) {
MemoizationList<C> cells = cellManager.getLazyCellList();
int presentBefore = cells.getMemoizedCountBefore(position);
for(int i = presentBefore - 1; i >= 0; --i) {
C cell = cells.memoizedItems().get(i);
if(cell.getNode().isVisible()) {
return OptionalInt.of(cells.indexOfMemoizedItem(i));
}
}
return OptionalInt.empty();
}
代码示例来源:origin: org.fxmisc.flowless/flowless
public OptionalInt firstVisibleAfter(int position) {
MemoizationList<C> cells = cellManager.getLazyCellList();
int presentBefore = cells.getMemoizedCountBefore(position);
int present = cells.getMemoizedCount();
for(int i = presentBefore; i < present; ++i) {
C cell = cells.memoizedItems().get(i);
if(cell.getNode().isVisible()) {
return OptionalInt.of(cells.indexOfMemoizedItem(i));
}
}
return OptionalInt.empty();
}
代码示例来源:origin: com.jfoenix/jfoenix
@Override
protected double computePrefWidth(double height) {
double width = 0.0F;
for (Node child : getChildren()) {
if (child instanceof TabHeaderContainer
&& child.isVisible()
&& (measureClosingTabs || !((TabHeaderContainer) child).isClosing)) {
width += child.prefWidth(height);
}
}
return snapSize(width) + snappedLeftInset() + snappedRightInset();
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
private void updateConstraints() {
AnchorPane.clearConstraints(anchorCenteredPane);
AnchorPane.setLeftAnchor(anchorCenteredPane, 0.);
AnchorPane.setRightAnchor(anchorCenteredPane, 0.);
AnchorPane.setTopAnchor(anchorCenteredPane, 0.);
if (bottomNode.isVisible()) {
AnchorPane.setBottomAnchor(anchorCenteredPane, 72.0);
} else {
AnchorPane.setBottomAnchor(anchorCenteredPane, 0.0);
}
}
代码示例来源:origin: com.jfoenix/jfoenix
@Override
protected void layoutChildren(double x, double y, double w, double h) {
updateDisclosureNode();
double disclosureWidth = 0;
Node disclosureNode = ((JFXTreeTableCell<S, T>) getSkinnable()).getDisclosureNode();
if (disclosureNode.isVisible()) {
Pos alignment = getSkinnable().getAlignment();
alignment = alignment == null ? Pos.CENTER_LEFT : alignment;
layoutInArea(disclosureNode, x + 8, y, w, h, 0, Insets.EMPTY, false, false, HPos.LEFT, VPos.CENTER);
disclosureWidth = disclosureNode.getLayoutBounds().getWidth() + 18;
}
super.layoutChildren(x + disclosureWidth, y, w - disclosureWidth, h);
}
}
代码示例来源:origin: com.guigarage/responsivefx
private static void updateManagedProperty(Node n, DeviceType type) {
// first time we've set this invisible => store the preset
if (!n.getProperties().containsKey(PROP_MANAGED_STATE)) {
n.getProperties().put(PROP_MANAGED_STATE, n.isManaged());
}
// don't track changes through this
n.managedProperty().removeListener(MANAGED_LISTENER);
// If it's visible we use the stored value for "managed" property
n.setManaged(n.isVisible() ? (Boolean) n.getProperties().get(PROP_MANAGED_STATE) : false);
// need to track changes through API
n.managedProperty().addListener(MANAGED_LISTENER);
}
内容来源于网络,如有侵权,请联系作者删除!