Label label = new Label(graphicComposite, SWT.NONE);
label.setText(Messages.StylingConstants_label_opacity);
label.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false));
label.setToolTipText(Messages.StylingConstants_tooltip_opacity);
opacityViewer = new ComboExpressionViewer(graphicComposite, SWT.SINGLE);
opacityViewer.setOptions(getOpacityList());
opacityViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
opacityViewer.getControl().setToolTipText(Messages.StylingConstants_label_opacity);
label = new Label(graphicComposite, SWT.NONE);
label.setText(Messages.StylingConstants_label_size);
label.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false));
label.setToolTipText(Messages.StylingConstants_tooltip_size);
sizeViewer = new ComboExpressionViewer(graphicComposite, SWT.SINGLE);
sizeViewer.setOptions(getSizeList());
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
GC gc = new GC(sizeViewer.getControl());
try {
Point extent = gc.textExtent("X");//$NON-NLS-1$
gd.widthHint = 3 * extent.x;
} finally {
gc.dispose();
}
sizeViewer.getControl().setLayoutData( gd);
sizeViewer.getControl().setToolTipText(Messages.StylingConstants_tooltip_size);
label = new Label(graphicComposite, SWT.NONE);
label.setText(Messages.StylingConstants_label_rotation);
label.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false));
label.setToolTipText(Messages.StylingConstants_tooltip_rotation);
rotationViewer = new ComboExpressionViewer(graphicComposite, SWT.SINGLE);
rotationViewer.setOptions(getRotationList());
rotationViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
rotationViewer.getControl().setToolTipText(Messages.StylingConstants_tooltip_rotation);
label = new Label(graphicComposite, SWT.NONE);
label.setText(Messages.StylingConstants_label_anchor);
label.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false));
label.setToolTipText(Messages.StylingConstants_tooltip_anchor);
Composite anchorComposite = new Composite(graphicComposite, SWT.NONE);
anchorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
anchorComposite.setLayout(new FormLayout());
anchorXViewer = new ComboExpressionViewer(anchorComposite, SWT.SINGLE);
anchorXViewer.setOptions(getAnchorList());
FormData data = new FormData();
data.left = new FormAttachment(0, 0);
data.top = new FormAttachment(0, 0);
data.bottom = new FormAttachment(100, 0);
anchorXViewer.getControl().setLayoutData(data);
anchorXViewer.getControl().setToolTipText(Messages.StylingConstants_tooltip_anchor);
label = new Label(anchorComposite, SWT.NONE);
label.setText("X");
data = new FormData();
data.left = new FormAttachment(anchorXViewer.getControl(), 4);
data.bottom = new FormAttachment(anchorXViewer.getControl(), 0, SWT.BOTTOM) ;
label.setLayoutData(data);
label.setToolTipText(Messages.StylingConstants_tooltip_anchor);
anchorYViewer = new ComboExpressionViewer(anchorComposite, SWT.SINGLE);
anchorYViewer.setOptions(getAnchorList());
data = new FormData();
data.left = new FormAttachment(label, 4);
data.top = new FormAttachment(anchorXViewer.getControl(), 0, SWT.TOP);
data.bottom = new FormAttachment(anchorXViewer.getControl(), 0, SWT.BOTTOM);
data.right = new FormAttachment(100, 0);
anchorYViewer.getControl().setLayoutData(data);
anchorYViewer.getControl().setToolTipText(Messages.StylingConstants_tooltip_anchor);
label = new Label(graphicComposite, SWT.NONE);
label.setText(Messages.StylingConstants_label_displacement);
label.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false));
label.setToolTipText(Messages.StylingConstants_tooltip_displacement);
Composite displacementComposite = new Composite(graphicComposite, SWT.NONE);
displacementComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
displacementComposite.setLayout(new FormLayout());
displacementXViewer = new ComboExpressionViewer(displacementComposite, SWT.SINGLE);
displacementXViewer.setOptions(getDisplacementList());
data = new FormData();
data.left = new FormAttachment(0, 0);
data.top = new FormAttachment(0, 0);
data.bottom = new FormAttachment(100, 0);
displacementXViewer.getControl().setLayoutData(data);
displacementXViewer.getControl().setToolTipText(Messages.StylingConstants_tooltip_displacement);
label = new Label(displacementComposite, SWT.NONE);
label.setText("X");
data = new FormData();
data.left = new FormAttachment(displacementXViewer.getControl(), 4, SWT.RIGHT);
data.bottom = new FormAttachment(displacementXViewer.getControl(), 0, SWT.BOTTOM);
label.setLayoutData(data);
label.setToolTipText(Messages.StylingConstants_tooltip_displacement);
displacementYViewer = new ComboExpressionViewer(displacementComposite, SWT.SINGLE);
displacementYViewer.setOptions(getDisplacementList());
data = new FormData();
data.left = new FormAttachment(label, 4, SWT.RIGHT);
data.top = new FormAttachment(displacementXViewer.getControl(), 0, SWT.TOP);
data.bottom = new FormAttachment(displacementXViewer.getControl(), 0, SWT.BOTTOM);