public code v1
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>flintstones.group</groupId>
|
||||
<artifactId>flintstones.bundles</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>flintstones.method.linguistic.topsis.phase.collective.ui</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<name>[bundle] Collective phase UI</name>
|
||||
<organization>
|
||||
<name>Sinbad2</name>
|
||||
</organization>
|
||||
</project>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>flintstones.method.linguistic.topsis.phase.collective.ui</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1779484362681</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
@@ -0,0 +1,14 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Collective phase UI
|
||||
Bundle-SymbolicName: flintstones.method.linguistic.topsis.phase.collective.ui;singleton:=true
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: Sinbad2
|
||||
Automatic-Module-Name: flintstones.method.linguistic.topsis.phase.collective.ui
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Require-Bundle: flintstones.entity.method.phase.ui,
|
||||
flintstones.method.linguistic.topsis.phase.collective,
|
||||
flintstones.entity.method.phase,
|
||||
org.eclipse.swt,
|
||||
flintstones.model.ui.service,
|
||||
de.kupzog.ktable
|
||||
@@ -0,0 +1,5 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="flintstones.phasemethod.ui">
|
||||
<phasemethod_ui
|
||||
implementation="flintstones.method.linguistic.topsis.phase.collective.ui.CollectiveInfoUI"
|
||||
phasemethod="flintstones.method.linguistic.topsis.phase.collective"
|
||||
uid="flintstones.method.linguistic.topsis.phase.collective.ui">
|
||||
</phasemethod_ui>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Combo;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
|
||||
import flintstones.entity.method.phase.ui.PhaseMethodUI;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.CollectiveClosenessCoefficientTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.CollectiveDistanceNegativeIdealSolutionTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.CollectiveDistancePositiveIdealSolutionTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.CollectiveDistanceSolutionsTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.CollectiveNegativeIdealSolutionTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.CollectivePositiveIdealSolutionTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.DecisionMatrixTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.ExpertWeightsTable;
|
||||
import flintstones.model.ui.service.UiService;
|
||||
|
||||
public class CollectiveInfoUI extends PhaseMethodUI {
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private DecisionMatrixTable decisionMatrixTable;
|
||||
private ExpertWeightsTable weightsTable;
|
||||
private CollectivePositiveIdealSolutionTable positiveIdealSolutionTable;
|
||||
private CollectiveNegativeIdealSolutionTable negativeIdealSolutionTable;
|
||||
private CollectiveDistancePositiveIdealSolutionTable distancePositiveIdealSolutionTable;
|
||||
private CollectiveDistanceNegativeIdealSolutionTable distanceNegativeIdealSolutionTable;
|
||||
private CollectiveDistanceSolutionsTable distanceSolutionsTable;
|
||||
private CollectiveClosenessCoefficientTable closenessCoefficientTable;
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
model = (CollectiveInfo) this.getModel();
|
||||
|
||||
Composite parent = this.getBaseComposite();
|
||||
GridLayout layout = UiService.setGridLayout(parent, 1, true);
|
||||
UiService.setGridData(parent, 9, 9, true, true);
|
||||
layout.horizontalSpacing = 15;
|
||||
layout.verticalSpacing = 15;
|
||||
|
||||
createPartControl(parent);
|
||||
|
||||
model.execute();
|
||||
}
|
||||
|
||||
private void createPartControl(Composite parent) {
|
||||
createWeightedInfoTables(parent);
|
||||
createSolutionsInfoTables(parent);
|
||||
createDistancesSolutionInfo(parent);
|
||||
createGlobalSolutionInfo(parent);
|
||||
//createSolutionDomainCombo(parent);
|
||||
}
|
||||
|
||||
private void createWeightedInfoTables(Composite parent) {
|
||||
Composite tablesComposite = new Composite(parent, SWT.NONE);
|
||||
UiService.setGridLayout(tablesComposite, 2, true);
|
||||
UiService.setGridData(tablesComposite, 9, 9, true, false);
|
||||
|
||||
createExpertWeightsTable(tablesComposite);
|
||||
createWeightedDecisionMatrixTable(tablesComposite);
|
||||
}
|
||||
|
||||
private void createExpertWeightsTable(Composite tablesComposite) {
|
||||
Composite weightsComposite = new Composite(tablesComposite, SWT.NONE);
|
||||
UiService.setGridLayout(weightsComposite, 1, true);
|
||||
UiService.setGridData(weightsComposite, 9, 9, true, false);
|
||||
|
||||
weightsTable = new ExpertWeightsTable(weightsComposite);
|
||||
UiService.setGridData(weightsTable, 9, 9, true, true);
|
||||
weightsTable.setModel(model);
|
||||
|
||||
createDomainWeightsCombo(weightsComposite);
|
||||
}
|
||||
|
||||
private void createDomainWeightsCombo(Composite weightsComposite) {
|
||||
Composite selectUnificationComboComposite = new Composite(weightsComposite, SWT.NONE);
|
||||
UiService.setGridLayout(selectUnificationComboComposite, 2, false);
|
||||
UiService.setGridData(selectUnificationComboComposite, -1, 9, true, true);
|
||||
|
||||
Label label = new Label(selectUnificationComboComposite, SWT.NONE);
|
||||
UiService.setGridData(label, -1, -1, false, true);
|
||||
label.setText("Select the domain for experts' weights:");
|
||||
|
||||
Combo selectUnificationDomainCombo = new Combo(selectUnificationComboComposite, SWT.BORDER);
|
||||
GridData grid = UiService.setGridData(selectUnificationDomainCombo, -1, -1, false, true);
|
||||
grid.verticalIndent = 15;
|
||||
selectUnificationDomainCombo.setItems(model.getLinguisticDomainNames());
|
||||
selectUnificationDomainCombo.select(0);
|
||||
model.setDomainWeights(selectUnificationDomainCombo.getText());
|
||||
|
||||
selectUnificationDomainCombo.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
model.setDomainWeights(selectUnificationDomainCombo.getText());
|
||||
model.execute();
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void createWeightedDecisionMatrixTable(Composite tablesComposite) {
|
||||
Composite decisionMatrixComposite = new Composite(tablesComposite, SWT.NONE);
|
||||
UiService.setGridLayout(decisionMatrixComposite, 1, true);
|
||||
UiService.setGridData(decisionMatrixComposite, 9, 9, true, true);
|
||||
|
||||
decisionMatrixTable = new DecisionMatrixTable(decisionMatrixComposite);
|
||||
UiService.setGridData(decisionMatrixTable, 9, 9, true, true);
|
||||
decisionMatrixTable.setModel(model);
|
||||
weightsTable.setDecisionMatrixTable(decisionMatrixTable);//To update the table when weights change
|
||||
}
|
||||
|
||||
private void createSolutionsInfoTables(Composite parent) {
|
||||
Composite solutionsTablesComposite = new Composite(parent, SWT.NONE);
|
||||
UiService.setGridLayout(solutionsTablesComposite, 2, true);
|
||||
UiService.setGridData(solutionsTablesComposite, 9, 1, true, false);
|
||||
|
||||
createPositiveIdealSolutionTable(solutionsTablesComposite);
|
||||
createNegativeIdealSolutionTable(solutionsTablesComposite);
|
||||
}
|
||||
|
||||
private void createPositiveIdealSolutionTable(Composite solutionsTablesComposite) {
|
||||
positiveIdealSolutionTable = new CollectivePositiveIdealSolutionTable(solutionsTablesComposite);
|
||||
UiService.setGridData(positiveIdealSolutionTable, 9, 9, true, true);
|
||||
positiveIdealSolutionTable.setModel(model);
|
||||
}
|
||||
|
||||
private void createNegativeIdealSolutionTable(Composite solutionsTablesComposite) {
|
||||
negativeIdealSolutionTable = new CollectiveNegativeIdealSolutionTable(solutionsTablesComposite);
|
||||
UiService.setGridData(negativeIdealSolutionTable, 9, 9, true, true);
|
||||
negativeIdealSolutionTable.setModel(model);
|
||||
}
|
||||
|
||||
private void createDistancesSolutionInfo(Composite parent) {
|
||||
Composite distanceSolutionsTablesComposite = new Composite(parent, SWT.NONE);
|
||||
UiService.setGridLayout(distanceSolutionsTablesComposite, 2, true);
|
||||
GridData gd = UiService.setGridData(distanceSolutionsTablesComposite, 9, 9, true, true);
|
||||
gd.heightHint = 25;
|
||||
|
||||
createDistancePositiveIdealSolutionTable(distanceSolutionsTablesComposite);
|
||||
createDistanceNegativeIdealSolutionTable(distanceSolutionsTablesComposite);
|
||||
}
|
||||
|
||||
private void createDistancePositiveIdealSolutionTable(Composite distanceSolutionsTablesComposite) {
|
||||
distancePositiveIdealSolutionTable = new CollectiveDistancePositiveIdealSolutionTable(distanceSolutionsTablesComposite);
|
||||
UiService.setGridData(distancePositiveIdealSolutionTable, 9, 9, true, true);
|
||||
distancePositiveIdealSolutionTable.setModel(model);
|
||||
}
|
||||
|
||||
private void createDistanceNegativeIdealSolutionTable(Composite distanceSolutionsTablesComposite) {
|
||||
distanceNegativeIdealSolutionTable = new CollectiveDistanceNegativeIdealSolutionTable(distanceSolutionsTablesComposite);
|
||||
UiService.setGridData(distanceNegativeIdealSolutionTable, 9, 9, true, true);
|
||||
distanceNegativeIdealSolutionTable.setModel(model);
|
||||
}
|
||||
|
||||
private void createGlobalSolutionInfo(Composite parent) {
|
||||
Composite globalSolutionsComposite = new Composite(parent, SWT.NONE);
|
||||
UiService.setGridLayout(globalSolutionsComposite, 2, true);
|
||||
GridData gd = UiService.setGridData(globalSolutionsComposite, 9, 9, true, true);
|
||||
gd.heightHint = 25;
|
||||
|
||||
createGlobalDistanceSolutionTable(globalSolutionsComposite);
|
||||
createClosenessCoefficientTable(globalSolutionsComposite);
|
||||
}
|
||||
|
||||
private void createGlobalDistanceSolutionTable(Composite globalSolutionsComposite) {
|
||||
distanceSolutionsTable = new CollectiveDistanceSolutionsTable(globalSolutionsComposite);
|
||||
UiService.setGridData(distanceSolutionsTable, 9, 9, true, true);
|
||||
distanceSolutionsTable.setModel(model);
|
||||
}
|
||||
|
||||
private void createClosenessCoefficientTable(Composite globalSolutionsComposite) {
|
||||
closenessCoefficientTable = new CollectiveClosenessCoefficientTable(globalSolutionsComposite);
|
||||
UiService.setGridData(closenessCoefficientTable, 9, 9, true, true);
|
||||
closenessCoefficientTable.setModel(model);
|
||||
}
|
||||
|
||||
/*private void createSolutionDomainCombo(Composite parent) {
|
||||
Composite resultsDomainComposite = new Composite(parent, SWT.BORDER);
|
||||
UiService.setGridLayout(resultsDomainComposite, 1, true);
|
||||
UiService.setGridData(resultsDomainComposite, 1, 1, false, false);
|
||||
|
||||
Combo resultsDomainCombo = new Combo(resultsDomainComposite, SWT.NONE);
|
||||
UiService.setGridData(resultsDomainCombo, -1, -1, false, true);
|
||||
resultsDomainCombo.setItems(model.getLinguisticDomainNames());
|
||||
resultsDomainCombo.select(0);
|
||||
|
||||
resultsDomainCombo.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
model.setClosenessCoefficientsDomain(resultsDomainCombo.getText());
|
||||
closenessCoefficientTable.redraw();
|
||||
}
|
||||
});
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
|
||||
if(model.distanceDomainChanged() || model.valuationDomainChanged())
|
||||
model.execute();
|
||||
|
||||
weightsTable.redraw();
|
||||
decisionMatrixTable.redraw();
|
||||
positiveIdealSolutionTable.redraw();
|
||||
negativeIdealSolutionTable.redraw();
|
||||
distancePositiveIdealSolutionTable.redraw();
|
||||
distanceNegativeIdealSolutionTable.redraw();
|
||||
distanceSolutionsTable.redraw();
|
||||
closenessCoefficientTable.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isForwardEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
|
||||
public class CollectiveAntiIdealSolutionContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
public CollectiveAntiIdealSolutionContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return model.getNumberExperts() + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Negative ideal solution"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = "Valuation";
|
||||
else if (row == 0)
|
||||
content = expertAbbreviation(col);
|
||||
else
|
||||
content = model.getStringNegativeIdealSolutionExpert(col - 1);
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
private Object expertAbbreviation(int pos) {
|
||||
return "E" + pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return 1 + getFixedRowCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
table.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if(col == 0 && row == 0) {
|
||||
return "";
|
||||
} else if (row < getFixedRowCount()) {
|
||||
return model.getExpertName(col - 1);
|
||||
} else {
|
||||
return model.getStringNegativeIdealSolutionExpert(col - 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
|
||||
public class CollectiveClosenessCoefficientContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
public CollectiveClosenessCoefficientContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return 2 + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Closeness coefficient"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = alternativeAbbreviation(row);
|
||||
else if (row == 0)
|
||||
if(col == 1)
|
||||
content = "Coefficient";
|
||||
else if(col == 2)
|
||||
content = "Ranking";
|
||||
else
|
||||
content = "";
|
||||
else {
|
||||
if(col == 1)
|
||||
content = model.getStringCollectiveClosenessCoefficient(row - 1);
|
||||
else if (col == 2)
|
||||
content = model.getStringRankingPositionAlternative(row - 1);
|
||||
else
|
||||
content = "";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
private Object alternativeAbbreviation(int pos) {
|
||||
return "R" + pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return model.getNumberAlternatives() + getFixedRowCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
table.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if ((col == 0) && (row == 0))
|
||||
return ""; //$NON-NLS-1$
|
||||
else if (col < getFixedColumnCount()) {
|
||||
return model.getAlternativeName(row - 1);
|
||||
} else if (row < getFixedRowCount())
|
||||
return "";
|
||||
else
|
||||
return (String) doGetContentAt(col, row);
|
||||
}
|
||||
|
||||
}
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
|
||||
public class CollectiveDistanceIAntiIdealSolutionContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
public CollectiveDistanceIAntiIdealSolutionContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return model.getNumberExperts() + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Dist (-)"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = alternativeAbbreviation(row);
|
||||
else if (row == 0)
|
||||
content = expertAbbreviation(col);
|
||||
else
|
||||
content = model.getStringCollectiveDistanceNegativeIdealSolutionValuation(col - 1, row - 1);
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
private Object expertAbbreviation(int pos) {
|
||||
return "E" + pos;
|
||||
}
|
||||
|
||||
private Object alternativeAbbreviation(int pos) {
|
||||
return "R" + pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return model.getNumberAlternatives() + getFixedRowCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
table.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if ((col == 0) && (row == 0))
|
||||
return ""; //$NON-NLS-1$
|
||||
else if (col < getFixedColumnCount()) {
|
||||
return model.getAlternativeName(row - 1);
|
||||
} else if (row < getFixedRowCount())
|
||||
return model.getExpertName(col - 1);
|
||||
else
|
||||
return (String) doGetContentAt(col, row);
|
||||
}
|
||||
|
||||
}
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
|
||||
public class CollectiveDistanceIdealSolutionContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
public CollectiveDistanceIdealSolutionContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return model.getNumberExperts() + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Dist (+)"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = alternativeAbbreviation(row);
|
||||
else if (row == 0)
|
||||
content = expertAbbreviation(col);
|
||||
else
|
||||
content = model.getStringCollectiveDistancePositiveIdealSolutionValuation(col - 1, row - 1);
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
private Object expertAbbreviation(int pos) {
|
||||
return "E" + pos;
|
||||
}
|
||||
|
||||
private Object alternativeAbbreviation(int pos) {
|
||||
return "R" + pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return model.getNumberAlternatives() + getFixedRowCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
table.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if ((col == 0) && (row == 0))
|
||||
return ""; //$NON-NLS-1$
|
||||
else if (col < getFixedColumnCount()) {
|
||||
return model.getAlternativeName(row - 1);
|
||||
} else if (row < getFixedRowCount())
|
||||
return model.getExpertName(col - 1);
|
||||
else
|
||||
return (String) doGetContentAt(col, row);
|
||||
}
|
||||
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
|
||||
public class CollectiveDistanceSolutionsContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
public CollectiveDistanceSolutionsContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return 2 + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Distances"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = alternativeAbbreviation(row);
|
||||
else if (row == 0)
|
||||
if(col == 1)
|
||||
content = "Dist (+)";
|
||||
else if(col == 2)
|
||||
content = "Dist (-)";
|
||||
else
|
||||
content = "";
|
||||
else {
|
||||
if(col == 1)
|
||||
content = model.getStringCollectiveGlobalDistancePositiveIdealSolutionValuation(row - 1);
|
||||
else if (col == 2)
|
||||
content = model.getStringCollectiveGlobalDistanceNegativeIdealSolutionValuation(row - 1);
|
||||
else
|
||||
content = "";
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
private Object alternativeAbbreviation(int pos) {
|
||||
return "R" + pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return model.getNumberAlternatives() + getFixedRowCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
table.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if ((col == 0) && (row == 0))
|
||||
return ""; //$NON-NLS-1$
|
||||
else if (col < getFixedColumnCount()) {
|
||||
return model.getAlternativeName(row - 1);
|
||||
} else if (row < getFixedRowCount())
|
||||
return "";
|
||||
else
|
||||
return (String) doGetContentAt(col, row);
|
||||
}
|
||||
|
||||
}
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
|
||||
public class CollectiveIdealSolutionContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
public CollectiveIdealSolutionContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return model.getNumberExperts() + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Positive ideal solution"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = "Valuation";
|
||||
else if (row == 0)
|
||||
content = expertAbbreviation(col);
|
||||
else
|
||||
content = model.getStringPositiveIdealSolutionExpert(col - 1);
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
private Object expertAbbreviation(int pos) {
|
||||
return "E" + pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return 1 + getFixedRowCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
table.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if ((col == 0) && (row == 0))
|
||||
return ""; //$NON-NLS-1$
|
||||
else if (col < getFixedColumnCount()) {
|
||||
return "";
|
||||
} else if (row < getFixedRowCount()) {
|
||||
return model.getExpertName(col - 1);
|
||||
} else {
|
||||
return model.getStringPositiveIdealSolutionExpert(col - 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
|
||||
public class DecisionMatrixContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
public DecisionMatrixContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return model.getNumberExperts() + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Decision Matrix"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = alternativeAbbreviation(row);
|
||||
else if (row == 0)
|
||||
content = expertAbbreviation(col);
|
||||
else
|
||||
content = model.getStringDecisionMatrixValuation(col - 1, row - 1);
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
private Object expertAbbreviation(int pos) {
|
||||
return "E" + pos;
|
||||
}
|
||||
|
||||
private Object alternativeAbbreviation(int pos) {
|
||||
return "R" + pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return model.getNumberAlternatives() + getFixedRowCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
table.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if ((col == 0) && (row == 0))
|
||||
return ""; //$NON-NLS-1$
|
||||
else if (col < getFixedColumnCount()) {
|
||||
return "";
|
||||
} else if (row < getFixedRowCount()) {
|
||||
return model.getExpertName(col - 1);
|
||||
} else {
|
||||
return model.getStringNegativeIdealSolutionExpert(col - 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.provider;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.KeyEvent;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.KTableCellEditor;
|
||||
import de.kupzog.ktable.KTableCellRenderer;
|
||||
import de.kupzog.ktable.KTableNoScrollModel;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import de.kupzog.ktable.editors.KTableCellEditorCombo;
|
||||
import de.kupzog.ktable.renderers.DefaultCellRenderer;
|
||||
import de.kupzog.ktable.renderers.FixedCellRenderer;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.table.DecisionMatrixTable;
|
||||
|
||||
public class ExpertWeightsContentProvider extends KTableNoScrollModel {
|
||||
|
||||
private KTable table;
|
||||
private KTable decisionMatrixTable;
|
||||
|
||||
private CollectiveInfo model;
|
||||
|
||||
private final FixedCellRenderer fixedRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | SWT.BOLD);
|
||||
private final FixedCellRenderer editableRenderer = new FixedCellRenderer(DefaultCellRenderer.STYLE_FLAT | DefaultCellRenderer.INDICATION_FOCUS);
|
||||
|
||||
|
||||
private class TableCellEditorCombo extends KTableCellEditorCombo {
|
||||
@Override
|
||||
protected void onKeyPressed(KeyEvent e) {
|
||||
if(e.keyCode == 13)
|
||||
this.close(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getActivationSignals() {
|
||||
return SINGLECLICK;
|
||||
}
|
||||
}
|
||||
|
||||
private TableCellEditorCombo combo;
|
||||
|
||||
public ExpertWeightsContentProvider(KTable table) {
|
||||
super(table);
|
||||
}
|
||||
|
||||
public void init(KTable table, CollectiveInfo model) {
|
||||
this.table = table;
|
||||
this.model = model;
|
||||
|
||||
initialize();
|
||||
setDesign();
|
||||
}
|
||||
|
||||
private void setDesign() {
|
||||
fixedRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
fixedRenderer.setBackground(new Color(Display.getCurrent(), 255, 165, 0));
|
||||
|
||||
editableRenderer.setAlignment(SWTX.ALIGN_HORIZONTAL_CENTER | SWTX.ALIGN_VERTICAL_CENTER);
|
||||
editableRenderer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
|
||||
public void setDecisionMatrixTable(DecisionMatrixTable decisionMatrixTable) {
|
||||
this.decisionMatrixTable = decisionMatrixTable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedHeaderRowCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableColumnCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFixedSelectableRowCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowHeightMinimum() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isColumnResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowResizable(int arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellEditor doGetCellEditor(int col, int row) {
|
||||
|
||||
if (col != 0 && row != 0) {
|
||||
combo = new TableCellEditorCombo();
|
||||
combo.setItems(model.getLinguisticLabelsNameDomain());
|
||||
return combo;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KTableCellRenderer doGetCellRenderer(int col, int row) {
|
||||
if((col < getFixedColumnCount()) || (row < getFixedRowCount()))
|
||||
return fixedRenderer;
|
||||
else
|
||||
return editableRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetColumnCount() {
|
||||
return model.getNumberExperts() + getFixedColumnCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object doGetContentAt(int col, int row) {
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
return "Weights"; //$NON-NLS-1$
|
||||
|
||||
Object content;
|
||||
|
||||
try {
|
||||
if (col == 0)
|
||||
content = "Weight";
|
||||
else if (row == 0)
|
||||
content = expertAbbreviation(col - 1);
|
||||
else
|
||||
content = model.getStringExpertWeight(col - 1);
|
||||
} catch (Exception e) {
|
||||
content = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
private Object expertAbbreviation(int pos) {
|
||||
return "E" + (pos + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int doGetRowCount() {
|
||||
return getFixedRowCount() + 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSetContentAt(int col, int row, Object value) {
|
||||
model.setExpertWeight(col - 1, (String) value);
|
||||
model.execute();
|
||||
table.redraw();
|
||||
decisionMatrixTable.redraw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialColumnWidth(int arg0) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialRowHeight(int arg0) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFixedCell(int col, int row) {
|
||||
if (col == 0)
|
||||
return true;
|
||||
else if (row == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHeaderCell(int col, int row) {
|
||||
return isFixedCell(col, row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doGetTooltipAt(int col, int row) {
|
||||
if ((col == 0) && (row == 0))
|
||||
return ""; //$NON-NLS-1$
|
||||
else if (col < getFixedColumnCount()) {
|
||||
return "";
|
||||
} else if (row < getFixedRowCount())
|
||||
return model.getExpertName(col - 1);
|
||||
else
|
||||
return model.getExpertName(col - 1) + " / " + model.getStringExpertWeight(col - 1);
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.CollectiveClosenessCoefficientContentProvider;
|
||||
|
||||
public class CollectiveClosenessCoefficientTable extends KTable {
|
||||
|
||||
CollectiveClosenessCoefficientContentProvider provider;
|
||||
|
||||
public CollectiveClosenessCoefficientTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | SWT.FLAT | SWT.V_SCROLL);
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new CollectiveClosenessCoefficientContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.CollectiveDistanceIAntiIdealSolutionContentProvider;
|
||||
|
||||
public class CollectiveDistanceNegativeIdealSolutionTable extends KTable {
|
||||
|
||||
CollectiveDistanceIAntiIdealSolutionContentProvider provider;
|
||||
|
||||
public CollectiveDistanceNegativeIdealSolutionTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | SWT.FLAT | SWT.V_SCROLL);
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new CollectiveDistanceIAntiIdealSolutionContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.CollectiveDistanceIdealSolutionContentProvider;
|
||||
|
||||
public class CollectiveDistancePositiveIdealSolutionTable extends KTable {
|
||||
|
||||
CollectiveDistanceIdealSolutionContentProvider provider;
|
||||
|
||||
public CollectiveDistancePositiveIdealSolutionTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | SWT.FLAT | SWT.V_SCROLL);
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new CollectiveDistanceIdealSolutionContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.CollectiveDistanceSolutionsContentProvider;
|
||||
|
||||
public class CollectiveDistanceSolutionsTable extends KTable {
|
||||
|
||||
CollectiveDistanceSolutionsContentProvider provider;
|
||||
|
||||
public CollectiveDistanceSolutionsTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | SWT.FLAT | SWT.V_SCROLL);
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new CollectiveDistanceSolutionsContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.CollectiveAntiIdealSolutionContentProvider;
|
||||
|
||||
public class CollectiveNegativeIdealSolutionTable extends KTable {
|
||||
|
||||
private CollectiveAntiIdealSolutionContentProvider provider;
|
||||
|
||||
public CollectiveNegativeIdealSolutionTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | SWT.FLAT);
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new CollectiveAntiIdealSolutionContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.CollectiveIdealSolutionContentProvider;
|
||||
|
||||
public class CollectivePositiveIdealSolutionTable extends KTable {
|
||||
|
||||
private CollectiveIdealSolutionContentProvider provider;
|
||||
|
||||
public CollectivePositiveIdealSolutionTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | SWT.FLAT);
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new CollectiveIdealSolutionContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import de.kupzog.ktable.SWTX;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.DecisionMatrixContentProvider;
|
||||
|
||||
public class DecisionMatrixTable extends KTable {
|
||||
|
||||
DecisionMatrixContentProvider provider;
|
||||
|
||||
public DecisionMatrixTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | 50 | SWTX.AUTO_SCROLL );
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new DecisionMatrixContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package flintstones.method.linguistic.topsis.phase.collective.ui.table;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import de.kupzog.ktable.KTable;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.CollectiveInfo;
|
||||
import flintstones.method.linguistic.topsis.phase.collective.ui.provider.ExpertWeightsContentProvider;
|
||||
|
||||
public class ExpertWeightsTable extends KTable {
|
||||
|
||||
private ExpertWeightsContentProvider provider;
|
||||
|
||||
public ExpertWeightsTable(Composite parent) {
|
||||
super(parent, SWT.NO_BACKGROUND | SWT.FLAT);
|
||||
setBackground(new Color(Display.getCurrent(), 255, 255, 255));
|
||||
provider = null;
|
||||
}
|
||||
|
||||
public void setModel(CollectiveInfo phase) {
|
||||
provider = new ExpertWeightsContentProvider(this);
|
||||
provider.init(this, phase);
|
||||
|
||||
setModel(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
public void setDecisionMatrixTable(DecisionMatrixTable weigthedDecisionMatrixTable) {
|
||||
provider.setDecisionMatrixTable(weigthedDecisionMatrixTable);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user