/** Creates a Line for given offset. * @param offset the begining of line * @return line that should represent the given line */ public Line createLine (int offset) { StyledDocument doc = support.getDocument(); if (doc == null) // do nothing - document was probably closed return null; PositionRef ref = new PositionRef( support.getPositionManager (), offset, Position.Bias.Forward ); return new SupportLine (support.getLookup (), ref, support); }
/** Creates a Line for given offset. * @param offset the begining of line * @return line that should represent the given line */ public Line createLine (int offset) { StyledDocument doc = support.getDocument(); if (doc == null) // do nothing - document was probably closed return null; PositionRef ref = new PositionRef( support.getPositionManager (), offset, Position.Bias.Forward ); return new SupportLine (support.getLookup (), ref, support); }
/** Find line object in the line set corresponding to current line number. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getCurrent (int line) throws IndexOutOfBoundsException { PositionRef ref = new PositionRef (support.getPositionManager (), line, 0, Position.Bias.Forward); // obj can be null, sorry... org.openide.util.Lookup obj = support.getLookup (); return this.registerLine(new SupportLine(obj, ref, support)); }
/** Find line object in the line set corresponding to current line number. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getCurrent (int line) throws IndexOutOfBoundsException { PositionRef ref = new PositionRef (support.getPositionManager (), line, 0, Position.Bias.Forward); // obj can be null, sorry... org.openide.util.Lookup obj = support.getLookup (); return this.registerLine(new SupportLine(obj, ref, support)); }
/** Find line object in the line set corresponding to current line number. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getCurrent(int line) throws IndexOutOfBoundsException { PositionRef ref = new PositionRef(support.getPositionManager(), line, 0, Position.Bias.Forward); // obj can be null, sorry... org.openide.util.Lookup obj = support.getLookup(); return this.registerLine(new SupportLine(obj, ref, support)); }
/** Creates a Line for given offset. * @param offset the begining of line * @return line that should represent the given line */ public Line createLine(int offset) { PositionRef ref = new PositionRef(support.getPositionManager(), offset, Position.Bias.Forward); return new SupportLine(support.getLookup(), ref, support); }