Exemplo n.º 1
0
 @Override
 public Box getCaretShape() {
   TextLocation caretLocation = getCaretLocation();
   TypedLayout line = getLines().get(caretLocation.line);
   Box caretShape = line.getCaretShape(caretLocation.index);
   caretShape.translate(getXOffset(line), getY(caretLocation));
   return caretShape;
 }
Exemplo n.º 2
0
 public PaintJob(Box clip, Color background) {
   bufferCache = Context.instance().bufferedImageCache;
   bufferedImagePool = Context.instance().bufferedImagePool;
   this.clip = clip;
   buffer = bufferedImagePool.acquire(clip.getSize());
   rootGraphics = buffer.createGraphics();
   rootGraphics.setBackground(background);
   rootGraphics.clearRect(0, 0, clip.width, clip.height);
   composite = rootGraphics.getComposite();
 }
Exemplo n.º 3
0
 public boolean panelIsInClip(Panel panel) {
   Box panelClip = panel.getAbsoluteBounds();
   return panelClip != null && clip.intersects(panelClip);
 }