public void handleEvent(Event e) { if (e.widget.equals(iscRotation)) { fdCurrent.setRotation(iscRotation.getValue()); ascRotation.setAngle(iscRotation.getValue()); ascRotation.redraw(); // TODO: Enable this if support for rotated text is added to // fontcanvas updatePreview(); } else if (e.widget.equals(fccColor)) { if (e.type == FillChooserComposite.FILL_CHANGED_EVENT) { cdCurrent = (ColorDefinition) fccColor.getFill(); // if ( cdCurrent == null ) // { // cdCurrent = ColorDefinitionImpl.TRANSPARENT( ); // } fcPreview.setColor(cdCurrent); fcPreview.redraw(); } } }
private void updatePreview() { FontDefinition fd = fdCurrent.copyInstance(); ChartUIUtil.getFlippedAlignment(fd.getAlignment(), isFlippedAxes()); fcPreview.setFontDefinition(fd); fcPreview.redraw(); }