restorable="true">
</view>
<view category="oic.simulator.clientcontroller.category"
- class="oic.simulator.clientcontroller.view.MultiResourceOrchestrationView"
- icon="icons/oic_logo_16x16.png"
- id="oic.simulator.clientcontroller.view.orchestration"
- name="Multi-Resource Automation"
- restorable="true">
- </view>
- <view category="oic.simulator.clientcontroller.category"
class="oic.simulator.clientcontroller.view.LogView"
icon="icons/oic_logo_16x16.png"
id="oic.simulator.clientcontroller.view.log"
id="oic.simulator.clientcontroller.view.attribute">
</viewShortcut>
<viewShortcut
- id="oic.simulator.clientcontroller.view.orchestration">
- </viewShortcut>
- <viewShortcut
id="oic.simulator.clientcontroller.view.log">
</viewShortcut>
</perspectiveExtension>
package oic.simulator.clientcontroller.manager;
+import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
public List<String> getAllValues(DoubleProperty dblProperty,
AttributeProperty.Type type) {
+ NumberFormat formatter = NumberFormat.getInstance();
List<String> values = new ArrayList<String>();
if (dblProperty.hasRange()) {
double min = (double) dblProperty.min();
double max = (double) dblProperty.max();
- for (double iVal = min; iVal <= max; iVal = iVal + 1) {
- values.add(String.valueOf(iVal));
+ for (double val = min; val <= max; val += 0.1) {
+ formatter.setMaximumFractionDigits(1);
+ formatter.setMinimumFractionDigits(1);
+ values.add(formatter.format(val));
}
} else if (dblProperty.hasValues()) {
for (Double val : dblProperty.getValues()) {
import oic.simulator.clientcontroller.view.AttributeView;
import oic.simulator.clientcontroller.view.LogView;
import oic.simulator.clientcontroller.view.MetaPropertiesView;
-import oic.simulator.clientcontroller.view.MultiResourceOrchestrationView;
import oic.simulator.clientcontroller.view.ResourceManagerView;
/**
}
private void addViews() {
- factory.addView(ResourceManagerView.VIEW_ID, IPageLayout.LEFT, 0.3f,
+ factory.addView(ResourceManagerView.VIEW_ID, IPageLayout.LEFT, 0.28f,
factory.getEditorArea());
- factory.addView(MetaPropertiesView.VIEW_ID, IPageLayout.BOTTOM, 0.65f,
- ResourceManagerView.VIEW_ID);
factory.addView(AttributeView.VIEW_ID, IPageLayout.LEFT, 0.7f,
factory.getEditorArea());
factory.addView(LogView.VIEW_ID, IPageLayout.BOTTOM, 0.65f,
AttributeView.VIEW_ID);
- factory.addView(MultiResourceOrchestrationView.VIEW_ID,
- IPageLayout.RIGHT, 0.6f, AttributeView.VIEW_ID);
+ factory.addView(MetaPropertiesView.VIEW_ID, IPageLayout.RIGHT, 0.6f,
+ AttributeView.VIEW_ID);
}
}
+++ /dev/null
-/*
- * Copyright 2015 Samsung Electronics All Rights Reserved.
- *
- * 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 oic.simulator.clientcontroller.view;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * This class manages and shows the multi-resource automation view in the
- * perspective.
- */
-public class MultiResourceOrchestrationView extends ViewPart {
-
- public static final String VIEW_ID = "oic.simulator.clientcontroller.view.orchestration";
-
- @Override
- public void createPartControl(Composite arg0) {
- }
-
- @Override
- public void setFocus() {
- }
-
-}
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.widgets.Display;
+import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
public List<String> getAllValues(DoubleProperty dblProperty,
AttributeProperty.Type type) {
+ NumberFormat formatter = NumberFormat.getInstance();
List<String> values = new ArrayList<String>();
if (dblProperty.hasRange()) {
double min = (double) dblProperty.min();
double max = (double) dblProperty.max();
- for (double iVal = min; iVal <= max; iVal = iVal + 1) {
- values.add(String.valueOf(iVal));
+ for (double val = min; val <= max; val += 0.1) {
+ formatter.setMaximumFractionDigits(1);
+ formatter.setMinimumFractionDigits(1);
+ values.add(formatter.format(val));
}
} else if (dblProperty.hasValues()) {
for (Double val : dblProperty.getValues()) {