isOpenOne static method

bool isOpenOne(
  1. dynamic component
)

Checks if specified component is opened.

To be checked components must implement IOpenable interface. If they don't the call to this method returns true.

  • component the component that is to be checked. Returns true if component is opened and false otherwise.

See IOpenable

Implementation

static bool isOpenOne(component) {
  if (component is IOpenable) {
    return component.isOpen();
  } else {
    return true;
  }
}