Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
735c1f41
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
735c1f41
编写于
6月 07, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MP wizard fix
上级
908905d6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
46 deletion
+21
-46
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/MultiPageWizardDialog.java
...c/org/jkiss/dbeaver/ui/dialogs/MultiPageWizardDialog.java
+21
-46
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/MultiPageWizardDialog.java
浏览文件 @
735c1f41
...
...
@@ -19,7 +19,7 @@
package
org.jkiss.dbeaver.ui.dialogs
;
import
org.eclipse.jface.dialogs.IDialogPage
;
import
org.eclipse.jface.dialogs.T
ray
Dialog
;
import
org.eclipse.jface.dialogs.T
itleArea
Dialog
;
import
org.eclipse.jface.operation.IRunnableWithProgress
;
import
org.eclipse.jface.operation.ModalContext
;
import
org.eclipse.jface.viewers.IStructuredSelection
;
...
...
@@ -34,10 +34,7 @@ import org.eclipse.swt.events.SelectionEvent;
import
org.eclipse.swt.graphics.Point
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Control
;
import
org.eclipse.swt.widgets.Tree
;
import
org.eclipse.swt.widgets.TreeItem
;
import
org.eclipse.swt.widgets.*
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.eclipse.ui.IWorkbenchWizard
;
import
org.jkiss.dbeaver.ui.UIUtils
;
...
...
@@ -47,7 +44,7 @@ import java.lang.reflect.InvocationTargetException;
/**
* MultiPageWizardDialog
*/
public
class
MultiPageWizardDialog
extends
T
ray
Dialog
implements
IWizardContainer
{
public
class
MultiPageWizardDialog
extends
T
itleArea
Dialog
implements
IWizardContainer
{
private
IWizard
wizard
;
private
Composite
pageArea
;
...
...
@@ -99,9 +96,14 @@ public class MultiPageWizardDialog extends TrayDialog implements IWizardContaine
SashForm
sash
=
new
SashForm
(
composite
,
SWT
.
HORIZONTAL
);
sash
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
pagesTree
=
new
Tree
(
sash
,
SWT
.
BORDER
|
SWT
.
SINGLE
);
pagesTree
=
new
Tree
(
sash
,
SWT
.
SINGLE
);
pagesTree
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
Composite
pageContainer
=
UIUtils
.
createPlaceholder
(
sash
,
1
);
Composite
pageContainer
=
UIUtils
.
createPlaceholder
(
sash
,
2
);
// Vertical separator
new
Label
(
pageContainer
,
SWT
.
SEPARATOR
|
SWT
.
VERTICAL
)
.
setLayoutData
(
new
GridData
(
SWT
.
LEFT
,
SWT
.
FILL
,
false
,
true
));
pageArea
=
UIUtils
.
createPlaceholder
(
pageContainer
,
1
);
pageArea
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
pageArea
.
setLayout
(
new
GridLayout
(
1
,
true
));
...
...
@@ -147,9 +149,20 @@ public class MultiPageWizardDialog extends TrayDialog implements IWizardContaine
}
});
// Set title and image from first page
setTitle
(
prevPage
.
getTitle
());
setTitleImage
(
prevPage
.
getImage
());
setMessage
(
prevPage
.
getMessage
());
// Horizontal separator
new
Label
(
composite
,
SWT
.
HORIZONTAL
|
SWT
.
SEPARATOR
)
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
// Progress monitor
monitorPart
=
new
ProgressMonitorPart
(
composite
,
null
,
true
);
gd
=
new
GridData
(
GridData
.
FILL_HORIZONTAL
);
gd
.
grabExcessHorizontalSpace
=
true
;
gd
.
horizontalIndent
=
20
;
gd
.
verticalIndent
=
0
;
monitorPart
.
setLayoutData
(
gd
);
monitorPart
.
setVisible
(
false
);
...
...
@@ -192,44 +205,6 @@ public class MultiPageWizardDialog extends TrayDialog implements IWizardContaine
}
}
/*
@Override
protected void createButtonsForButtonBar(Composite parent)
{
super.createButtonsForButtonBar(parent);
testButton = createButton(parent, TEST_BUTTON_ID, CoreMessages.dialog_connection_button_test, false);
testButton.setEnabled(false);
testButton.moveAbove(getButton(IDialogConstants.BACK_ID));
}
@Override
protected void buttonPressed(int buttonId)
{
if (buttonId == TEST_BUTTON_ID) {
testConnection();
return;
}
super.buttonPressed(buttonId);
}
@Override
public void updateButtons()
{
ConnectionWizard wizard = (ConnectionWizard) getWizard();
ConnectionPageSettings settings = wizard.getPageSettings();
testButton.setEnabled(settings != null && settings.isPageComplete());
super.updateButtons();
}
private void testConnection()
{
ConnectionWizard wizard = (ConnectionWizard) getWizard();
wizard.getPageSettings().saveSettings();
wizard.testConnection(wizard.getPageSettings().getConnectionInfo());
}
*/
@Override
public
IWizardPage
getCurrentPage
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录