@Override protected void paintFigure(Graphics graphics) { if (vertical) { String subStringText = getSubStringText(); if (!subStringText.isEmpty()) { Image image = ImageUtilities.createRotatedImageOfString(subStringText, getFont(), getForegroundColor(), getBackgroundColor()); graphics.drawImage(image, new Point(getTextLocation()) .translate(getLocation())); image.dispose(); } } else { super.paintFigure(graphics); } }
protected void useShadedImage() { disposeShadedImage(); if (super.getImage() != null) { ImageData data = ImageUtilities .createShadedImage(super.getImage(), ColorConstants.menuBackgroundSelected); shadedImage = new Image(null, data, data.getTransparencyMask()); } }