1 19 package org.netbeans.modules.diff.builtin.visualizer.editable; 20 21 import org.netbeans.spi.editor.highlighting.HighlightsLayerFactory; 22 import org.netbeans.spi.editor.highlighting.HighlightsLayer; 23 import org.netbeans.spi.editor.highlighting.ZOrder; 24 25 30 public class DiffHighlightsLayerFactory implements HighlightsLayerFactory { 31 32 static final String HIGHLITING_LAYER_ID = "org.netbeans.modules.diff.builtin.visualizer.editable.DiffContentPanel"; 34 public HighlightsLayer[] createLayers(Context context) { 35 DiffContentPanel master = (DiffContentPanel) context.getComponent().getClientProperty(HIGHLITING_LAYER_ID); 36 if (master == null) return null; 37 38 HighlightsLayer [] layers = new HighlightsLayer[1]; 39 layers[0] = HighlightsLayer.create(HIGHLITING_LAYER_ID, ZOrder.TOP_RACK, true, master.getHighlightsContainer()); 40 return layers; 41 } 42 } 43 | Popular Tags |