本文整理匯總了Java中org.dashbuilder.dataset.def.DataSetDef.isPushEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java DataSetDef.isPushEnabled方法的具體用法?Java DataSetDef.isPushEnabled怎麽用?Java DataSetDef.isPushEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.dashbuilder.dataset.def.DataSetDef
的用法示例。
在下文中一共展示了DataSetDef.isPushEnabled方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: show
import org.dashbuilder.dataset.def.DataSetDef; //導入方法依賴的package包/類
public void show(final DataSetDef def) {
if (def != null) {
// Cache status panel.
final boolean isShowBackendCache = def.getProvider() != null
&& ( !DataSetProviderType.BEAN.equals(def.getProvider())
&& !DataSetProviderType.CSV.equals(def.getProvider() ));
final Boolean isCacheEnabled = isShowBackendCache ? def.isCacheEnabled() : null;
final boolean isPushEnabled = def.isPushEnabled();
final boolean isRefreshEnabled = def.getRefreshTime() != null;
view.showStatusPanel(isCacheEnabled, isPushEnabled, isRefreshEnabled);
// Show loading icon on size panel while performing the backend request.
showLoadingIcon();
getMetadata(def, new DataSetMetadataCallback() {
@Override
public void callback(final DataSetMetadata metadata) {
final int estimatedSize = metadata.getEstimatedSize();
final int rowCount = metadata.getNumberOfRows();
view.showSizePanel(humanReadableRowCount(rowCount) + " " + DataSetExplorerConstants.INSTANCE.rows(),
humanReadableByteCount(estimatedSize));
}
@Override
public void notFound() {
showErrorIcon();
showError(def.getUUID(), DataSetExplorerConstants.INSTANCE.notFound());
}
@Override
public boolean onError(final ClientRuntimeError error) {
showErrorIcon();
showError(def.getUUID(), error);
return false;
}
});
}
}
示例2: setValue
import org.dashbuilder.dataset.def.DataSetDef; //導入方法依賴的package包/類
@Override
public void setValue(final DataSetDef value) {
Double _value = value != null ? value.getPushMaxSize() : 100d;
if (value != null && value.isPushEnabled()) {
enable();
} else {
disable();
}
view.setValue(_value);
}