本文整理匯總了Java中org.pentaho.di.ui.trans.step.BaseStepDialog.positionBottomButtons方法的典型用法代碼示例。如果您正苦於以下問題:Java BaseStepDialog.positionBottomButtons方法的具體用法?Java BaseStepDialog.positionBottomButtons怎麽用?Java BaseStepDialog.positionBottomButtons使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.ui.trans.step.BaseStepDialog
的用法示例。
在下文中一共展示了BaseStepDialog.positionBottomButtons方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: open
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
public JobMeta open()
{
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
props.setLook(shell);
shell.setImage((Image) GUIResource.getInstance().getImageJobGraph());
lsMod = new ModifyListener()
{
public void modifyText(ModifyEvent e)
{
changed = true;
}
};
FormLayout formLayout = new FormLayout ();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout(formLayout);
shell.setText(Messages.getString("JobDialog.JobProperties.ShellText"));
middle = props.getMiddlePct();
margin = Const.MARGIN;
wTabFolder = new CTabFolder(shell, SWT.BORDER);
props.setLook(wTabFolder, Props.WIDGET_STYLE_TAB);
addJobTab();
addParamTab();
addLogTab();
fdTabFolder = new FormData();
fdTabFolder.left = new FormAttachment(0, 0);
fdTabFolder.top = new FormAttachment(0, 0);
fdTabFolder.right = new FormAttachment(100, 0);
fdTabFolder.bottom= new FormAttachment(100, -50);
wTabFolder.setLayoutData(fdTabFolder);
// THE BUTTONS
wOK=new Button(shell, SWT.PUSH);
wOK.setText(BaseMessages.getString("System.Button.OK"));
wOK.setText(BaseMessages.getString("System.Button.OK"));
wSQL=new Button(shell, SWT.PUSH);
wSQL.setText(BaseMessages.getString("System.Button.SQL"));
wCancel=new Button(shell, SWT.PUSH);
wCancel.setText(BaseMessages.getString("System.Button.Cancel"));
//BaseStepDialog.positionBottomButtons(shell, new Button[] { wOK, wSQL, wCancel }, margin, wSharedObjectsFile);
BaseStepDialog.positionBottomButtons(shell, new Button[] { wOK, wSQL, wCancel }, Const.MARGIN, null);
// Add listeners
lsOK = new Listener() { public void handleEvent(Event e) { ok(); } };
lsSQL = new Listener() { public void handleEvent(Event e) { sql(); } };
lsCancel = new Listener() { public void handleEvent(Event e) { cancel(); } };
wOK.addListener (SWT.Selection, lsOK );
wSQL.addListener (SWT.Selection, lsSQL );
wCancel.addListener(SWT.Selection, lsCancel);
lsDef=new SelectionAdapter() { public void widgetDefaultSelected(SelectionEvent e) { ok(); } };
wJobname.addSelectionListener( lsDef );
// Detect X or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() { public void shellClosed(ShellEvent e) { cancel(); } } );
wTabFolder.setSelection(0);
getData();
BaseStepDialog.setSize(shell);
changed=false;
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch()) display.sleep();
}
return jobMeta;
}
示例2: open
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
public void open()
{
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
props.setLook(shell);
shell.setImage(GUIResource.getInstance().getImageSpoon());
FormLayout formLayout = new FormLayout ();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout(formLayout);
shell.setText(Messages.getString("PreviewSelectDialog.Dialog.PreviewSelection.Title")); //Preview selection screen
shell.setImage(GUIResource.getInstance().getImageLogoSmall());
int margin = Const.MARGIN;
wlFields=new Label(shell, SWT.NONE);
wlFields.setText(Messages.getString("PreviewSelectDialog.Label.Steps")); //Steps:
props.setLook(wlFields);
fdlFields=new FormData();
fdlFields.left = new FormAttachment(0, 0);
fdlFields.top = new FormAttachment(0, margin);
wlFields.setLayoutData(fdlFields);
final int FieldsRows=trans.nrUsedSteps();
ColumnInfo[] colinf = {
new ColumnInfo( Messages.getString("PreviewSelectDialog.Column.Stepname"), ColumnInfo.COLUMN_TYPE_TEXT, false, true ), //Stepname
new ColumnInfo( Messages.getString("PreviewSelectDialog.Column.PreviewSize"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //Preview size
};
wFields=new TableView(trans, shell,
SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI,
colinf,
FieldsRows,
true, // read-only
null,
props
);
fdFields=new FormData();
fdFields.left = new FormAttachment(0, 0);
fdFields.top = new FormAttachment(wlFields, margin);
fdFields.right = new FormAttachment(100, 0);
fdFields.bottom = new FormAttachment(100, -50);
wFields.setLayoutData(fdFields);
wPreview=new Button(shell, SWT.PUSH);
wPreview.setText(Messages.getString("System.Button.Show"));
wCancel=new Button(shell, SWT.PUSH);
wCancel.setText(Messages.getString("System.Button.Close"));
BaseStepDialog.positionBottomButtons(shell, new Button[] { wPreview, wCancel }, margin, null);
// Add listeners
lsCancel = new Listener() { public void handleEvent(Event e) { cancel(); } };
lsPreview = new Listener() { public void handleEvent(Event e) { preview(); } };
wCancel.addListener (SWT.Selection, lsCancel );
wPreview.addListener(SWT.Selection, lsPreview );
// Detect X or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() { public void shellClosed(ShellEvent e) { cancel(); } } );
BaseStepDialog.setSize(shell);
getData();
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch()) display.sleep();
}
}
示例3: open
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
public String open()
{
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
props.setLook(shell);
FormLayout formLayout = new FormLayout ();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout(formLayout);
shell.setImage(GUIResource.getInstance().getImageSpoon());
shell.setText(shellText);
int length = Const.LENGTH;
int margin = Const.MARGIN;
// The String line...
wlString=new Label(shell, SWT.NONE);
wlString.setText(lineText);
props.setLook(wlString);
fdlString=new FormData();
fdlString.left = new FormAttachment(0, 0);
fdlString.top = new FormAttachment(0, margin);
wlString.setLayoutData(fdlString);
wString=new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
wString.setText(string);
props.setLook(wString);
fdString=new FormData();
fdString.left = new FormAttachment(0, 0);
fdString.top = new FormAttachment(wlString, margin);
fdString.right= new FormAttachment(0, length);
wString.setLayoutData(fdString);
// Some buttons
wOK=new Button(shell, SWT.PUSH);
wOK.setText(Messages.getString("System.Button.OK"));
wCancel=new Button(shell, SWT.PUSH);
wCancel.setText(Messages.getString("System.Button.Cancel"));
BaseStepDialog.positionBottomButtons(shell, new Button[] { wOK, wCancel }, margin, wString);
// Add listeners
lsCancel = new Listener() { public void handleEvent(Event e) { cancel(); } };
lsOK = new Listener() { public void handleEvent(Event e) { ok(); } };
wOK.addListener (SWT.Selection, lsOK );
wCancel.addListener(SWT.Selection, lsCancel );
lsDef=new SelectionAdapter() { public void widgetDefaultSelected(SelectionEvent e) { ok(); } };
wString.addSelectionListener(lsDef);
// Detect [X] or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() { public void shellClosed(ShellEvent e) { cancel(); } } );
getData();
BaseStepDialog.setSize(shell);
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch()) display.sleep();
}
return string;
}
示例4: addOptionsTab
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
private void addOptionsTab()
{
// ////////////////////////
// START OF OPTIONS TAB///
// /
wOptionsTab = new CTabItem(wTabFolder, SWT.NONE);
wOptionsTab.setText(Messages.getString("DatabaseDialog.label.Options")); //$NON-NLS-1$
wOptionsTab.setToolTipText(Messages.getString("DatabaseDialog.tooltip.Options")); //$NON-NLS-1$
FormLayout optionsLayout = new FormLayout();
optionsLayout.marginWidth = margin;
optionsLayout.marginHeight = margin;
wOptionsComp = new Composite(wTabFolder, SWT.NONE);
props.setLook(wOptionsComp);
wOptionsComp.setLayout(optionsLayout);
wOptionsHelp = new Button(wOptionsComp, SWT.PUSH);
wOptionsHelp.setText(Messages.getString("DatabaseDialog.button.ShowHelp")); //$NON-NLS-1$
wOptionsHelp.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent arg0)
{
showOptionsHelpText();
}
});
BaseStepDialog.positionBottomButtons(wOptionsComp, new Button[] { wOptionsHelp }, margin, null);
// options list
ColumnInfo[] colinfo = new ColumnInfo[] {
new ColumnInfo(
Messages.getString("DatabaseDialog.column.DbType"), ColumnInfo.COLUMN_TYPE_CCOMBO, DatabaseMeta.getDBTypeDescLongList(), true), //$NON-NLS-1$
new ColumnInfo(Messages.getString("DatabaseDialog.column.Parameter"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
new ColumnInfo(Messages.getString("DatabaseDialog.column.Value"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
};
colinfo[0].setToolTip(Messages.getString("DatabaseDialog.tooltip.DbType")); //$NON-NLS-1$
colinfo[1].setToolTip(Messages.getString("DatabaseDialog.tooltip.Parameter")); //$NON-NLS-1$
colinfo[2].setUsingVariables(true);
wOptions = new TableView(databaseMeta, wOptionsComp, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, colinfo, 1, lsMod, props);
props.setLook(wOptions);
FormData fdOptions = new FormData();
fdOptions.left = new FormAttachment(0, 0);
fdOptions.right = new FormAttachment(100, 0);
fdOptions.top = new FormAttachment(0, 0);
fdOptions.bottom = new FormAttachment(wOptionsHelp, -margin);
wOptions.setLayoutData(fdOptions);
FormData fdOptionsComp = new FormData();
fdOptionsComp.left = new FormAttachment(0, 0);
fdOptionsComp.top = new FormAttachment(0, 0);
fdOptionsComp.right = new FormAttachment(100, 0);
fdOptionsComp.bottom = new FormAttachment(100, 0);
wOptionsComp.setLayoutData(fdOptionsComp);
wOptionsComp.layout();
wOptionsTab.setControl(wOptionsComp);
}
示例5: addGrid
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
private void addGrid()
{
Composite composite = new Composite(sashform, SWT.NONE);
props.setLook(composite);
FormLayout formLayout = new FormLayout ();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
composite.setLayout(formLayout);
wReload = new Button(composite, SWT.NONE);
wReload.setText(" &Reload ");
wLocale= new Button(composite, SWT.NONE);
wLocale.setText(" &Select locale ");
wClose = new Button(composite, SWT.NONE);
wClose.setText(" &Close ");
wVerify = new Button(composite, SWT.CHECK);
wVerify.setText("&Verify usage");
wVerify.setSelection(true); // Check it!
wUsed = new Button(composite, SWT.CHECK);
wUsed.setText("&Remove used keys");
wUsed.setSelection(false); // Check it!
wAvailable= new Button(composite, SWT.CHECK);
wAvailable.setText("&Check key against other locale");
wAvailable.setSelection(true); // Check it!
BaseStepDialog.positionBottomButtons(composite, new Button[] { wReload, wLocale, wClose, wVerify, wUsed, wAvailable } , Const.MARGIN, null);
ColumnInfo[] colinf=new ColumnInfo[]
{
new ColumnInfo("Locale", ColumnInfo.COLUMN_TYPE_TEXT, true),
new ColumnInfo("Package", ColumnInfo.COLUMN_TYPE_TEXT, true),
new ColumnInfo("Class", ColumnInfo.COLUMN_TYPE_TEXT, true),
new ColumnInfo("Key", ColumnInfo.COLUMN_TYPE_TEXT, true),
new ColumnInfo("Value", ColumnInfo.COLUMN_TYPE_TEXT, true),
new ColumnInfo("Used?", ColumnInfo.COLUMN_TYPE_TEXT, true),
new ColumnInfo("Not available in", ColumnInfo.COLUMN_TYPE_TEXT, true),
};
wGrid=new TableView( Variables.getADefaultVariableSpace(),
composite,
SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI,
colinf,
0,
null,
PropsUI.getInstance()
);
FormData fdGrid=new FormData();
fdGrid.left = new FormAttachment(0, 0);
fdGrid.top = new FormAttachment(0, 0);
fdGrid.right = new FormAttachment(100, 0);
fdGrid.bottom = new FormAttachment(wReload, -Const.MARGIN*3);
wGrid.setLayoutData(fdGrid);
}
示例6: fillIndexGroup
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
private void fillIndexGroup(Composite parentTab) {
wIndexGroup = new Group(parentTab, SWT.SHADOW_NONE);
props.setLook(wIndexGroup);
wIndexGroup.setText(BaseMessages.getString(PKG, "ElasticSearchBulkDialog.IndexGroup.Label"));
FormLayout indexGroupLayout = new FormLayout();
indexGroupLayout.marginWidth = 10;
indexGroupLayout.marginHeight = 10;
wIndexGroup.setLayout(indexGroupLayout);
//Index
wIndex = new LabelTextVar(transMeta, wIndexGroup, BaseMessages.getString(PKG, "ElasticSearchBulkDialog.Index.Label"), BaseMessages.getString(PKG, "ElasticSearchBulkDialog.Index.Tooltip"));
wIndex.addModifyListener(lsMod);
//Type
wType = new LabelTextVar(transMeta, wIndexGroup, BaseMessages.getString(PKG, "ElasticSearchBulkDialog.Type.Label"), BaseMessages.getString(PKG, "ElasticSearchBulkDialog.Type.Tooltip"));
wType.addModifyListener(lsMod);
//Test button
wTest=new Button(wIndexGroup,SWT.PUSH);
wTest.setText(BaseMessages.getString(PKG, "ElasticSearchBulkDialog.TestIndex.Label"));
wTest.setToolTipText(BaseMessages.getString(PKG, "ElasticSearchBulkDialog.TestIndex.Tooltip"));
wTest.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event arg0) {
test(TestType.INDEX);
}
});
Control[] connectionControls = new Control[]{ wIndex, wType };
placeControls(wIndexGroup, connectionControls);
BaseStepDialog.positionBottomButtons(wIndexGroup, new Button[] {wTest}, Const.MARGIN, wType);
fdIndexGroup = new FormData();
fdIndexGroup.left = new FormAttachment(0, Const.MARGIN);
fdIndexGroup.top = new FormAttachment(wStepname, Const.MARGIN);
fdIndexGroup.right = new FormAttachment(100, -Const.MARGIN);
wIndexGroup.setLayoutData(fdIndexGroup);
}
示例7: open
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
public void open()
{
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
props.setLook(shell);
shell.setImage(GUIResource.getInstance().getImageSpoon());
FormLayout formLayout = new FormLayout ();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout(formLayout);
shell.setText(BaseMessages.getString(PKG, "PreviewSelectDialog.Dialog.PreviewSelection.Title")); //Preview selection screen
shell.setImage(GUIResource.getInstance().getImageLogoSmall());
int margin = Const.MARGIN;
wlFields=new Label(shell, SWT.NONE);
wlFields.setText(BaseMessages.getString(PKG, "PreviewSelectDialog.Label.Steps")); //Steps:
props.setLook(wlFields);
fdlFields=new FormData();
fdlFields.left = new FormAttachment(0, 0);
fdlFields.top = new FormAttachment(0, margin);
wlFields.setLayoutData(fdlFields);
List<StepMeta> usedSteps = trans.getUsedSteps();
final int FieldsRows=usedSteps.size();
ColumnInfo[] colinf = {
new ColumnInfo( BaseMessages.getString(PKG, "PreviewSelectDialog.Column.Stepname"), ColumnInfo.COLUMN_TYPE_TEXT, false, true ), //Stepname
new ColumnInfo( BaseMessages.getString(PKG, "PreviewSelectDialog.Column.PreviewSize"), ColumnInfo.COLUMN_TYPE_TEXT, false, false), //Preview size
};
wFields=new TableView(trans, shell,
SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI,
colinf,
FieldsRows,
true, // read-only
null,
props
);
fdFields=new FormData();
fdFields.left = new FormAttachment(0, 0);
fdFields.top = new FormAttachment(wlFields, margin);
fdFields.right = new FormAttachment(100, 0);
fdFields.bottom = new FormAttachment(100, -50);
wFields.setLayoutData(fdFields);
wPreview=new Button(shell, SWT.PUSH);
wPreview.setText(BaseMessages.getString(PKG, "System.Button.Show"));
wCancel=new Button(shell, SWT.PUSH);
wCancel.setText(BaseMessages.getString(PKG, "System.Button.Close"));
BaseStepDialog.positionBottomButtons(shell, new Button[] { wPreview, wCancel }, margin, null);
// Add listeners
lsCancel = new Listener() { public void handleEvent(Event e) { cancel(); } };
lsPreview = new Listener() { public void handleEvent(Event e) { preview(); } };
wCancel.addListener (SWT.Selection, lsCancel );
wPreview.addListener(SWT.Selection, lsPreview );
// Detect X or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() { public void shellClosed(ShellEvent e) { cancel(); } } );
BaseStepDialog.setSize(shell);
getData();
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch()) display.sleep();
}
}
示例8: open
import org.pentaho.di.ui.trans.step.BaseStepDialog; //導入方法依賴的package包/類
public JobEntryInterface open()
{
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
props.setLook(shell);
JobDialog.setShellImage(shell, jobEntry);
FormLayout formLayout = new FormLayout ();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout(formLayout);
shell.setText("Do Login ON EAI");
int margin = Const.MARGIN;
wOK=new Button(shell, SWT.PUSH);
wOK.setText(" &OK ");
BaseStepDialog.positionBottomButtons(shell, new Button[] { wOK }, margin,null);
lsOK = new Listener() { public void handleEvent(Event e) { ok(); } };
wOK.addListener (SWT.Selection, lsOK );
// Detect X or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() { public void shellClosed(ShellEvent e) { ok(); } } );
BaseStepDialog.setSize(shell);
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch()) display.sleep();
}
return jobEntry;
}