Permalink
Browse files

Refines taskmanager look and feel, updates filtering per Nicole Rayner (

  • Loading branch information...
bowring committed Sep 3, 2018
1 parent 6004aaf commit cc5f5df0d309d60bc0eb48983e259fbaabbcff6e
@@ -6,7 +6,7 @@ apply plugin: 'java'
apply plugin: 'maven'
String mavenGroupId = 'org.cirdles'
String mavenVersion = '0.4.6'
String mavenVersion = '0.4.7'
sourceCompatibility = '1.8'
@@ -25,6 +25,7 @@
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -136,7 +137,6 @@
import static org.cirdles.squid.gui.constants.Squid3GuiConstants.EXPRESSION_BUILDER_DEFAULT_FONTSIZE;
import static org.cirdles.squid.gui.constants.Squid3GuiConstants.EXPRESSION_BUILDER_MAX_FONTSIZE;
import static org.cirdles.squid.gui.constants.Squid3GuiConstants.EXPRESSION_BUILDER_MIN_FONTSIZE;
import org.cirdles.squid.tasks.expressions.variables.VariableNodeForPerSpotTaskExpressions;
import org.cirdles.squid.tasks.expressions.variables.VariableNodeForSummary;
/**
@@ -237,8 +237,11 @@
private enum OrderChoiceEnum {
EVALUATION(" Evaluation order"),
NAME(" Name"),
NUSWITCH(" NU Switch"),
BUILTINCUSTOM(" BuiltIn/Custom");
// NUSWITCH(" NU Switch"),
// BUILTINCUSTOM(" BuiltIn/Custom"),
REFMAT(" Reference Material"),
CONCREFMAT(" Conc. Reference Mat"),
UNKNOWN(" Unknown Sample");
private final String printName;
@@ -696,29 +699,80 @@ private void orderList(OrderChoiceEnum order) {
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
}));
break;
case BUILTINCUSTOM:
// case BUILTINCUSTOM:
// globalListView.setItems(globalListView.getItems().sorted((o1, o2) -> {
// boolean o1IsCustom = !o1.getExpressionTree().isSquidSpecialUPbThExpression() && !o1.isSquidSwitchNU();
// boolean o2IsCustom = !o2.getExpressionTree().isSquidSpecialUPbThExpression() && !o2.isSquidSwitchNU();
// if ((o1IsCustom && o2IsCustom) || (!o1IsCustom && !o2IsCustom)) {
// return 0;
// } else if (o1IsCustom && !o2IsCustom) {
// return 1;
// } else {
// return -1;
// }
// }));
// break;
// case NUSWITCH:
// globalListView.setItems(globalListView.getItems().sorted((o1, o2) -> {
// if (o1.isSquidSwitchNU() && o2.isSquidSwitchNU()) {
// return 0;
// } else if (o1.isSquidSwitchNU() && !o2.isSquidSwitchNU()) {
// return -1;
// } else {
// return 1;
// }
// }));
// break;
case REFMAT:
globalListView.setItems(globalListView.getItems().sorted((o1, o2) -> {
boolean o1IsCustom = !o1.getExpressionTree().isSquidSpecialUPbThExpression() && !o1.isSquidSwitchNU();
boolean o2IsCustom = !o2.getExpressionTree().isSquidSpecialUPbThExpression() && !o2.isSquidSwitchNU();
if ((o1IsCustom && o2IsCustom) || (!o1IsCustom && !o2IsCustom)) {
return 0;
} else if (o1IsCustom && !o2IsCustom) {
return 1;
if (o1.getExpressionTree().isSquidSwitchSTReferenceMaterialCalculation()
&& o2.getExpressionTree().isSquidSwitchSTReferenceMaterialCalculation()) {
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
} else if (o1.getExpressionTree().isSquidSwitchSTReferenceMaterialCalculation()
&& !o2.getExpressionTree().isSquidSwitchSTReferenceMaterialCalculation()) {
return -1;
} else {
if (!o2.getExpressionTree().isSquidSwitchSTReferenceMaterialCalculation()) {
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
}
return 1;
}
}));
globalListView.refresh();
break;
case UNKNOWN:
globalListView.setItems(globalListView.getItems().sorted((o1, o2) -> {
if (o1.getExpressionTree().isSquidSwitchSAUnknownCalculation()
&& o2.getExpressionTree().isSquidSwitchSAUnknownCalculation()) {
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
} else if (o1.getExpressionTree().isSquidSwitchSAUnknownCalculation()
&& !o2.getExpressionTree().isSquidSwitchSAUnknownCalculation()) {
return -1;
} else {
if (!o2.getExpressionTree().isSquidSwitchSAUnknownCalculation()) {
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
}
return 1;
}
}));
globalListView.refresh();
break;
case NUSWITCH:
case CONCREFMAT:
globalListView.setItems(globalListView.getItems().sorted((o1, o2) -> {
if (o1.isSquidSwitchNU() && o2.isSquidSwitchNU()) {
return 0;
} else if (o1.isSquidSwitchNU() && !o2.isSquidSwitchNU()) {
if (o1.getExpressionTree().isSquidSwitchConcentrationReferenceMaterialCalculation()
&& o2.getExpressionTree().isSquidSwitchConcentrationReferenceMaterialCalculation()) {
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
} else if (o1.getExpressionTree().isSquidSwitchConcentrationReferenceMaterialCalculation()
&& !o2.getExpressionTree().isSquidSwitchConcentrationReferenceMaterialCalculation()) {
return -1;
} else {
if (!o2.getExpressionTree().isSquidSwitchConcentrationReferenceMaterialCalculation()) {
return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
}
return 1;
}
}));
globalListView.refresh();
break;
default:
globalListView.setItems(globalListView.getItems().sorted((o1, o2) -> {
@@ -14,7 +14,7 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<GridPane fx:id="taskManagerGridPane" hgap="15.0" minHeight="640.0" minWidth="1100.0" styleClass="backgroundCalamari" stylesheets="@css/projectManager.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.cirdles.squid.gui.TaskManagerController">
<GridPane fx:id="taskManagerGridPane" hgap="15.0" minHeight="640.0" minWidth="1225.0" styleClass="backgroundCalamari" stylesheets="@css/projectManager.css" vgap="10.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.cirdles.squid.gui.TaskManagerController">
<columnConstraints>
<ColumnConstraints halignment="RIGHT" hgrow="NEVER" />
<ColumnConstraints hgrow="ALWAYS" />
@@ -75,10 +75,12 @@
<Label style="-fx-font-size: 14;" text="Preferred index isotope:" GridPane.rowIndex="3" />
<Label layoutX="10.0" layoutY="94.0" style="-fx-font-size: 14;" text="Weighted Means of Ref Mat:" GridPane.rowIndex="4" />
<Label style="-fx-font-size: 14;" text="(Beta Testing) Parameter Models:" GridPane.rowIndex="5" />
<HBox spacing="15.0" GridPane.columnIndex="1" GridPane.rowIndex="5">
<HBox GridPane.columnIndex="1" GridPane.rowIndex="5">
<children>
<ComboBox fx:id="refMatModelComboBox" prefHeight="27.0" prefWidth="300.0" promptText="Reference Material Model" />
<ComboBox fx:id="concRefMatModelComboBox" layoutX="10.0" layoutY="10.0" prefHeight="27.0" prefWidth="300.0" promptText="Concentration Reference Material Model" />
<Label prefHeight="29.0" prefWidth="50.0" style="-fx-font-size: 10;" text="Ref Mat:" textAlignment="RIGHT" />
<ComboBox fx:id="refMatModelComboBox" prefHeight="27.0" prefWidth="325.0" promptText="Reference Material Model" />
<Label layoutX="10.0" layoutY="10.0" prefHeight="29.0" prefWidth="77.0" style="-fx-font-size: 10;" text="Conc Ref Mat:" textAlignment="RIGHT" translateX="10.0" />
<ComboBox fx:id="concRefMatModelComboBox" layoutX="10.0" layoutY="10.0" prefHeight="27.0" prefWidth="325.0" promptText="Concentration Reference Material Model" translateX="10.0" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="30.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
@@ -119,10 +121,12 @@
<Spinner fx:id="assignedExternalErrSpinner" prefHeight="27.0" prefWidth="75.0" translateX="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="200.0" spacing="15.0" GridPane.columnIndex="1" GridPane.rowIndex="6">
<HBox GridPane.columnIndex="1" GridPane.rowIndex="6">
<children>
<ComboBox fx:id="commonPbModelComboBox" prefHeight="27.0" prefWidth="300.0" promptText="Common Lead Model" />
<ComboBox fx:id="physConstModelComboBox" prefHeight="27.0" prefWidth="300.0" promptText="Physical Constants Model" />
<Label prefHeight="29.0" prefWidth="50.0" style="-fx-font-size: 10;" text="Comm Pb:" textAlignment="RIGHT" />
<ComboBox fx:id="commonPbModelComboBox" prefHeight="27.0" prefWidth="325.0" promptText="Common Lead Model" />
<Label prefHeight="29.0" prefWidth="77.0" style="-fx-font-size: 10;" text="Phys Const:" textAlignment="RIGHT" translateX="10.0" />
<ComboBox fx:id="physConstModelComboBox" prefHeight="27.0" prefWidth="325.0" promptText="Physical Constants Model" translateX="10.0" />
</children>
</HBox>
</children>

0 comments on commit cc5f5df

Please sign in to comment.