本文整理汇总了Java中org.pentaho.di.ui.trans.step.BaseStepDialog.setSize方法的典型用法代码示例。如果您正苦于以下问题:Java BaseStepDialog.setSize方法的具体用法?Java BaseStepDialog.setSize怎么用?Java BaseStepDialog.setSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.trans.step.BaseStepDialog
的用法示例。
在下文中一共展示了BaseStepDialog.setSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: open
import org.pentaho.di.ui.trans.step.BaseStepDialog; //导入方法依赖的package包/类
public void open()
{
shell = new Shell(display);
shell.setLayout(new FillLayout());
shell.setText(APP_NAME);
try
{
readFiles(ROOT);
}
catch(Exception e)
{
new ErrorDialog(shell, "Error reading translations", "There was an unexpected error reading the translations", e);
}
// Put something on the screen
sashform = new SashForm(shell, SWT.HORIZONTAL);
sashform.setLayout(new FillLayout());
addList();
addGrid();
addListeners();
sashform.setWeights(new int[] { 30, 70 });
sashform.setVisible(true);
refresh();
BaseStepDialog.setSize(shell);
shell.open();
}
示例2: 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;
}
示例3: 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();
}
}
示例4: 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;
}
示例5: 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();
}
}
示例6: 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;
}