本文整理匯總了Java中com.google.gwt.user.client.ui.CheckBox.setTitle方法的典型用法代碼示例。如果您正苦於以下問題:Java CheckBox.setTitle方法的具體用法?Java CheckBox.setTitle怎麽用?Java CheckBox.setTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.CheckBox
的用法示例。
在下文中一共展示了CheckBox.setTitle方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: render
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
public Widget render(Row row, Column column, Object value) {
if(value == null || !(value instanceof Boolean)) {
return null;
} else {
CheckBox checkbox = new CheckBox();
checkbox.setValue(((Boolean)value).booleanValue());
if(_title != null) checkbox.setTitle(_title);
return checkbox;
}
}
示例2: makeCheckBox
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
public static CheckBox makeCheckBox(String text,
String tip,
boolean selected,
boolean forceNowrap) {
CheckBox cb = new CheckBox();
cb.addStyleName("gwtutil-checkbox");
cb.setValue(selected);
cb.setHTML(text);
cb.setTitle(tip);
if (forceNowrap) {
setStyle(cb, "whiteSpace", "nowrap");
}
return cb;
}
示例3: setProperties
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
/**
* Sets the properties this field will have, if it is an object.
*/
public void setProperties(Map<String, Schema> properties) {
List<String> keys = Lists.newArrayList(properties.keySet());
Collections.sort(keys);
HTMLPanel inner = new HTMLPanel("");
inner.getElement().getStyle().setPaddingLeft(20, Unit.PX);
for (String childKey : keys) {
final Schema property = properties.get(childKey);
final Map<String, Schema> childProperties = property.getProperties();
final Schema items = property.getItems();
if (childProperties == null && items == null) {
// This is a simple field
CheckBox checkBox = new CheckBox(childKey);
checkBox.setValue(root.getValue());
checkBox.setTitle(property.getDescription());
children.put(childKey, checkBox);
checkBox.getElement().appendChild(Document.get().createBRElement());
inner.add(checkBox);
} else {
final FieldsEditor editor = new FieldsEditor(service, childKey);
children.put(childKey, editor);
inner.add(editor);
if (childProperties != null) {
editor.setProperties(childProperties);
} else if (property.getRef() != null) {
editor.setRef(property.getRef());
} else if (items != null) {
if (items.getProperties() != null) {
editor.setProperties(items.getProperties());
} else if (items.getRef() != null) {
editor.setRef(items.getRef());
}
}
}
}
add(inner);
}