com.google.gwt.query.client.css.LineHeightProperty Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2011, The gwtquery team.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.query.client.css;
/**
*
* If the property is set on a block-level element whose content is composed of
* inline-level elements, it specifies the minimal height of each generated
* inline box.
*
*
*
* If the property is set on an inline-level element, it specifies the exact
* height of each box generated by the element. (Except for inline replaced
* elements, where the height of the box is given by the height
* property.)
*
*/
public class LineHeightProperty extends CssProperty implements
TakesNumber {
private static final String CSS_PROPERTY = "lineHeight";
public static void init() {
CSS.LINE_HEIGHT = new LineHeightProperty();
}
private LineHeightProperty() {
super(CSS_PROPERTY);
}
/**
* The used value of the property is this value
multiplied by the
* element's font size. Negative values are illegal.
*/
public CssSetter with(Integer value) {
return new SimpleCssSetter(CSS_PROPERTY, value != null ? "" + value : null);
}
/**
* The used value of the property is this value
multiplied by the
* element's font size. Negative values are illegal.
*/
public CssSetter with(Double value) {
return new SimpleCssSetter(CSS_PROPERTY, value != null ? "" + value : null);
}
}