本文整理汇总了Java中org.dashbuilder.dataset.def.DataSetDef.getRefreshTime方法的典型用法代码示例。如果您正苦于以下问题:Java DataSetDef.getRefreshTime方法的具体用法?Java DataSetDef.getRefreshTime怎么用?Java DataSetDef.getRefreshTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.dashbuilder.dataset.def.DataSetDef
的用法示例。
在下文中一共展示了DataSetDef.getRefreshTime方法的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) {
final String rTime = value != null ? value.getRefreshTime() : null;
setRefreshEnabled(rTime != null);
}