List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Widget isVisible
public boolean isVisible()
From source file:com.kotcrab.vis.ui.util.value.PrefHeightIfVisibleValue.java
License:Apache License
@Override public float get(Actor actor) { if (actor instanceof Widget) { Widget widget = (Widget) actor; return widget.isVisible() ? widget.getPrefHeight() : 0; }//from w ww . j av a 2s .c o m if (actor instanceof Table) { Table table = (Table) actor; return table.isVisible() ? table.getPrefHeight() : 0; } throw new IllegalStateException("Unsupported actor type for PrefHeightIfVisibleValue: " + actor.getClass()); }
From source file:com.kotcrab.vis.ui.util.value.PrefWidthIfVisibleValue.java
License:Apache License
@Override public float get(Actor actor) { if (actor instanceof Widget) { Widget widget = (Widget) actor; return widget.isVisible() ? widget.getPrefWidth() : 0; }/*from w w w .jav a 2 s . c om*/ if (actor instanceof Table) { Table table = (Table) actor; return table.isVisible() ? table.getPrefWidth() : 0; } throw new IllegalStateException("Unsupported actor type for PrefWidthIfVisibleValue: " + actor.getClass()); }