use of com.ramussoft.pb.dmaster.Template in project ramus by Vitaliy-Yakovchuk.
the class MovingArea method down.
/**
* Мотод показує контекстну діаграму активного функціонального блоку, якщо
* на поточній діаграмі всього один функціональний блок то показується його
* контекстна діаграма.
*/
public void down() {
Function function = null;
if (activeFunction.getRealChildCount() == 1)
function = ((Function) activeFunction).getRealChildAt(0);
else if (activeObject instanceof MovingFunction) {
function = ((MovingFunction) activeObject).getFunction();
}
if ((function != null) && (function.getType() < Function.TYPE_EXTERNAL_REFERENCE)) {
if (function.getRealChildCount() == 0) {
if (panel.isReadOnly())
return;
panel.getFramework().setOpenDynamikViewEvent(panel.getView().getOpenAction());
ContextMasterDialog contextMasterDialog = panel.getContextMasterDialog();
contextMasterDialog.setDecompositionType(activeFunction.getDecompositionType());
final Template model = contextMasterDialog.showModal();
panel.getFramework().setOpenDynamikViewEvent(null);
int type = contextMasterDialog.getDecompositionType();
if (model != null) {
startUserTransaction();
function.setDecompositionType(type);
refactor.saveToFunction();
model.createChilds(function, dataPlugin);
setActiveFunction(function);
refactor.fixNoNameBug();
refactor.saveToFunction();
if (isUserTransactionStarted())
commitUserTransaction();
}
} else
setActiveFunction(function);
panel.getJPanel3().repaint();
}
pressedPanel = null;
}
use of com.ramussoft.pb.dmaster.Template in project ramus by Vitaliy-Yakovchuk.
the class ContextMasterDialog method showModal.
public Template showModal() {
Options.loadOptions("ContextMasterDialog", this);
result = null;
prev.setDiagramType(getDecompositionType());
loadModels();
setVisible(true);
for (Template template : data) template.close();
Options.saveOptions("ContextMasterDialog", this);
return result;
}
use of com.ramussoft.pb.dmaster.Template in project ramus by Vitaliy-Yakovchuk.
the class IDEFPanel method openTabNActive.
protected Tab openTabNActive(final Function function) {
if (function.getChildCount() == 0) {
final Template model = getContextMasterDialog().showModal();
if (model != null) {
model.createChilds(function, dataPlugin);
}
}
if (function.getChildCount() == 0)
return null;
Tab x = null;
if (tabbedPane.getTabCount() == 0) {
x = createTab(movingArea.getActiveFunction());
}
final Tab tab = createTab(function);
if (x != null)
x.getPanel().add(getJScrollPane1(), BorderLayout.CENTER);
return tab;
}
Aggregations