diff --git a/features/org.eclipse.ice.feature/feature.xml b/features/org.eclipse.ice.feature/feature.xml
index f02a864125eadc79e07df6c82e035b74310d355d..be3baed5f3b2384d795d895a6f4367dfe673842d 100644
--- a/features/org.eclipse.ice.feature/feature.xml
+++ b/features/org.eclipse.ice.feature/feature.xml
@@ -2829,5 +2829,4 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
install-size="0"
version="0.0.0"
unpack="false"/>
-
diff --git a/repository/org.eclipse.ice.repository/ice.product.launch b/repository/org.eclipse.ice.repository/ice.product.launch
index ea8a1193c0e9ca8eb1cd11f1ab7dde3010be2f2f..d4748a56a6c62fa333bd7d616843212503d3c587 100644
--- a/repository/org.eclipse.ice.repository/ice.product.launch
+++ b/repository/org.eclipse.ice.repository/ice.product.launch
@@ -22,7 +22,7 @@
-
+
diff --git a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ElementSourceDialog.java b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ElementSourceDialog.java
index a2a30a25876f4d8067294379f47be244aba7e2eb..e20c73ee4625582dab2073a1f7de3a89c1a6f59b 100644
--- a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ElementSourceDialog.java
+++ b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ElementSourceDialog.java
@@ -7,30 +7,39 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation -
- * Jay Jay Billings
+ * Jay Jay Billings, Kasper Gammeltoft
*******************************************************************************/
package org.eclipse.ice.client.widgets;
+import java.util.Collections;
+import java.util.Comparator;
+
import org.eclipse.ice.datastructures.ICEObject.IElementSource;
+import org.eclipse.ice.datastructures.ICEObject.ListComponent;
+import org.eclipse.ice.datastructures.form.Material;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
import ca.odell.glazedlists.EventList;
-import ca.odell.glazedlists.swt.DefaultEventTableViewer;
+import ca.odell.glazedlists.gui.WritableTableFormat;
/**
* This class is a JFace Dialog for rendering IElementSources that are used by
* ListComponents.
*
- * Only single selections are supported.
*
- * @author Jay Jay Billings
- *
+ * @author Jay Jay Billings, Kasper Gammeltoft
+ *
*/
public class ElementSourceDialog extends Dialog {
@@ -40,9 +49,14 @@ public class ElementSourceDialog extends Dialog {
private IElementSource source;
/**
- * The SWT table that shows the list
+ * The list of the data for the table to display
+ */
+ private ListComponent list;
+
+ /**
+ * The NatTable that shows the list
*/
- private Table listTable;
+ private ListComponentNattable listTable;
/**
* The selection made by the user or null if the dialog was closed.
@@ -66,6 +80,22 @@ public class ElementSourceDialog extends Dialog {
IElementSource elementSource) {
super(parentShell);
source = elementSource;
+ // Create the list component from source
+ list = new ListComponent();
+ list.setTableFormat((WritableTableFormat) source.getTableFormat());
+ elements = source.getElements();
+ list.addAll(elements);
+
+ // Sorts the list according to the item's comparator, if it is
+ // available
+ if (!list.isEmpty() && list.get(0) instanceof Comparable) {
+ Collections.sort(list, new Comparator() {
+ public int compare(Object first, Object second) {
+ return ((Comparable) first).compareTo((Comparable) second);
+ }
+ });
+ }
+
}
/*
@@ -78,20 +108,129 @@ public class ElementSourceDialog extends Dialog {
@Override
protected Control createDialogArea(Composite parent) {
+ // Create the composite from the parent
Composite comp = (Composite) super.createDialogArea(parent);
+ comp.setLayout(new GridLayout(1, false));
+ comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- // Create the table to hold the ListComponent.
- listTable = new Table(parent, SWT.FLAT);
- elements = source.getElements();
- DefaultEventTableViewer listTableViewer = new DefaultEventTableViewer(
- elements, listTable, source.getTableFormat());
- listTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
- 1));
+ // Set the background to white (visible on the borders)
+ comp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
+
+ // Add filter to the Dialog to filter the table results
+ final Text filter = new Text(comp, SWT.BORDER | SWT.SEARCH);
+ filter.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
+
+ // Get a copy of the list to give to the NatTable so that we can keep a
+ // fresh copy to compare to.
+ ListComponent copy = new ListComponent();
+ copy.setTableFormat(list.getTableFormat());
+ for (int i = 0; i < list.size(); i++) {
+ copy.add(list.get(i));
+ }
+
+ // Create the Nattable from the Composite parent and the ListComponent
+ // list
+ // We do NOT want this table to be editable!
+ listTable = new ListComponentNattable(comp, copy, false);
+
+ // Set the size of the shell, have the list fill the entire available
+ // area.
+ int width = listTable.getPreferredWidth();
+ int height = listTable.getPreferredHeight();
+ comp.getShell().setSize(width * 3 / 4, height);
+
+ // Forces the table to grab the extra area in the gridlayout.
+ GridDataFactory.fillDefaults().grab(true, true)
+ .applyTo(listTable.getTable());
+
+ // Selects the first component by default
+ ListComponent select = new ListComponent();
+ select.add(list.get(0));
+ listTable.setSelection(select);
+
+ // Add a modify listener to filter the table as the user types in the
+ // filter.
+ filter.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent arg0) {
+ ListComponent listFromTable = listTable.getList();
+ // Get the filter text
+ String filterText = filter.getText().toLowerCase();
+
+ // Checks to see if this is a search for a specific
+ // isotope or a element (in which case all isotopes should be
+ // shown through the filter).
+ boolean useElementName = (filterText.length() > 0 && Character
+ .isDigit(filterText.charAt(0)));
+
+ // Iterate over the list and pick the items to keep from the
+ // filter text.
+ int numRemoved = 0;
+ for (int i = 0; i < list.size(); i++) {
+
+ // Lock the list to protect thread issues.
+ listFromTable.getReadWriteLock().writeLock().lock();
+ // If the list contains materials, get the material
+ if (list.get(i) instanceof Material) {
+ Material mat = (Material) list.get(i);
+ // Finally, if the material fits the filter, make sure
+ // it is in the list. Otherwise,
+ // take it out of the list.
+
+ // Get whether to compare entire name or just elemental
+ // name.
+ String matName = "";
+ if (useElementName) {
+ matName = mat.getElementalName();
+ } else {
+ matName = mat.getName();
+ }
+
+ // If the material meets the criteria
+ if (matName.toLowerCase().startsWith(filterText)) {
+
+ // Make sure material is in list
+ if (!listFromTable.contains(mat)) {
+ listFromTable.add(i - numRemoved, mat);
+ }
+
+ // If the material does not meet the criteria
+ } else {
+
+ // Remove materials that do not fit the search
+ // criteria.
+ if (listFromTable.contains(mat)) {
+ listFromTable.remove(mat);
+ }
+ numRemoved++;
+ }
+
+ }
+
+ // Unlock the list
+ listFromTable.getReadWriteLock().writeLock().unlock();
+ }
+ }
+ });
return comp;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
+ * .Shell)
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText("Select Material");
+ }
+
/*
* (non-Javadoc)
*
@@ -99,9 +238,10 @@ public class ElementSourceDialog extends Dialog {
*/
@Override
protected void okPressed() {
- // Set the selection if the OK button was pressed
- int index = listTable.getSelectionIndex();
- selection = elements.get(index);
+
+ // Sets the selection if OK is pressed, will be the first selected
+ // object if there are multiple selections.
+ selection = (T) listTable.getSelectedObjects().get(0);
super.okPressed();
}
@@ -115,4 +255,4 @@ public class ElementSourceDialog extends Dialog {
return selection;
}
-}
+}
\ No newline at end of file
diff --git a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ListComponentNattable.java b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ListComponentNattable.java
new file mode 100644
index 0000000000000000000000000000000000000000..8309e07b2ef78fd058e86cb415093355627daa34
--- /dev/null
+++ b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ListComponentNattable.java
@@ -0,0 +1,337 @@
+/*******************************************************************************
+ * Copyright (c) 2014 UT-Battelle, LLC.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Initial API and implementation and/or initial documentation -
+ * Jay Jay Billings, Kasper Gammeltoft
+ *******************************************************************************/
+package org.eclipse.ice.client.widgets;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.ice.datastructures.ICEObject.ListComponent;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration;
+import org.eclipse.nebula.widgets.nattable.config.ConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.config.IEditableRule;
+import org.eclipse.nebula.widgets.nattable.data.IColumnPropertyAccessor;
+import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
+import org.eclipse.nebula.widgets.nattable.data.IRowDataProvider;
+import org.eclipse.nebula.widgets.nattable.data.ListDataProvider;
+import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes;
+import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsEventLayer;
+import org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider;
+import org.eclipse.nebula.widgets.nattable.grid.data.DefaultCornerDataProvider;
+import org.eclipse.nebula.widgets.nattable.grid.data.DefaultRowHeaderDataProvider;
+import org.eclipse.nebula.widgets.nattable.grid.layer.ColumnHeaderLayer;
+import org.eclipse.nebula.widgets.nattable.grid.layer.CornerLayer;
+import org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer;
+import org.eclipse.nebula.widgets.nattable.grid.layer.DefaultRowHeaderDataLayer;
+import org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer;
+import org.eclipse.nebula.widgets.nattable.grid.layer.RowHeaderLayer;
+import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
+import org.eclipse.nebula.widgets.nattable.layer.ILayer;
+import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnLabelAccumulator;
+import org.eclipse.nebula.widgets.nattable.selection.RowSelectionProvider;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Displays the information contained in a ListComponent as a Nattable.
+ *
+ *
+ * @author Jay Jay Billings, Kasper Gammeltoft
+ *
+ */
+public class ListComponentNattable {
+
+ /**
+ * The Composite will act as a parent where the Nattable will be drawn.
+ *
+ */
+ private Composite sectionClient;
+
+ /**
+ * The ListComponent is the data input for the Nattable to use.
+ *
+ */
+ private ListComponent list;
+
+ /**
+ * Holds the selected list components.
+ */
+ private ListComponent selectedList;
+
+ /**
+ * The table to hold the list data.
+ */
+ private NatTable table;
+
+ /**
+ * Provides the information about the selection layer for the NatTable.
+ * Gets/Sets the selected rows for the table.
+ */
+ private RowSelectionProvider selectionProvider;
+
+ /**
+ * If the NatTable is editable or not (from the user's side). If false, the
+ * user will only be able to select table cells, if true then the user will
+ * be able to change the table's values.
+ */
+ private boolean canEdit;
+
+ private boolean percentResize;
+
+ /**
+ * Constructor, needs the parent Composite and the List for data. This has
+ * the column percent resizing for the table automatically turned on. You
+ * must use the constructor with that explicit variable if you do not want
+ * column width resizing to fit the parent Composite.
+ *
+ * @param parent
+ * The Composite to be used as a parent Shell or View.
+ * @param listComponent
+ * The ListComponent to be used as list data for the Nattable
+ * @param editable
+ * A boolean representing if the table is editable by the user
+ */
+ public ListComponentNattable(Composite parent, ListComponent listComponent,
+ boolean editable) {
+ sectionClient = parent;
+ list = listComponent;
+ selectedList = new ListComponent();
+ canEdit = editable;
+ percentResize = true;
+ createTable();
+ }
+
+ /**
+ * Constructor, needs the parent Composite and the List for data
+ *
+ * @param parent
+ * The Composite to be used as a parent Shell or View.
+ * @param listComponent
+ * The ListComponent to be used as list data for the Nattable
+ * @param editable
+ * A boolean representing if the table is editable by the user
+ * @param sizeForParent
+ * A boolean representing if the table should take the size of
+ * its parent or maintain its preferred size and have scroll bars
+ * or unfilled space instead. Only effects column width.
+ */
+ public ListComponentNattable(Composite parent, ListComponent listComponent,
+ boolean editable, boolean sizeForParent) {
+ sectionClient = parent;
+ list = listComponent;
+ selectedList = new ListComponent();
+ canEdit = editable;
+ percentResize = sizeForParent;
+ createTable();
+ }
+
+ /**
+ * This operation configures the NatTable used to render the ListComponent
+ * on the screen.
+ */
+ private void createTable() {
+
+ // Create the data layer of the table
+ IColumnPropertyAccessor accessor = new ListComponentColumnPropertyAccessor(
+ list);
+ IDataProvider dataProvider = new ListDataProvider(list, accessor);
+ DataLayer dataLayer = new DataLayer(dataProvider);
+ GlazedListsEventLayer eventLayer = new GlazedListsEventLayer(dataLayer,
+ list);
+
+ // If the table's columns should autoresize their widths to fill the
+ // parent Composite.
+ dataLayer.setColumnPercentageSizing(percentResize);
+
+ // Create the selection and viewport layers of the table
+ SelectionLayer selectionLayer = new SelectionLayer(eventLayer);
+ ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
+
+ // Get the column names
+ String[] columnNames = new String[list.getColumnCount()];
+ for (int i = 0; i < list.getColumnCount(); i++) {
+ columnNames[i] = accessor.getColumnProperty(i);
+ }
+
+ // Create the column header layer (column names) of the table
+ IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
+ columnNames);
+ DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
+ columnHeaderDataProvider);
+ ILayer columnHeaderLayer = new ColumnHeaderLayer(columnHeaderDataLayer,
+ viewportLayer, selectionLayer);
+ // Turn the column labels on by default
+ columnHeaderDataLayer
+ .setConfigLabelAccumulator(new ColumnLabelAccumulator());
+
+ // Create the row header layer (row names) of the table
+ IDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
+ dataProvider);
+
+ DataLayer rowHeaderDataLayer = new DefaultRowHeaderDataLayer(
+ rowHeaderDataProvider);
+ ILayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer,
+ viewportLayer, selectionLayer);
+
+ // Create the corner layer of the table
+ IDataProvider cornerDataProvider = new DefaultCornerDataProvider(
+ columnHeaderDataProvider, rowHeaderDataProvider);
+ DataLayer cornerDataLayer = new DataLayer(cornerDataProvider);
+ ILayer cornerLayer = new CornerLayer(cornerDataLayer, rowHeaderLayer,
+ columnHeaderLayer);
+
+ // Create the grid layer and the table
+ GridLayer gridLayer = new GridLayer(viewportLayer, columnHeaderLayer,
+ rowHeaderLayer, cornerLayer);
+ NatTable natTable = new NatTable(sectionClient, gridLayer, false);
+ ConfigRegistry configRegistry = new ConfigRegistry();
+ natTable.setConfigRegistry(configRegistry);
+ // Set the default table style
+ natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
+
+ // Make the table editable by updating the configuration rules
+ natTable.addConfiguration(new AbstractRegistryConfiguration() {
+ @Override
+ public void configureRegistry(IConfigRegistry configRegistry) {
+ // only allow editing if the user can edit.
+ if (canEdit) {
+ configRegistry.registerConfigAttribute(
+ EditConfigAttributes.CELL_EDITABLE_RULE,
+ IEditableRule.ALWAYS_EDITABLE);
+ } else {
+ configRegistry.registerConfigAttribute(
+ EditConfigAttributes.CELL_EDITABLE_RULE,
+ IEditableRule.NEVER_EDITABLE);
+ }
+ }
+ });
+
+ // Configure the table (lay it out)
+ natTable.configure();
+ natTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1,
+ 1));
+
+ // Setting table instance variable
+ table = natTable;
+
+ // Create a new selectionProvider to listen to selection events.
+ selectionProvider = new RowSelectionProvider(selectionLayer,
+ (IRowDataProvider) dataProvider, false);
+ // Add the listener
+ selectionProvider
+ .addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent e) {
+
+ // Get the selection and add the selected objects to a
+ // ListComponent for reference.
+ IStructuredSelection selection = (IStructuredSelection) e
+ .getSelection();
+ selectedList.clear();
+ Iterator it = selection.iterator();
+ while (it.hasNext()) {
+ selectedList.add(it.next());
+ }
+ }
+ });
+
+ return;
+ }
+
+ /**
+ * Gets the currently selected elements.
+ *
+ * @return
+ */
+ public ListComponent getSelectedObjects() {
+ return selectedList;
+
+ }
+
+ /**
+ * Gets the row selection provider so that another class could potentially
+ * listen for selection events in the table.
+ *
+ * @return
+ */
+ public RowSelectionProvider getSelectionProvider() {
+ return selectionProvider;
+ }
+
+ /**
+ * Gets the SWT.COLOR of the current background for the table. By default is
+ * a light gray
+ *
+ * @return Color The background color.
+ */
+ public Color getBackground() {
+ return table.getBackground();
+ }
+
+ /**
+ * Sets the elements to be selected for this table.
+ *
+ * @param elements
+ */
+ public void setSelection(ListComponent elements) {
+ StructuredSelection newSelection = new StructuredSelection(elements);
+ selectionProvider.setSelection(newSelection);
+ }
+
+ /**
+ * Gets the preferred width of the table.
+ *
+ * @return int The preferred width
+ */
+ public int getPreferredWidth() {
+ return table.getPreferredWidth();
+ }
+
+ /**
+ * Gets the preferred height of the table.
+ *
+ * @return int The preferred height
+ */
+ public int getPreferredHeight() {
+ return table.getPreferredHeight();
+ }
+
+ /**
+ * Gets the ListComponent that this Nattable uses for data.
+ *
+ * @return
+ */
+ public ListComponent getList() {
+ return list;
+ }
+
+ /**
+ * Gets the NatTable
+ *
+ * @return
+ */
+ public NatTable getTable() {
+ return table;
+ }
+
+}
\ No newline at end of file
diff --git a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ListComponentSectionPage.java b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ListComponentSectionPage.java
index 4ece46ba82b0be23fbad39c91541144e29ef3c76..6b315a2a57eb6c47190db352d8c375a32db1b060 100644
--- a/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ListComponentSectionPage.java
+++ b/src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/ListComponentSectionPage.java
@@ -7,7 +7,7 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation -
- * Jay Jay Billings
+ * Jay Jay Billings, Kasper Gammeltoft
*******************************************************************************/
package org.eclipse.ice.client.widgets;
@@ -45,6 +45,7 @@ import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
@@ -57,7 +58,7 @@ import org.eclipse.swt.layout.GridData;
* This is a FormPage that can render ListComponents into pages usable by the
* ICEFormEditor.
*
- * @author Jay Jay Billings
+ * @author Jay Jay Billings, Kasper Gammeltoft
*
*/
public class ListComponentSectionPage extends ICEFormPage {
@@ -82,10 +83,15 @@ public class ListComponentSectionPage extends ICEFormPage {
* The composite that will act as the client of the section where everything
* is drawn.
*/
- Composite sectionClient;
+ private Composite sectionClient;
/**
- * The Constructor
+ * The NatTable that is displayed
+ */
+ private ListComponentNattable table;
+
+ /**
+ * The Constructor.
*
* @param editor
* The FormEditor for which the Page should be constructed.
@@ -122,6 +128,7 @@ public class ListComponentSectionPage extends ICEFormPage {
// Get the parent
Composite parent = managedForm.getForm().getBody();
+
shell = parent.getShell();
// Create the section and set its layout info
Section listSection = formToolkit.createSection(parent,
@@ -136,12 +143,17 @@ public class ListComponentSectionPage extends ICEFormPage {
sectionClient.setLayout(new GridLayout(2, false));
sectionClient.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
true, 1, 1));
+ // Fixes section header bug where label color is spammed
+ sectionClient.setBackground(Display.getCurrent().getSystemColor(
+ SWT.COLOR_WHITE));
+ // Fixes background color bug for NatTable
+ sectionClient.setBackgroundMode(SWT.INHERIT_FORCE);
- // Draw the table
- configureTable();
+ // Draws the table and sets that instance variable
+ table = new ListComponentNattable(sectionClient, list, true);
- // Create the Add/Delete buttons
- createAddDeleteButtons();
+ // Create the buttons for add, delete, up, and down
+ createButtons();
// Set the section client.
listSection.setClient(sectionClient);
@@ -152,9 +164,9 @@ public class ListComponentSectionPage extends ICEFormPage {
/**
* This operation creates the add and delete buttons that are used to add
- * layers to the table.
+ * layers to the table. Also creates buttons for moving layers around.
*/
- private void createAddDeleteButtons() {
+ private void createButtons() {
// Create a composite for holding Add/Delete buttons to manipulate
// the table and lay it out.
@@ -219,83 +231,148 @@ public class ListComponentSectionPage extends ICEFormPage {
// from the list.
Button deleteMaterialButton = new Button(listButtonComposite, SWT.PUSH);
deleteMaterialButton.setText("Delete");
+ deleteMaterialButton.addSelectionListener(new SelectionListener() {
- return;
- }
+ @Override
+ public void widgetDefaultSelected(SelectionEvent arg0) {
- /**
- * This operation configures the NatTable used to render the ListComponent
- * on the screen.
- */
- private void configureTable() {
-
- // Create the data layer of the table
- IColumnPropertyAccessor accessor = new ListComponentColumnPropertyAccessor(
- list);
- IDataProvider dataProvider = new ListDataProvider(list, accessor);
- DataLayer dataLayer = new DataLayer(dataProvider);
- GlazedListsEventLayer eventLayer = new GlazedListsEventLayer(dataLayer,
- list);
-
- // Create the selection and viewport layers of the table
- SelectionLayer selectionLayer = new SelectionLayer(eventLayer);
- ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
-
- // Get the column names
- String[] columnNames = new String[list.getColumnCount()];
- for (int i = 0; i < list.getColumnCount(); i++) {
- columnNames[i] = list.getColumnName(i);
- }
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent arg0) {
+
+ // checks if list has something to delete
+ if (list.size() > 0) {
+ ListComponent selected = table.getSelectedObjects();
+ if (selected.size() > 0) {
+
+ // removes that material from the list
+ // lock the list before removing the selection
+ list.getReadWriteLock().writeLock().lock();
+ try {
+ for (Object o : selected) {
+ list.remove(o);
+ }
+ } finally {
+ // Unlock it
+ list.getReadWriteLock().writeLock().unlock();
+ }
+ }
+ }
+ }
+
+ });
+
+ // Move up button, moves the selected rows up one index.
+ Button moveUpButton = new Button(listButtonComposite, SWT.PUSH);
+ moveUpButton.setText("^");
+ moveUpButton.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetDefaultSelected(SelectionEvent arg0) {
- // Create the column header layer (column names) of the table
- IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
- columnNames);
- DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
- columnHeaderDataProvider);
- ILayer columnHeaderLayer = new ColumnHeaderLayer(columnHeaderDataLayer,
- viewportLayer, selectionLayer);
- // Turn the column labels on by default
- columnHeaderDataLayer
- .setConfigLabelAccumulator(new ColumnLabelAccumulator());
-
- // Create the row header layer (row names) of the table
- IDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
- dataProvider);
- DataLayer rowHeaderDataLayer = new DefaultRowHeaderDataLayer(
- rowHeaderDataProvider);
- ILayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer,
- viewportLayer, selectionLayer);
-
- // Create the corner layer of the table
- IDataProvider cornerDataProvider = new DefaultCornerDataProvider(
- columnHeaderDataProvider, rowHeaderDataProvider);
- DataLayer cornerDataLayer = new DataLayer(cornerDataProvider);
- ILayer cornerLayer = new CornerLayer(cornerDataLayer, rowHeaderLayer,
- columnHeaderLayer);
-
- // Create the grid layer and the table
- GridLayer gridLayer = new GridLayer(viewportLayer, columnHeaderLayer,
- rowHeaderLayer, cornerLayer);
- NatTable natTable = new NatTable(sectionClient, gridLayer, false);
- ConfigRegistry configRegistry = new ConfigRegistry();
- natTable.setConfigRegistry(configRegistry);
- // Set the default table style
- natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
-
- // Make the table editable by updating the configuration rules
- natTable.addConfiguration(new AbstractRegistryConfiguration() {
+ }
+
+ @SuppressWarnings("unchecked")
@Override
- public void configureRegistry(IConfigRegistry configRegistry) {
- configRegistry.registerConfigAttribute(
- EditConfigAttributes.CELL_EDITABLE_RULE,
- IEditableRule.ALWAYS_EDITABLE);
+ public void widgetSelected(SelectionEvent arg0) {
+ // Makes sure there is actually data in the list to manipulate
+ if (list.size() > 0) {
+ // Gets selected rows
+ ListComponent selected = table.getSelectedObjects();
+ // Makes sure there are selected rows
+ if (selected.size() > 0) {
+ int numSelected = selected.size();
+ // Makes sure that the user does not move the cell at
+ // position 0 to position -1 (past top of table)
+ if (!(selected.get(0).equals(list.get(0)))) {
+
+ list.getReadWriteLock().writeLock().lock();
+
+ // Gets the object in the list that will be
+ // overridden
+ int index = 0;
+ Object toMove = list.get(0);
+
+ // Overrides the list entries to move the selected
+ // rows up by one row
+ for (int i = 0; i < numSelected; i++) {
+ index = list.indexOf(selected.get(i)) - 1;
+ toMove = list.get(index);
+ list.set(index, selected.get(i));
+ list.set(index + 1, toMove);
+
+ }
+
+ // Resets the overridden row to be at the end of the
+ // selected rows
+ list.set(index + 1, toMove);
+
+ // Unlocks the list
+ list.getReadWriteLock().writeLock().unlock();
+ table.setSelection(selected);
+
+ }
+
+ }
+ }
}
+
});
- // Configure the table (lay it out)
- natTable.configure();
- natTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
- 1));
+ // Move down button, moves the currently selected rows down one index.
+ Button moveDownButton = new Button(listButtonComposite, SWT.PUSH);
+ moveDownButton.setText("v");
+ moveDownButton.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void widgetSelected(SelectionEvent arg0) {
+ // makes sure there is actually data in the list to manipulate
+ if (list.size() > 0) {
+ // Gets selected rows
+ ListComponent selected = table.getSelectedObjects();
+ // Makes sure there are selected rows
+ if (selected.size() > 0) {
+ int numSelected = selected.size();
+ // Makes sure that the user does not move the selected
+ // cell past the end of the table.
+ if (!(selected.get(numSelected - 1).equals(list
+ .get(list.size() - 1)))) {
+
+ list.getReadWriteLock().writeLock().lock();
+
+ // Gets the object in the list that will be
+ // overridden
+ int index = 0;
+ Object toMove = list.get(0);
+
+ // Overrides the list entries to move the selected
+ // rows up by one row
+ for (int i = numSelected - 1; i >= 0; i--) {
+ index = list.indexOf(selected.get(i)) + 1;
+ toMove = list.get(index);
+ list.set(index, selected.get(i));
+ list.set(index - 1, toMove);
+
+ }
+
+ // Resets the overridden row to be at the end of the
+ // selected rows
+ list.set(index - 1, toMove);
+
+ // Unlocks the list
+ list.getReadWriteLock().writeLock().unlock();
+ table.setSelection(selected);
+ }
+ }
+ }
+ }
+
+ });
return;
}
@@ -305,11 +382,12 @@ public class ListComponentSectionPage extends ICEFormPage {
* the section page.
*
* @param list
- * The ListComponent
+ * The ListComponent to set as the new list for this section page
+ * and for the data to be displayed in its table.
*/
public void setList(ListComponent list) {
this.list = list;
this.source = list.getElementSource();
}
-}
+}
\ No newline at end of file
diff --git a/src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/Material.java b/src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/Material.java
index f0bc83e887e938a76a11fb2363a5651d49e11eb0..581c0dde8d491ef874313033cb0ae006e4db8f0f 100644
--- a/src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/Material.java
+++ b/src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/Material.java
@@ -42,7 +42,7 @@ import javax.xml.bind.annotation.XmlRootElement;
*/
@XmlRootElement(name = "Material")
@XmlAccessorType(XmlAccessType.FIELD)
-public class Material implements Cloneable {
+public class Material implements Cloneable, Comparable {
/**
* The name of the material.
@@ -144,6 +144,18 @@ public class Material implements Cloneable {
properties.put(key, value);
}
+ /**
+ * This operation removes a property from the material's properties list.
+ *
+ * @param key
+ * The name of the property that should be removed.
+ */
+ public void removeProperty(String key) {
+ if (properties.containsKey(key)) {
+ properties.remove(key);
+ }
+ }
+
/**
* This operation returns the full set of properties for this material.
*
@@ -237,11 +249,64 @@ public class Material implements Cloneable {
if (material != null && material != this) {
this.name = material.name;
this.size = material.size;
- this.properties = new HashMap (material.properties);
+ this.properties = new HashMap(material.properties);
this.components = new ArrayList(material.components);
}
}
+ /**
+ * Gets the number before the element denoting which isotope or form of an
+ * element or compound this material represents.
+ *
+ * @return The number of this isotope, as an int. Will return 0 if this is a
+ * pure element (no number preceding its name)
+ */
+ public int getIsotopicNumber() {
+ // Get an empty string to build off of
+ String numStr = "";
+ // Iterate over the characters in the name to pull out the isotope
+ // number.
+ // it is assumed that the name will follow the format xxxYy, where x is
+ // a digit and y is a letter.
+ for (int i = 0; i < name.length(); i++) {
+ if (Character.isDigit(name.charAt(i))) {
+ numStr += name.charAt(i);
+ } else {
+ break;
+ }
+ }
+ // Get the isotope number in int form. If no x values in name, return 0.
+ int retVal;
+ if (numStr.equals("")) {
+ retVal = 0;
+ } else {
+ retVal = Integer.parseInt(numStr);
+ }
+ return retVal;
+ }
+
+ /**
+ * Gets the elemental or compound name for this material. Note- this will
+ * return the same string for two isotopes of the same element.
+ *
+ * @return A String containing the name of the element or compound that this
+ * material represents.
+ */
+ public String getElementalName() {
+ // A string to build on
+ String nameStr = "";
+ // Iterate over the name of the material, it is assumed that the
+ // name follow the form xxxYy, where x is a digit and y is a letter.
+ for (int i = name.length() - 1; i >= 0; i--) {
+ if (Character.isLetter(name.charAt(i))) {
+ nameStr = name.charAt(i) + nameStr;
+ } else {
+ break;
+ }
+ }
+ return nameStr;
+ }
+
/**
* This operation clones the material and creates a completely new material
* with the same information.
@@ -255,4 +320,54 @@ public class Material implements Cloneable {
return clone;
}
+ /**
+ * This operation compares materials so that they may be sorted when in
+ * lists. Implements the Comparable interface. Uses only the material's
+ * names, as these should be the best unique identifiers for sorting.
+ *
+ * @param otherMaterial
+ * The other material to be compared. Will return 0 if this is
+ * not a material object or a subclass!
+ * @return Returns a value less than one if it is to be closer to index 0
+ * than the other material. Returns a value of exactly 0 if it is
+ * equal to the other material. Finally, returns a value of greater
+ * than one if it is to be further from index 0 than the other
+ * material.
+ */
+ @Override
+ public int compareTo(Object otherMaterial) {
+
+ int returnVal = 0;
+
+ // The name of the element or compound for the two materials
+ String thisElement = getElementalName();
+ String otherElement = ((Material) otherMaterial).getElementalName();
+
+ // The isotopic numbers for the two materials
+ int thisNum = getIsotopicNumber();
+ int otherNum = ((Material) otherMaterial).getIsotopicNumber();
+
+ // Dealing with the same element, sort by isotope number
+ if (thisElement.toLowerCase().equals(otherElement.toLowerCase())) {
+
+ // Sort from lower isotopic number to greater
+ if (thisNum < otherNum) {
+ returnVal = -1;
+ } else if (thisNum > otherNum) {
+ returnVal = 1;
+ } else {
+ returnVal = 0;
+ }
+
+ // Dealing with different elements, sort by name.
+ } else {
+ returnVal = thisElement.toLowerCase().compareTo(
+ otherElement.toLowerCase());
+ }
+
+ // Return the sorting value for these two Materials
+ return returnVal;
+
+ }
+
}
diff --git a/src/org.eclipse.ice.materials.ui/META-INF/MANIFEST.MF b/src/org.eclipse.ice.materials.ui/META-INF/MANIFEST.MF
index 06978f5945f9f5b978b44f9580b476523e1ea8cb..b105fc17c7461c8d9892ff799a240847303e9b88 100644
--- a/src/org.eclipse.ice.materials.ui/META-INF/MANIFEST.MF
+++ b/src/org.eclipse.ice.materials.ui/META-INF/MANIFEST.MF
@@ -9,7 +9,11 @@ Require-Bundle: org.eclipse.e4.ui.model.workbench;bundle-version="1.0.1.v2013111
javax.annotation,
javax.inject,
org.eclipse.e4.ui.workbench;bundle-version="1.0.2",
- org.eclipse.ui;bundle-version="3.105.0"
+ org.eclipse.ui;bundle-version="3.105.0",
+ org.eclipse.ice.datastructures,
+ org.eclipse.ice.client.widgets,
+ org.eclipse.jface,
+ org.eclipse.nebula.widgets.nattable.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: javax.inject;version="1.0.0",
org.eclipse.core.runtime;version="3.4.0",
diff --git a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizard.java b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizard.java
index c21804bb660c9e9b7fa2aa1a3ec5ad69b815d79b..1e810918cc557401f16e0ce892f7b300d9976374 100644
--- a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizard.java
+++ b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizard.java
@@ -12,6 +12,7 @@
package org.eclipse.ice.materials.ui;
import org.eclipse.core.commands.IHandler;
+import org.eclipse.ice.datastructures.form.Material;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
@@ -23,7 +24,7 @@ import org.eclipse.ui.IWorkbenchWindow;
* materials database.
*
* @author Jay Jay Billings
- *
+ *
*/
public class AddMaterialWizard extends Wizard implements INewWizard {
@@ -32,6 +33,11 @@ public class AddMaterialWizard extends Wizard implements INewWizard {
*/
private AddMaterialWizardPage page;
+ /**
+ * The material that was constructed from the wizard
+ */
+ private Material materialFromPage;
+
/**
* The workbench window used by the wizard.
*/
@@ -56,6 +62,10 @@ public class AddMaterialWizard extends Wizard implements INewWizard {
this();
// Store a reference to the workbench window.
workbenchWindow = window;
+
+ // Turn off extra buttons we do not need
+ this.setForcePreviousAndNextButtons(false);
+ this.setHelpAvailable(false);
}
/*
@@ -82,6 +92,25 @@ public class AddMaterialWizard extends Wizard implements INewWizard {
workbenchWindow = workbench.getActiveWorkbenchWindow();
}
+ /**
+ * Gets the material created by this wizard
+ *
+ * @return The new material to add to the database
+ */
+ public Material getMaterial() {
+ return materialFromPage;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.Wizard#canFinish()
+ */
+ @Override
+ public boolean canFinish() {
+ return page.isPageComplete();
+ }
+
/*
* (non-Javadoc)
*
@@ -89,8 +118,15 @@ public class AddMaterialWizard extends Wizard implements INewWizard {
*/
@Override
public boolean performFinish() {
- // TODO Auto-generated method stub
- return false;
+ boolean finished;
+
+ if (canFinish()) {
+ finished = true;
+ materialFromPage = page.getMaterial();
+ } else {
+ finished = false;
+ }
+ return finished;
}
}
diff --git a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizardPage.java b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizardPage.java
index f566eb9b6aabdf89ea7844e7f7139664233f34ea..deef9115af407f2df7f44bfd22237f852b1ba4c9 100644
--- a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizardPage.java
+++ b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddMaterialWizardPage.java
@@ -11,10 +11,15 @@
*******************************************************************************/
package org.eclipse.ice.materials.ui;
+import java.util.List;
+
+import org.eclipse.ice.datastructures.form.Material;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Table;
@@ -75,6 +80,43 @@ public class AddMaterialWizardPage extends WizardPage {
super(pageName, title, titleImage);
}
+ /**
+ * Returns if the material page's necessary fields are complete.
+ *
+ * @return Returns true if the name field and the density field have valid
+ * values.
+ */
+ @Override
+ public boolean isPageComplete() {
+ boolean hasName = nameText.getText().length() > 0;
+ boolean density;
+ try {
+ Double d = Double.parseDouble(densityText.getText());
+ density = true;
+ } catch (Exception e) {
+ density = false;
+ }
+ return hasName && density;
+ }
+
+ /**
+ * Gets the material created by the fields on this page.
+ *
+ * @return A new material with the set name, density and stoichiometry
+ * denoted on the page.
+ */
+ public Material getMaterial() {
+ // Creates the new material
+ Material material = new Material();
+ // Set the name
+ material.setName(nameText.getText());
+ // Set the density
+ material.setProperty("Dens (g/cm3)",
+ Double.parseDouble(densityText.getText()));
+
+ return material;
+ }
+
/*
* (non-Javadoc)
*
@@ -121,7 +163,7 @@ public class AddMaterialWizardPage extends WizardPage {
SWT.NONE);
densityComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
false, 1, 1));
- densityComposite.setLayout(new GridLayout(2, false));
+ densityComposite.setLayout(new GridLayout(3, false));
Label densityLabel = new Label(densityComposite, SWT.NONE);
densityLabel.setText("Density:");
@@ -130,6 +172,24 @@ public class AddMaterialWizardPage extends WizardPage {
densityText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
false, 1, 1));
+ Label densityUnitsLabel = new Label(densityComposite, SWT.NONE);
+ densityUnitsLabel.setText("g/cm3");
+
+ // Add a modify listener to update the buttons in the wizard if the text
+ // fields change.
+ ModifyListener listener = new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent arg0) {
+ getWizard().getContainer().updateButtons();
+ }
+
+ };
+
+ // Add the listener
+ nameText.addModifyListener(listener);
+ densityText.addModifyListener(listener);
+
Composite stoichiometryComposite = new Composite(container, SWT.NONE);
stoichiometryComposite.setLayout(new GridLayout(2, false));
stoichiometryComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
diff --git a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddPropertyDialog.java b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddPropertyDialog.java
new file mode 100644
index 0000000000000000000000000000000000000000..61a150aa163194a7dbf4ca1c98deff72554ab7d5
--- /dev/null
+++ b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/AddPropertyDialog.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 UT-Battelle, LLC.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Initial API and implementation and/or initial documentation - Kasper
+ * Gammeltoft
+ *******************************************************************************/
+package org.eclipse.ice.materials.ui;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * This is a JFace Dialog for adding properties to materials in the materials
+ * Database. It has two text fields: A name for the property and a value for the
+ * property that should be a String and a double, respectively.
+ *
+ *
+ * @author Kasper Gammeltoft
+ *
+ */
+public class AddPropertyDialog extends Dialog {
+
+ /**
+ * The material property to return after the dialog closes.
+ */
+ MaterialProperty newProperty;
+
+ /**
+ * Text field for holding the name of the property to be added.
+ */
+ Text nameText;
+
+ /**
+ * Text field for holding the value of the property to be added.
+ */
+ Text valueText;
+
+ /**
+ * The constructor. Creates a new Dialog for adding properties to materials.
+ *
+ * @param parentShell
+ * The parent shell to create the Dialog in
+ */
+ public AddPropertyDialog(Shell parentShell) {
+ super(parentShell);
+ newProperty = new MaterialProperty();
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+ * .Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ // Create the composite to hold the text fields and labels
+ Composite comp = (Composite) super.createDialogArea(parent);
+ comp.setLayout(new GridLayout(2, false));
+ comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+
+ // Create property name composite for storing that input
+ Composite propertyName = new Composite(comp, SWT.NONE);
+ propertyName.setLayout(new GridLayout(2, false));
+ propertyName.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+ false, 1, 1));
+
+ // The label for the property's name input
+ Label nameLbl = new Label(propertyName, SWT.NONE);
+ nameLbl.setText("Property: ");
+
+ // The text field for the property's name
+ nameText = new Text(propertyName, SWT.BORDER | SWT.LEAD);
+
+ // Create the property value composite for storing that input
+ Composite propertyValue = new Composite(comp, SWT.NONE);
+ propertyValue.setLayout(new GridLayout(2, false));
+ propertyValue.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+ false, 1, 1));
+
+ // The label for the property's value input
+ Label valLbl = new Label(propertyValue, SWT.NONE);
+ valLbl.setText("Value: ");
+
+ // The text field for the property's value
+ valueText = new Text(propertyValue, SWT.BORDER | SWT.LEAD);
+
+ return comp;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
+ * .Shell)
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText("Add Property");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ @Override
+ protected void okPressed() {
+
+ // Locks the current values in the text fields into a MaterialProperty
+ // to add to the database.
+
+ // Gets the text for the name.
+ newProperty.key = nameText.getText();
+
+ // Gets the text for the value.
+ String val = valueText.getText();
+ double dVal = 0.0;
+
+ // If the text for the value is a number, will set that number as the
+ // value. Otherwise it will be zero
+ try {
+ dVal = Double.parseDouble(val);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ newProperty.value = dVal;
+ super.okPressed();
+ }
+
+ /**
+ * Returns the new material property.
+ *
+ * @return The material property that was created by this dialog to be added
+ * to a material.
+ */
+ public MaterialProperty getSelection() {
+ return newProperty;
+ }
+
+}
diff --git a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialDetailsPage.java b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialDetailsPage.java
index cd79ff852fbec4ff66352317d072c001a6a0736e..d2b890f391ba98f39a9f7b237d2879ec0f362b6c 100644
--- a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialDetailsPage.java
+++ b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialDetailsPage.java
@@ -12,13 +12,22 @@
*******************************************************************************/
package org.eclipse.ice.materials.ui;
+import java.util.ArrayList;
+
+import org.eclipse.ice.client.widgets.ListComponentNattable;
+import org.eclipse.ice.datastructures.ICEObject.ListComponent;
import org.eclipse.ice.datastructures.form.Material;
import org.eclipse.ice.materials.IMaterialsDatabase;
+import org.eclipse.ice.materials.SingleMaterialWritableTableFormat;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.RowSelectionProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -26,19 +35,21 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.forms.IDetailsPage;
import org.eclipse.ui.forms.IFormPart;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
+import ca.odell.glazedlists.gui.WritableTableFormat;
+
/**
* This class presents a Material as a table with properties.
*
* @author Jay Jay Billings
- *
+ *
*/
public class MaterialDetailsPage implements IDetailsPage {
@@ -58,9 +69,24 @@ public class MaterialDetailsPage implements IDetailsPage {
IManagedForm managedForm;
/**
- * The table viewer that shows the material's properties.
+ * The list component that holds the property keys for the NatTable.
+ */
+ ListComponent list;
+
+ /**
+ * The table to display the material's properties
+ */
+ ListComponentNattable natTable;
+
+ /**
+ * The section client for the NatTable to draw on
*/
- TableViewer tableViewer;
+ Composite sectionClient;
+
+ /**
+ * The shell to use for opening the add property dialog
+ */
+ Shell shell;
/**
* The constructor
@@ -174,13 +200,61 @@ public class MaterialDetailsPage implements IDetailsPage {
Object structuredSelection = ((IStructuredSelection) selection)
.getFirstElement();
if (structuredSelection instanceof Material) {
- // Set the input to the properties
+
+ // Updates the material to the new selection
material = (Material) structuredSelection;
- tableViewer.setInput(material.getProperties());
- // Fix the column width
- Table table = tableViewer.getTable();
- for (TableColumn column : table.getColumns()) {
- column.pack();
+
+ // Creates new table if this is the first selection of a material.
+ if (natTable == null) {
+
+ // Creates new listComponent for the table data.
+ list = new ListComponent();
+
+ // Gets the property names or column names for the table.
+ ArrayList propertyNames = new ArrayList();
+ propertyNames.addAll(material.getProperties().keySet());
+
+ // Creates new writable table format for the nattable
+ WritableTableFormat tableFormat = new SingleMaterialWritableTableFormat(
+ material);
+
+ // Adds the tableformat to the list
+ list.setTableFormat(tableFormat);
+
+ // Adds the material
+ list.addAll(propertyNames);
+
+ // Makes the NatTable, with the list data and current
+ // sectionClient to draw on.
+ natTable = new ListComponentNattable(sectionClient, list, true);
+ RowSelectionProvider selectionProvider = natTable
+ .getSelectionProvider();
+ selectionProvider
+ .addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(
+ SelectionChangedEvent arg0) {
+ database.updateMaterial(material);
+ }
+
+ });
+ } else {
+
+ // Clears out any existing entries in the list
+ list.clear();
+ // Gets the property names or column names for the table.
+ ArrayList propertyNames = new ArrayList();
+ propertyNames.addAll(material.getProperties().keySet());
+
+ // Adds the new properties to the list.
+ list.addAll(propertyNames);
+
+ // Changes the selected material
+ SingleMaterialWritableTableFormat format = (SingleMaterialWritableTableFormat) list
+ .getTableFormat();
+ format.setMaterial(material);
+
}
}
return;
@@ -195,6 +269,8 @@ public class MaterialDetailsPage implements IDetailsPage {
*/
@Override
public void createContents(Composite parent) {
+ // Get the shell for the add property dialog
+ shell = parent.getShell();
// Set the layout for the parent
GridLayout parentGridLayout = new GridLayout(1, true);
@@ -213,7 +289,7 @@ public class MaterialDetailsPage implements IDetailsPage {
// Create the area in which the block will be rendered - the
// "section client"
- Composite sectionClient = toolkit.createComposite(section);
+ sectionClient = toolkit.createComposite(section);
// Configure the layout to be greedy.
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
@@ -225,38 +301,10 @@ public class MaterialDetailsPage implements IDetailsPage {
// Finally tell the section about its client
section.setClient(sectionClient);
- // Create a table viewer to display the materials properties
- tableViewer = new TableViewer(sectionClient, SWT.BORDER | SWT.H_SCROLL
- | SWT.V_SCROLL | SWT.FULL_SELECTION);
-
- // Create the property name column
- TableViewerColumn nameColumn = new TableViewerColumn(tableViewer,
- SWT.CENTER);
- nameColumn.getColumn().setText("Property");
- nameColumn.getColumn().setToolTipText(
- "The name of the material property");
- nameColumn.setLabelProvider(new MaterialCellLabelProvider());
- nameColumn.getColumn().pack();
- // Create the property value column
- TableViewerColumn valueColumn = new TableViewerColumn(tableViewer,
- SWT.CENTER);
- valueColumn.getColumn().setText("Value");
- valueColumn.getColumn().setToolTipText(
- "The value of the material property");
- valueColumn.getColumn().pack();
- valueColumn.setLabelProvider(new MaterialCellLabelProvider());
- // Add the columns
- String[] names = { "Property", "Value" };
- tableViewer.setColumnProperties(names);
-
- // Set the content provider and the layout information on the
- // tableViewer
- tableViewer.setContentProvider(new MaterialPropertyContentProvider());
- Table table = tableViewer.getTable();
- table.setLayout(new GridLayout(1, true));
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
+ // Sets the sectionClient color to overrule the table's background
+ sectionClient.setBackground(Display.getCurrent().getSystemColor(
+ SWT.COLOR_WHITE));
+ sectionClient.setBackgroundMode(SWT.INHERIT_FORCE);
// Add a composite for holding the Add and Delete buttons for adding
// or removing properties
@@ -264,41 +312,78 @@ public class MaterialDetailsPage implements IDetailsPage {
buttonComposite.setLayout(new GridLayout(1, false));
buttonComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false,
true, 1, 1));
- // Create a listener that will throw up an error message since the Add
- // and Delete operations are not yet supported. The error message is
- // just a simple JFace message dialog that is opened when either button
- // is pressed.
- String title = "Operation Unsupported";
- String msg = "Adding and deleting properties"
- + " is not yet supported.";
- String[] labels = { "OK" };
- final MessageDialog dialog = new MessageDialog(parent.getShell(),
- title, null, msg, MessageDialog.ERROR, labels, 0);
- SelectionListener errorListener = new SelectionListener() {
+
+ // Create the Add button
+ Button addMaterialButton = new Button(buttonComposite, SWT.PUSH);
+ addMaterialButton.setText("Add");
+ addMaterialButton.addSelectionListener(new SelectionListener() {
+
@Override
- public void widgetSelected(SelectionEvent e) {
- dialog.open();
+ public void widgetSelected(SelectionEvent arg0) {
+ // Opens the new dialog to create a property
+ AddPropertyDialog dialog = new AddPropertyDialog(shell);
+ if (dialog.open() == Window.OK) {
+ // Sets the new property
+ MaterialProperty newProperty = dialog.getSelection();
+ material.setProperty(newProperty.key, newProperty.value);
+ database.updateMaterial(material);
+
+ // Lock the list to avoid concurrent modifications
+ list.getReadWriteLock().writeLock().lock();
+ try {
+ // Adds the new property to the list so that it will
+ // update on screen for the user.
+ list.add(newProperty.key);
+ } finally {
+ // Unlock the list
+ list.getReadWriteLock().writeLock().unlock();
+ }
+ }
}
@Override
- public void widgetDefaultSelected(SelectionEvent e) {
- dialog.open();
+ public void widgetDefaultSelected(SelectionEvent arg0) {
}
- };
- // Create the Add button
- Button addMaterialButton = new Button(buttonComposite, SWT.PUSH);
- addMaterialButton.setText("Add");
- // Set the error listener for now until the delete operation is
- // supported.
- addMaterialButton.addSelectionListener(errorListener);
- // Create the Delete button
+
+ });
+
+ // Create the delete button for removing material properties.
Button deleteMaterialButton = new Button(buttonComposite, SWT.PUSH);
deleteMaterialButton.setText("Delete");
- // Set the error listener for now until the delete operation is
- // supported
- deleteMaterialButton.addSelectionListener(errorListener);
+ deleteMaterialButton.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent arg0) {
+
+ // gets the selected property
+ String property = (String) natTable.getSelectedObjects().get(0);
+
+ // Removes the property from the material.
+ material.removeProperty(property);
+ database.updateMaterial(material);
+
+ // Finally, removes the property string from the list so that it
+ // will
+ // update on screen for the user.
+ // Lock the list to avoid concurrent modifications
+ list.getReadWriteLock().writeLock().lock();
+ try {
+ // remove the property
+ list.remove(property);
+ } finally {
+ // unlock the list
+ list.getReadWriteLock().writeLock().unlock();
+ }
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+
+ }
+
+ });
return;
}
-}
+}
\ No newline at end of file
diff --git a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialsDatabaseMasterDetailsBlock.java b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialsDatabaseMasterDetailsBlock.java
index 3e5308a983a01ed0bfae9f29f5befced667a9a0f..9836e04534af30a0f7469db5f77f975b29db36dc 100644
--- a/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialsDatabaseMasterDetailsBlock.java
+++ b/src/org.eclipse.ice.materials.ui/src/org/eclipse/ice/materials/ui/MaterialsDatabaseMasterDetailsBlock.java
@@ -12,24 +12,36 @@
*******************************************************************************/
package org.eclipse.ice.materials.ui;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.core.runtime.Platform;
import org.eclipse.e4.ui.workbench.IWorkbench;
+import org.eclipse.ice.datastructures.ICEObject.ListComponent;
import org.eclipse.ice.datastructures.form.Material;
import org.eclipse.ice.materials.IMaterialsDatabase;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.DetailsPart;
@@ -37,6 +49,7 @@ import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.MasterDetailsBlock;
import org.eclipse.ui.forms.SectionPart;
import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
/**
@@ -54,11 +67,21 @@ public class MaterialsDatabaseMasterDetailsBlock extends MasterDetailsBlock {
*/
IMaterialsDatabase materialsDatabase;
+ /**
+ * The list that holds the materials database information.
+ */
+ List materials;
+
/**
* The managed form for the block.
*/
IManagedForm mForm;
+ /**
+ * The tree viewer for displaying the materials
+ */
+ TreeViewer treeViewer;
+
/**
* The constructor
*
@@ -113,15 +136,100 @@ public class MaterialsDatabaseMasterDetailsBlock extends MasterDetailsBlock {
final SectionPart sectionPart = new SectionPart(section);
mForm.addPart(sectionPart);
+ // Create a composite to hold the tree viewer and the filter text
+ Composite treeComp = new Composite(sectionClient, SWT.NONE);
+ treeComp.setLayout(new GridLayout(1, false));
+ treeComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
+ 1));
+
+ // Add filter to the Dialog to filter the table results
+ final Text filter = new Text(treeComp, SWT.BORDER | SWT.SEARCH);
+ filter.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
+
// Create the tree viewer that shows the contents of the database
- TreeViewer treeViewer = new TreeViewer(sectionClient);
+ treeViewer = new TreeViewer(treeComp);
treeViewer.setContentProvider(new MaterialsDatabaseContentProvider());
treeViewer.setLabelProvider(new MaterialsDatabaseLabelProvider());
- // Set the input and layout information on the treeViewer
- treeViewer.setInput(materialsDatabase.getMaterials());
+ // Create a sorted final list from the database for pulling the database
+ // information
+ materials = materialsDatabase.getMaterials();
+ // Sorts the list according to the material compareTo operator
+ Collections.sort(materials);
+
+ // Create a copy of the master list for the table to display.
+ List editableCopy = new ArrayList();
+ for (int i = 0; i < materials.size(); i++) {
+ editableCopy.add(materials.get(i));
+ }
+
+ // Set the treeviewer input
+ treeViewer.setInput(editableCopy);
+
+ // Add a modify listener to filter the table as the user types in the
+ // filter.
+ filter.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent arg0) {
+ List listFromTree = (List) treeViewer
+ .getInput();
+ // Get the filter text
+ String filterText = filter.getText().toLowerCase();
+
+ // Checks to see if this is a search for a specific
+ // isotope or a element (in which case all isotopes should be
+ // shown through the filter).
+ boolean useElementName = !((filterText.length() > 0) && (Character
+ .isDigit(filterText.charAt(0))));
+
+ // Iterate over the list and pick the items to keep from the
+ // filter text.
+ int numRemoved = 0;
+ for (int i = 0; i < materials.size(); i++) {
+
+ Material mat = materials.get(i);
+
+ String matName = "";
+ if (useElementName) {
+ matName = mat.getElementalName();
+ } else {
+ matName = mat.getName();
+ }
+ // Finally, if the material fits the filter, make sure it is
+ // in the list. Otherwise,
+ // take it out of the list.
+ if (matName.toLowerCase().startsWith(filterText)) {
+ // make sure material is in list
+ if (!listFromTree.contains(mat)) {
+ listFromTree.add(i - numRemoved, mat);
+ }
+
+ } else {
+
+ // remove materials that do not fit the search criteria.
+ if (listFromTree.contains(mat)) {
+ listFromTree.remove(mat);
+ }
+ numRemoved++;
+ }
+ }
+ // Refresh the tree viewer so that it is repainted
+ treeViewer.refresh();
+ }
+ });
+
+ // Lay out the list
treeViewer.getTree().setLayout(new GridLayout(1, true));
- treeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // Sets the gridData to grab the available space, but to have only the
+ // treeview have the scrolling.
+ // This allows for the master tree to scroll without moving the details
+ // page out of the viewport.
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
+ data.widthHint = sectionClient.getClientArea().width;
+ data.heightHint = sectionClient.getClientArea().height;
+ treeViewer.getTree().setLayoutData(data);
// Add a listener to notify the managed form when a selection is made so
// that its details can be presented.
@@ -142,25 +250,37 @@ public class MaterialsDatabaseMasterDetailsBlock extends MasterDetailsBlock {
// Create the Add button
Button addMaterialButton = new Button(buttonComposite, SWT.PUSH);
addMaterialButton.setText("Add");
- // Create a wizard dialog to hold the AddMaterialWizard that will be used to create new materials.
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- AddMaterialWizard addMaterialWizard = new AddMaterialWizard(window);
- addMaterialWizard.setWindowTitle("Create a new material");
- final WizardDialog addMaterialDialog = new WizardDialog(window.getShell(), addMaterialWizard);
+
// Add a listener to the add button to open the Add Material Wizard
addMaterialButton.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
- // Just pop open the dialog
- addMaterialDialog.create();
- addMaterialDialog.open();
+ // Create a wizard dialog to hold the AddMaterialWizard that will be
+ // used to create new materials.
+ IWorkbenchWindow window = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow();
+ AddMaterialWizard addMaterialWizard = new AddMaterialWizard(window);
+ addMaterialWizard.setWindowTitle("Create a new material");
+ WizardDialog addMaterialDialog = new WizardDialog(
+ window.getShell(), addMaterialWizard);
+
+ // Get the new material to add
+ if(addMaterialDialog.open() == Window.OK){
+ Material newMaterial = addMaterialWizard.getMaterial();
+ materialsDatabase.addMaterial(newMaterial);
+ materials.add(newMaterial);
+ List listFromTree = (List) treeViewer
+ .getInput();
+ listFromTree.add(newMaterial);
+ Collections.sort(listFromTree);
+ treeViewer.refresh();
+ }
+
}
-
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
- // Just pop open the dialog
- addMaterialDialog.create();
- addMaterialDialog.open();
+ // Nothing TODO
}
});
@@ -172,7 +292,7 @@ public class MaterialsDatabaseMasterDetailsBlock extends MasterDetailsBlock {
// a simple JFace message dialog that is opened when either button
// is pressed.
String title = "Confirm Deletion";
- String msg = "Are you sure you want to delete this material?";
+ String msg = "Are you sure you want to delete this material(s)?";
String[] labels = { "OK", "Cancel" };
final MessageDialog deletionDialog = new MessageDialog(
parent.getShell(), title, null, msg, MessageDialog.WARNING,
@@ -181,13 +301,37 @@ public class MaterialsDatabaseMasterDetailsBlock extends MasterDetailsBlock {
@Override
public void widgetSelected(SelectionEvent e) {
int index = deletionDialog.open();
- // Do the deletion - NOT YET IMPLEMENTED!
+ // If the user presses OK
+ if (index == 0) {
+ // Get the currently selected materials
+ IStructuredSelection selection = (IStructuredSelection) treeViewer
+ .getSelection();
+ Iterator it = selection.iterator();
+
+ // Get the model from the treeViewer
+ List listFromTree = (List) treeViewer
+ .getInput();
+
+ // Remove each selected material
+ while (it.hasNext()) {
+ Material toDelete = (Material) it.next();
+ // Remove the material from the user's database
+ materialsDatabase.deleteMaterial(toDelete);
+ // Remove from the master materials list
+ materials.remove(toDelete);
+ // Remove the material from the tree viewer
+ listFromTree.remove(toDelete);
+ }
+
+ // Update the treeViwer so that it repaints and shows the
+ // changes on screen.
+ treeViewer.refresh();
+ }
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
- int index = deletionDialog.open();
- // Do the deletion - NOT YET IMPLEMENTED!
+ // nothing TODO
}
};
deleteMaterialButton.addSelectionListener(deletionListener);
@@ -213,7 +357,28 @@ public class MaterialsDatabaseMasterDetailsBlock extends MasterDetailsBlock {
@Override
public void widgetSelected(SelectionEvent e) {
int index = restoreDialog.open();
- // Do the restore - NOT YET IMPLEMENTED!
+ if (index == 0) {
+ materialsDatabase.restoreDefaults();
+ // Create a sorted final list from the database for pulling
+ // the database information
+ materials = materialsDatabase.getMaterials();
+ // Sorts the list according to the material compareTo
+ // operator
+ Collections.sort(materials);
+
+ // Get the model from the treeViewer
+ List listFromTree = (List) treeViewer
+ .getInput();
+ // Refresh the list from the reset materials database
+ listFromTree.clear();
+ for (int i = 0; i < materials.size(); i++) {
+ listFromTree.add(materials.get(i));
+ }
+
+ // Update the treeViwer so that it repaints and shows the
+ // changes on screen.
+ treeViewer.refresh();
+ }
}
@Override
diff --git a/src/org.eclipse.ice.materials/data/userMatDB.xml b/src/org.eclipse.ice.materials/data/userMatDB.xml
index 9454e9fb113e14e29bc6acab49c4902c2442e56a..25a6dd82edf4d2eb200a846a38871ac9761622a8 100644
--- a/src/org.eclipse.ice.materials/data/userMatDB.xml
+++ b/src/org.eclipse.ice.materials/data/userMatDB.xml
@@ -4,33 +4,33 @@
Ga
1
-
- mmabs/l (Å-2)
- 1.32E14
-
-
- Abs xs
- 2.75
-
Inc xs
0.16
- Dens (at/nm3)
- 51.0
+ mmabs/l (Å-2)
+ 1.32E14
M (amu)
69.72
+
+ Coh b
+ 7.288
+
Dens (g/cm3)
5.9
- Coh b
- 7.288
+ Abs xs
+ 2.75
+
+
+ Dens (at/nm3)
+ 51.0
mminc (Å-1)
@@ -42,33 +42,33 @@
188Os
1
-
- mmabs/l (Å-2)
- 8.37E13
-
-
- Abs xs
- 4.7
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 8.37E13
M (amu)
188.0
+
+ Coh b
+ 7.6
+
Dens (g/cm3)
0.0
- Coh b
- 7.6
+ Abs xs
+ 4.7
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -80,33 +80,33 @@
137Ba
1
-
- mmabs/l (Å-2)
- 8.8E13
-
-
- Abs xs
- 3.6
-
Inc xs
0.5
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 8.8E13
M (amu)
137.0
+
+ Coh b
+ 6.83
+
Dens (g/cm3)
0.0
- Coh b
- 6.83
+ Abs xs
+ 3.6
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -118,33 +118,33 @@
22Ne
1
-
- mmabs/l (Å-2)
- 7.0E12
-
-
- Abs xs
- 0.046
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.0E12
M (amu)
22.0
+
+ Coh b
+ 3.87
+
Dens (g/cm3)
0.0
- Coh b
- 3.87
+ Abs xs
+ 0.046
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -156,33 +156,33 @@
184Os
1
-
- mmabs/l (Å-2)
- 5.46E16
-
-
- Abs xs
- 3000.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 5.46E16
M (amu)
184.0
+
+ Coh b
+ 10.0
+
Dens (g/cm3)
0.0
- Coh b
- 10.0
+ Abs xs
+ 3000.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -194,33 +194,33 @@
Fe
1
-
- mmabs/l (Å-2)
- 1.53E14
-
-
- Abs xs
- 2.56
-
Inc xs
0.4
- Dens (at/nm3)
- 84.76
+ mmabs/l (Å-2)
+ 1.53E14
M (amu)
55.847
+
+ Coh b
+ 9.45
+
Dens (g/cm3)
7.86
- Coh b
- 9.45
+ Abs xs
+ 2.56
+
+
+ Dens (at/nm3)
+ 84.76
mminc (Å-1)
@@ -232,33 +232,33 @@
29Si
1
-
- mmabs/l (Å-2)
- 1.17E13
-
-
- Abs xs
- 0.101
-
Inc xs
0.001
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.17E13
M (amu)
29.0
+
+ Coh b
+ 4.7
+
Dens (g/cm3)
0.0
- Coh b
- 4.7
+ Abs xs
+ 0.101
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -270,33 +270,33 @@
26Mg
1
-
- mmabs/l (Å-2)
- 4.92E12
-
-
- Abs xs
- 0.0382
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.92E12
M (amu)
26.0
+
+ Coh b
+ 4.89
+
Dens (g/cm3)
0.0
- Coh b
- 4.89
+ Abs xs
+ 0.0382
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -308,33 +308,33 @@
3He
1
-
- mmabs/l (Å-2)
- 5.95E18
-
-
- Abs xs
- 5333.0
-
Inc xs
1.6
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 5.95E18
M (amu)
3.0
+
+ Coh b
+ 5.74
+
Dens (g/cm3)
0.0
- Coh b
- 5.74
+ Abs xs
+ 5333.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -346,33 +346,33 @@
130Te
1
-
- mmabs/l (Å-2)
- 7.47E12
-
-
- Abs xs
- 0.29
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.47E12
M (amu)
130.0
+
+ Coh b
+ 6.02
+
Dens (g/cm3)
0.0
- Coh b
- 6.02
+ Abs xs
+ 0.29
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -384,34 +384,34 @@
Eu
1
-
- mmabs/l (Å-2)
- 9.98E16
-
-
- Abs xs
- 4530.0
-
Inc xs
2.5
- Dens (at/nm3)
- 20.77
+ mmabs/l (Å-2)
+ 9.98E16
M (amu)
151.96
-
- Dens (g/cm3)
- 5.24
-
Coh b
7.22
+
+ Dens (g/cm3)
+ 5.24
+
+
+ Abs xs
+ 4530.0
+
+
+ Dens (at/nm3)
+ 20.77
+
mminc (Å-1)
9.9E13
@@ -422,33 +422,33 @@
85Rb
1
-
- mmabs/l (Å-2)
- 1.89E13
-
-
- Abs xs
- 0.48
-
Inc xs
0.5
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.89E13
M (amu)
85.0
+
+ Coh b
+ 7.03
+
Dens (g/cm3)
0.0
- Coh b
- 7.03
+ Abs xs
+ 0.48
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -460,33 +460,33 @@
160Gd
1
-
- mmabs/l (Å-2)
- 1.61E13
-
-
- Abs xs
- 0.77
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.61E13
M (amu)
160.0
+
+ Coh b
+ 9.15
+
Dens (g/cm3)
0.0
- Coh b
- 9.15
+ Abs xs
+ 0.77
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -498,33 +498,33 @@
Er
1
-
- mmabs/l (Å-2)
- 3.18E15
-
-
- Abs xs
- 159.0
-
Inc xs
1.1
- Dens (at/nm3)
- 32.42
+ mmabs/l (Å-2)
+ 3.18E15
M (amu)
167.28
+
+ Coh b
+ 7.79
+
Dens (g/cm3)
9.01
- Coh b
- 7.79
+ Abs xs
+ 159.0
+
+
+ Dens (at/nm3)
+ 32.42
mminc (Å-1)
@@ -536,33 +536,33 @@
86Kr
1
-
- mmabs/l (Å-2)
- 1.17E11
-
-
- Abs xs
- 0.003
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.17E11
M (amu)
86.0
+
+ Coh b
+ 8.1
+
Dens (g/cm3)
0.0
- Coh b
- 8.1
+ Abs xs
+ 0.003
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -574,33 +574,33 @@
109Ag
1
-
- mmabs/l (Å-2)
- 2.8E15
-
-
- Abs xs
- 91.0
-
Inc xs
0.32
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.8E15
M (amu)
109.0
+
+ Coh b
+ 4.165
+
Dens (g/cm3)
0.0
- Coh b
- 4.165
+ Abs xs
+ 91.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -612,33 +612,33 @@
46Ti
1
-
- mmabs/l (Å-2)
- 4.29E13
-
-
- Abs xs
- 0.59
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.29E13
M (amu)
46.0
+
+ Coh b
+ 4.93
+
Dens (g/cm3)
0.0
- Coh b
- 4.93
+ Abs xs
+ 0.59
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -650,33 +650,33 @@
76Ge
1
-
- mmabs/l (Å-2)
- 7.05E12
-
-
- Abs xs
- 0.16
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.05E12
M (amu)
76.0
+
+ Coh b
+ 8.2
+
Dens (g/cm3)
0.0
- Coh b
- 8.2
+ Abs xs
+ 0.16
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -688,33 +688,33 @@
Dy
1
-
- mmabs/l (Å-2)
- 2.05E16
-
-
- Abs xs
- 994.0
-
Inc xs
54.4
- Dens (at/nm3)
- 31.69
+ mmabs/l (Å-2)
+ 2.05E16
M (amu)
162.5
+
+ Coh b
+ 16.9
+
Dens (g/cm3)
8.55
- Coh b
- 16.9
+ Abs xs
+ 994.0
+
+
+ Dens (at/nm3)
+ 31.69
mminc (Å-1)
@@ -726,33 +726,33 @@
78Se
1
-
- mmabs/l (Å-2)
- 1.85E13
-
-
- Abs xs
- 0.43
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.85E13
M (amu)
78.0
+
+ Coh b
+ 8.24
+
Dens (g/cm3)
0.0
- Coh b
- 8.24
+ Abs xs
+ 0.43
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -764,33 +764,33 @@
72Ge
1
-
- mmabs/l (Å-2)
- 3.72E13
-
-
- Abs xs
- 0.8
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 3.72E13
M (amu)
72.0
+
+ Coh b
+ 8.51
+
Dens (g/cm3)
0.0
- Coh b
- 8.51
+ Abs xs
+ 0.8
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -802,34 +802,34 @@
168Er
1
+
+ Inc xs
+ 0.0
+
mmabs/l (Å-2)
5.46E13
- Abs xs
- 2.74
+ M (amu)
+ 168.0
- Inc xs
- 0.0
+ Coh b
+ 7.4
- Dens (at/nm3)
+ Dens (g/cm3)
0.0
- M (amu)
- 168.0
+ Abs xs
+ 2.74
- Dens (g/cm3)
+ Dens (at/nm3)
0.0
-
- Coh b
- 7.4
-
mminc (Å-1)
0.0
@@ -840,33 +840,33 @@
238Pu
1
-
- mmabs/l (Å-2)
- 7.85E15
-
-
- Abs xs
- 558.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.85E15
M (amu)
238.0
+
+ Coh b
+ 14.1
+
Dens (g/cm3)
0.0
- Coh b
- 14.1
+ Abs xs
+ 558.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -878,33 +878,33 @@
74Se
1
-
- mmabs/l (Å-2)
- 2.34E15
-
-
- Abs xs
- 51.8
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.34E15
M (amu)
74.0
+
+ Coh b
+ 0.8
+
Dens (g/cm3)
0.0
- Coh b
- 0.8
+ Abs xs
+ 51.8
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -916,33 +916,33 @@
139La
1
-
- mmabs/l (Å-2)
- 2.15E14
-
-
- Abs xs
- 8.93
-
Inc xs
1.13
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.15E14
M (amu)
139.0
+
+ Coh b
+ 8.24
+
Dens (g/cm3)
0.0
- Coh b
- 8.24
+ Abs xs
+ 8.93
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -954,33 +954,33 @@
164Er
1
-
- mmabs/l (Å-2)
- 2.65E14
-
-
- Abs xs
- 13.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.65E14
M (amu)
164.0
+
+ Coh b
+ 8.2
+
Dens (g/cm3)
0.0
- Coh b
- 8.2
+ Abs xs
+ 13.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -992,33 +992,33 @@
94Zr
1
-
- mmabs/l (Å-2)
- 1.78E12
-
-
- Abs xs
- 0.0499
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.78E12
M (amu)
94.0
+
+ Coh b
+ 8.2
+
Dens (g/cm3)
0.0
- Coh b
- 8.2
+ Abs xs
+ 0.0499
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1030,33 +1030,33 @@
198Pt
1
-
- mmabs/l (Å-2)
- 6.19E13
-
-
- Abs xs
- 3.66
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 6.19E13
M (amu)
198.0
+
+ Coh b
+ 7.8
+
Dens (g/cm3)
0.0
- Coh b
- 7.8
+ Abs xs
+ 3.66
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1068,33 +1068,33 @@
157Gd
1
-
- mmabs/l (Å-2)
- 5.52E18
-
-
- Abs xs
- 259000.0
-
Inc xs
394.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 5.52E18
M (amu)
157.0
+
+ Coh b
+ -1.14
+
Dens (g/cm3)
0.0
- Coh b
- -1.14
+ Abs xs
+ 259000.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1106,33 +1106,33 @@
6Li
1
-
- mmabs/l (Å-2)
- 5.25E17
-
-
- Abs xs
- 940.0
-
Inc xs
0.46
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 5.25E17
M (amu)
6.0
+
+ Coh b
+ 2.0
+
Dens (g/cm3)
0.0
- Coh b
- 2.0
+ Abs xs
+ 940.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1144,33 +1144,33 @@
90Zr
1
-
- mmabs/l (Å-2)
- 4.09E11
-
-
- Abs xs
- 0.011
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.09E11
M (amu)
90.0
+
+ Coh b
+ 6.4
+
Dens (g/cm3)
0.0
- Coh b
- 6.4
+ Abs xs
+ 0.011
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1182,33 +1182,33 @@
Cu
1
-
- mmabs/l (Å-2)
- 1.99E14
-
-
- Abs xs
- 3.78
-
Inc xs
0.55
- Dens (at/nm3)
- 84.53
+ mmabs/l (Å-2)
+ 1.99E14
M (amu)
63.5406
+
+ Coh b
+ 7.718
+
Dens (g/cm3)
8.92
- Coh b
- 7.718
+ Abs xs
+ 3.78
+
+
+ Dens (at/nm3)
+ 84.53
mminc (Å-1)
@@ -1220,33 +1220,33 @@
123Te
1
-
- mmabs/l (Å-2)
- 1.14E16
-
-
- Abs xs
- 418.0
-
Inc xs
0.52
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.14E16
M (amu)
123.0
+
+ Coh b
+ -0.05
+
Dens (g/cm3)
0.0
- Coh b
- -0.05
+ Abs xs
+ 418.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1258,33 +1258,33 @@
Cs
1
-
- mmabs/l (Å-2)
- 7.31E14
-
-
- Abs xs
- 29.0
-
Inc xs
0.21
- Dens (at/nm3)
- 8.52
+ mmabs/l (Å-2)
+ 7.31E14
M (amu)
132.905
+
+ Coh b
+ 5.42
+
Dens (g/cm3)
1.88
- Coh b
- 5.42
+ Abs xs
+ 29.0
+
+
+ Dens (at/nm3)
+ 8.52
mminc (Å-1)
@@ -1296,33 +1296,33 @@
194Pt
1
-
- mmabs/l (Å-2)
- 2.49E13
-
-
- Abs xs
- 1.44
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.49E13
M (amu)
194.0
+
+ Coh b
+ 10.55
+
Dens (g/cm3)
0.0
- Coh b
- 10.55
+ Abs xs
+ 1.44
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1334,33 +1334,33 @@
Cr
1
-
- mmabs/l (Å-2)
- 1.96E14
-
-
- Abs xs
- 3.05
-
Inc xs
1.83
- Dens (at/nm3)
- 83.39
+ mmabs/l (Å-2)
+ 1.96E14
M (amu)
51.996
+
+ Coh b
+ 3.635
+
Dens (g/cm3)
7.2
- Coh b
- 3.635
+ Abs xs
+ 3.05
+
+
+ Dens (at/nm3)
+ 83.39
mminc (Å-1)
@@ -1372,33 +1372,33 @@
164Dy
1
-
- mmabs/l (Å-2)
- 5.8E16
-
-
- Abs xs
- 2840.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 5.8E16
M (amu)
164.0
+
+ Coh b
+ 49.4
+
Dens (g/cm3)
0.0
- Coh b
- 49.4
+ Abs xs
+ 2840.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1410,33 +1410,33 @@
64Ni
1
-
- mmabs/l (Å-2)
- 7.95E13
-
-
- Abs xs
- 1.52
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.95E13
M (amu)
64.0
+
+ Coh b
+ -0.37
+
Dens (g/cm3)
0.0
- Coh b
- -0.37
+ Abs xs
+ 1.52
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1448,33 +1448,33 @@
Co
1
-
- mmabs/l (Å-2)
- 2.11E15
-
-
- Abs xs
- 37.18
-
Inc xs
4.8
- Dens (at/nm3)
- 90.94
+ mmabs/l (Å-2)
+ 2.11E15
M (amu)
58.9332
+
+ Coh b
+ 2.49
+
Dens (g/cm3)
8.9
- Coh b
- 2.49
+ Abs xs
+ 37.18
+
+
+ Dens (at/nm3)
+ 90.94
mminc (Å-1)
@@ -1486,33 +1486,33 @@
66Zn
1
-
- mmabs/l (Å-2)
- 3.15E13
-
-
- Abs xs
- 0.62
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 3.15E13
M (amu)
66.0
+
+ Coh b
+ 5.97
+
Dens (g/cm3)
0.0
- Coh b
- 5.97
+ Abs xs
+ 0.62
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1524,33 +1524,33 @@
96Mo
1
-
- mmabs/l (Å-2)
- 1.74E13
-
-
- Abs xs
- 0.5
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.74E13
M (amu)
96.0
+
+ Coh b
+ 6.2
+
Dens (g/cm3)
0.0
- Coh b
- 6.2
+ Abs xs
+ 0.5
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1562,33 +1562,33 @@
Cl
1
-
- mmabs/l (Å-2)
- 3.16E15
-
-
- Abs xs
- 33.5
-
Inc xs
5.3
- Dens (at/nm3)
- 0.05
+ mmabs/l (Å-2)
+ 3.16E15
M (amu)
35.453
+
+ Coh b
+ 9.577
+
Dens (g/cm3)
0.0
- Coh b
- 9.577
+ Abs xs
+ 33.5
+
+
+ Dens (at/nm3)
+ 0.05
mminc (Å-1)
@@ -1600,33 +1600,33 @@
178Hf
1
-
- mmabs/l (Å-2)
- 1.58E15
-
-
- Abs xs
- 84.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.58E15
M (amu)
178.0
+
+ Coh b
+ 5.9
+
Dens (g/cm3)
0.0
- Coh b
- 5.9
+ Abs xs
+ 84.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1638,33 +1638,33 @@
190Pt
1
-
- mmabs/l (Å-2)
- 2.68E15
-
-
- Abs xs
- 152.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.68E15
M (amu)
190.0
+
+ Coh b
+ 9.0
+
Dens (g/cm3)
0.0
- Coh b
- 9.0
+ Abs xs
+ 152.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1676,33 +1676,33 @@
160Dy
1
-
- mmabs/l (Å-2)
- 1.17E15
-
-
- Abs xs
- 56.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.17E15
M (amu)
160.0
+
+ Coh b
+ 6.7
+
Dens (g/cm3)
0.0
- Coh b
- 6.7
+ Abs xs
+ 56.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1714,33 +1714,33 @@
60Ni
1
-
- mmabs/l (Å-2)
- 1.62E14
-
-
- Abs xs
- 2.9
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.62E14
M (amu)
60.0
+
+ Coh b
+ 2.8
+
Dens (g/cm3)
0.0
- Coh b
- 2.8
+ Abs xs
+ 2.9
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1752,33 +1752,33 @@
Ce
1
-
- mmabs/l (Å-2)
- 1.51E13
-
-
- Abs xs
- 0.63
-
Inc xs
0.001
- Dens (at/nm3)
- 28.62
+ mmabs/l (Å-2)
+ 1.51E13
M (amu)
140.12
+
+ Coh b
+ 4.84
+
Dens (g/cm3)
6.66
- Coh b
- 4.84
+ Abs xs
+ 0.63
+
+
+ Dens (at/nm3)
+ 28.62
mminc (Å-1)
@@ -1790,33 +1790,33 @@
206Pb
1
-
- mmabs/l (Å-2)
- 4.88E11
-
-
- Abs xs
- 0.03
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.88E11
M (amu)
206.0
+
+ Coh b
+ 9.22
+
Dens (g/cm3)
0.0
- Coh b
- 9.22
+ Abs xs
+ 0.03
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1828,33 +1828,33 @@
Cd
1
-
- mmabs/l (Å-2)
- 7.51E16
-
-
- Abs xs
- 2520.0
-
Inc xs
3.46
- Dens (at/nm3)
- 46.3
+ mmabs/l (Å-2)
+ 7.51E16
M (amu)
112.41
+
+ Coh b
+ 4.87
+
Dens (g/cm3)
8.64
- Coh b
- 4.87
+ Abs xs
+ 2520.0
+
+
+ Dens (at/nm3)
+ 46.3
mminc (Å-1)
@@ -1866,33 +1866,33 @@
92Mo
1
-
- mmabs/l (Å-2)
- 6.91E11
-
-
- Abs xs
- 0.019
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 6.91E11
M (amu)
92.0
+
+ Coh b
+ 6.91
+
Dens (g/cm3)
0.0
- Coh b
- 6.91
+ Abs xs
+ 0.019
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1904,33 +1904,33 @@
187Re
1
-
- mmabs/l (Å-2)
- 1.37E15
-
-
- Abs xs
- 76.4
-
Inc xs
1.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.37E15
M (amu)
187.0
+
+ Coh b
+ 9.3
+
Dens (g/cm3)
0.0
- Coh b
- 9.3
+ Abs xs
+ 76.4
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -1942,33 +1942,33 @@
Ca
1
-
- mmabs/l (Å-2)
- 3.59E13
-
-
- Abs xs
- 0.43
-
Inc xs
0.05
- Dens (at/nm3)
- 23.14
+ mmabs/l (Å-2)
+ 3.59E13
M (amu)
40.08
+
+ Coh b
+ 4.7
+
Dens (g/cm3)
1.54
- Coh b
- 4.7
+ Abs xs
+ 0.43
+
+
+ Dens (at/nm3)
+ 23.14
mminc (Å-1)
@@ -1980,33 +1980,33 @@
174Hf
1
-
- mmabs/l (Å-2)
- 1.08E16
-
-
- Abs xs
- 561.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.08E16
M (amu)
174.0
+
+ Coh b
+ 10.9
+
Dens (g/cm3)
0.0
- Coh b
- 10.9
+ Abs xs
+ 561.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2018,34 +2018,34 @@
38Ar
1
+
+ Inc xs
+ 0.0
+
mmabs/l (Å-2)
7.05E13
- Abs xs
- 0.8
+ M (amu)
+ 38.0
- Inc xs
- 0.0
+ Coh b
+ 3.5
- Dens (at/nm3)
+ Dens (g/cm3)
0.0
- M (amu)
- 38.0
+ Abs xs
+ 0.8
- Dens (g/cm3)
+ Dens (at/nm3)
0.0
-
- Coh b
- 3.5
-
mminc (Å-1)
0.0
@@ -2056,33 +2056,33 @@
69Ga
1
-
- mmabs/l (Å-2)
- 1.06E14
-
-
- Abs xs
- 2.18
-
Inc xs
0.091
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.06E14
M (amu)
69.0
+
+ Coh b
+ 7.88
+
Dens (g/cm3)
0.0
- Coh b
- 7.88
+ Abs xs
+ 2.18
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2094,33 +2094,33 @@
111Cd
1
-
- mmabs/l (Å-2)
- 7.24E14
-
-
- Abs xs
- 24.0
-
Inc xs
0.3
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.24E14
M (amu)
111.0
+
+ Coh b
+ 6.5
+
Dens (g/cm3)
0.0
- Coh b
- 6.5
+ Abs xs
+ 24.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2132,33 +2132,33 @@
Br
1
-
- mmabs/l (Å-2)
- 2.89E14
-
-
- Abs xs
- 6.9
-
Inc xs
0.1
- Dens (at/nm3)
- 0.02
+ mmabs/l (Å-2)
+ 2.89E14
M (amu)
79.904
+
+ Coh b
+ 6.795
+
Dens (g/cm3)
0.0
- Coh b
- 6.795
+ Abs xs
+ 6.9
+
+
+ Dens (at/nm3)
+ 0.02
mminc (Å-1)
@@ -2170,33 +2170,33 @@
123Sb
1
-
- mmabs/l (Å-2)
- 1.03E14
-
-
- Abs xs
- 3.8
-
Inc xs
0.001
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.03E14
M (amu)
123.0
+
+ Coh b
+ 5.38
+
Dens (g/cm3)
0.0
- Coh b
- 5.38
+ Abs xs
+ 3.8
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2208,33 +2208,33 @@
Bi
1
-
- mmabs/l (Å-2)
- 5.42E11
-
-
- Abs xs
- 0.0338
-
Inc xs
0.0084
- Dens (at/nm3)
- 28.24
+ mmabs/l (Å-2)
+ 5.42E11
M (amu)
208.98
+
+ Coh b
+ 8.532
+
Dens (g/cm3)
9.8
- Coh b
- 8.532
+ Abs xs
+ 0.0338
+
+
+ Dens (at/nm3)
+ 28.24
mminc (Å-1)
@@ -2246,33 +2246,33 @@
145Nd
1
-
- mmabs/l (Å-2)
- 9.7E14
-
-
- Abs xs
- 42.0
-
Inc xs
5.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 9.7E14
M (amu)
145.0
+
+ Coh b
+ 14.0
+
Dens (g/cm3)
0.0
- Coh b
- 14.0
+ Abs xs
+ 42.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2284,33 +2284,33 @@
190Os
1
-
- mmabs/l (Å-2)
- 2.31E14
-
-
- Abs xs
- 13.1
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.31E14
M (amu)
190.0
+
+ Coh b
+ 11.0
+
Dens (g/cm3)
0.0
- Coh b
- 11.0
+ Abs xs
+ 13.1
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2322,33 +2322,33 @@
Be
1
-
- mmabs/l (Å-2)
- 2.82E12
-
-
- Abs xs
- 0.0076
-
Inc xs
0.0018
- Dens (at/nm3)
- 123.62
+ mmabs/l (Å-2)
+ 2.82E12
M (amu)
9.0122
+
+ Coh b
+ 7.79
+
Dens (g/cm3)
1.85
- Coh b
- 7.79
+ Abs xs
+ 0.0076
+
+
+ Dens (at/nm3)
+ 123.62
mminc (Å-1)
@@ -2360,33 +2360,33 @@
153Eu
1
-
- mmabs/l (Å-2)
- 6.83E15
-
-
- Abs xs
- 312.0
-
Inc xs
1.3
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 6.83E15
M (amu)
153.0
+
+ Coh b
+ 8.22
+
Dens (g/cm3)
0.0
- Coh b
- 8.22
+ Abs xs
+ 312.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2398,33 +2398,33 @@
Ba
1
-
- mmabs/l (Å-2)
- 2.68E13
-
-
- Abs xs
- 1.1
-
Inc xs
0.15
- Dens (at/nm3)
- 15.35
+ mmabs/l (Å-2)
+ 2.68E13
M (amu)
137.33
+
+ Coh b
+ 5.07
+
Dens (g/cm3)
3.5
- Coh b
- 5.07
+ Abs xs
+ 1.1
+
+
+ Dens (at/nm3)
+ 15.35
mminc (Å-1)
@@ -2436,33 +2436,33 @@
Zr
1
-
- mmabs/l (Å-2)
- 6.79E12
-
-
- Abs xs
- 0.185
-
Inc xs
0.02
- Dens (at/nm3)
- 42.85
+ mmabs/l (Å-2)
+ 6.79E12
M (amu)
91.22
+
+ Coh b
+ 7.16
+
Dens (g/cm3)
6.49
- Coh b
- 7.16
+ Abs xs
+ 0.185
+
+
+ Dens (at/nm3)
+ 42.85
mminc (Å-1)
@@ -2474,33 +2474,33 @@
Zn
1
-
- mmabs/l (Å-2)
- 5.68E13
-
-
- Abs xs
- 1.11
-
Inc xs
0.077
- Dens (at/nm3)
- 65.77
+ mmabs/l (Å-2)
+ 5.68E13
M (amu)
65.38
+
+ Coh b
+ 5.68
+
Dens (g/cm3)
7.14
- Coh b
- 5.68
+ Abs xs
+ 1.11
+
+
+ Dens (at/nm3)
+ 65.77
mminc (Å-1)
@@ -2512,33 +2512,33 @@
199Hg
1
-
- mmabs/l (Å-2)
- 3.62E16
-
-
- Abs xs
- 2150.0
-
Inc xs
30.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 3.62E16
M (amu)
199.0
+
+ Coh b
+ 16.9
+
Dens (g/cm3)
0.0
- Coh b
- 16.9
+ Abs xs
+ 2150.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2550,33 +2550,33 @@
Au
1
-
- mmabs/l (Å-2)
- 1.68E15
-
-
- Abs xs
- 98.65
-
Inc xs
0.43
- Dens (at/nm3)
- 57.72
+ mmabs/l (Å-2)
+ 1.68E15
M (amu)
196.97
+
+ Coh b
+ 7.63
+
Dens (g/cm3)
18.88
- Coh b
- 7.63
+ Abs xs
+ 98.65
+
+
+ Dens (at/nm3)
+ 57.72
mminc (Å-1)
@@ -2588,33 +2588,33 @@
As
1
-
- mmabs/l (Å-2)
- 2.01E14
-
-
- Abs xs
- 4.5
-
Inc xs
0.06
- Dens (at/nm3)
- 46.03
+ mmabs/l (Å-2)
+ 2.01E14
M (amu)
74.9216
+
+ Coh b
+ 6.58
+
Dens (g/cm3)
5.73
- Coh b
- 6.58
+ Abs xs
+ 4.5
+
+
+ Dens (at/nm3)
+ 46.03
mminc (Å-1)
@@ -2626,33 +2626,33 @@
148Sm
1
-
- mmabs/l (Å-2)
- 5.43E13
-
-
- Abs xs
- 2.4
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 5.43E13
M (amu)
148.0
+
+ Coh b
+ -3.0
+
Dens (g/cm3)
0.0
- Coh b
- -3.0
+ Abs xs
+ 2.4
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2664,33 +2664,33 @@
Ar
1
-
- mmabs/l (Å-2)
- 5.66E13
-
-
- Abs xs
- 0.675
-
Inc xs
0.225
- Dens (at/nm3)
- 0.03
+ mmabs/l (Å-2)
+ 5.66E13
M (amu)
39.948
+
+ Coh b
+ 1.909
+
Dens (g/cm3)
0.0
- Coh b
- 1.909
+ Abs xs
+ 0.675
+
+
+ Dens (at/nm3)
+ 0.03
mminc (Å-1)
@@ -2702,33 +2702,33 @@
106Pd
1
-
- mmabs/l (Å-2)
- 9.6E12
-
-
- Abs xs
- 0.304
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 9.6E12
M (amu)
106.0
+
+ Coh b
+ 6.4
+
Dens (g/cm3)
0.0
- Coh b
- 6.4
+ Abs xs
+ 0.304
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2740,33 +2740,33 @@
136Ce
1
-
- mmabs/l (Å-2)
- 1.8E14
-
-
- Abs xs
- 7.3
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.8E14
M (amu)
136.0
+
+ Coh b
+ 5.8
+
Dens (g/cm3)
0.0
- Coh b
- 5.8
+ Abs xs
+ 7.3
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2778,33 +2778,33 @@
Am
1
-
- mmabs/l (Å-2)
- 1.04E15
-
-
- Abs xs
- 75.3
-
Inc xs
0.3
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.04E15
M (amu)
243.0
+
+ Coh b
+ 8.3
+
Dens (g/cm3)
0.0
- Coh b
- 8.3
+ Abs xs
+ 75.3
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2816,33 +2816,33 @@
Al
1
-
- mmabs/l (Å-2)
- 2.87E13
-
-
- Abs xs
- 0.231
-
Inc xs
0.0082
- Dens (at/nm3)
- 60.31
+ mmabs/l (Å-2)
+ 2.87E13
M (amu)
26.9815
+
+ Coh b
+ 3.449
+
Dens (g/cm3)
2.7
- Coh b
- 3.449
+ Abs xs
+ 0.231
+
+
+ Dens (at/nm3)
+ 60.31
mminc (Å-1)
@@ -2854,33 +2854,33 @@
144Sm
1
-
- mmabs/l (Å-2)
- 1.63E13
-
-
- Abs xs
- 0.7
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.63E13
M (amu)
144.0
+
+ Coh b
+ -3.0
+
Dens (g/cm3)
0.0
- Coh b
- -3.0
+ Abs xs
+ 0.7
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2892,33 +2892,37 @@
Ag
1
-
- mmabs/l (Å-2)
- 1.96E15
-
-
- Abs xs
- 63.3
-
Inc xs
0.58
- Dens (at/nm3)
- 58.62
+ Scattering Length Density (A^-2)
+ 0.0
+
+
+ mmabs/l (Å-2)
+ 1.96E15
M (amu)
107.868
+
+ Coh b
+ 5.922
+
Dens (g/cm3)
10.5
- Coh b
- 5.922
+ Abs xs
+ 63.3
+
+
+ Dens (at/nm3)
+ 58.62
mminc (Å-1)
@@ -2930,33 +2934,33 @@
102Pd
1
-
- mmabs/l (Å-2)
- 1.12E14
-
-
- Abs xs
- 3.4
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.12E14
M (amu)
102.0
+
+ Coh b
+ 7.7
+
Dens (g/cm3)
0.0
- Coh b
- 7.7
+ Abs xs
+ 3.4
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -2968,33 +2972,33 @@
205Tl
1
-
- mmabs/l (Å-2)
- 1.7E12
-
-
- Abs xs
- 0.104
-
Inc xs
0.007
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.7E12
M (amu)
205.0
+
+ Coh b
+ 9.52
+
Dens (g/cm3)
0.0
- Coh b
- 9.52
+ Abs xs
+ 0.104
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3006,33 +3010,33 @@
88Sr
1
-
- mmabs/l (Å-2)
- 2.21E12
-
-
- Abs xs
- 0.058
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.21E12
M (amu)
88.0
+
+ Coh b
+ 7.15
+
Dens (g/cm3)
0.0
- Coh b
- 7.15
+ Abs xs
+ 0.058
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3044,33 +3048,33 @@
18O
1
-
- mmabs/l (Å-2)
- 2.98E10
-
-
- Abs xs
- 1.6E-4
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.98E10
M (amu)
18.0
+
+ Coh b
+ 5.84
+
Dens (g/cm3)
0.0
- Coh b
- 5.84
+ Abs xs
+ 1.6E-4
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3082,33 +3086,33 @@
171Yb
1
-
- mmabs/l (Å-2)
- 9.52E14
-
-
- Abs xs
- 48.6
-
Inc xs
3.9
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 9.52E14
M (amu)
171.0
+
+ Coh b
+ 9.66
+
Dens (g/cm3)
0.0
- Coh b
- 9.66
+ Abs xs
+ 48.6
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3120,33 +3124,33 @@
108Cd
1
-
- mmabs/l (Å-2)
- 3.41E13
-
-
- Abs xs
- 1.1
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 3.41E13
M (amu)
108.0
+
+ Coh b
+ 5.4
+
Dens (g/cm3)
0.0
- Coh b
- 5.4
+ Abs xs
+ 1.1
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3158,33 +3162,33 @@
84Sr
1
-
- mmabs/l (Å-2)
- 3.47E13
-
-
- Abs xs
- 0.87
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 3.47E13
M (amu)
84.0
+
+ Coh b
+ 7.0
+
Dens (g/cm3)
0.0
- Coh b
- 7.0
+ Abs xs
+ 0.87
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3196,33 +3200,33 @@
116Sn
1
-
- mmabs/l (Å-2)
- 4.04E12
-
-
- Abs xs
- 0.14
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.04E12
M (amu)
116.0
+
+ Coh b
+ 5.93
+
Dens (g/cm3)
0.0
- Coh b
- 5.93
+ Abs xs
+ 0.14
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3234,33 +3238,33 @@
112Sn
1
-
- mmabs/l (Å-2)
- 2.99E13
-
-
- Abs xs
- 1.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.99E13
M (amu)
112.0
+
+ Coh b
+ 6.0
+
Dens (g/cm3)
0.0
- Coh b
- 6.0
+ Abs xs
+ 1.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3272,33 +3276,33 @@
187Os
1
-
- mmabs/l (Å-2)
- 5.73E15
-
-
- Abs xs
- 320.0
-
Inc xs
0.3
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 5.73E15
M (amu)
187.0
+
+ Coh b
+ 10.0
+
Dens (g/cm3)
0.0
- Coh b
- 10.0
+ Abs xs
+ 320.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3310,33 +3314,33 @@
48Ca
1
-
- mmabs/l (Å-2)
- 7.6E13
-
-
- Abs xs
- 1.09
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.6E13
M (amu)
48.0
+
+ Coh b
+ 0.39
+
Dens (g/cm3)
0.0
- Coh b
- 0.39
+ Abs xs
+ 1.09
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3348,33 +3352,33 @@
136Ba
1
-
- mmabs/l (Å-2)
- 1.67E13
-
-
- Abs xs
- 0.68
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.67E13
M (amu)
136.0
+
+ Coh b
+ 4.91
+
Dens (g/cm3)
0.0
- Coh b
- 4.91
+ Abs xs
+ 0.68
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3386,33 +3390,33 @@
Yb
1
-
- mmabs/l (Å-2)
- 6.73E14
-
-
- Abs xs
- 34.8
-
Inc xs
4.0
- Dens (at/nm3)
- 24.24
+ mmabs/l (Å-2)
+ 6.73E14
M (amu)
173.04
+
+ Coh b
+ 12.43
+
Dens (g/cm3)
6.97
- Coh b
- 12.43
+ Abs xs
+ 34.8
+
+
+ Dens (at/nm3)
+ 24.24
mminc (Å-1)
@@ -3424,33 +3428,33 @@
21Ne
1
-
- mmabs/l (Å-2)
- 1.07E14
-
-
- Abs xs
- 0.67
-
Inc xs
0.05
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.07E14
M (amu)
21.0
+
+ Coh b
+ 6.66
+
Dens (g/cm3)
0.0
- Coh b
- 6.66
+ Abs xs
+ 0.67
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3462,33 +3466,33 @@
80Se
1
-
- mmabs/l (Å-2)
- 2.55E13
-
-
- Abs xs
- 0.61
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.55E13
M (amu)
80.0
+
+ Coh b
+ 7.48
+
Dens (g/cm3)
0.0
- Coh b
- 7.48
+ Abs xs
+ 0.61
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3500,33 +3504,33 @@
17O
1
-
- mmabs/l (Å-2)
- 4.65E13
-
-
- Abs xs
- 0.236
-
Inc xs
0.004
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.65E13
M (amu)
17.0
+
+ Coh b
+ 5.78
+
Dens (g/cm3)
0.0
- Coh b
- 5.78
+ Abs xs
+ 0.236
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3538,33 +3542,33 @@
170Er
1
-
- mmabs/l (Å-2)
- 1.14E14
-
-
- Abs xs
- 5.8
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.14E14
M (amu)
170.0
+
+ Coh b
+ 9.6
+
Dens (g/cm3)
0.0
- Coh b
- 9.6
+ Abs xs
+ 5.8
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3576,33 +3580,33 @@
44Ca
1
-
- mmabs/l (Å-2)
- 6.7E13
-
-
- Abs xs
- 0.88
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 6.7E13
M (amu)
44.0
+
+ Coh b
+ 1.42
+
Dens (g/cm3)
0.0
- Coh b
- 1.42
+ Abs xs
+ 0.88
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3614,36 +3618,36 @@
132Ba
1
-
- mmabs/l (Å-2)
- 1.78E14
-
-
- Abs xs
- 7.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.78E14
M (amu)
132.0
-
- Dens (g/cm3)
- 0.0
-
Coh b
7.8
- mminc (Å-1)
+ Dens (g/cm3)
+ 0.0
+
+
+ Abs xs
+ 7.0
+
+
+ Dens (at/nm3)
+ 0.0
+
+
+ mminc (Å-1)
0.0
@@ -3652,33 +3656,33 @@
240Pu
1
-
- mmabs/l (Å-2)
- 4.04E15
-
-
- Abs xs
- 289.6
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.04E15
M (amu)
240.0
+
+ Coh b
+ 3.5
+
Dens (g/cm3)
0.0
- Coh b
- 3.5
+ Abs xs
+ 289.6
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3690,33 +3694,33 @@
40Ca
1
-
- mmabs/l (Å-2)
- 3.43E13
-
-
- Abs xs
- 0.41
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 3.43E13
M (amu)
40.0
+
+ Coh b
+ 4.8
+
Dens (g/cm3)
0.0
- Coh b
- 4.8
+ Abs xs
+ 0.41
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3728,33 +3732,33 @@
28Si
1
-
- mmabs/l (Å-2)
- 2.12E13
-
-
- Abs xs
- 0.177
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.12E13
M (amu)
28.0
+
+ Coh b
+ 4.107
+
Dens (g/cm3)
0.0
- Coh b
- 4.107
+ Abs xs
+ 0.177
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3766,33 +3770,33 @@
25Mg
1
-
- mmabs/l (Å-2)
- 2.54E13
-
-
- Abs xs
- 0.19
-
Inc xs
0.28
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.54E13
M (amu)
25.0
+
+ Coh b
+ 3.62
+
Dens (g/cm3)
0.0
- Coh b
- 3.62
+ Abs xs
+ 0.19
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3804,33 +3808,33 @@
58Fe
1
-
- mmabs/l (Å-2)
- 7.39E13
-
-
- Abs xs
- 1.28
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 7.39E13
M (amu)
58.0
+
+ Coh b
+ 15.0
+
Dens (g/cm3)
0.0
- Coh b
- 15.0
+ Abs xs
+ 1.28
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3842,33 +3846,33 @@
246Cm
1
-
- mmabs/l (Å-2)
- 1.85E13
-
-
- Abs xs
- 1.36
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.85E13
M (amu)
246.0
+
+ Coh b
+ 9.3
+
Dens (g/cm3)
0.0
- Coh b
- 9.3
+ Abs xs
+ 1.36
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3880,33 +3884,33 @@
Xe
1
-
- mmabs/l (Å-2)
- 6.09E14
-
-
- Abs xs
- 23.9
-
Inc xs
0.0
- Dens (at/nm3)
- 0.03
+ mmabs/l (Å-2)
+ 6.09E14
M (amu)
131.3
+
+ Coh b
+ 4.92
+
Dens (g/cm3)
0.01
- Coh b
- 4.92
+ Abs xs
+ 23.9
+
+
+ Dens (at/nm3)
+ 0.03
mminc (Å-1)
@@ -3918,33 +3922,33 @@
168Yb
1
-
- mmabs/l (Å-2)
- 4.44E16
-
-
- Abs xs
- 2230.0
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 4.44E16
M (amu)
168.0
+
+ Coh b
+ -4.07
+
Dens (g/cm3)
0.0
- Coh b
- -4.07
+ Abs xs
+ 2230.0
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3956,33 +3960,33 @@
54Fe
1
-
- mmabs/l (Å-2)
- 1.4E14
-
-
- Abs xs
- 2.25
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.4E14
M (amu)
54.0
+
+ Coh b
+ 4.2
+
Dens (g/cm3)
0.0
- Coh b
- 4.2
+ Abs xs
+ 2.25
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -3994,33 +3998,33 @@
16O
1
-
- mmabs/l (Å-2)
- 2.09E10
-
-
- Abs xs
- 1.0E-4
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 2.09E10
M (amu)
16.0
+
+ Coh b
+ 5.803
+
Dens (g/cm3)
0.0
- Coh b
- 5.803
+ Abs xs
+ 1.0E-4
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -4032,33 +4036,33 @@
49Ti
1
-
- mmabs/l (Å-2)
- 1.5E14
-
-
- Abs xs
- 2.2
-
Inc xs
3.3
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.5E14
M (amu)
49.0
+
+ Coh b
+ 1.04
+
Dens (g/cm3)
0.0
- Coh b
- 1.04
+ Abs xs
+ 2.2
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -4070,33 +4074,33 @@
65Cu
1
-
- mmabs/l (Å-2)
- 1.12E14
-
-
- Abs xs
- 2.17
-
Inc xs
0.4
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 1.12E14
M (amu)
65.0
+
+ Coh b
+ 10.61
+
Dens (g/cm3)
0.0
- Coh b
- 10.61
+ Abs xs
+ 2.17
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -4108,33 +4112,33 @@
186W
1
-
- mmabs/l (Å-2)
- 6.82E14
-
-
- Abs xs
- 37.9
-
Inc xs
0.0
- Dens (at/nm3)
- 0.0
+ mmabs/l (Å-2)
+ 6.82E14
M (amu)
186.0
+
+ Coh b
+ -0.72
+
Dens (g/cm3)
0.0
- Coh b
- -0.72
+ Abs xs
+ 37.9
+
+
+ Dens (at/nm3)
+ 0.0
mminc (Å-1)
@@ -4146,33 +4150,33 @@
180Hf
1
-