/** Add new layer and use its priority to position it in the chain. * If there's the layer with same visibility then the inserted layer * will be placed after it. * * @param layer layer to insert into the chain */ public boolean addLayer(DrawLayer layer, int visibility) { return drawLayerList.add(layer, visibility); }
/** * Add new layer and use its priority to position it in the chain. If * there's the layer with same visibility then the inserted layer will be * placed after it. * * @param layer * layer to insert into the chain */ public boolean addLayer(DrawLayer layer, int visibility) { return drawLayerList.add(layer, visibility); }
synchronized void add(DrawLayerList l) { DrawLayer[] lta = l.layers; for (int i = 0; i < lta.length; i++) { add(lta[i], ((Integer) l.visibilityList.get(i)).intValue()); } }
synchronized void add(DrawLayerList l) { DrawLayer[] lta = l.layers; for (int i = 0; i < lta.length; i++) { add(lta[i], ((Integer)l.visibilityList.get(i)).intValue()); } }
/** 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()); }
public boolean addLayer(DrawLayer layer, int visibility) { if (drawLayerList.add(layer, visibility)) { BaseDocumentEvent evt = createDocumentEvent(0, 0, DocumentEvent.EventType.CHANGE); evt.addEdit(new BaseDocumentEvent.DrawLayerChange(layer.getName(), visibility)); fireChangedUpdate(evt); return true; } else { return false; } }
public boolean addLayer(DrawLayer layer, int visibility) { if (drawLayerList.add(layer, visibility)) { BaseDocumentEvent evt = createDocumentEvent(0, 0, DocumentEvent.EventType.CHANGE); evt.addEdit(new BaseDocumentEvent.DrawLayerChange(layer.getName(), visibility)); fireChangedUpdate(evt); return true; } else { return false; } }
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 * 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); }