/** * Set the layoutData for the title area. In most cases this will be a copy * of the layoutData used in setMessageLayoutData. * * @param layoutData * the layoutData for the title * @see #setMessageLayoutData(Object) */ public void setTitleLayoutData(Object layoutData) { titleLabel.setLayoutData(layoutData); }
/** * Set the layoutData for the title area. In most cases this will be a copy * of the layoutData used in setMessageLayoutData. * * @param layoutData * the layoutData for the title * @see #setMessageLayoutData(Object) */ public void setTitleLayoutData(Object layoutData) { titleLabel.setLayoutData(layoutData); }
/** * Set the layoutData for the title area. In most cases this will be a copy * of the layoutData used in setMessageLayoutData. * * @param layoutData * the layoutData for the title * @see #setMessageLayoutData(Object) */ public void setTitleLayoutData(Object layoutData) { titleLabel.setLayoutData(layoutData); }
private void createSourceViewerLabel(Composite c) { fCurrentElementLabel= new CLabel(c, SWT.NONE); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.heightHint= JavaElementImageProvider.SMALL_SIZE.x; fCurrentElementLabel.setText(RefactoringMessages.RenameTypeWizardSimilarElementsPage_select_element_to_view_source); fCurrentElementLabel.setLayoutData(gd); }
private void createSourceViewerLabel(Composite c) { fCurrentElementLabel= new CLabel(c, SWT.NONE); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.heightHint= JavaElementImageProvider.SMALL_SIZE.x; fCurrentElementLabel.setText(RefactoringMessages.RenameTypeWizardSimilarElementsPage_select_element_to_view_source); fCurrentElementLabel.setLayoutData(gd); }
private void createSourceViewerLabel(Composite c) { fCurrentElementLabel= new CLabel(c, SWT.NONE); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.heightHint= JavaElementImageProvider.SMALL_SIZE.x; fCurrentElementLabel.setText(RefactoringMessages.RenameTypeWizardSimilarElementsPage_select_element_to_view_source); fCurrentElementLabel.setLayoutData(gd); }
private void createContent () { GridData gdTmp = new GridData(GridData.FILL_HORIZONTAL); gdTmp.horizontalSpan = 3; setLayoutData(gdTmp); GridLayout layout = new GridLayout(2, false); layout.marginHeight = 0; layout.marginWidth = 0; layout.horizontalSpacing = 2; setLayout(layout); counterLabel = new CLabel(this, SWT.BORDER | SWT.CENTER); gdTmp = new GridData(); gdTmp.widthHint = 180; counterLabel.setLayoutData(gdTmp); infoLabel = new CLabel(this, SWT.BORDER); gdTmp = new GridData(GridData.FILL_HORIZONTAL); infoLabel.setLayoutData(gdTmp); }
/** * Create the image controls. * * @param parent the parent <code>Composite</code>. * @since 3.0 */ private void createImage(Composite parent) { descImageCanvas = new CLabel(parent, SWT.NONE); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING); data.widthHint = 0; data.heightHint = 0; descImageCanvas.setLayoutData(data); // hook a listener to get rid of cached images. descImageCanvas.addDisposeListener(e -> { for (Iterator i = imageTable.values().iterator(); i.hasNext();) { ((Image) i.next()).dispose(); } imageTable.clear(); }); }
public Control createContents(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); LayoutUtil.doDefaultLayout(composite, new DialogField[] { fVariablesList }, true, 0, 0); LayoutUtil.setHorizontalGrabbing(fVariablesList.getListControl(null)); fWarning= new CLabel(composite, SWT.NONE); fWarning.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, fVariablesList.getNumberOfControls() - 1, 1)); fControl= composite; updateDeprecationWarning(); return composite; }
public Control createContents(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); LayoutUtil.doDefaultLayout(composite, new DialogField[] { fVariablesList }, true, 0, 0); LayoutUtil.setHorizontalGrabbing(fVariablesList.getListControl(null)); fWarning= new CLabel(composite, SWT.NONE); fWarning.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, fVariablesList.getNumberOfControls() - 1, 1)); fControl= composite; updateDeprecationWarning(); return composite; }
private void createMatchLabel(Composite parent) { Label separator = new Label(parent, SWT.SEPARATOR); setLayoutData(separator); matchLabel = new CLabel(parent, SWT.SHADOW_NONE); StatusLineLayoutData data = new StatusLineLayoutData(); data.widthHint = getTextWidth(parent, 10) + 15; data.heightHint = getPreferredHeight(); matchLabel.setLayoutData(data); matchLabel.setText(matchText); }
public Control createContents(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); LayoutUtil.doDefaultLayout(composite, new DialogField[] { fVariablesList }, true, 0, 0); LayoutUtil.setHorizontalGrabbing(fVariablesList.getListControl(null)); fWarning= new CLabel(composite, SWT.NONE); fWarning.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, fVariablesList.getNumberOfControls() - 1, 1)); fControl= composite; updateDeprecationWarning(); return composite; }
@Override protected Control createDialogArea(Composite parent) { initializeDialogUnits(parent); Composite composite= (Composite) super.createDialogArea(parent); GridLayout layout= (GridLayout) composite.getLayout(); layout.numColumns= 2; fVariablesList.doFillIntoGrid(composite, 3); LayoutUtil.setHorizontalSpan(fVariablesList.getLabelControl(null), 2); GridData listData= (GridData) fVariablesList.getListControl(null).getLayoutData(); listData.grabExcessHorizontalSpace= true; listData.heightHint= convertHeightInCharsToPixels(10); listData.widthHint= convertWidthInCharsToPixels(70); fWarning= new CLabel(composite, SWT.NONE); fWarning.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, fVariablesList.getNumberOfControls() - 1, 1)); Composite lowerComposite= new Composite(composite, SWT.NONE); lowerComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; lowerComposite.setLayout(layout); fConfigButton.doFillIntoGrid(lowerComposite, 1); applyDialogFont(composite); return composite; }
@Override public void fill(Composite parent) { Label sep= new Label(parent, SWT.SEPARATOR); fLabel= new CLabel(parent, SWT.SHADOW_NONE); fLabel.addDisposeListener(e -> fMouseListener = null); if (fActionHandler != null) { fMouseListener= new Listener(); fLabel.addMouseListener(fMouseListener); } StatusLineLayoutData data= new StatusLineLayoutData(); data.widthHint= getWidthHint(parent); fLabel.setLayoutData(data); data= new StatusLineLayoutData(); data.heightHint= getHeightHint(parent); sep.setLayoutData(data); updateMessageLabel(); }
fWarning.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, fVariablesList.getNumberOfControls() - 1, 1));
public void fill(Composite parent) { Label sep= new Label(parent, SWT.SEPARATOR); fLabel= new CLabel(parent, SWT.SHADOW_NONE); fLabel.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { fMouseListener= null; } }); if (fActionHandler != null) { fMouseListener= new Listener(); fLabel.addMouseListener(fMouseListener); } StatusLineLayoutData data= new StatusLineLayoutData(); data.widthHint= getWidthHint(parent); fLabel.setLayoutData(data); data= new StatusLineLayoutData(); data.heightHint= getHeightHint(parent); sep.setLayoutData(data); updateMessageLabel(); }
@Override public void fill(Composite parent) { Label sep= new Label(parent, SWT.SEPARATOR); fLabel= new CLabel(parent, SWT.SHADOW_NONE); fLabel.addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { fMouseListener= null; } }); if (fActionHandler != null) { fMouseListener= new Listener(); fLabel.addMouseListener(fMouseListener); } StatusLineLayoutData data= new StatusLineLayoutData(); data.widthHint= getWidthHint(parent); fLabel.setLayoutData(data); data= new StatusLineLayoutData(); data.heightHint= getHeightHint(parent); sep.setLayoutData(data); updateMessageLabel(); }
public void fill(Composite parent) { Label sep = new Label(parent, SWT.SEPARATOR); label = new CLabel(parent, SWT.SHADOW_NONE); StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData(); if (widthHint < 0) { GC gc = new GC(parent); gc.setFont(parent.getFont()); FontMetrics fm = gc.getFontMetrics(); widthHint = fm.getAverageCharWidth() * charWidth; heightHint = fm.getHeight(); gc.dispose(); } statusLineLayoutData.widthHint = widthHint; label.setLayoutData(statusLineLayoutData); label.setText(text); label.setImage(image); if(listener != null) { label.addListener(eventType, listener); } if(tooltip != null) { label.setToolTipText(tooltip); } statusLineLayoutData = new StatusLineLayoutData(); statusLineLayoutData.heightHint = heightHint; sep.setLayoutData(statusLineLayoutData); }
@Override protected Control createDialogArea(Composite parent) { initializeDialogUnits(parent); Composite composite= (Composite) super.createDialogArea(parent); GridLayout layout= (GridLayout) composite.getLayout(); layout.numColumns= 3; int widthHint= convertWidthInCharsToPixels(50); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan= 3; // archive name field fFileNameField.doFillIntoGrid(composite, 4); LayoutUtil.setHorizontalSpan(fFileNameField.getLabelControl(null), 3); LayoutUtil.setWidthHint(fFileNameField.getTextControl(null), widthHint); LayoutUtil.setHorizontalGrabbing(fFileNameField.getTextControl(null)); // label that shows the resolved path for variable jars //DialogField.createEmptySpace(composite, 1); fFullPathResolvedLabel= new CLabel(composite, SWT.LEFT); fFullPathResolvedLabel.setText(getResolvedLabelString()); fFullPathResolvedLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); DialogField.createEmptySpace(composite, 2); fFileNameField.postSetFocusOnDialogField(parent.getDisplay()); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.SOURCE_ATTACHMENT_BLOCK); applyDialogFont(composite); return composite; }
public void fill(Composite parent) { label = new CLabel(parent, SWT.DEFAULT); StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData(); if (widthHint < 0) { GC gc = new GC(parent); gc.setFont(parent.getFont()); FontMetrics fm = gc.getFontMetrics(); widthHint = fm.getAverageCharWidth() * charWidth; heightHint = fm.getHeight(); gc.dispose(); } statusLineLayoutData.widthHint = widthHint; label.setLayoutData(statusLineLayoutData); label.setText(text); label.setImage(image); if (listener != null) { label.addListener(eventType, listener); } if (tooltip != null) { label.setToolTipText(tooltip); } statusLineLayoutData = new StatusLineLayoutData(); statusLineLayoutData.heightHint = heightHint; }