/** * Defines how to draw element * * @param graphics */ @Override public void draw(Graphics2D graphics) { content.draw(graphics, offset); }
/** * @see Content#draw(Graphics2D) */ @Override public void draw(Graphics2D graphics) { content.draw(graphics, position); }
/** * Draws element shifted by offset * @param graphics * @param offset */ public final void draw(Graphics2D graphics, Point2D offset) { graphics.translate(offset.getX(), offset.getY()); draw(graphics); graphics.translate(-offset.getX(), -offset.getY()); }
/** * @see Content#draw(Graphics2D) */ @Override public void draw(Graphics2D graphics) { content.draw(graphics, getShapeOffset()); }
/** * @see Content#draw(Graphics2D) */ @Override public void draw(Graphics2D graphics) { if(null!=color) { Color oldColor = graphics.getColor(); graphics.setColor(color); graphics.fill(getShape()); graphics.setColor(oldColor); } getContent().draw(graphics); }
/** * @see Content#draw(Graphics2D) */ @Override public void draw(Graphics2D graphics) { if(null!=color) { Color oldColor = graphics.getColor(); graphics.setColor(color); graphics.draw(getShape()); graphics.setColor(oldColor); } getContent().draw(graphics); }
@Override public void draw(Graphics2D graphics) { getContent().draw(graphics, getLocationOnGraph()); }
/** * @see Content#draw(Graphics2D) */ @Override public final void draw(Graphics2D graphics) { Content content = null; Point2D offset = new Point2D.Double(0,0); Iterator<Content> iterator = contents.iterator(); if(iterator.hasNext()) { content = iterator.next(); content.draw(graphics, offset); } while(iterator.hasNext()) { offset = getNextOffset(offset, content); content = iterator.next(); content.draw(graphics, offset); separator.draw(graphics, getStartPointSeparator(offset), getEndPointSeparator(offset)); } }