use of cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT in project vcell by virtualcell.
the class GeometrySubVolumePanel method moveSubvolumeFront.
/**
* connEtoM6: (FrontButton.action.actionPerformed(java.awt.event.ActionEvent) --> Geometry.bringForward(Lcbit.vcell.geometry.AnalyticSubVolume;)V)
* @param arg1 java.awt.event.ActionEvent
*/
private void moveSubvolumeFront() {
try {
if ((getSelectedSubVolume() != null)) {
AsynchClientTask task1 = new AsynchClientTask("moving to front", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
@Override
public void run(Hashtable<String, Object> hashTable) throws Exception {
SubVolume selectedSubVolume = getSelectedSubVolume();
if (selectedSubVolume instanceof CSGObject) {
getGeometrySpec().bringForward((CSGObject) selectedSubVolume);
} else if (selectedSubVolume instanceof AnalyticSubVolume) {
getGeometrySpec().bringForward((AnalyticSubVolume) selectedSubVolume);
}
getGeometry().precomputeAll(new GeometryThumbnailImageFactoryAWT());
}
};
ClientTaskDispatcher.dispatch(GeometrySubVolumePanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { task1 }, false);
}
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
use of cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT in project vcell by virtualcell.
the class GeometrySubVolumePanel method addSubVolume.
private void addSubVolume(final SubVolume subVolume) {
AsynchClientTask task1 = new AsynchClientTask("adding subdomain", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
@Override
public void run(Hashtable<String, Object> hashTable) throws Exception {
if (subVolume instanceof AnalyticSubVolume) {
getGeometrySpec().addSubVolume((AnalyticSubVolume) subVolume, true);
} else if (subVolume instanceof CSGObject) {
getGeometrySpec().addSubVolume((CSGObject) subVolume, true);
}
getGeometry().precomputeAll(new GeometryThumbnailImageFactoryAWT());
}
};
AsynchClientTask task2 = new AsynchClientTask("adding subdomain", AsynchClientTask.TASKTYPE_SWING_BLOCKING) {
@Override
public void run(Hashtable<String, Object> hashTable) throws Exception {
DocumentEditorSubPanel.setTableSelections(new Object[] { subVolume }, ivjScrollPaneTable, ivjgeometrySubVolumeTableModel);
}
};
ClientTaskDispatcher.dispatch(GeometrySubVolumePanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { task1, task2 }, true, false, false, null, true);
}
use of cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT in project vcell by virtualcell.
the class GeometrySubVolumePanel method deleteSubvolume.
/**
* connEtoM1: (DeleteButton.action.actionPerformed(java.awt.event.ActionEvent) --> Geometry.removeAnalyticSubVolume(Lcbit.vcell.geometry.AnalyticSubVolume;)V)
* @param arg1 java.awt.event.ActionEvent
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void deleteSubvolume() {
try {
if ((getSelectedSubVolume() != null)) {
AsynchClientTask task1 = new AsynchClientTask("removing subdomain", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
@Override
public void run(Hashtable<String, Object> hashTable) throws Exception {
if (getSelectedSubVolume() instanceof AnalyticSubVolume) {
getGeometrySpec().removeAnalyticSubVolume((AnalyticSubVolume) getSelectedSubVolume());
} else if (getSelectedSubVolume() instanceof CSGObject) {
getGeometrySpec().removeCSGObject((CSGObject) getSelectedSubVolume());
}
getGeometry().precomputeAll(new GeometryThumbnailImageFactoryAWT());
}
};
ClientTaskDispatcher.dispatch(GeometrySubVolumePanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { task1 }, false);
}
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
use of cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT in project vcell by virtualcell.
the class GeometrySubVolumePanel method moveBack.
/**
* connEtoM9: (BackButton.action.actionPerformed(java.awt.event.ActionEvent) --> Geometry.sendBackward(Lcbit.vcell.geometry.AnalyticSubVolume;)V)
* @param arg1 java.awt.event.ActionEvent
*/
private void moveBack() {
try {
if ((getSelectedSubVolume() != null)) {
AsynchClientTask task1 = new AsynchClientTask("moving to back", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
@Override
public void run(Hashtable<String, Object> hashTable) throws Exception {
SubVolume selectedSubVolume = getSelectedSubVolume();
if (selectedSubVolume instanceof CSGObject) {
getGeometrySpec().sendBackward((CSGObject) selectedSubVolume);
} else if (selectedSubVolume instanceof AnalyticSubVolume) {
getGeometrySpec().sendBackward((AnalyticSubVolume) selectedSubVolume);
}
getGeometry().precomputeAll(new GeometryThumbnailImageFactoryAWT());
}
};
ClientTaskDispatcher.dispatch(GeometrySubVolumePanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { task1 }, false);
}
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
use of cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT in project vcell by virtualcell.
the class GeometryViewer method updateSurfaceView.
private void updateSurfaceView() {
if (tabbedPane.getSelectedComponent() == surfaceViewer && getGeometry() != null) {
AsynchClientTask surfaceGenerationTask = new AsynchClientTask("creating new smoothed surface", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
getGeometry().precomputeAll(new GeometryThumbnailImageFactoryAWT(), true, true);
}
};
AsynchClientTask[] tasks = new AsynchClientTask[] { surfaceGenerationTask };
ClientTaskDispatcher.dispatch(this, new Hashtable<String, Object>(), tasks);
}
}
Aggregations