/** Get logical style for position in paragraph */ public Style getLogicalStyle(int pos) { try { pos = op.getBOL(pos); // begining of line DrawLayer[] layerArray = getDrawLayerList().currentLayers(); for (int i = 0; i < layerArray.length; i++) { DrawLayer layer = layerArray[i]; if (layer instanceof DrawLayerFactory.StyleLayer) { if (((DrawLayerFactory.StyleLayer) layer).markChain.isMark(pos)) { return ((DrawLayerFactory.StyleLayer) layer).style; } } } } catch (BadLocationException e) { // do nothing for invalid positions } return getStyle(normalStyleName); // no style found }
/** Get logical style for position in paragraph */ public Style getLogicalStyle(int pos) { try { pos = Utilities.getRowStart(this, pos); DrawLayer[] layerArray = getDrawLayerList().currentLayers(); for (int i = 0; i < layerArray.length; i++) { DrawLayer layer = layerArray[i]; if (layer instanceof DrawLayerFactory.StyleLayer) { if (((DrawLayerFactory.StyleLayer)layer).markChain.isMark(pos)) { return ((DrawLayerFactory.StyleLayer)layer).style; } } } return getStyle(normalStyleName); // no style found } catch (BadLocationException e) { return null; } }
String layerName = (String)stylesToLayers.get(s.getName()); DrawLayer[] layerArray = getDrawLayerList().currentLayers(); for (int i = 0; i < layerArray.length; i++) { if (layerArray[i] instanceof DrawLayerFactory.StyleLayer) {
DrawLayer[] layerArray = getDrawLayerList().currentLayers(); for (int i = 0; i < layerArray.length; i++) { if (layerArray[i] instanceof DrawLayerFactory.StyleLayer) {
ctx.layers = ctx.editorUI.getDrawLayerList().currentLayers(); int layersLength = ctx.layers.length; ctx.layerActives = new boolean[layersLength];
ctx.layers = ctx.editorUI.getDrawLayerList().currentLayers(); int layersLength = ctx.layers.length; ctx.layerActives = new boolean[layersLength];