예제 #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;
 }
예제 #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();
 }
예제 #3
0
 public boolean panelIsInClip(Panel panel) {
   Box panelClip = panel.getAbsoluteBounds();
   return panelClip != null && clip.intersects(panelClip);
 }