Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
ca030501
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
ca030501
编写于
2月 18, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Get rid of properties.tabbed
Former-commit-id:
de458227
上级
46b35f65
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
45 addition
and
137 deletion
+45
-137
features/org.jkiss.dbeaver.core/feature.xml
features/org.jkiss.dbeaver.core/feature.xml
+0
-1
features/org.jkiss.dbeaver.rcp/feature.xml
features/org.jkiss.dbeaver.rcp/feature.xml
+1
-8
features/org.jkiss.dbeaver.runtime/feature.xml
features/org.jkiss.dbeaver.runtime/feature.xml
+0
-1
features/org.jkiss.dbeaver.standalone/feature.xml
features/org.jkiss.dbeaver.standalone/feature.xml
+0
-1
plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF
plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/FolderComposite.java
...rg/jkiss/dbeaver/ui/controls/folders/FolderComposite.java
+8
-9
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/FolderInfo.java
...src/org/jkiss/dbeaver/ui/controls/folders/FolderInfo.java
+3
-10
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/FolderList.java
...src/org/jkiss/dbeaver/ui/controls/folders/FolderList.java
+15
-15
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/IFolderContainer.java
...g/jkiss/dbeaver/ui/controls/folders/IFolderContainer.java
+0
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/IFolderDescription.java
...jkiss/dbeaver/ui/controls/folders/IFolderDescription.java
+0
-69
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/properties/ObjectPropertiesEditor.java
.../ui/editors/entity/properties/ObjectPropertiesEditor.java
+11
-13
plugins/org.jkiss.dbeaver.test/src/org/jkiss/dbeaver/ext/test/ui/TestDialog.java
...er.test/src/org/jkiss/dbeaver/ext/test/ui/TestDialog.java
+6
-7
未找到文件。
features/org.jkiss.dbeaver.core/feature.xml
浏览文件 @
ca030501
...
...
@@ -25,7 +25,6 @@
<import
plugin=
"org.eclipse.ui"
/>
<import
plugin=
"org.eclipse.ui.workbench"
/>
<import
plugin=
"org.eclipse.ui.workbench.texteditor"
/>
<import
plugin=
"org.eclipse.ui.views.properties.tabbed"
/>
<import
plugin=
"org.eclipse.swt"
/>
<import
plugin=
"org.eclipse.jface"
/>
<import
plugin=
"org.eclipse.jface.text"
/>
...
...
features/org.jkiss.dbeaver.rcp/feature.xml
浏览文件 @
ca030501
...
...
@@ -2,7 +2,7 @@
<feature
id=
"org.jkiss.dbeaver.rcp"
label=
"RCP"
version=
"2.0.
1
"
>
version=
"2.0.
2
"
>
<description>
Feature for standalone DBeaver RCP
...
...
@@ -663,13 +663,6 @@
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.eclipse.ui.views.properties.tabbed"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.eclipse.ui.workbench"
download-size=
"0"
...
...
features/org.jkiss.dbeaver.runtime/feature.xml
浏览文件 @
ca030501
...
...
@@ -29,7 +29,6 @@
<import
plugin=
"org.eclipse.ui"
/>
<import
plugin=
"org.eclipse.ui.workbench"
/>
<import
plugin=
"org.eclipse.ui.workbench.texteditor"
/>
<import
plugin=
"org.eclipse.ui.views.properties.tabbed"
/>
<import
plugin=
"org.eclipse.swt"
/>
<import
plugin=
"org.eclipse.jface"
/>
<import
plugin=
"org.eclipse.jface.text"
/>
...
...
features/org.jkiss.dbeaver.standalone/feature.xml
浏览文件 @
ca030501
...
...
@@ -57,7 +57,6 @@
<import
plugin=
"org.eclipse.ui"
/>
<import
plugin=
"org.eclipse.ui.workbench"
/>
<import
plugin=
"org.eclipse.ui.workbench.texteditor"
/>
<import
plugin=
"org.eclipse.ui.views.properties.tabbed"
/>
<import
plugin=
"org.eclipse.swt"
/>
<import
plugin=
"org.eclipse.jface"
/>
<import
plugin=
"org.eclipse.jface.text"
/>
...
...
plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF
浏览文件 @
ca030501
...
...
@@ -119,9 +119,9 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.core.expressions,
org.eclipse.ui,
org.eclipse.ui.views,
org.eclipse.ui.workbench,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.views.properties.tabbed,
org.eclipse.swt,
org.eclipse.jface,
org.eclipse.jface.text,
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/FolderComposite.java
浏览文件 @
ca030501
...
...
@@ -40,7 +40,6 @@ 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.jkiss.dbeaver.ui.UIUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -56,7 +55,7 @@ public class FolderComposite extends Composite implements IFolderContainer {
private
final
FolderList
folderList
;
private
final
Composite
pane
;
private
final
Map
<
IFolderDescription
,
Composite
>
contentsMap
=
new
HashMap
<
IFolderDescription
,
Composite
>();
private
final
Map
<
FolderInfo
,
Composite
>
contentsMap
=
new
HashMap
<
FolderInfo
,
Composite
>();
private
IFolder
curFolder
;
private
Control
curContent
;
private
List
<
IFolderListener
>
listeners
=
new
ArrayList
<
IFolderListener
>();
...
...
@@ -84,21 +83,21 @@ public class FolderComposite extends Composite implements IFolderContainer {
folderList
.
addSelectionListener
(
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
onFolderSwitch
(
folderList
.
getElementAt
(
folderList
.
getSelectionIndex
()).
get
TabItem
());
onFolderSwitch
(
folderList
.
getElementAt
(
folderList
.
getSelectionIndex
()).
get
Info
());
}
});
addDisposeListener
(
new
DisposeListener
()
{
@Override
public
void
widgetDisposed
(
DisposeEvent
e
)
{
for
(
IFolderDescription
folderDescription
:
contentsMap
.
keySet
())
{
for
(
FolderInfo
folderDescription
:
contentsMap
.
keySet
())
{
folderDescription
.
getContents
().
dispose
();
}
}
});
}
private
void
onFolderSwitch
(
IFolderDescription
folder
)
{
private
void
onFolderSwitch
(
FolderInfo
folder
)
{
Composite
newContent
=
contentsMap
.
get
(
folder
);
IFolder
newFolder
=
folder
.
getContents
();
if
(
newContent
==
null
)
{
...
...
@@ -126,7 +125,7 @@ public class FolderComposite extends Composite implements IFolderContainer {
}
}
public
void
setFolders
(
IFolderDescription
[]
folders
)
{
public
void
setFolders
(
FolderInfo
[]
folders
)
{
boolean
firstTime
=
folderList
.
getNumberOfElements
()
==
0
;
folderList
.
setFolders
(
folders
);
folderList
.
select
(
0
);
...
...
@@ -135,19 +134,19 @@ public class FolderComposite extends Composite implements IFolderContainer {
}
}
public
IFolderDescription
[]
getFolders
()
{
public
FolderInfo
[]
getFolders
()
{
return
folderList
.
getElements
();
}
@Override
public
IFolder
getActiveFolder
()
{
return
folderList
.
getElementAt
(
folderList
.
getSelectionIndex
()).
get
TabItem
().
getContents
();
return
folderList
.
getElementAt
(
folderList
.
getSelectionIndex
()).
get
Info
().
getContents
();
}
@Override
public
void
switchFolder
(
String
folderId
)
{
for
(
int
i
=
0
;
i
<
folderList
.
getNumberOfElements
();
i
++)
{
if
(
folderList
.
getElementAt
(
i
).
get
TabItem
().
getId
().
equals
(
folderId
))
{
if
(
folderList
.
getElementAt
(
i
).
get
Info
().
getId
().
equals
(
folderId
))
{
folderList
.
select
(
i
);
break
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/Folder
Description
.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/Folder
Info
.java
浏览文件 @
ca030501
...
...
@@ -31,12 +31,11 @@
package
org.jkiss.dbeaver.ui.controls.folders
;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.ui.part.IPage
;
/**
* Folder
s composite
* Folder
info
*/
public
class
Folder
Description
implements
IFolderDescription
{
public
class
Folder
Info
{
private
String
id
;
private
String
text
;
...
...
@@ -44,7 +43,7 @@ public class FolderDescription implements IFolderDescription {
private
String
tooltip
;
private
IFolder
contents
;
public
Folder
Description
(
String
id
,
String
text
,
Image
image
,
String
tooltip
,
IFolder
contents
)
{
public
Folder
Info
(
String
id
,
String
text
,
Image
image
,
String
tooltip
,
IFolder
contents
)
{
this
.
id
=
id
;
this
.
text
=
text
;
this
.
image
=
image
;
...
...
@@ -52,32 +51,26 @@ public class FolderDescription implements IFolderDescription {
this
.
contents
=
contents
;
}
@Override
public
String
getId
()
{
return
id
;
}
@Override
public
String
getText
()
{
return
text
;
}
@Override
public
Image
getImage
()
{
return
image
;
}
@Override
public
String
getTooltip
()
{
return
tooltip
;
}
@Override
public
boolean
isIndented
()
{
return
false
;
}
@Override
public
IFolder
getContents
()
{
return
contents
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/FolderList.java
浏览文件 @
ca030501
...
...
@@ -94,7 +94,7 @@ public class FolderList extends Composite {
*/
public
class
ListElement
extends
Canvas
{
private
IFolderDescription
tab
;
private
FolderInfo
tab
;
private
int
index
;
private
boolean
selected
;
private
boolean
hover
;
...
...
@@ -106,7 +106,7 @@ public class FolderList extends Composite {
* @param tab the tab item for the element.
* @param index the index in the list.
*/
public
ListElement
(
Composite
parent
,
final
IFolderDescription
tab
,
int
index
)
{
public
ListElement
(
Composite
parent
,
final
FolderInfo
tab
,
int
index
)
{
super
(
parent
,
SWT
.
NO_FOCUS
);
this
.
tab
=
tab
;
hover
=
false
;
...
...
@@ -256,7 +256,7 @@ public class FolderList extends Composite {
*
* @return the tab item.
*/
public
IFolderDescription
getTabItem
()
{
public
FolderInfo
getInfo
()
{
return
tab
;
}
...
...
@@ -524,10 +524,10 @@ public class FolderList extends Composite {
return
null
;
}
public
IFolderDescription
[]
getElements
()
{
IFolderDescription
[]
tabs
=
new
IFolderDescription
[
elements
.
length
];
public
FolderInfo
[]
getElements
()
{
FolderInfo
[]
tabs
=
new
FolderInfo
[
elements
.
length
];
for
(
int
i
=
0
;
i
<
elements
.
length
;
i
++)
{
tabs
[
i
]
=
elements
[
i
].
get
TabItem
();
tabs
[
i
]
=
elements
[
i
].
get
Info
();
}
return
tabs
;
}
...
...
@@ -562,7 +562,7 @@ public class FolderList extends Composite {
/**
* Sets the new list elements.
*/
public
void
setFolders
(
IFolderDescription
[]
children
)
{
public
void
setFolders
(
FolderInfo
[]
children
)
{
if
(
elements
!=
ELEMENTS_EMPTY
)
{
removeAll
();
}
...
...
@@ -592,17 +592,17 @@ public class FolderList extends Composite {
computeTopAndBottomTab
();
}
private
int
getTabWidth
(
IFolderDescription
tabItem
)
{
int
width
=
getTextDimension
(
tabItem
.
getText
()).
x
;
private
int
getTabWidth
(
FolderInfo
folderInfo
)
{
int
width
=
getTextDimension
(
folderInfo
.
getText
()).
x
;
/*
* To anticipate for the icon placement we should always keep the
* space available after the label. So when the active tab includes
* an icon the width of the tab doesn't change.
*/
if
(
tabItem
.
getImage
()
!=
null
)
{
width
=
width
+
tabItem
.
getImage
().
getBounds
().
width
+
4
;
if
(
folderInfo
.
getImage
()
!=
null
)
{
width
=
width
+
folderInfo
.
getImage
().
getBounds
().
width
+
4
;
}
if
(
tabItem
.
isIndented
())
{
if
(
folderInfo
.
isIndented
())
{
width
=
width
+
INDENT
;
}
return
width
;
...
...
@@ -667,7 +667,7 @@ public class FolderList extends Composite {
/*
* Add INDENT pixels to the left of the longest tab as a margin.
*/
int
width
=
getTabWidth
(
elements
[
widestLabelIndex
].
get
TabItem
())
+
INDENT
;
int
width
=
getTabWidth
(
elements
[
widestLabelIndex
].
get
Info
())
+
INDENT
;
/*
* Add 10 pixels to the right of the longest tab as a margin.
*/
...
...
@@ -903,13 +903,13 @@ public class FolderList extends Composite {
public
void
getName
(
AccessibleEvent
e
)
{
if
(
getSelectionIndex
()
!=
NONE
)
{
e
.
result
=
elements
[
getSelectionIndex
()].
get
TabItem
().
getText
();
e
.
result
=
elements
[
getSelectionIndex
()].
get
Info
().
getText
();
}
}
public
void
getHelp
(
AccessibleEvent
e
)
{
if
(
getSelectionIndex
()
!=
NONE
)
{
e
.
result
=
elements
[
getSelectionIndex
()].
get
TabItem
().
getText
();
e
.
result
=
elements
[
getSelectionIndex
()].
get
Info
().
getText
();
}
}
});
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/IFolderContainer.java
浏览文件 @
ca030501
...
...
@@ -19,8 +19,6 @@
package
org.jkiss.dbeaver.ui.controls.folders
;
import
org.eclipse.ui.part.IPage
;
import
org.eclipse.ui.views.properties.tabbed.ITabDescriptor
;
import
org.jkiss.code.Nullable
;
/**
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/folders/IFolderDescription.java
已删除
100644 → 0
浏览文件 @
46b35f65
/*
* Copyright (C) 2010-2014 Serge Rieder
* serge@jkiss.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package
org.jkiss.dbeaver.ui.controls.folders
;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.ui.part.IPage
;
/**
* Represents a tab to be displayed in the tab list in the tabbed property sheet
* page.
*
* @author Anthony Hunter
* @author Serge Rieder
*/
public
interface
IFolderDescription
{
/**
* Tab unique ID.
*/
public
String
getId
();
/**
* Get the text label for the tab.
*
* @return the text label for the tab.
*/
public
String
getText
();
/**
* Get the icon image for the tab.
*
* @return the icon image for the tab.
*/
public
Image
getImage
();
/**
* Tab tooltip.
*/
public
String
getTooltip
();
/**
* Determine if this tab is indented.
*
* @return <code>true</code> if this tab is indented.
*/
public
boolean
isIndented
();
/**
* Creates tab contents
*/
public
IFolder
getContents
();
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/properties/ObjectPropertiesEditor.java
浏览文件 @
ca030501
...
...
@@ -25,14 +25,12 @@ import org.eclipse.swt.events.SelectionAdapter;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.events.SelectionListener
;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.swt.layout.FormLayout
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.layout.RowLayout
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Link
;
import
org.eclipse.ui.*
;
import
org.eclipse.ui.part.IPage
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.CoreMessages
;
...
...
@@ -171,12 +169,12 @@ public class ObjectPropertiesEditor extends AbstractDatabaseObjectEditor<DBSObje
folderComposite
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
// Load properties
IFolderDescription
[]
folders
=
collectFolders
(
this
);
FolderInfo
[]
folders
=
collectFolders
(
this
);
folderComposite
.
setFolders
(
folders
);
// Collect section contributors
GlobalContributorManager
contributorManager
=
GlobalContributorManager
.
getInstance
();
for
(
IFolderDescription
folder
:
folderComposite
.
getFolders
())
{
for
(
FolderInfo
folder
:
folderComposite
.
getFolders
())
{
IFolder
page
=
folder
.
getContents
();
if
(
page
instanceof
IDatabaseEditorContributorUser
)
{
IEditorActionBarContributor
contributor
=
((
IDatabaseEditorContributorUser
)
page
).
getContributor
(
contributorManager
);
...
...
@@ -407,19 +405,19 @@ public class ObjectPropertiesEditor extends AbstractDatabaseObjectEditor<DBSObje
return
result
==
null
?
super
.
getAdapter
(
adapter
)
:
result
;
}
public
IFolderDescription
[]
collectFolders
(
IWorkbenchPart
part
)
public
FolderInfo
[]
collectFolders
(
IWorkbenchPart
part
)
{
List
<
IFolderDescription
>
tabList
=
new
ArrayList
<
IFolderDescription
>();
List
<
FolderInfo
>
tabList
=
new
ArrayList
<
FolderInfo
>();
makeStandardPropertiesTabs
(
tabList
);
if
(
part
instanceof
IDatabaseEditor
)
{
makeDatabaseEditorTabs
((
IDatabaseEditor
)
part
,
tabList
);
}
return
tabList
.
toArray
(
new
IFolderDescription
[
tabList
.
size
()]);
return
tabList
.
toArray
(
new
FolderInfo
[
tabList
.
size
()]);
}
private
void
makeStandardPropertiesTabs
(
List
<
IFolderDescription
>
tabList
)
private
void
makeStandardPropertiesTabs
(
List
<
FolderInfo
>
tabList
)
{
tabList
.
add
(
new
Folder
Description
(
tabList
.
add
(
new
Folder
Info
(
//PropertiesContributor.CATEGORY_INFO,
PropertiesContributor
.
TAB_STANDARD
,
CoreMessages
.
ui_properties_category_information
,
...
...
@@ -428,7 +426,7 @@ public class ObjectPropertiesEditor extends AbstractDatabaseObjectEditor<DBSObje
new
FolderPageProperties
(
getEditorInput
())));
}
private
void
makeDatabaseEditorTabs
(
IDatabaseEditor
part
,
List
<
IFolderDescription
>
tabList
)
private
void
makeDatabaseEditorTabs
(
IDatabaseEditor
part
,
List
<
FolderInfo
>
tabList
)
{
final
DBNDatabaseNode
node
=
part
.
getEditorInput
().
getTreeNode
();
final
DBSObject
object
=
node
.
getObject
();
...
...
@@ -463,7 +461,7 @@ public class ObjectPropertiesEditor extends AbstractDatabaseObjectEditor<DBSObje
if
(!
CommonUtils
.
isEmpty
(
editors
))
{
for
(
EntityEditorDescriptor
descriptor
:
editors
)
{
if
(
descriptor
.
getType
()
==
EntityEditorDescriptor
.
Type
.
folder
)
{
tabList
.
add
(
new
Folder
Description
(
tabList
.
add
(
new
Folder
Info
(
//PropertiesContributor.CATEGORY_STRUCT,
descriptor
.
getId
(),
descriptor
.
getName
(),
...
...
@@ -475,9 +473,9 @@ public class ObjectPropertiesEditor extends AbstractDatabaseObjectEditor<DBSObje
}
}
private
void
addNavigatorNodeTab
(
final
IDatabaseEditor
part
,
List
<
IFolderDescription
>
tabList
,
final
NavigatorTabInfo
tabInfo
)
private
void
addNavigatorNodeTab
(
final
IDatabaseEditor
part
,
List
<
FolderInfo
>
tabList
,
final
NavigatorTabInfo
tabInfo
)
{
tabList
.
add
(
new
Folder
Description
(
tabList
.
add
(
new
Folder
Info
(
//PropertiesContributor.CATEGORY_STRUCT,
tabInfo
.
getName
(),
tabInfo
.
getName
(),
...
...
plugins/org.jkiss.dbeaver.test/src/org/jkiss/dbeaver/ext/test/ui/TestDialog.java
浏览文件 @
ca030501
...
...
@@ -24,34 +24,33 @@ import org.eclipse.swt.layout.GridData;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.ui.DBIcon
;
import
org.jkiss.dbeaver.ui.controls.folders.FolderComposite
;
import
org.jkiss.dbeaver.ui.controls.folders.Folder
Description
;
import
org.jkiss.dbeaver.ui.controls.folders.Folder
Info
;
import
org.jkiss.dbeaver.ui.controls.folders.FolderPage
;
import
org.jkiss.dbeaver.ui.controls.folders.IFolderDescription
;
public
class
TestDialog
extends
TrayDialog
{
private
FolderComposite
folderComposite
;
private
final
IFolderDescription
[]
tabs
;
private
final
FolderInfo
[]
tabs
;
public
TestDialog
(
Shell
shell
)
{
super
(
shell
);
tabs
=
new
IFolderDescription
[
3
];
tabs
[
0
]
=
new
Folder
Description
(
"tab1"
,
"Tab 1"
,
DBIcon
.
TREE_TABLE
.
getImage
(),
"Tooltip 1"
,
new
FolderPage
()
{
tabs
=
new
FolderInfo
[
3
];
tabs
[
0
]
=
new
Folder
Info
(
"tab1"
,
"Tab 1"
,
DBIcon
.
TREE_TABLE
.
getImage
(),
"Tooltip 1"
,
new
FolderPage
()
{
@Override
public
void
createControl
(
Composite
parent
)
{
new
Text
(
parent
,
SWT
.
NONE
);
}
});
tabs
[
1
]
=
new
Folder
Description
(
"tab2"
,
"Tab with long-long name"
,
DBIcon
.
TREE_COLUMNS
.
getImage
(),
"Tooltip 2"
,
new
FolderPage
()
{
tabs
[
1
]
=
new
Folder
Info
(
"tab2"
,
"Tab with long-long name"
,
DBIcon
.
TREE_COLUMNS
.
getImage
(),
"Tooltip 2"
,
new
FolderPage
()
{
@Override
public
void
createControl
(
Composite
parent
)
{
new
Label
(
parent
,
SWT
.
NONE
);
}
});
tabs
[
2
]
=
new
Folder
Description
(
"tab3"
,
"Example"
,
DBIcon
.
PROJECT
.
getImage
(),
"123123"
,
new
FolderPage
()
{
tabs
[
2
]
=
new
Folder
Info
(
"tab3"
,
"Example"
,
DBIcon
.
PROJECT
.
getImage
(),
"123123"
,
new
FolderPage
()
{
@Override
public
void
createControl
(
Composite
parent
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录