Java Code Examples for com.google.gwt.dom.client.Style#Visibility

The following examples show how to use com.google.gwt.dom.client.Style#Visibility . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MaterialWidget.java    From gwt-material with Apache License 2.0 5 votes vote down vote up
/**
 * Get the visibility style or null if not applied.
 */
public Style.Visibility getVisibility() {
    String visibility = getElement().getStyle().getVisibility();
    if (visibility != null && !visibility.isEmpty()) {
        return Style.Visibility.valueOf(visibility.toUpperCase());
    }
    return null;
}
 
Example 2
Source File: MaterialWidget.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
public void setVisibility(Style.Visibility visibility) {
    getElement().getStyle().setVisibility(visibility);
}
 
Example 3
Source File: OverlayStyleMixin.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
/**
 * Will apply the visibility into the {@link #overlayElement}
 */
protected void applyVisibility(Style.Visibility visibility) {
    if (overlayElement != null && visibility != null) {
        overlayElement.css("visibility", visibility.getCssName());
    }
}
 
Example 4
Source File: OverlayOption.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
/**
 * Will get the visibility of the overlay element
 */
public Style.Visibility getVisibility() {
    return visibility;
}
 
Example 5
Source File: OverlayOption.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
/**
 * Will set the visibility of the overlay element
 */
public void setVisibility(Style.Visibility visibility) {
    this.visibility = visibility;
}
 
Example 6
Source File: MaterialOverlay.java    From gwt-material-addins with Apache License 2.0 4 votes vote down vote up
public MaterialOverlay(Color backgroundColor, Style.Visibility visibility, Double opacity) {
    this(backgroundColor);
    setVisibility(visibility);
    setOpacity(opacity);
}
 
Example 7
Source File: MaterialOverlay.java    From gwt-material-addins with Apache License 2.0 4 votes vote down vote up
public boolean isOpen() {
    Style.Visibility visibility = getVisibility();
    return visibility == null || !visibility.equals(Style.Visibility.HIDDEN);
}