use of org.entirej.framework.core.data.EJDataRecord in project rap by entirej.
the class EJRWTListRecordBlockRenderer method recordDeleted.
public void recordDeleted(int dataBlockRecordNumber) {
EJDataRecord recordAt = getRecordAt(dataBlockRecordNumber > 1 ? dataBlockRecordNumber - 2 : 0);
if (recordAt == null) {
recordAt = getLastRecord();
}
if (_tableViewer != null && !_tableViewer.getTable().isDisposed()) {
clearFilter();
_tableViewer.setInput(new Object());
applyFileter();
}
if (recordAt != null)
recordSelected(recordAt);
}
use of org.entirej.framework.core.data.EJDataRecord in project rap by entirej.
the class EJRWTListRecordBlockRenderer method notifyStatus.
protected void notifyStatus() {
if (hasFocus()) {
EJRWTApplicationManager mng = (EJRWTApplicationManager) _block.getFrameworkManager().getApplicationManager();
int displayedRecordCount = getDisplayedRecordCount();
if (mng.getStatusbar() != null) {
EJDataRecord focusedRecord = getFocusedRecord();
int displayedRecordNumber = getDisplayedRecordNumber(focusedRecord);
if (displayedRecordCount > 0 && displayedRecordNumber == -1) {
mng.getStatusbar().setStatus2("");
} else {
mng.getStatusbar().setStatus2(String.format("%s of %s", String.valueOf(displayedRecordNumber + 1), String.valueOf(displayedRecordCount)));
}
}
} else {
EJRWTApplicationManager mng = (EJRWTApplicationManager) _block.getFrameworkManager().getApplicationManager();
if (mng.getStatusbar() != null) {
mng.getStatusbar().setStatus2("");
}
}
}
use of org.entirej.framework.core.data.EJDataRecord in project rap by entirej.
the class EJRWTListRecordBlockRenderer method getFocusedRecord.
public EJDataRecord getFocusedRecord() {
EJDataRecord _focusedRecord = null;
if (_tableViewer != null && !_tableViewer.getTable().isDisposed()) {
ISelection selection = _tableViewer.getSelection();
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
Object firstElement = structuredSelection.getFirstElement();
if (firstElement instanceof EJDataRecord) {
_focusedRecord = (EJDataRecord) firstElement;
}
}
}
return _focusedRecord;
}
use of org.entirej.framework.core.data.EJDataRecord in project rap by entirej.
the class EJRWTSingleRecordBlockRenderer method notifyStatus.
protected void notifyStatus() {
if (hasFocus()) {
EJRWTApplicationManager mng = (EJRWTApplicationManager) _block.getFrameworkManager().getApplicationManager();
int displayedRecordCount = getDisplayedRecordCount();
if (mng.getStatusbar() != null) {
EJDataRecord focusedRecord = getFocusedRecord();
int displayedRecordNumber = getDisplayedRecordNumber(focusedRecord);
if (displayedRecordCount > 0 && displayedRecordNumber == -1) {
mng.getStatusbar().setStatus2("");
} else {
mng.getStatusbar().setStatus2(String.format("%s of %s", String.valueOf(displayedRecordNumber + 1), String.valueOf(displayedRecordCount)));
}
}
} else {
EJRWTApplicationManager mng = (EJRWTApplicationManager) _block.getFrameworkManager().getApplicationManager();
if (mng.getStatusbar() != null) {
mng.getStatusbar().setStatus2("");
}
}
}
use of org.entirej.framework.core.data.EJDataRecord in project rap by entirej.
the class EJRWTTreeTableRecordBlockRenderer method getFocusedRecord.
@Override
public EJDataRecord getFocusedRecord() {
EJDataRecord _focusedRecord = null;
if (_tableViewer != null && !_tableViewer.getTree().isDisposed()) {
ISelection selection = _tableViewer.getSelection();
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
Object firstElement = structuredSelection.getFirstElement();
if (firstElement instanceof EJDataRecord) {
_focusedRecord = (EJDataRecord) firstElement;
}
}
}
return _focusedRecord;
}
Aggregations