Example #1
0
 /**
  * @see com.architexa.org.eclipse.draw2d.Border#paint(com.architexa.org.eclipse.draw2d.IFigure,
  *     com.architexa.org.eclipse.draw2d.Graphics,
  *     com.architexa.org.eclipse.draw2d.geometry.Insets)
  */
 public void paint(IFigure figure, Graphics graphics, Insets insets) {
   graphics.setForegroundColor(ColorConstants.buttonDarker);
   if (horizontal) {
     graphics.drawLine(
         figure.getBounds().getTopLeft(),
         figure
             .getBounds()
             .getBottomLeft()
             .translate(new com.architexa.org.eclipse.draw2d.geometry.Point(0, -4)));
   } else {
     graphics.drawLine(
         figure.getBounds().getTopLeft(),
         figure
             .getBounds()
             .getTopRight()
             .translate(new com.architexa.org.eclipse.draw2d.geometry.Point(-4, 0)));
   }
 }
Example #2
0
 /** @see com.architexa.org.eclipse.draw2d.Figure#paintFigure(Graphics) */
 protected void paintFigure(Graphics graphics) {
   Image thumbnail = getThumbnailImage();
   if (thumbnail == null) return;
   graphics.drawImage(thumbnail, getClientArea().getLocation());
 }