本文整理了Java中com.vaadin.flow.dom.Element.getProperty()
方法的一些代码示例,展示了Element.getProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getProperty()
方法的具体详情如下:
包路径:com.vaadin.flow.dom.Element
类名称:Element
方法名:getProperty
[英]Gets the value of the given property as a string.
[中]以字符串形式获取给定属性的值。
代码示例来源:origin: com.vaadin/flow-server
/**
* Gets the value of the given property as a string.
*
* @param name
* the property name, not <code>null</code>
* @return the property value, or <code>null</code> if no value is set
*/
public String getProperty(String name) {
return getProperty(name, null);
}
代码示例来源:origin: com.vaadin/vaadin-radio-button-flow
/**
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
*
* @return the {@code name} property from the webcomponent
*/
protected String getNameString() {
return getElement().getProperty("name");
}
代码示例来源:origin: com.vaadin/vaadin-iron-list-flow
/**
* Gets whether this list is rendered in a grid layout instead of a linear
* list.
*
* @return <code>true</code> if the list renders itself as a grid,
* <code>false</code> otherwise
*/
public boolean isGridLayout() {
return getElement().getProperty("grid", false);
}
代码示例来源:origin: com.vaadin/vaadin-context-menu-flow
/**
* Gets the checked state of this item. The item can be checked and
* un-checked with {@link #setChecked(boolean)} or by clicking it when it is
* checkable. A checked item displays a checkmark icon inside it.
*
* @return {@code true} if the item is checked, {@code false} otherwise
* @see #setCheckable(boolean)
* @see #setChecked(boolean)
*/
public boolean isChecked() {
return getElement().getProperty("_checked", false);
}
代码示例来源:origin: com.vaadin/incubator-tooltip-flow
/**
* Checks the manual mode of the tooltip.
*
* @return manualMode <code>true</code> the tooltip is controlled programmatically
* <code>false</code>, it is controlled automatically
*/
public boolean isManualMode() {
return getElement().getProperty(MANUAL_PROPERTY, false);
}
代码示例来源:origin: com.vaadin/flow-server
@Override
default boolean isReadOnly() {
return getElement().getProperty("readonly", false);
}
}
代码示例来源:origin: com.vaadin/incubator-tooltip-flow
/**
* Gets the alignment of the tooltip.
*
* <p>
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
* </p>
*
* @return alignment "top","right","left","bottom" or center
*/
private String getAlignmentText() {
return getElement().getProperty(ALIGNMENT_PROPERTY);
}
}
代码示例来源:origin: com.vaadin/vaadin-custom-field-flow
@Override
public String getErrorMessage() {
return getElement().getProperty("errorMessage");
}
代码示例来源:origin: com.vaadin/vaadin-checkbox-flow
/**
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
*
* @return the {@code name} property from the webcomponent
*/
protected String getNameString() {
return getElement().getProperty("name");
}
代码示例来源:origin: com.vaadin/vaadin-custom-field-flow
/**
* Gets the label for the field.
*
* @return the {@code label} property from the webcomponent
*/
public String getLabel() {
return getElement().getProperty("label", null);
}
代码示例来源:origin: com.vaadin/flow-server
@Override
default boolean isRequiredIndicatorVisible() {
return getElement().getProperty("required", false);
}
代码示例来源:origin: com.vaadin/incubator-tooltip-flow
/**
* Gets the position of the tooltip.
*
* <p>
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
* </p>
*
* @return position "top","right","left" or "bottom"
*/
private String getPositionText() {
return getElement().getProperty(POSITION_PROPERTY);
}
代码示例来源:origin: com.vaadin/vaadin-text-field-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Set to true to display value increase/decrease controls.
* <p>
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
* </p>
*
* @return the {@code hasControls} property from the webcomponent
*/
protected boolean hasControlsBoolean() {
return getElement().getProperty("hasControls", false);
}
代码示例来源:origin: com.vaadin/vaadin-accordion-flow
/**
* Gets the index of the currently opened index.
*
* @return the index of the opened panel or null if the accordion is closed.
*/
@Synchronize(property = OPENED_PROPERTY, value = OPENED_CHANGED_DOM_EVENT)
public OptionalInt getOpenedIndex() {
final String opened = getElement().getProperty(OPENED_PROPERTY);
return opened == null ? OptionalInt.empty() : OptionalInt.of(Integer.valueOf(opened));
}
代码示例来源:origin: com.vaadin/vaadin-tabs-flow
/**
* Gets the orientation of this tab sheet.
*
* @return the orientation
*/
public Orientation getOrientation() {
String orientation = getElement().getProperty("orientation");
if (orientation != null) {
return Orientation.valueOf(orientation.toUpperCase(Locale.ROOT));
}
return Orientation.HORIZONTAL;
}
代码示例来源:origin: com.vaadin/vaadin-tabs-flow
/**
* Gets the zero-based index of the currently selected tab.
*
* @return the zero-based index of the selected tab, or -1 if none of the
* tabs is selected
*/
@Synchronize(property = SELECTED, value = "selected-changed")
public int getSelectedIndex() {
return getElement().getProperty(SELECTED, -1);
}
代码示例来源:origin: com.vaadin/vaadin-confirm-dialog-flow
@Synchronize(property = "opened", value = "opened-changed")
public boolean isOpened() {
return getElement().getProperty("opened", false);
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
private void validateTimelineAndConfiguration() {
if (getElement().getProperty("timeline", false)) {
final ChartType type = getConfiguration().getChart().getType();
if (TIMELINE_NOT_SUPPORTED.contains(type)) {
throw new IllegalArgumentException(
"Timeline is not supported for chart type '" + type + "'");
}
}
}
代码示例来源:origin: com.vaadin/vaadin-radio-button-flow
@Override
protected boolean hasValidValue() {
String selectedKey = getElement().getProperty("value");
return itemEnabledProvider.test(keyMapper.get(selectedKey));
}
代码示例来源:origin: com.vaadin/vaadin-select-flow
@Override
protected boolean hasValidValue() {
// this is not about whether the value is actually "valid",
// this is about whether or not is something that should be committed to
// the _value_ of this field. E.g, it might be a value that is
// acceptable,
// but the component status should still be _invalid_.
String selectedKey = getElement().getProperty("value");
T item = keyMapper.get(selectedKey);
if (item == null) {
return isEmptySelectionAllowed() && isItemEnabled(item);
}
return isItemEnabled(item);
}
内容来源于网络,如有侵权,请联系作者删除!