diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/MeterGaugeDisplaySetting.java b/Kieker.WebGUI/src/main/java/kieker/webgui/MeterGaugeDisplaySetting.java deleted file mode 100644 index d108be681424baf44e1fb854a241bbc598ae1f39..0000000000000000000000000000000000000000 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/MeterGaugeDisplaySetting.java +++ /dev/null @@ -1,17 +0,0 @@ -package kieker.webgui; - -import kieker.webgui.common.IDisplaySetting; - -public class MeterGaugeDisplaySetting implements IDisplaySetting { - - private volatile String selectedDiagram; - - public String getSelectedDiagram() { - return this.selectedDiagram; - } - - public void setSelectedDiagram(final String selectedDiagram) { - this.selectedDiagram = selectedDiagram; - } - -} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/MeterGaugeDisplaySetting.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/MeterGaugeDisplaySetting.java new file mode 100644 index 0000000000000000000000000000000000000000..adc33a100f02d01541a9f83d239fef7b02c69a35 --- /dev/null +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/MeterGaugeDisplaySetting.java @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright 2013 Kieker Project (http://kieker-monitoring.net) + * + * 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.common; + +/** + * @author Nils Christian Ehmke + */ +public class MeterGaugeDisplaySetting implements IDisplaySetting { + + private volatile String selectedDiagram; + + public MeterGaugeDisplaySetting() { + // No code necessary + } + + public String getSelectedDiagram() { + return this.selectedDiagram; + } + + public void setSelectedDiagram(final String selectedDiagram) { + this.selectedDiagram = selectedDiagram; + } + +} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java index a56ae0f8751964f3e029fae2381d4034a9647a7d..6d0c4589d415f7eeb1ee3bff24d23376a4d62b52 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CockpitBean.java @@ -48,8 +48,8 @@ import kieker.analysis.model.analysisMetaModel.MIView; import kieker.common.logging.Log; import kieker.common.logging.LogFactory; import kieker.monitoring.core.registry.Registry; -import kieker.webgui.MeterGaugeDisplaySetting; import kieker.webgui.common.IDisplaySetting; +import kieker.webgui.common.MeterGaugeDisplaySetting; import kieker.webgui.common.XYPlotDisplaySetting; import kieker.webgui.common.exception.DisplayNotFoundException; import kieker.webgui.common.exception.InvalidAnalysisStateException; @@ -67,6 +67,7 @@ import org.primefaces.component.chart.pie.PieChart; import org.primefaces.component.commandbutton.CommandButton; import org.primefaces.component.dashboard.Dashboard; import org.primefaces.component.panel.Panel; +import org.primefaces.component.selectbooleancheckbox.SelectBooleanCheckbox; import org.primefaces.component.selectcheckboxmenu.SelectCheckboxMenu; import org.primefaces.component.selectonelistbox.SelectOneListbox; import org.primefaces.component.separator.Separator; @@ -870,6 +871,8 @@ public final class CockpitBean { this.displaySettings.put(displayConnector, setting); } + lineChart.setFill(((XYPlotDisplaySetting) this.displaySettings.get(displayConnector)).isFilled()); + lineChart.setLegendCols((int) (Math.ceil(keys.size() / 10.0))); linearModel.clear(); @@ -964,8 +967,16 @@ public final class CockpitBean { selectManyCheckbox.getChildren().add(item); } + final SelectBooleanCheckbox checkBoxFilled = (SelectBooleanCheckbox) application.createComponent(facesContext, + "org.primefaces.component.SelectBooleanCheckbox", "org.primefaces.component.SelectBooleanCheckboxRenderer"); + final HtmlOutputText outputText = new HtmlOutputText(); + outputText.setValue("Filled"); + checkBoxFilled.setValueExpression("value", CockpitBean.createValueExpression("#{cockpitBean.xyplotFilled}", Boolean.class)); + this.displaySettingsDialog.getChildren().clear(); this.displaySettingsDialog.getChildren().add(selectManyCheckbox); + this.displaySettingsDialog.getChildren().add(outputText); + this.displaySettingsDialog.getChildren().add(checkBoxFilled); this.addButtonBoxToSettingsDialog(); } catch (final Exception ex) { // NOCS NOPMD (Temporary catch) @@ -987,6 +998,14 @@ public final class CockpitBean { ((MeterGaugeDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).setSelectedDiagram(meterGaugeSelection); } + public boolean getXyplotFilled() { + return ((XYPlotDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).isFilled(); + } + + public void setXyplotFilled(final boolean xyplotFilled) { + ((XYPlotDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).setFilled(xyplotFilled); + } + public List<String> getXyplotSelection() { return ((XYPlotDisplaySetting) this.displaySettings.get(this.selectedDisplayConnector)).getSelectedLines(); }