Search in sources :

Example 1 with DocViewerPanel

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();
}
Also used : DocViewerPanel(doc_gui.DocViewerPanel) Grouping(doc.mathobjects.Grouping)

Aggregations

Grouping (doc.mathobjects.Grouping)1 DocViewerPanel (doc_gui.DocViewerPanel)1