本文整理汇总了Java中org.primefaces.model.DashboardColumn类的典型用法代码示例。如果您正苦于以下问题:Java DashboardColumn类的具体用法?Java DashboardColumn怎么用?Java DashboardColumn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DashboardColumn类属于org.primefaces.model包,在下文中一共展示了DashboardColumn类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1:
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
@PostConstruct
/* */ public void init()
/* */ {
/* 41 */ this.model = new DefaultDashboardModel();
/* 42 */ DashboardColumn column1 = new DefaultDashboardColumn();
/* 43 */ DashboardColumn column2 = new DefaultDashboardColumn();
/* 44 */ DashboardColumn column3 = new DefaultDashboardColumn();
/* */
/* 46 */ column1.addWidget("sports");
/* 47 */ column1.addWidget("finance");
/* */
/* 49 */ column2.addWidget("lifestyle");
/* 50 */ column2.addWidget("weather");
/* */
/* 52 */ column3.addWidget("politics");
/* */
/* 54 */ this.model.addColumn(column1);
/* 55 */ this.model.addColumn(column2);
/* 56 */ this.model.addColumn(column3);
/* */ }
开发者ID:marlonalexis,项目名称:Multicentro_Mascotas,代码行数:21,代码来源:DashboardView.java
示例2: saveLayout
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void saveLayout() {
List<OverviewLayoutElementVO> elements = new ArrayList<>();
for (int colNum = 0; colNum < dashboardModel.getColumnCount(); ++colNum) {
DashboardColumn col = dashboardModel.getColumn(colNum);
for (int rowNum = 0; rowNum < col.getWidgetCount(); ++rowNum) {
IndexWidget widget = widgets.get(col.getWidget(rowNum));
OverviewLayoutElementVO newElement = new OverviewLayoutElementVO();
newElement.setId(widget.getId());
newElement.setType(OverviewLayoutElementType.valueOf(widget.getType()));
newElement.setSensor(widget.getSensor());
newElement.setActor(widget.getActor());
newElement.setColumn(colNum);
newElement.setRow(rowNum);
elements.add(newElement);
}
}
selectedLayout.setElements(elements);
layoutContainer.updateLayout(selectedLayout);
setLayouts(layoutContainer.getLayouts());
}
开发者ID:daergoth,项目名称:hiots,代码行数:22,代码来源:IndexManager.java
示例3: DashboardView
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public DashboardView(){
// Initialize the dashboard model
this.model = new DefaultDashboardModel();
DashboardColumn mainColumn = new DefaultDashboardColumn();
mainColumn.addWidget("Routed");
mainColumn.addWidget("NotRouted");
mainColumn.addWidget("Claimed");
this.model.addColumn(mainColumn);
}
开发者ID:m-reza-rahman,项目名称:pragmatic-microservices-lab,代码行数:13,代码来源:DashboardView.java
示例4: initWidgets
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
private void initWidgets() {
for (String widgetId : widgets.keySet()) {
WidgetComponent component = widgets.get(widgetId);
Object uiComponent = component.createComponent(widgetId);
Panel panel = (Panel) JSFHelper.createComponent(Panel.COMPONENT_TYPE);
panel.setId(widgetId);
panel.setHeader(component.getTitle());
panel.setClosable(false);
panel.setToggleable(false);
panel.setStyle("width: 400px; height: 330px;");
panel.getChildren().add((UIComponent) uiComponent);
this.dashboard.getChildren().add(panel);
Widget widget = component.getWidget();
DashboardColumn column = model.getColumn(widget.getColumnIndex());
column.addWidget(widget.getColumnPosition(), widgetId);
this.widgets.put(widgetId, component);
logger.debug("Added a new widget '" + widgetId + "' to the dashboard");
}
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:25,代码来源:RuntimeController.java
示例5: init
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
@PostConstruct
public void init() {
dashboard = new Dashboard();
model = new DefaultDashboardModel();
DashboardColumn column1 = new DefaultDashboardColumn();
DashboardColumn column2 = new DefaultDashboardColumn();
DashboardColumn column3 = new DefaultDashboardColumn();
column1.addWidget("sports");
column1.addWidget("finance");
column2.addWidget("lifestyle");
column2.addWidget("weather");
column3.addWidget("politics");
model.addColumn(column1);
model.addColumn(column2);
model.addColumn(column3);
dashboard.setModel(model);
createPanels();
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:27,代码来源:SampleDashboardController.java
示例6: initWidgets
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void initWidgets() {
for (String widgetId : widgets.keySet()) {
WidgetComponent component = widgets.get(widgetId);
Object uiComponent = component.createComponent(widgetId);
Panel panel = (Panel) JSFHelper.createComponent(Panel.COMPONENT_TYPE);
panel.setId(widgetId);
panel.setHeader(component.getTitle());
panel.setClosable(false);
panel.setToggleable(false);
panel.setStyle("width: 400px; height: 330px;");
panel.getChildren().add((UIComponent) uiComponent);
this.dashboard.getChildren().add(panel);
Widget widget = component.getWidget();
DashboardColumn column = model.getColumn(widget.getColumnIndex());
column.addWidget(widget.getColumnPosition(), widgetId);
this.widgets.put(widgetId, component);
logger.debug("Added a new widget '" + widgetId + "' to the dashboard");
}
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:25,代码来源:PreviewController.java
示例7: DashboardBean
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public DashboardBean() {
model = new DefaultDashboardModel();
DashboardColumn column1 = new DefaultDashboardColumn();
DashboardColumn column2 = new DefaultDashboardColumn();
DashboardColumn column3 = new DefaultDashboardColumn();
column1.addWidget("sports");
column1.addWidget("finance");
column2.addWidget("lifestyle");
column2.addWidget("weather");
column3.addWidget("politics");
model.addColumn(column1);
model.addColumn(column2);
model.addColumn(column3);
}
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:19,代码来源:DashboardBean.java
示例8: init
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
@PostConstruct
private void init() {
model = new DefaultDashboardModel();
DashboardColumn column1 = new DefaultDashboardColumn();
DashboardColumn column2 = new DefaultDashboardColumn();
column1.addWidget("announcements");
column2.addWidget("studentsAnnouncements");
column1.addWidget("results");
column2.addWidget("registrationChart");
model.addColumn(column1);
model.addColumn(column2);
}
开发者ID:diokey,项目名称:ums,代码行数:17,代码来源:DashBordBean.java
示例9: getDashboardColumn
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
private DashboardColumn getDashboardColumn(String widgetId) {
for (DashboardColumn column : model.getColumns()) {
for (String id : column.getWidgets()) {
if (id.equals(widgetId)) {
return column;
}
}
}
return null;
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:11,代码来源:IDEController.java
示例10: getDashboardColumnPosition
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
private int getDashboardColumnPosition(int columnIndex, String widgetId) {
DashboardColumn column = model.getColumn(columnIndex);
for (int i = 0; i < column.getWidgetCount(); i++) {
if (column.getWidget(i).equals(widgetId)) {
return i;
}
}
return -1;
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:10,代码来源:IDEController.java
示例11: moveWidgetToUp
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void moveWidgetToUp(String widgetId) {
DashboardColumn column = getDashboardColumn(widgetId);
int index = 0;
for (int i = 0; i < column.getWidgetCount(); i++) {
if (column.getWidget(i).equals(widgetId)) {
index = i;
break;
}
}
if (index != 0) {
column.reorderWidget(--index, widgetId);
logger.debug("Widget '" + widgetId + "' moved to up at column in the dashboard");
}
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:15,代码来源:IDEController.java
示例12: moveWidgetToDown
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void moveWidgetToDown(String widgetId) {
DashboardColumn column = getDashboardColumn(widgetId);
int index = 0;
for (int i = 0; i < column.getWidgetCount(); i++) {
if (column.getWidget(i).equals(widgetId)) {
index = i;
break;
}
}
if ((index + 1) != column.getWidgetCount()) {
column.reorderWidget(++index, widgetId);
logger.debug("Widget '" + widgetId + "' moved to down at column in the dashboard");
}
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:15,代码来源:IDEController.java
示例13: moveWidgetToLeft
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void moveWidgetToLeft(String widgetId) {
DashboardColumn column = getDashboardColumn(widgetId);
int index = model.getColumns().indexOf(column);
if (index != 0) {
DashboardColumn target = model.getColumn(--index);
model.transferWidget(column, target, widgetId, 0);
logger.debug("Widget '" + widgetId + "' moved to left columns at dashboard");
}
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:10,代码来源:IDEController.java
示例14: moveWidgetToRight
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void moveWidgetToRight(String widgetId) {
DashboardColumn column = getDashboardColumn(widgetId);
int index = model.getColumns().indexOf(column);
if (index < 2) {
DashboardColumn target = model.getColumn(++index);
model.transferWidget(column, target, widgetId, 0);
logger.debug("Widget '" + widgetId + "' moved to right columns at dashboard");
}
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:10,代码来源:IDEController.java
示例15: populatePrintJobList
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void populatePrintJobList(){
System.out.println("Populating List ");
if(customer.getEmail().equals("[email protected]")){
jobList = ds.getJobsBySubmittedStatus();
}else{
jobList = ds.getJobsByCustomerId(customer);
}
System.out.println(jobList);
model = new DefaultDashboardModel();
if(jobList != null && !jobList.isEmpty()){
for(int i=0;i<jobList.size();i++) {
DashboardColumn column = new DefaultDashboardColumn();
for(int j=0;j<4;j++) {
if(i < jobList.size()) {
column.addWidget(jobList.get(i).getJobRefId());
i++;
}
}
model.addColumn(column);
}
}
}
开发者ID:sudheerj,项目名称:primefaces-blueprints,代码行数:28,代码来源:DashboardController.java
示例16: addWidget
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void addWidget(WidgetComponent component) {
String widgetId = component.getWidgetId();
if (widgetId == null) {
widgetId = "widget" + widgetCount;
logger.debug("Generated a new widgetId: " + widgetId);
}
Object uiComponent = component.createComponent(widgetId);
Panel panel = (Panel) JSFHelper.createComponent(Panel.COMPONENT_TYPE);
panel.setId(widgetId);
panel.setHeader(component.getTitle());
panel.setClosable(false);
panel.setToggleable(false);
HtmlPanelGroup group = (HtmlPanelGroup) JSFHelper.createComponent(HtmlPanelGroup.COMPONENT_TYPE);
group.getChildren().add(createLink(widgetId, LinkType.RIGHT));
group.getChildren().add(createLink(widgetId, LinkType.UP));
group.getChildren().add(createLink(widgetId, LinkType.DOWN));
group.getChildren().add(createLink(widgetId, LinkType.LEFT));
panel.getFacets().put("actions", group);
Menu menu = createMenu(widgetId, component.getType());
panel.getFacets().put("options", menu);
panel.setStyle("width: 400px; height: 350px;");
panel.getChildren().add((UIComponent) uiComponent);
dashboard.getChildren().add(panel);
Widget widget = component.getWidget();
int columnIndex = widget.getColumnIndex() != null
? widget.getColumnIndex() : 0;
int columnPosition = widget.getColumnPosition() != null
? widget.getColumnPosition() : 0;
DashboardColumn column = model.getColumn(columnIndex);
column.addWidget(columnPosition, panel.getId());
widgets.put(widgetId, component);
widgetCount++;
logger.debug("Added a new widget '" + widgetId + "' to the dashboard");
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:46,代码来源:IDEController.java
示例17: deleteWidget
import org.primefaces.model.DashboardColumn; //导入依赖的package包/类
public void deleteWidget(String widgetId) {
DashboardColumn column = getDashboardColumn(widgetId);
column.removeWidget(widgetId);
widgets.remove(widgetId);
logger.debug("Widget '" + widgetId + "' deleted from the dashboard");
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:7,代码来源:IDEController.java
注:本文中的org.primefaces.model.DashboardColumn类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论