Package arez.dom
Class DocumentVisibility
java.lang.Object
arez.dom.DocumentVisibility
- All Implemented Interfaces:
Disposable
Exposes
document.visibilityState as an observable property for specified documents.
A very simple example
import arez.Arez;
import arez.dom.DocumentVisibility;
import com.google.gwt.core.client.EntryPoint;
import akasha.Console;
public class DocumentVisibilityExample
implements EntryPoint
{
public void onModuleLoad()
{
final DocumentVisibility v = DocumentVisibility.create();
Arez.context().observer( () -> Console.log( "Document Visibility: " + v.getVisibility() ) );
}
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe visibility state of the document. -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentVisibilitycreate()Create component monitoring the default document.static DocumentVisibilitycreate(akasha.Document document) Create component monitoring specific document.voiddispose()Dispose the element.akasha.DocumentReturn the document that monitoring visibility state.Return the visibility state of the document as an enum.Return the visibility state of the document as a string.booleanReturn true if dispose() has been called on object.booleanisHidden()Return true if visibility state is "hidden".booleanReturn true if visibility state is "visible".voidsetDocument(akasha.Document document) Change the document that is having visibility state monitored.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface arez.Disposable
isNotDisposed
-
Method Details
-
create
Create component monitoring the default document.- Returns:
- the new component.
-
create
Create component monitoring specific document.- Parameters:
document- the document.- Returns:
- the new component.
-
getDocument
Return the document that monitoring visibility state.- Returns:
- the document.
-
setDocument
Change the document that is having visibility state monitored.- Parameters:
document- the new document.
-
getVisibility
Return the visibility state of the document as an enum.- Returns:
- the visibility state as an enum.
-
getVisibilityState
Return the visibility state of the document as a string.- Returns:
- the visibility state as a string.
-
isVisible
Return true if visibility state is "visible".- Returns:
- true if visibility state is "visible".
-
isHidden
Return true if visibility state is "hidden".- Returns:
- true if visibility state is "hidden".
-
dispose
Description copied from interface:DisposableDispose the element. SeeDisposablefor a description of the implications.- Specified by:
disposein interfaceDisposable
-
isDisposed
Description copied from interface:DisposableReturn true if dispose() has been called on object.- Specified by:
isDisposedin interfaceDisposable- Returns:
- true if dispose has been called.
-