Author: kaiyi4
Date: Tue Aug 26 15:36:46 2008
New Revision: 2613
Modified:
trunk/src/ca/sqlpower/architect/swingui/olap/HierarchyEditPanel.java
Log:
Added a required property field, hasAll for hierarchy. It represents a top
level, generic hierarchy thats used in an axis or slicer when the more
specific hierarchies are not included from the view. It is by default true
for any give hierarchy, according to Mondrian Documentation.
Modified:
trunk/src/ca/sqlpower/architect/swingui/olap/HierarchyEditPanel.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/olap/HierarchyEditPanel.java
(original)
+++ trunk/src/ca/sqlpower/architect/swingui/olap/HierarchyEditPanel.java
Tue Aug 26 15:36:46 2008
@@ -22,6 +22,7 @@
import java.util.List;
import java.util.Vector;
+import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JPanel;
@@ -48,6 +49,7 @@
private final JTextField name;
private final JTextField captionField;
private final JComboBox tableChooser;
+ private final JCheckBox hasAll;
/**
* Validation handler for errors in the dialog
@@ -73,6 +75,7 @@
builder.append(status, 3);
builder.append("Name", name = new JTextField(hierarchy.getName()));
builder.append("Caption", captionField = new
JTextField(hierarchy.getCaption()));
+ builder.append("Has All", hasAll = new JCheckBox("Has All",
hierarchy.getHasAll() != null ? hierarchy.getHasAll() : true));
builder.append("Table", tableChooser = new JComboBox(new
Vector<SQLTable>(tables)));
tableChooser.setSelectedItem(OLAPUtil.tableForHierarchy(hierarchy)); // XXX
this isn't quite right.. it would set the default as the local value
@@ -94,6 +97,7 @@
} else {
hierarchy.setCaption(null);
}
+ hierarchy.setHasAll(hasAll.isSelected());
if (tableChooser.getSelectedItem() != null) {
SQLTable stable = (SQLTable) tableChooser.getSelectedItem();
Table table = new Table();