aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphui')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Group.java8
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Shape.java5
2 files changed, 12 insertions, 1 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Group.java b/src/graphui/classes/com/jogamp/graph/ui/Group.java
index 38e1fd12e..aa5079b02 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Group.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Group.java
@@ -101,6 +101,9 @@ public class Group extends Shape implements Container {
this.setInteractive(false);
}
+ @Override
+ public final boolean isContainer() { return true; }
+
/** Return current {@link Group.Layout}. */
public Layout getLayout() { return layouter; }
@@ -244,6 +247,11 @@ public class Group extends Shape implements Container {
public boolean getRelayoutOnDirtyShapes() { return relayoutOnDirtyShapes; }
@Override
+ public boolean isActive() {
+ return super.isActive() || forAll((final Shape gs) -> { return gs.isActive(); });
+ }
+
+ @Override
protected boolean isShapeDirty() {
if( relayoutOnDirtyShapes ) {
// Deep dirty state update:
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Shape.java b/src/graphui/classes/com/jogamp/graph/ui/Shape.java
index 961b2cba4..a80f07403 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Shape.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Shape.java
@@ -216,6 +216,9 @@ public abstract class Shape {
/** Return the optional symbolic name for this shape. */
public final String getName() { return this.name; }
+ /** Returns true if this shape denotes a container, e.g. {@link Group}, otherwise false. */
+ public boolean isContainer() { return false; }
+
/** Returns true if this shape is enabled and hence visible, otherwise false. */
public final boolean isEnabled() { return isIO(IO_ENABLED); }
/** Enable or disable this shape, i.e. its visibility. */
@@ -1244,7 +1247,7 @@ public abstract class Shape {
}
}
/** Returns true of this shape is active */
- public final boolean isActive() { return isIO(IO_ACTIVE); }
+ public boolean isActive() { return isIO(IO_ACTIVE); }
/**
* Set whether this shape is interactive,