Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
e2dd6b07
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e2dd6b07
编写于
3月 22, 2011
作者:
J
jbarrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ACT-696: started with deployment page
上级
36e463fd
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
360 addition
and
50 deletion
+360
-50
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/Images.java
...explorer2/src/main/java/org/activiti/explorer/Images.java
+2
-0
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/MainMenuBar.java
...2/src/main/java/org/activiti/explorer/ui/MainMenuBar.java
+1
-1
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBar.java
...rg/activiti/explorer/ui/management/ManagementMenuBar.java
+13
-2
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabaseDetailPanel.java
...tiviti/explorer/ui/management/db/DatabaseDetailPanel.java
+30
-19
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/DatabasePage.java
.../org/activiti/explorer/ui/management/db/DatabasePage.java
+2
-2
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/db/TableDataQuery.java
...rg/activiti/explorer/ui/management/db/TableDataQuery.java
+1
-1
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentDetailPanel.java
...lorer/ui/management/deployment/DeploymentDetailPanel.java
+126
-0
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentListQuery.java
...xplorer/ui/management/deployment/DeploymentListQuery.java
+89
-0
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentPage.java
...iti/explorer/ui/management/deployment/DeploymentPage.java
+70
-0
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/task/TaskDetailPanel.java
...n/java/org/activiti/explorer/ui/task/TaskDetailPanel.java
+0
-8
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/task/TaskListQuery.java
...ain/java/org/activiti/explorer/ui/task/TaskListQuery.java
+7
-9
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/task/TaskMenuBar.java
.../main/java/org/activiti/explorer/ui/task/TaskMenuBar.java
+19
-8
modules/activiti-webapp-explorer2/src/main/webapp/VAADIN/themes/activiti/img/process_48.png
...src/main/webapp/VAADIN/themes/activiti/img/process_48.png
+0
-0
modules/activiti-webapp-explorer2/src/main/webapp/VAADIN/themes/activiti/img/resource.png
...2/src/main/webapp/VAADIN/themes/activiti/img/resource.png
+0
-0
未找到文件。
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/Images.java
浏览文件 @
e2dd6b07
...
...
@@ -28,6 +28,8 @@ public class Images {
public
static
final
Resource
CLOCK
=
new
ThemeResource
(
"img/clock.png"
);
public
static
final
Resource
PEOPLE
=
new
ThemeResource
(
"img/people.png"
);
public
static
final
Resource
PROCESS
=
new
ThemeResource
(
"img/process.png"
);
public
static
final
Resource
PROCESS_48
=
new
ThemeResource
(
"img/process_48.png"
);
public
static
final
Resource
RESOURCE
=
new
ThemeResource
(
"img/resource.png"
);
// Accounts
public
static
final
Resource
SKYPE
=
new
ThemeResource
(
"img/skype.png"
);
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/MainMenuBar.java
浏览文件 @
e2dd6b07
...
...
@@ -15,7 +15,7 @@ package org.activiti.explorer.ui;
import
org.activiti.explorer.ExplorerApplication
;
import
org.activiti.explorer.ui.flow.FlowPage
;
import
org.activiti.explorer.ui.management.DatabasePage
;
import
org.activiti.explorer.ui.management.
db.
DatabasePage
;
import
org.activiti.explorer.ui.task.TaskInboxPage
;
import
com.vaadin.ui.Button
;
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/ManagementMenuBar.java
浏览文件 @
e2dd6b07
...
...
@@ -15,6 +15,8 @@ package org.activiti.explorer.ui.management;
import
org.activiti.explorer.Constants
;
import
org.activiti.explorer.ExplorerApplication
;
import
org.activiti.explorer.ui.MenuBar
;
import
org.activiti.explorer.ui.management.db.DatabasePage
;
import
org.activiti.explorer.ui.management.deployment.DeploymentPage
;
import
com.vaadin.ui.Button
;
import
com.vaadin.ui.Button.ClickEvent
;
...
...
@@ -34,12 +36,21 @@ public class ManagementMenuBar extends MenuBar {
addStyleName
(
Constants
.
STYLE_MENUBAR
);
Button
database
=
createMenuBarButton
(
"Database"
);
database
.
addListener
(
new
ClickListener
()
{
Button
database
Button
=
createMenuBarButton
(
"Database"
);
database
Button
.
addListener
(
new
ClickListener
()
{
public
void
buttonClick
(
ClickEvent
event
)
{
ExplorerApplication
.
getCurrent
().
switchView
(
new
DatabasePage
());
}
});
Button
deploymentButton
=
createMenuBarButton
(
"Deployments"
);
deploymentButton
.
addListener
(
new
ClickListener
()
{
public
void
buttonClick
(
ClickEvent
event
)
{
ExplorerApplication
.
getCurrent
().
switchView
(
new
DeploymentPage
());
}
});
fillRemainingSpace
();
}
}
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/DatabaseDetailPanel.java
→
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/
db/
DatabaseDetailPanel.java
浏览文件 @
e2dd6b07
...
...
@@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.explorer.ui.management
;
package
org.activiti.explorer.ui.management
.db
;
import
org.activiti.engine.ManagementService
;
import
org.activiti.engine.ProcessEngines
;
...
...
@@ -39,7 +39,7 @@ public class DatabaseDetailPanel extends VerticalLayout {
this
.
tableName
=
tableName
;
this
.
managementService
=
ProcessEngines
.
getDefaultProcessEngine
().
getManagementService
();
addStyleName
(
Constants
.
STYLE_DATABASE_DETAILS
);
addStyleName
(
Reindeer
.
LAYOUT_WHITE
);
setSizeFull
();
addTableName
();
...
...
@@ -49,31 +49,42 @@ public class DatabaseDetailPanel extends VerticalLayout {
protected
void
addTableName
()
{
Label
name
=
new
Label
(
tableName
);
name
.
addStyleName
(
Reindeer
.
LABEL_H1
);
name
.
addStyleName
(
Constants
.
STYLE_DATABASE_DETAILS
);
addComponent
(
name
);
addComponent
(
new
Label
(
" "
,
Label
.
CONTENT_XHTML
));
}
protected
void
addTableData
()
{
Table
data
=
new
Table
();
data
.
setEditable
(
false
);
data
.
setSelectable
(
true
);
data
.
setColumnReorderingAllowed
(
true
);
addComponent
(
data
);
data
.
setWidth
(
"95%"
);
data
.
setHeight
(
"80%"
);
data
.
addStyleName
(
Constants
.
STYLE_DATABASE_TABLE_ROW
);
data
.
addStyleName
(
Reindeer
.
TABLE_STRONG
);
setExpandRatio
(
data
,
1.0f
);
LazyLoadingQuery
lazyLoadingQuery
=
new
TableDataQuery
(
tableName
,
managementService
);
LazyLoadingContainer
lazyLoadingContainer
=
new
LazyLoadingContainer
(
lazyLoadingQuery
,
10
);
data
.
setContainerDataSource
(
lazyLoadingContainer
);
// Create column headers
TableMetaData
metaData
=
managementService
.
getTableMetaData
(
tableName
);
for
(
String
columnName
:
metaData
.
getColumnNames
())
{
data
.
addContainerProperty
(
columnName
,
String
.
class
,
null
);
if
(
lazyLoadingContainer
.
size
()
>
0
)
{
Table
data
=
new
Table
();
data
.
setContainerDataSource
(
lazyLoadingContainer
);
data
.
setEditable
(
false
);
data
.
setSelectable
(
true
);
data
.
setColumnReorderingAllowed
(
true
);
addComponent
(
data
);
data
.
setWidth
(
"95%"
);
data
.
setHeight
(
"80%"
);
data
.
addStyleName
(
Constants
.
STYLE_DATABASE_TABLE_ROW
);
data
.
addStyleName
(
Reindeer
.
TABLE_STRONG
);
data
.
addStyleName
(
Constants
.
STYLE_DATABASE_DETAILS
);
setExpandRatio
(
data
,
1.0f
);
// Create column headers
TableMetaData
metaData
=
managementService
.
getTableMetaData
(
tableName
);
for
(
String
columnName
:
metaData
.
getColumnNames
())
{
data
.
addContainerProperty
(
columnName
,
String
.
class
,
null
);
}
}
else
{
Label
noDataLabel
=
new
Label
(
"Table contains no rows"
);
noDataLabel
.
addStyleName
(
Constants
.
STYLE_DATABASE_DETAILS
);
addComponent
(
noDataLabel
);
setExpandRatio
(
noDataLabel
,
1.0f
);
}
}
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/DatabasePage.java
→
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/
db/
DatabasePage.java
浏览文件 @
e2dd6b07
...
...
@@ -10,13 +10,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.explorer.ui.management
;
package
org.activiti.explorer.ui.management
.db
;
import
java.util.TreeMap
;
import
org.activiti.engine.ManagementService
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.explorer.Images
;
import
org.activiti.explorer.ui.management.ManagementPage
;
import
com.vaadin.data.Item
;
import
com.vaadin.data.Property
;
...
...
@@ -40,7 +41,6 @@ public class DatabasePage extends ManagementPage {
protected
Table
tableList
;
public
DatabasePage
()
{
super
();
this
.
managementService
=
ProcessEngines
.
getDefaultProcessEngine
().
getManagementService
();
addTableList
();
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/TableDataQuery.java
→
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/
db/
TableDataQuery.java
浏览文件 @
e2dd6b07
...
...
@@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.explorer.ui.management
;
package
org.activiti.explorer.ui.management
.db
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentDetailPanel.java
0 → 100644
浏览文件 @
e2dd6b07
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.explorer.ui.management.deployment
;
import
java.util.List
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.repository.Deployment
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.explorer.Images
;
import
com.ocpsoft.pretty.time.PrettyTime
;
import
com.vaadin.ui.Alignment
;
import
com.vaadin.ui.Embedded
;
import
com.vaadin.ui.GridLayout
;
import
com.vaadin.ui.HorizontalLayout
;
import
com.vaadin.ui.Label
;
import
com.vaadin.ui.VerticalLayout
;
import
com.vaadin.ui.themes.Reindeer
;
/**
* @author Joram Barrez
*/
public
class
DeploymentDetailPanel
extends
VerticalLayout
{
private
static
final
long
serialVersionUID
=
1L
;
protected
RepositoryService
repositoryService
;
protected
Deployment
deployment
;
public
DeploymentDetailPanel
(
String
deploymentId
)
{
this
.
repositoryService
=
ProcessEngines
.
getDefaultProcessEngine
().
getRepositoryService
();
this
.
deployment
=
repositoryService
.
createDeploymentQuery
().
deploymentId
(
deploymentId
).
singleResult
();
setSpacing
(
true
);
addStyleName
(
Reindeer
.
LAYOUT_WHITE
);
addDeploymentName
();
addDeploymentTime
();
addProcessDefinitionLinks
();
addResourceLinks
();
}
protected
void
addDeploymentName
()
{
Label
nameLabel
=
new
Label
(
deployment
.
getName
());
nameLabel
.
addStyleName
(
Reindeer
.
LABEL_H1
);
addComponent
(
nameLabel
);
}
protected
void
addDeploymentTime
()
{
Label
emptySpace
=
new
Label
(
" "
,
Label
.
CONTENT_XHTML
);
emptySpace
.
setSizeUndefined
();
addComponent
(
emptySpace
);
HorizontalLayout
timeDetails
=
new
HorizontalLayout
();
timeDetails
.
setSpacing
(
true
);
addComponent
(
timeDetails
);
Embedded
clockImage
=
new
Embedded
(
null
,
Images
.
CLOCK
);
timeDetails
.
addComponent
(
clockImage
);
Label
timeLabel
=
new
Label
(
"Deployed "
+
new
PrettyTime
().
format
(
deployment
.
getDeploymentTime
()));
timeDetails
.
addComponent
(
timeLabel
);
timeDetails
.
setComponentAlignment
(
timeLabel
,
Alignment
.
MIDDLE_CENTER
);
}
protected
void
addProcessDefinitionLinks
()
{
List
<
ProcessDefinition
>
processDefinitions
=
repositoryService
.
createProcessDefinitionQuery
()
.
deploymentId
(
deployment
.
getId
())
.
list
();
if
(
processDefinitions
.
size
()
>
0
)
{
HorizontalLayout
processDefinitionLayout
=
new
HorizontalLayout
();
processDefinitionLayout
.
setSpacing
(
true
);
addComponent
(
processDefinitionLayout
);
// process icon
Embedded
processIcon
=
new
Embedded
(
null
,
Images
.
PROCESS_48
);
processDefinitionLayout
.
addComponent
(
processIcon
);
// processes
VerticalLayout
processDefinitionLinksLayout
=
new
VerticalLayout
();
processDefinitionLayout
.
addComponent
(
processDefinitionLinksLayout
);
for
(
ProcessDefinition
processDefinition
:
processDefinitions
)
{
Label
processDefinitionLabel
=
new
Label
(
processDefinition
.
getName
());
processDefinitionLinksLayout
.
addComponent
(
processDefinitionLabel
);
}
}
}
protected
void
addResourceLinks
()
{
List
<
String
>
resourceNames
=
repositoryService
.
getDeploymentResourceNames
(
deployment
.
getId
());
if
(
resourceNames
.
size
()
>
0
)
{
HorizontalLayout
resourceLayout
=
new
HorizontalLayout
();
addComponent
(
resourceLayout
);
// resource icon
Embedded
resourceIcon
=
new
Embedded
(
null
,
Images
.
RESOURCE
);
resourceLayout
.
addComponent
(
resourceIcon
);
// resources
VerticalLayout
resourceLinksLayout
=
new
VerticalLayout
();
resourceLayout
.
addComponent
(
resourceLinksLayout
);
for
(
String
resourceName
:
resourceNames
)
{
resourceLinksLayout
.
addComponent
(
new
Label
(
resourceName
));
}
}
}
}
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentListQuery.java
0 → 100644
浏览文件 @
e2dd6b07
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.explorer.ui.management.deployment
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.repository.Deployment
;
import
org.activiti.explorer.data.AbstractLazyLoadingQuery
;
import
com.vaadin.data.Item
;
import
com.vaadin.data.util.ObjectProperty
;
import
com.vaadin.data.util.PropertysetItem
;
/**
* @author Joram Barrez
*/
public
class
DeploymentListQuery
extends
AbstractLazyLoadingQuery
{
protected
RepositoryService
repositoryService
;
public
DeploymentListQuery
()
{
this
.
repositoryService
=
ProcessEngines
.
getDefaultProcessEngine
().
getRepositoryService
();
}
public
int
size
()
{
return
(
int
)
repositoryService
.
createDeploymentQuery
().
count
();
}
public
List
<
Item
>
loadItems
(
int
start
,
int
count
)
{
List
<
Deployment
>
deployments
=
repositoryService
.
createDeploymentQuery
()
.
orderByDeploymentName
().
asc
()
.
orderByDeploymentId
().
asc
()
.
list
();
List
<
Item
>
items
=
new
ArrayList
<
Item
>();
for
(
Deployment
deployment
:
deployments
)
{
items
.
add
(
new
DeploymentListitem
(
deployment
));
}
return
items
;
}
public
Item
loadSingleResult
(
String
id
)
{
return
new
DeploymentListitem
(
repositoryService
.
createDeploymentQuery
().
deploymentId
(
id
).
singleResult
());
}
public
void
setSorting
(
Object
[]
propertyIds
,
boolean
[]
ascending
)
{
throw
new
UnsupportedOperationException
();
}
class
DeploymentListitem
extends
PropertysetItem
implements
Comparable
<
DeploymentListitem
>
{
private
static
final
long
serialVersionUID
=
1L
;
public
DeploymentListitem
(
Deployment
deployment
)
{
addItemProperty
(
"id"
,
new
ObjectProperty
<
String
>(
deployment
.
getId
()));
addItemProperty
(
"name"
,
new
ObjectProperty
<
String
>(
deployment
.
getName
()));
}
public
int
compareTo
(
DeploymentListitem
other
)
{
String
name
=
(
String
)
getItemProperty
(
"name"
).
getValue
();
String
otherName
=
(
String
)
other
.
getItemProperty
(
"name"
).
getValue
();
int
comparison
=
name
.
compareTo
(
otherName
);
if
(
comparison
!=
0
)
{
return
comparison
;
}
else
{
String
id
=
(
String
)
getItemProperty
(
"id"
).
getValue
();
String
otherId
=
(
String
)
other
.
getItemProperty
(
"id"
).
getValue
();
return
id
.
compareTo
(
otherId
);
}
}
}
}
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/management/deployment/DeploymentPage.java
0 → 100644
浏览文件 @
e2dd6b07
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.explorer.ui.management.deployment
;
import
org.activiti.explorer.data.LazyLoadingContainer
;
import
org.activiti.explorer.data.LazyLoadingQuery
;
import
org.activiti.explorer.ui.management.ManagementPage
;
import
org.activiti.explorer.ui.task.TaskDetailPanel
;
import
com.vaadin.data.Item
;
import
com.vaadin.data.Property
;
import
com.vaadin.data.Property.ValueChangeEvent
;
import
com.vaadin.ui.Table
;
/**
* @author Joram Barrez
*/
public
class
DeploymentPage
extends
ManagementPage
{
private
static
final
long
serialVersionUID
=
1L
;
protected
Table
deploymentTable
;
public
DeploymentPage
()
{
addDeploymentList
();
}
protected
void
addDeploymentList
()
{
this
.
deploymentTable
=
new
Table
();
mainSplitPanel
.
setFirstComponent
(
deploymentTable
);
// Set non-editable, selectable and full-size
deploymentTable
.
setEditable
(
false
);
deploymentTable
.
setImmediate
(
true
);
deploymentTable
.
setSelectable
(
true
);
deploymentTable
.
setNullSelectionAllowed
(
false
);
deploymentTable
.
setSizeFull
();
LazyLoadingQuery
deploymentListQuery
=
new
DeploymentListQuery
();
LazyLoadingContainer
deploymentListContainer
=
new
LazyLoadingContainer
(
deploymentListQuery
,
10
);
deploymentTable
.
setContainerDataSource
(
deploymentListContainer
);
// Listener to change right panel when clicked on a task
deploymentTable
.
addListener
(
new
Property
.
ValueChangeListener
()
{
private
static
final
long
serialVersionUID
=
8811553575319455854L
;
public
void
valueChange
(
ValueChangeEvent
event
)
{
Item
item
=
deploymentTable
.
getItem
(
event
.
getProperty
().
getValue
());
// the value of the property is the itemId of the table entry
String
deploymentId
=
(
String
)
item
.
getItemProperty
(
"id"
).
getValue
();
mainSplitPanel
.
setSecondComponent
(
new
DeploymentDetailPanel
(
deploymentId
));
}
});
// Create column headers
deploymentTable
.
addContainerProperty
(
"name"
,
String
.
class
,
null
);
deploymentTable
.
setColumnHeaderMode
(
Table
.
COLUMN_HEADER_MODE_HIDDEN
);
}
}
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/task/TaskDetailPanel.java
浏览文件 @
e2dd6b07
...
...
@@ -47,7 +47,6 @@ public class TaskDetailPanel extends HorizontalLayout {
protected
Panel
rightPanel
;
public
TaskDetailPanel
(
String
taskId
)
{
super
();
setSizeFull
();
addStyleName
(
Reindeer
.
LAYOUT_WHITE
);
...
...
@@ -96,13 +95,6 @@ public class TaskDetailPanel extends HorizontalLayout {
}
protected
void
initTimeDetails
()
{
// Label detailsHeader = new Label("Details");
// detailsHeader.addStyleName(Reindeer.LABEL_H2);
// addComponent(detailsHeader);
// Label horizontalLine = new Label("<hr />", Label.CONTENT_XHTML);
// horizontalLine.addStyleName(Constants.STYLE_HORIZONTAL_SEPARATOR);
// addComponent(horizontalLine);
HorizontalLayout
timeDetailsLayout
=
new
HorizontalLayout
();
timeDetailsLayout
.
setSpacing
(
true
);
timeDetailsLayout
.
setSizeUndefined
();
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/task/TaskListQuery.java
浏览文件 @
e2dd6b07
...
...
@@ -47,20 +47,13 @@ public class TaskListQuery extends AbstractLazyLoadingQuery {
List
<
Task
>
tasks
=
createBaseQuery
().
listPage
(
start
,
count
);
List
<
Item
>
items
=
new
ArrayList
<
Item
>();
for
(
Task
task
:
tasks
)
{
items
.
add
(
create
TaskListItem
(
task
));
items
.
add
(
new
TaskListItem
(
task
));
}
return
items
;
}
public
Item
loadSingleResult
(
String
id
)
{
return
createTaskListItem
(
createBaseQuery
().
taskId
(
id
).
singleResult
());
}
protected
TaskListItem
createTaskListItem
(
Task
task
)
{
TaskListItem
taskListItem
=
new
TaskListItem
();
taskListItem
.
addItemProperty
(
"id"
,
new
ObjectProperty
<
String
>(
task
.
getId
()));
taskListItem
.
addItemProperty
(
"name"
,
new
ObjectProperty
<
String
>(
task
.
getName
()));
return
taskListItem
;
return
new
TaskListItem
(
createBaseQuery
().
taskId
(
id
).
singleResult
());
}
protected
TaskQuery
createBaseQuery
()
{
...
...
@@ -75,6 +68,11 @@ public class TaskListQuery extends AbstractLazyLoadingQuery {
class
TaskListItem
extends
PropertysetItem
implements
Comparable
<
TaskListItem
>{
private
static
final
long
serialVersionUID
=
1L
;
public
TaskListItem
(
Task
task
)
{
addItemProperty
(
"id"
,
new
ObjectProperty
<
String
>(
task
.
getId
()));
addItemProperty
(
"name"
,
new
ObjectProperty
<
String
>(
task
.
getName
()));
}
public
int
compareTo
(
TaskListItem
other
)
{
String
taskId
=
(
String
)
getItemProperty
(
"id"
).
getValue
();
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/task/TaskMenuBar.java
浏览文件 @
e2dd6b07
...
...
@@ -13,9 +13,16 @@
package
org.activiti.explorer.ui.task
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.TaskService
;
import
org.activiti.explorer.Constants
;
import
org.activiti.explorer.ExplorerApplication
;
import
org.activiti.explorer.ui.MenuBar
;
import
com.vaadin.ui.Button
;
import
com.vaadin.ui.Button.ClickEvent
;
import
com.vaadin.ui.Button.ClickListener
;
/**
...
...
@@ -24,18 +31,22 @@ import org.activiti.explorer.ui.MenuBar;
public
class
TaskMenuBar
extends
MenuBar
{
private
static
final
long
serialVersionUID
=
7957488256766569264L
;
protected
TaskService
taskService
;
public
TaskMenuBar
()
{
super
();
this
.
taskService
=
ProcessEngines
.
getDefaultProcessEngine
().
getTaskService
();
addStyleName
(
Constants
.
STYLE_MENUBAR
);
createMenuBarButton
(
"Inbox (12)"
);
createMenuBarButton
(
"Todo (4)"
);
createMenuBarButton
(
"Planned (9)"
);
createMenuBarButton
(
"Queued (58)"
);
createMenuBarButton
(
"Delegated (2)"
);
createMenuBarButton
(
"Archived"
);
Button
inboxButton
=
createMenuBarButton
(
"Inbox"
);
inboxButton
.
addListener
(
new
ClickListener
()
{
public
void
buttonClick
(
ClickEvent
event
)
{
ExplorerApplication
.
getCurrent
().
switchView
(
new
TaskInboxPage
());
}
});
fillRemainingSpace
();
}
}
modules/activiti-webapp-explorer2/src/main/webapp/VAADIN/themes/activiti/img/process_48.png
0 → 100644
浏览文件 @
e2dd6b07
3.9 KB
modules/activiti-webapp-explorer2/src/main/webapp/VAADIN/themes/activiti/img/resource.png
0 → 100644
浏览文件 @
e2dd6b07
3.5 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录