public void draw(Graphics2D graphics, int width, int height) {
		// Convert text if needed
		String drawnText = text;
		int start, end;
		boolean found;
		do {
			found = false;
			start = drawnText.indexOf("$date{");
			if (start != -1) {
				end = drawnText.indexOf('}', start);
				if (end != -1) {
					found = true;
					// Parse the date format
					String format = drawnText.substring(start + 6, end);
					if (format.length() == 0) {
						format = "dd-MM-yyyy";
					}
					try {
						SimpleDateFormat sdf = new SimpleDateFormat(format);
						String dateText = sdf.format(new Date(System.currentTimeMillis()));
						drawnText = drawnText.substring(0, start) + dateText + drawnText.substring(end + 1);
					} catch (IllegalArgumentException ex) {
					}
				}
			}
		} while (found);

		// Font
		font.apply(graphics);
		// Color
		graphics.setColor(getColor());
		// Calculate the offset to use
		int textWidth = graphics.getFontMetrics().stringWidth(drawnText);
		int textOffset = 0;
		if (align == Align.LEFT) {
			textOffset = textWidth;
		} else if (align == Align.CENTER) {
			textOffset = textWidth / 2;
		}
		// Draw the text
		graphics.drawString(drawnText, posX - textOffset, posY);
	}