下面列出了怎么用org.eclipse.swt.widgets.Group的API类实例代码及写法,或者点击链接到github查看源代码。
protected void createOutline( Composite cmpLeft, boolean bEnableUI )
{
grpOutline = new Group( cmpLeft, SWT.NONE );
GridData gdGOutline = new GridData( GridData.FILL_HORIZONTAL );
grpOutline.setLayoutData( gdGOutline );
grpOutline.setText( Messages.getString( "LabelAttributesComposite.Lbl.Outline" ) ); //$NON-NLS-1$
grpOutline.setLayout( new FillLayout( ) );
grpOutline.setEnabled( bEnableUI );
int iStyles = LineAttributesComposite.ENABLE_WIDTH
| LineAttributesComposite.ENABLE_STYLES
| LineAttributesComposite.ENABLE_VISIBILITY
| LineAttributesComposite.ENABLE_COLOR;
iStyles |= getContext( ).getUIFactory( ).supportAutoUI( ) ? LineAttributesComposite.ENABLE_AUTO_COLOR
: iStyles;
liacOutline = new LineAttributesComposite( grpOutline,
SWT.NONE,
iStyles,
getContext( ),
getSeriesForProcessing( ).getLabel( ).getOutline( ),
defSeries.getLabel( ).getOutline( ) );
liacOutline.addListener( this );
liacOutline.setAttributesEnabled( bEnableUI );
}
/**
* This method initializes group1
*/
private void createChildGroup(final Composite composite, final int size) {
final GridLayout gridLayout = new GridLayout();
gridLayout.marginHeight = 10;
gridLayout.verticalSpacing = 10;
final GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
final Group group = new Group(composite, SWT.NONE);
group.setLayoutData(gridData);
group.setLayout(gridLayout);
group.setText(ResourceString.getResourceString("label.child"));
final Label filler = new Label(group, SWT.NONE);
filler.setText("");
final GridData fillerGridData = new GridData();
fillerGridData.heightHint = size;
filler.setLayoutData(fillerGridData);
createChildMandatoryGroup(group);
}
private void createItemParametersGroup(Composite parent) {
Group dataGroup = createEmptyGroup(parent, "Item parameters");
dataGroup.setLayout(new RowLayout());
cItemRenderer = new Combo(dataGroup, SWT.READ_ONLY);
cItemRenderer.setItems(new String[] { "Icon", "List" });
cItemRenderer.setText("Icon");
cItemRenderer.addListener(SWT.Selection, itemRendererParamSelectionListener);
bItemDropShadow = createButton(dataGroup, SWT.CHECK, "Drop shadow", false, true);
sItemDropShadowSize = new Spinner(dataGroup, SWT.NONE);
sItemDropShadowSize.setMinimum(0);
sItemDropShadowSize.setMaximum(20);
sItemDropShadowSize.setIncrement(1);
sItemDropShadowSize.setSelection(5);
sItemDropShadowSize.addListener(SWT.Selection, itemRendererParamSelectionListener);
bItemLabel = createButton(dataGroup, SWT.CHECK, "Display labels", false, true);
}
private Control createIncludeMask(Composite parent) {
Group result= new Group(parent, SWT.NONE);
result.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
result.setText(SearchMessages.SearchPage_searchIn_label);
result.setLayout(new GridLayout(4, false));
fIncludeMasks= new Button[] {
createButton(result, SWT.CHECK, SearchMessages.SearchPage_searchIn_sources, JavaSearchScopeFactory.SOURCES, true),
createButton(result, SWT.CHECK, SearchMessages.SearchPage_searchIn_projects, JavaSearchScopeFactory.PROJECTS, true),
createButton(result, SWT.CHECK, SearchMessages.SearchPage_searchIn_jre, JavaSearchScopeFactory.JRE, false),
createButton(result, SWT.CHECK, SearchMessages.SearchPage_searchIn_libraries, JavaSearchScopeFactory.LIBS, true),
};
SelectionAdapter listener= new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
updateOKStatus();
}
};
for (int i= 0; i < fIncludeMasks.length; i++) {
fIncludeMasks[i].addSelectionListener(listener);
}
return result;
}
private void createStyleGroup(Composite parent) {
Group gp = new Group(parent, SWT.NONE);
gp.setText("Style");
gp.setLayout(new RowLayout());
GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
// data.horizontalSpan = 2;
gp.setLayoutData(data);
borderStyle = new Button(gp, SWT.CHECK);
borderStyle.setText("SWT.BORDER");
borderStyle.addListener(SWT.Selection, recreateListener);
readOnlyStyle = new Button(gp, SWT.CHECK);
readOnlyStyle.setText("SWT.READ_ONLY");
readOnlyStyle.addListener(SWT.Selection, recreateListener);
flatStyle = new Button(gp, SWT.CHECK);
flatStyle.setText("SWT.FLAT");
flatStyle.addListener(SWT.Selection, recreateListener);
}
/**
* @param parent
*/
private void createStyleGroup(Composite parent) {
Group other = new Group(parent, SWT.NONE);
other.setText("Style");
other.setLayout(new GridLayout());
other.setLayoutData(new GridData(GridData.FILL_VERTICAL));
borderStyle = new Button(other, SWT.CHECK);
borderStyle.setText("SWT.BORDER");
borderStyle.setSelection(true);
borderStyle.addListener(SWT.Selection, recreateListener);
readOnlyStyle = new Button(other, SWT.CHECK);
readOnlyStyle.setText("SWT.READ_ONLY");
readOnlyStyle.setSelection(true);
readOnlyStyle.addListener(SWT.Selection, recreateListener);
flatStyle = new Button(other, SWT.CHECK);
flatStyle.setText("SWT.FLAT");
flatStyle.addListener(SWT.Selection, recreateListener);
}
public Composite buildStrategyDescriptionPanel(Composite aParentComposite, Atdl4jOptions atdl4jOptions)
{
setAtdl4jOptions( atdl4jOptions );
composite = new SWTVisibleGroup(aParentComposite, SWT.NONE);
((Group) composite).setText("Strategy Description");
composite.setLayout(new GridLayout(1, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
strategyDescription = new Text(composite, SWT.WRAP | SWT.BORDER | SWT.V_SCROLL );
strategyDescription.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
strategyDescription.setForeground(composite.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
GridData descData = new GridData(SWT.FILL, SWT.FILL, true, false);
descData.heightHint = DEFAULT_STRATEGY_DESCRIPTION_HEIGHT_HINT;
strategyDescription.setLayoutData(descData);
return composite;
}
private void createDrillthroughCreateLinkExpression( Composite container )
{
Group group = new Group( container, SWT.NONE );
group.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
group.setText( STEPS[3]
+ Messages.getString( "HyperlinkBuilder.DrillThrough.CreateLinkExpr" ) ); //$NON-NLS-1$
GridLayout layout = new GridLayout( );
layout.numColumns = 3;
group.setLayout( layout );
new Label( group, SWT.NONE ).setText( Messages.getString( "HyperlinkBuilder.DrillThroughLinkExpression" ) ); //$NON-NLS-1$
bookmarkEditor = new Text( group, SWT.BORDER
| SWT.READ_ONLY
| SWT.MULTI );
GridData gd = new GridData( GridData.FILL_HORIZONTAL );
gd.heightHint = bookmarkEditor.computeSize( SWT.DEFAULT, SWT.DEFAULT ).y
- bookmarkEditor.getBorderWidth( )
* 2;
bookmarkEditor.setLayoutData( gd );
createExpressionButton( group, bookmarkEditor );
}
@Override
protected Control createContents(Composite parent) {
Composite tparent = new Composite(parent, SWT.NONE);
tparent.setLayout(new GridLayout());
tparent.setLayoutData(new GridData(GridData.FILL_BOTH));
Group groupCommon = new Group(tparent, SWT.NONE);
groupCommon.setLayout(new GridLayout());
groupCommon.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
groupCommon.setText(Messages.getString("preference.ExcelPreferencePage.groupCommon"));
HsImageLabel imageLabel = new HsImageLabel(
Messages.getString("preference.ExcelPreferencePage.imageLabel"),
Activator.getImageDescriptor(Constants.PREFERENCE_EXCEL_32));
Composite cmpCommon = imageLabel.createControl(groupCommon);
cmpCommon.setLayout(new GridLayout());
cmpCommon.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
btnRedFont = new Button(cmpCommon, SWT.CHECK);
btnRedFont.setText(Messages.getString("preference.ExcelPreferencePage.btnRedFont"));
GridDataFactory.fillDefaults().applyTo(btnRedFont);
imageLabel.computeSize();
btnRedFont.setSelection(preferenceStore.getBoolean(Constants.EXCEL_FILTER));
return parent;
}
protected Composite buildIncrementPolicyPanel( Composite aParent )
{
Group tempIncrementPolicyGroup = new Group( aParent, SWT.NONE );
tempIncrementPolicyGroup.setText( "Increment Policy" );
GridLayout tempIncrementPolicyGroupLayout = new GridLayout( 2, false );
tempIncrementPolicyGroup.setLayout(tempIncrementPolicyGroupLayout);
tempIncrementPolicyGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false ));
Label tempLabelIncrementPolicyLotSize = new Label( tempIncrementPolicyGroup, SWT.NONE );
tempLabelIncrementPolicyLotSize.setText( "Lot Size:" );
textIncrementPolicyLotSize = new Text( tempIncrementPolicyGroup, SWT.NONE );
textIncrementPolicyLotSize.setToolTipText( "May be used in conjunction with Control/@incrementPolicy on spinner controls" );
textIncrementPolicyLotSize.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false ));
setTextValue( textIncrementPolicyLotSize, getAtdl4jOptions().getInputAndFilterData().getInputIncrementPolicy_LotSize() );
Label tempLabelIncrementPolicyTick = new Label( tempIncrementPolicyGroup, SWT.NONE );
tempLabelIncrementPolicyTick.setText( "Tick Size:" );
textIncrementPolicyTick = new Text( tempIncrementPolicyGroup, SWT.NONE );
textIncrementPolicyTick.setToolTipText( "May be used in conjunction with Control/@incrementPolicy on spinner controls" );
textIncrementPolicyTick.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false ));
setTextValue( textIncrementPolicyTick, getAtdl4jOptions().getInputAndFilterData().getInputIncrementPolicy_Tick() );
return tempIncrementPolicyGroup;
}
@SuppressWarnings("synthetic-access")
public Control createControl(Composite composite) {
this.group = new Group(composite, SWT.NONE);
this.group.setFont(composite.getFont());
this.group.setLayout(initGridLayout(new GridLayout(2, false), true));
this.group.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_title);
this.useEEJRE.doFillIntoGrid(this.group, 1);
final Combo eeComboControl = this.eeCombo.getComboControl(this.group);
eeComboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
this.useProjectJRE.doFillIntoGrid(this.group, 1);
final Combo comboControl = this.jreCombo.getComboControl(this.group);
comboControl.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
this.useDefaultJRE.doFillIntoGrid(this.group, 1);
this.preferenceLink = new Link(this.group, SWT.NONE);
this.preferenceLink.setFont(this.group.getFont());
this.preferenceLink.setText(NewWizardMessages.NewJavaProjectWizardPageOne_JREGroup_link_description);
this.preferenceLink.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
this.preferenceLink.addSelectionListener(this);
updateEnableState();
return this.group;
}
private void createFeatureListTab(TabFolder tabFolder, ActiveTab type) {
TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
if (type == ActiveTab.ALL_FEATURES) {
tabItem.setText(ALL_FEATURES_TAB_TITLE);
} else {
tabItem.setText(UPDATES_TAB_TITLE);
}
ScrolledComposite scroll = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scroll.setLayout(new GridLayout());
scroll.setLayoutData(new GridData());
Group group = new Group(scroll, SWT.NONE);
group.setLayout(new GridLayout());
group.setLayoutData(new GridData());
listFeatures(group, type);
scroll.setContent(group);
scroll.setExpandHorizontal(true);
scroll.setExpandVertical(true);
scroll.setMinSize(group.computeSize(SWT.DEFAULT, SWT.DEFAULT));
tabItem.setControl(scroll);
}
protected void setDefaultUserInformationGroup(final Group defaultGroup) {
defaultGroup.setText(Messages.defaultInformationGroupTitle);
defaultGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create());
defaultGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
final Composite globalComposite = new Composite(defaultGroup, SWT.FILL);
globalComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(5, 5).create());
globalComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
final Composite tablesComposite = new Composite(globalComposite, SWT.FILL);
tablesComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).equalWidth(true).create());
tablesComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
createGeneralDataTable(tablesComposite);
createBusinessCardTable(tablesComposite);
createPersonalDataTable(tablesComposite);
final Composite membershipsComposite = new Composite(globalComposite, SWT.NONE);
membershipsComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create());
membershipsComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
createMembershipsTable(membershipsComposite);
}
private void createSelectedTableTable(final Composite composite) {
final GridData gridData = new GridData();
gridData.verticalSpan = 2;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = GridData.FILL;
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
final Group group = new Group(composite, SWT.NONE);
group.setText(ResourceString.getResourceString("label.testdata.table.list"));
group.setLayout(gridLayout);
group.setLayoutData(gridData);
final GridData tableGridData = new GridData();
tableGridData.grabExcessVerticalSpace = true;
tableGridData.verticalAlignment = GridData.FILL;
tableGridData.widthHint = 300;
tableGridData.verticalSpan = 2;
selectedTableTable = new Table(group, SWT.FULL_SELECTION | SWT.BORDER | SWT.MULTI);
selectedTableTable.setHeaderVisible(false);
selectedTableTable.setLayoutData(tableGridData);
selectedTableTable.setLinesVisible(false);
final TableColumn tableColumn = new TableColumn(selectedTableTable, SWT.CENTER);
tableColumn.setWidth(200);
tableColumn.setText(ResourceString.getResourceString("label.testdata.table.name"));
final TableColumn numColumn = new TableColumn(selectedTableTable, SWT.CENTER);
numColumn.setWidth(80);
numColumn.setText(ResourceString.getResourceString("label.testdata.table.test.num"));
}
@Override
public void createWidget(ParameterComposite parameterComposite, Composite parent) {
group = new Group(parent, SWT.READ_ONLY);
group.setLayout(new GridLayout(2, false));
group.setText(getLabel());
group.setToolTipText(getDescription());
}
private void createObjectListComposite(Composite parent) {
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
gridLayout.verticalSpacing = 20;
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(gridLayout);
composite.setLayoutData(gridData);
this.createAllObjectGroup(composite);
GridData groupGridData = new GridData();
groupGridData.horizontalAlignment = GridData.FILL;
groupGridData.grabExcessHorizontalSpace = true;
groupGridData.horizontalSpan = 3;
GridLayout groupLayout = new GridLayout();
groupLayout.marginWidth = 15;
groupLayout.marginHeight = 15;
Group group = new Group(composite, SWT.NONE);
group.setText(ResourceString.getResourceString("label.option"));
group.setLayoutData(groupGridData);
group.setLayout(groupLayout);
this.initializeOptionGroup(group);
}
protected Composite createValidateOutputSection()
{
// -- SWTVisibleGroup avoids consuming vertical space when hidden via setVisible(false) --
validateOutputSection = new SWTVisibleGroup(getShell(), SWT.NONE);
((Group) validateOutputSection).setText("Validation");
validateOutputSection.setLayout(new GridLayout(2, false));
validateOutputSection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
// validate button
Button validateButton = new Button(validateOutputSection, SWT.NONE);
validateButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
validateButton.setText("Validate Output");
validateButton.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent e)
{
try {
validateButtonSelected();
} catch (ValidationException ex) {
logger.info("Validation Exception:", ex);
getAtdl4jUserMessageHandler().displayException("Validation Exception", "", ex);
}
}
});
outputFixMessageText = new Text(validateOutputSection, SWT.BORDER);
outputFixMessageText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
setValidateOutputText( "" );
return validateOutputSection;
}
protected void createStartupModuleComponent(Composite parent) {
Group group = SWTFactory.createGroup(parent, "Available Modules:", 3, 1, GridData.FILL_BOTH);
GridLayout groupLayout = (GridLayout) group.getLayout();
groupLayout.marginBottom = 8;
group.setLayout(groupLayout);
IModulesChangeListener listener = new IModulesChangeListener() {
@Override
public void onModulesChanged() {
updateLaunchConfigurationDialog();
}
};
entryPointModulesBlock = new EntryPointModulesSelectionBlock(listener);
entryPointModulesBlock.doFillIntoGrid(group, 3);
}
protected Group Group(Composite parent, Procedure1<? super Group> config) {
Group group = new Group(parent, SWT.NONE);
group.setFont(parent.getFont());
group.setLayout(new GridLayout(1, false));
group.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
config.apply(group);
return group;
}
private void createPropertiesGroup(Composite contents) {
Group langComposite = new Group(contents, SWT.NONE);
langComposite.setText("默认属性"); //$NON-NLS-1$
langComposite.setLayout(new GridLayout(2, false));
langComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label tgtEncLabel = new Label(langComposite, SWT.NONE);
tgtEncLabel.setText("目标编码"); //$NON-NLS-1$
tgtEncCombo = new Combo(langComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
tgtEncCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
tgtEncCombo.addSelectionListener(new SelectionAdapter() {
@SuppressWarnings("unchecked")
public void widgetSelected(SelectionEvent arg0) {
ISelection selection = tableViewer.getSelection();
if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
Iterator<ConversionConfigBean> iter = structuredSelection.iterator();
while (iter.hasNext()) {
ConversionConfigBean bean = iter.next();
bean.setTargetEncoding(tgtEncCombo.getText());
}
validate();
}
}
});
}
@Override
protected Control createDialogArea(Composite parent) {
// Main dialog panel
Composite dialogComposite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(1, true);
dialogComposite.setLayout(layout);
dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
// Contexts list
Group contextGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
contextGroup.setText(Messages.TraceControl_AddContextAvailableContextsLabel);
layout = new GridLayout(1, true);
contextGroup.setLayout(layout);
contextGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
fContextsViewer = new CheckboxTreeViewer(contextGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
fContextsViewer.getTree().setToolTipText(Messages.TraceControl_AddContextAvailableContextsTooltip);
fContextsViewer.setContentProvider(new ContextsContentProvider());
fContextsViewer.setLabelProvider(new ContextsLabelProvider());
fContextsViewer.addCheckStateListener(new ContextCheckListener());
fContextsViewer.setInput(fContextModel);
fContextsViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
getShell().setMinimumSize(new Point(500, 450));
return dialogComposite;
}
private void createRightComposite( SashForm sf )
{
Composite right = new Composite( sf, SWT.NONE );
right.setLayout( new GridLayout( 1, false ) );
Group classStructureGroup = new Group( right, SWT.NONE );
classStructureGroup.setLayoutData( new GridData( GridData.FILL_BOTH ) );
classStructureGroup.setText( Messages.getString( "DataSet.ColumnMapping" ) ); //$NON-NLS-1$
classStructureGroup.setLayout( new GridLayout( 2, false ) );
createRightTableViewer( classStructureGroup );
createRightButtonArea( classStructureGroup );
}
private void createFormatGroup(final Composite parent) {
final Group group = CompositeFactory.createGroup(parent, "label.format", 3, 2);
formatSqlRadio = CompositeFactory.createRadio(this, group, "label.sql", 2);
formatDBUnitRadio = CompositeFactory.createRadio(this, group, "label.dbunit", 2);
formatDBUnitFlatXmlRadio = CompositeFactory.createRadio(this, group, "label.dbunit.flat.xml", 2);
formatDBUnitXlsRadio = CompositeFactory.createRadio(this, group, "label.dbunit.xls", 2);
CompositeFactory.fillLine(group);
fileEncodingCombo = CompositeFactory.createFileEncodingCombo(diagram.getEditor().getDefaultCharset(), this, group, "label.output.file.encoding", 1);
}
/**
* Refreshes the specified group to re-set the default spacings that have
* been trashed by the field editors
*
* @param group
*/
void initGroup(Group group) {
GridData gd = (GridData) group.getLayoutData();
gd.grabExcessHorizontalSpace = true;
GridLayout lo = (GridLayout) group.getLayout();
lo.marginWidth = 5;
lo.marginHeight = 5;
}
/**
* Creates the widgets for configuring the context identifier.
*
* @param parent the parent composite.
* @param text the label of the group.
*/
protected void createContextIdentifierTypeEditor(Composite parent, String text) {
final Group group = SWTFactory.createGroup(parent, text, 1, 1, GridData.FILL_HORIZONTAL);
this.defaultContextIdentifierButton = createRadioButton(group, MessageFormat.format(Messages.MainLaunchConfigurationTab_11, NO_OPT));
this.defaultContextIdentifierButton.addSelectionListener(this.defaultListener);
this.randomContextIdentifierButton = createRadioButton(group, MessageFormat.format(Messages.MainLaunchConfigurationTab_12, NO_OPT));
this.randomContextIdentifierButton.addSelectionListener(this.defaultListener);
this.bootContextIdentifierButton = createRadioButton(group, MessageFormat.format(Messages.MainLaunchConfigurationTab_13, NO_OPT));
this.bootContextIdentifierButton.addSelectionListener(this.defaultListener);
}
private void createDrillthroughTooltip( Composite container )
{
Group formatsGroup = new Group( container, SWT.NONE );
formatsGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
formatsGroup.setText( STEPS[6]
+ Messages.getString( "HyperlinkBuilder.DrillThrough.Tooltip" ) ); //$NON-NLS-1$
formatsGroup.setLayout( new GridLayout( 2, false ) );
toolTip = new Label( formatsGroup, SWT.NONE );
toolTip.setText( LABEL_TOOLTIP );
tooltipText = new Text( formatsGroup, SWT.BORDER );
tooltipText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
}
private void createSystemSwapSettingField( BidiFormat bidiFormat,
Group externalBiDiFormatFrame, GridData innerFrameGridData,
boolean isMetadataSetting )
{
Label symSwapLabel = new Label( externalBiDiFormatFrame, SWT.NONE );
symSwapLabel.setText( isMetadataSetting
? BidiConstants.SYMSWAP_TITLE_METADATA
: BidiConstants.SYMSWAP_TITLE_CONTENT );
symSwapLabel.setLayoutData( innerFrameGridData );
symSwapCombo = new Combo( externalBiDiFormatFrame, SWT.DROP_DOWN
| SWT.READ_ONLY );
symSwapCombo.setToolTipText( BidiConstants.SYMSWAP_TOOLTIP );
symSwapCombo.add( BidiConstants.SYMSWAP_TRUE,
BidiConstants.SYMSWAP_TRUE_INDX );
symSwapCombo.add( BidiConstants.SYMSWAP_FALSE,
BidiConstants.SYMSWAP_FALSE_INDX );
if ( bidiFormat.getSymSwap( ) )
{
symSwapCombo.select( BidiConstants.SYMSWAP_TRUE_INDX );
}
else
{
symSwapCombo.select( BidiConstants.SYMSWAP_FALSE_INDX );
}
symSwapCombo.setLayoutData( innerFrameGridData );
}
private String generateGroupname() {
final Set<String> names = new HashSet<>();
for (final org.bonitasoft.studio.actors.model.organization.Group g : groupList) {
names.add(g.getName());
}
return NamingUtils.generateNewName(names, Messages.defaultGroupName, 1);
}
/**
*
* @param group
*/
private void setupIncludeSchemaCheckBox( Group group )
{
GridData layoutData = new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING );
layoutData.horizontalSpan = 2;
includeSchemaCheckBox = new Button( group, SWT.CHECK );
includeSchemaCheckBox.setText( JdbcPlugin.getResourceString( "tablepage.button.includeSchemaInfo" ) ); //$NON-NLS-1$
includeSchemaCheckBox.setSelection( true );
includeSchemaCheckBox.setLayoutData( layoutData );
includeSchemaCheckBox.setEnabled( true );
}
@Override
public void createControl(Composite parent) {
Composite container = new Composite(parent, 0);
container.setLayout(new RowLayout(SWT.VERTICAL));
setControl(container);
Label l1 = new Label(container, 0);
l1.setText("Question Text");
textQuestionDescription = new Text(container, SWT.BORDER);
textQuestionDescription.setLayoutData(new RowData(500, SWT.DEFAULT));
Group g = new Group(container, 0);
g.setText("Presets");
g.setLayout(new RowLayout(SWT.HORIZONTAL));
createButtonPresetLikert4(g);
createButtonPresetLikert5(g);
Label l2 = new Label(container, 0);
l2.setText("Choices, each line is one possible choice.\nLeave blank if you want free text answers instead.");
textQuestionChoices = new Text(container, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
textQuestionChoices.setLayoutData(new RowData(500, textQuestionChoices.getLineHeight() * 6));
buttonMultipleChoice = new Button(container, SWT.CHECK);
buttonMultipleChoice.setText("Allow multiple-choice");
initFromQuestion(initialQuestion);
}