Skip to content
Snippets Groups Projects
Commit c509cfea authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Implemented resizing of workspace.

parent 63632d1c
No related branches found
No related tags found
No related merge requests found
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* 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 kieker.webgui.beans.request;
import javax.faces.bean.ManagedBean;
......
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* 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 kieker.webgui.beans.session;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
/**
*
* @author Nils Christian Ehmke
*/
@ManagedBean
@SessionScoped
public class CurrentWorkspaceSizeBean {
private int sizeX;
private int sizeY;
public CurrentWorkspaceSizeBean() {
this.sizeX = 1000;
this.sizeY = 1000;
}
public int getSizeX() {
return sizeX;
}
public void setSizeX(int sizeX) {
this.sizeX = sizeX;
}
public int getSizeY() {
return sizeY;
}
public void setSizeY(int sizeY) {
this.sizeY = sizeY;
}
}
......@@ -11,9 +11,19 @@
<h:head>
<title>Kieker.WebGUI - Analysis</title>
<link rel="stylesheet" type="text/css" href="../handleAnalysis.css" />
<script type="text/javascript" src="../js-graph-it.js"/>
<link rel="stylesheet" type="text/css" href="../js-graph-it.css"/>
<style>
.block {
position: absolute;
}
.connector {
background-color: #FF9900;
}
</style>
</h:head>
<h:body>
<h:body onload="initPageObjects();">
<p:layout fullPage="true">
<p:layoutUnit header="Navigation" position="north" collapsible="true" resizable="true">
......@@ -37,13 +47,16 @@
<p:layoutUnit position="center" >
<h:form id="centerForm">
<ui:repeat id="centerRepeat" value="#{selectedProjectBean.selectedProject.plugins}" var="plugin">
<p:panel header="#{plugin.name}" toggleSpeed="200" toggleable="true" id="plugin" style="width: 20%">
<p:commandLink ajax="true" value="Show Data"/>
</p:panel>
<p:draggable for="plugin">
</p:draggable>
</ui:repeat>
<div class="canvas" id="mainCanvas" style="width: auto; height: 500px">
<c:forEach items="#{selectedProjectBean.selectedProject.plugins}" var="plugin">
<div class="ui-panel ui-widget ui-widget-content ui-corner-all block draggable" id="#{stringToIDBean.stringToID(plugin)}">
<div class="ui-panel-titlebar ui-widget-header ui-corner-all">
<h:outputText style="font-weight: bold" value="#{plugin.name}"/>
</div>
<p:commandLink ajax="true" value="Show Data"/>
</div>
</c:forEach>
</div>
</h:form>
</p:layoutUnit>
......
......@@ -11,8 +11,8 @@
<h:head>
<title>Kieker.WebGUI</title>
<link rel="stylesheet" type="text/css" href="../main.css" />
<script type="text/javascript" src="../main/js-graph-it.js"/>
<link rel="stylesheet" type="text/css" href="../main/js-graph-it.css"/>
<script type="text/javascript" src="../js-graph-it.js"/>
<link rel="stylesheet" type="text/css" href="../js-graph-it.css"/>
<style>
.block {
position: absolute;
......@@ -115,13 +115,13 @@
<!-- ******************************************************************************** -->
<!-- The following layout unit is within the center and used for the graph. -->
<p:layoutUnit position="center" id="centerLayout">
<h:form id="centerForm">
<div class="canvas" id="mainCanvas" style="width: auto; height: 500px">
<h:form id="centerForm" style="height: 100%">
<div class="canvas" id="mainCanvas" style="width : #{currentWorkspaceSizeBean.sizeX}px;height: #{currentWorkspaceSizeBean.sizeY}px">
<c:forEach items="#{selectedMainProjectBean.mainProject.plugins}" var="plugin">
<div class="ui-panel ui-widget ui-widget-content ui-corner-all block draggable" id="#{stringToIDBean.stringToID(plugin)}">
<div class="ui-panel-titlebar ui-widget-header ui-corner-all">
<h:outputText style="font-weight: bold" value="#{plugin.getName()}"/>
</div>
<div class="ui-panel ui-widget ui-widget-content ui-corner-all block draggable" id="#{stringToIDBean.stringToID(plugin)}">
<div class="ui-panel-titlebar ui-widget-header ui-corner-all">
<h:outputText style="font-weight: bold" value="#{plugin.getName()}"/>
</div>
<p:commandLink ajax="true" value="Configure" action="#{selectedPluginBean.setPlugin(plugin)}" update=":propertiesForm"/>
<br/>
<p:commandLink ajax="true" value="Connect" update=":connectionDialogForm" onclick="connectionDialog.show();"/>
......
......@@ -10,13 +10,20 @@
<p:dialog id="settingsDialog" header="Settings" resizable="false"
modal="true" widgetVar="settingsDialog">
<h:form>
<h:panelGrid columns="2" cellpadding="10">
<h:panelGrid columns="4" cellpadding="10">
<h:outputText value="Look and Feel:" />
<p:themeSwitcher value="#{currentThemeBean.theme}"
style="width:150px" effect="fade">
<f:selectItem itemLabel="Choose Theme" itemValue="" />
<f:selectItems value="#{themeSwitcherBean.themes}" />
</p:themeSwitcher>
<h:outputText value=""/>
<h:outputText value=""/>
<h:outputText value="Graph Workspace Size:"/>
<p:spinner value="#{currentWorkspaceSizeBean.sizeX}" suffix=" px"/>
<h:outputText value=" x "/>
<p:spinner value="#{currentWorkspaceSizeBean.sizeY}" suffix=" px"/>
</h:panelGrid>
<hr/>
<div style="text-align: right">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment