Example usage for org.w3c.dom.css CSSPrimitiveValue getStringValue

List of usage examples for org.w3c.dom.css CSSPrimitiveValue getStringValue

Introduction

In this page you can find the example usage for org.w3c.dom.css CSSPrimitiveValue getStringValue.

Prototype

public String getStringValue() throws DOMException;

Source Link

Document

This method is used to get the string value.

Usage

From source file:org.akrogen.tkui.css.swt.properties.css2.CSSPropertyClassificationSWTHandler.java

@Override
public void applyCSSPropertyVisibility(Object element, CSSValue value, String pseudo, CSSEngine engine)
        throws Exception {
    if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
        Control control = (Control) element;
        CSSPrimitiveValue primitiveValue = (CSSPrimitiveValue) value;
        String visibility = primitiveValue.getStringValue();
        if ("hidden".equals(visibility))
            control.setVisible(false);// w ww  .j  av  a  2 s.  c om
        else if ("collapse".equals(visibility)) {
            // TODO : manage collapse
            control.setVisible(false);
        } else
            control.setVisible(true);
    }
}