public double getWidth(StringBounder stringBounder) { final TextBlock timeHeader = project.getTimeHeader(dayWith); final Row row = getMainRow(); final TextBlock headers = row.header(); return headers.calculateDimension(stringBounder).getWidth() + timeHeader.calculateDimension(stringBounder).getWidth() + 1; }
public void draw(UGraphic ug, double x, double y) { final TextBlock timeHeader = project.getTimeHeader(dayWith); final Row row = getMainRow(); final TextBlock headers = row.header(); final double deltaX = headers.calculateDimension(ug.getStringBounder()).getWidth(); final double deltaY = timeHeader.calculateDimension(ug.getStringBounder()).getHeight(); headers.drawU(ug.apply(new UTranslate(x, (y + deltaY)))); final TextBlock tbRow = row.asTextBloc(project.getTimeConverter(dayWith)); tbRow.drawU(ug.apply(new UTranslate((x + deltaX), (y + deltaY)))); timeHeader.drawU(ug.apply(new UTranslate((x + deltaX), y))); }