protected void modelChanged(BaseDocument oldDoc, BaseDocument newDoc) { if (oldDoc != null) { // remove all document layers drawLayerList.remove(oldDoc.getDrawLayerList()); } if (newDoc != null) { settingsChange(null); // add all document layers drawLayerList.add(newDoc.getDrawLayerList()); } if (oldDoc != null) oldDoc.getBookmarks().removeAll(); }
protected void modelChanged(BaseDocument oldDoc, BaseDocument newDoc) { if (oldDoc != null) { // remove all document layers drawLayerList.remove(oldDoc.getDrawLayerList()); } if (newDoc != null) { settingsChange(null); // add all document layers drawLayerList.add(newDoc.getDrawLayerList()); } if (oldDoc != null) oldDoc.getBookmarks().removeAll(); }
/** Construct extended UI for printing the given document */ public EditorUI(BaseDocument printDoc) { this.printDoc = printDoc; settingsChange(null); setLineNumberEnabled(true); updateLineNumberWidth(0); drawLayerList.add(printDoc.getDrawLayerList()); }
/** * Construct extended UI for printing the given document * and specify which set of colors should be used. * * @param printDoc document that should be printed. * @param usePrintColoringMap use printing coloring settings instead * of the regular ones. * @param lineNumberEnabled if set to false the line numbers will not be printed. * If set to true the visibility of line numbers depends on lineNumberVisibleSetting. */ public EditorUI(BaseDocument printDoc, boolean usePrintColoringMap, boolean lineNumberEnabled) { this.printDoc = printDoc; this.usePrintColoringMap = usePrintColoringMap; settingsChange(null); setLineNumberEnabled(lineNumberEnabled); updateLineNumberWidth(0); drawLayerList.add(printDoc.getDrawLayerList()); // the fix of #37363 drawLayerList.remove(DrawLayerFactory.GUARDED_LAYER_NAME); drawLayerList.remove(DrawLayerFactory.HIGHLIGHT_SEARCH_LAYER_NAME); drawLayerList.remove(DrawLayerFactory.INC_SEARCH_LAYER_NAME); }