use of doc_gui.DocViewerPanel in project OpenNotebook by jaltekruse.
the class ObjectPropertiesFrame method buttonAction.
private void buttonAction(String s) {
object.performAction(s);
// when the document redraws itself
if (!object.actionWasCancelled()) {
notebookPanel.getCurrentDocViewer().addUndoState();
}
DocViewerPanel currentViewer = notebookPanel.getCurrentDocViewer();
// at the time of this comment this is achieved with a double click
if (currentViewer.getFocusedObject() != null && currentViewer.getFocusedObject().getParentContainer() instanceof Grouping) {
((Grouping) currentViewer.getFocusedObject().getParentContainer()).adjustSizeToFitChildren();
}
currentViewer.repaintDoc();
}
Aggregations