Author: [email protected]
Date: Tue Jan 20 14:31:43 2009
New Revision: 2928
Modified:
trunk/doc/ReleaseNotes.txt
trunk/regress/ca/sqlpower/architect/swingui/TestSwingUIProject.java
trunk/regress/ca/sqlpower/architect/swingui/TestingArchitectSwingSession.java
trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSession.java
trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java
trunk/src/ca/sqlpower/architect/swingui/ProjectSettingsPanel.java
trunk/src/ca/sqlpower/architect/swingui/SwingUIProject.java
trunk/src/ca/sqlpower/architect/swingui/TablePane.java
trunk/src/ca/sqlpower/architect/swingui/messages.properties
Log:
Improved the Show Column features in Project Settings. Change the settings
from checkboxes to radiobuttons which makes more sense.(Note: when first
time useing this build to load previous projects, it will be set to the
default value - Show All Columns) As a result, also changes related
testcases and release notes.
Modified: trunk/doc/ReleaseNotes.txt
==============================================================================
--- trunk/doc/ReleaseNotes.txt (original)
+++ trunk/doc/ReleaseNotes.txt Tue Jan 20 14:31:43 2009
@@ -18,6 +18,12 @@
* Fixed print preview behaviour
* Fixed an issue where loading an OLAP session resulted in a new OLAP
session being added to the project.
+ * Improved the Show Column features in Project Settings. Change the
+ settings from checkboxes to radiobuttons which makes more sense.(Note:
+ when first time useing this build to load previous projects, it will
be
+ set to the default value - Show All Columns)
+
+
0.9.12
Modified:
trunk/regress/ca/sqlpower/architect/swingui/TestSwingUIProject.java
==============================================================================
--- trunk/regress/ca/sqlpower/architect/swingui/TestSwingUIProject.java
(original)
+++ trunk/regress/ca/sqlpower/architect/swingui/TestSwingUIProject.java Tue
Jan 20 14:31:43 2009
@@ -164,7 +164,7 @@
" <source-stuff datastoreTypeAsString='PROJECT'
connectName='Arthur_test' " +
" schema='ARCHITECT_REGRESS' filepath='' />"+
"<target-stuff datastoreTypeAsString='FILE' filePath='Testpath' />
</compare-dm-settings>"+
- " <play-pen zoom=\"12.3\" viewportX=\"200\" viewportY=\"20\"
relationship-style=\"rectilinear\" showPrimaryTag=\"true\"
showForeignTag=\"true\" showAlternateTag=\"true\" showPrimary=\"true\"
showForeign=\"true\" showIndexed=\"true\" showUnique=\"true\"
showTheRest=\"true\">" +
+ " <play-pen zoom=\"12.3\" viewportX=\"200\" viewportY=\"20\"
relationship-style=\"rectilinear\" showPrimaryTag=\"true\"
showForeignTag=\"true\" showAlternateTag=\"true\" showPK=\"false\"
showPKFK=\"false\" showIndexed=\"false\" showPKFKUnique=\"false\"
showPKFKUniqueIndexed=\"false\" showAll=\"true\" >" +
" <table-pane table-ref='TAB0' x='85' y='101' />" +
" <table-pane table-ref='TAB6' x='196' y='38' />" +
" <table-link relationship-ref='REL12' pk-x='76' pk-y='60'
fk-x='114' fk-y='30' />" +
@@ -1027,11 +1027,10 @@
session.setShowPkTag(false);
session.setShowFkTag(false);
session.setShowAkTag(false);
- session.setShowPrimary(false);
- session.setShowForeign(false);
- session.setShowIndexed(false);
- session.setShowUnique(false);
- session.setShowTheRest(false);
+ session.setShowPK(false);
+ session.setShowPKFK(false);
+ session.setShowPKFKUnique(false);
+ session.setShowPKFKUniqueIndexed(false);
ByteArrayOutputStream byteArrayOutputStream = new
ByteArrayOutputStream();
project.save(byteArrayOutputStream, ENCODING);
@@ -1049,11 +1048,10 @@
assertEquals("PK Tag", session.isShowPkTag(),
newSession.isShowPkTag());
assertEquals("FK Tag", session.isShowFkTag(),
newSession.isShowFkTag());
assertEquals("AK Tag", session.isShowAkTag(),
newSession.isShowAkTag());
- assertEquals("Primary Column", session.isShowPrimary(),
newSession.isShowPrimary());
- assertEquals("Foreign Column", session.isShowForeign(),
newSession.isShowForeign());
- assertEquals("Indexed Column", session.isShowIndexed(),
newSession.isShowIndexed());
- assertEquals("Unique Column", session.isShowUnique(),
newSession.isShowUnique());
- assertEquals("The Rest of the Columns", session.isShowTheRest(),
newSession.isShowTheRest());
+ assertEquals("Primary Column", session.isShowPK(),
newSession.isShowPK());
+ assertEquals("PK and Fk Column", session.isShowPKFK(),
newSession.isShowPKFK());
+ assertEquals("PK, FK and Unique Column",
session.isShowPKFKUnique(), newSession.isShowPKFKUnique());
+ assertEquals("PK, FK, Unique and Indexed Columns",
session.isShowPKFKUniqueIndexed(), newSession.isShowPKFKUniqueIndexed());
}
@@ -1071,11 +1069,11 @@
assertEquals("PK Tag", true, session.isShowPkTag());
assertEquals("FK Tag", true, session.isShowFkTag());
assertEquals("AK Tag", true, session.isShowAkTag());
- assertEquals("Primary Column", true, session.isShowPrimary());
- assertEquals("Foreign Column", true, session.isShowForeign());
- assertEquals("Indexed Column", true, session.isShowIndexed());
- assertEquals("Unique Column", true, session.isShowUnique());
- assertEquals("The Rest of the Columns", true,
session.isShowTheRest());
+ assertEquals("Primary Columns", false, session.isShowPK());
+ assertEquals("PK and Fk Columns", false, session.isShowPKFK());
+ assertEquals("PK, FK and Unique Columns", false,
session.isShowPKFKUnique());
+ assertEquals("PK, FK, Unique and Indexed Columns", false,
session.isShowPKFKUniqueIndexed());
+ assertEquals("All Columns", true, session.isShowAll());
}
/**
Modified:
trunk/regress/ca/sqlpower/architect/swingui/TestingArchitectSwingSession.java
==============================================================================
---
trunk/regress/ca/sqlpower/architect/swingui/TestingArchitectSwingSession.java
(original)
+++
trunk/regress/ca/sqlpower/architect/swingui/TestingArchitectSwingSession.java
Tue Jan 20 14:31:43 2009
@@ -75,11 +75,11 @@
private boolean showFkTag = true;
private boolean showAkTag = true;
- protected boolean showPrimary = true;
- protected boolean showForeign = true;
- protected boolean showIndexed = true;
- protected boolean showUnique = true;
- protected boolean showTheRest = true;
+ protected boolean showAll = true;
+ protected boolean show_PK = false;
+ protected boolean show_PK_FK= false;
+ protected boolean show_PK_FK_Unique = false;
+ protected boolean show_PK_FK_Unique_Indexed = false;
public TestingArchitectSwingSession(ArchitectSwingSessionContext
context) throws ArchitectException {
this.context = context;
@@ -303,44 +303,45 @@
}
}
- public boolean isShowPrimary() {
- return showPrimary;
+ public boolean isShowPK() {
+ return show_PK;
}
- public void setShowPrimary(boolean showPrimary) {
- this.showPrimary = showPrimary;
+ public void setShowPK(boolean showPrimary) {
+ this.show_PK = showPrimary;
}
- public boolean isShowForeign() {
- return showForeign;
+ public boolean isShowPKFK() {
+ return show_PK_FK;
}
- public void setShowForeign(boolean showForeign) {
- this.showForeign = showForeign;
+ public void setShowPKFK(boolean showForeign) {
+ this.show_PK_FK = showForeign;
}
- public boolean isShowIndexed() {
- return showIndexed;
+ public boolean isShowPKFKUnique() {
+ return show_PK_FK_Unique;
}
- public void setShowIndexed(boolean showIndexed) {
- this.showIndexed = showIndexed;
+ public void setShowPKFKUnique(boolean showUnique) {
+ this.show_PK_FK_Unique = showUnique;
}
-
- public boolean isShowUnique() {
- return showUnique;
+
+ public boolean isShowPKFKUniqueIndexed() {
+ return show_PK_FK_Unique_Indexed;
}
- public void setShowUnique(boolean showUnique) {
- this.showUnique = showUnique;
+ public void setShowPKFKUniqueIndexed(boolean showIndexed) {
+ this.show_PK_FK_Unique_Indexed = showIndexed;
}
- public boolean isShowTheRest() {
- return showTheRest;
+
+ public boolean isShowAll() {
+ return showAll;
}
- public void setShowTheRest(boolean showTheRest) {
- this.showTheRest = showTheRest;
+ public void setShowAll(boolean showTheRest) {
+ this.showAll = showTheRest;
}
public OLAPRootObject getOLAPRootObject() {
Modified: trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSession.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSession.java
(original)
+++ trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSession.java Tue
Jan 20 14:31:43 2009
@@ -220,54 +220,56 @@
public void setShowAkTag(boolean showAkTag);
/**
- * Indicates whether PK Columns will be shown.
+ * Indicates whether All Columns will be shown.
*/
- public boolean isShowPrimary();
+
+ public boolean isShowAll();
/**
- * Sets whether PK Columns should be shown.
+ * Sets whether All Columns should be shown.
*/
- public void setShowPrimary(boolean showPrimary);
+ public void setShowAll(boolean showForeign);
/**
- * Indicates whether FK Columns will be shown.
+ * Indicates whether PK, FK, Unique and Indexed Columns will be shown.
*/
- public boolean isShowForeign();
+ public boolean isShowPKFKUniqueIndexed();
/**
- * Sets whether FK Columns should be shown.
+ * Sets whether PK, FK, Unique and Indexed Columns should be shown.
*/
- public void setShowForeign(boolean showForeign);
+ public void setShowPKFKUniqueIndexed(boolean showUnique);
/**
- * Indicates whether Unique Columns will be shown.
+ * Indicates whether PK, FK and Unique Columns will be shown.
*/
- public boolean isShowUnique();
+ public boolean isShowPKFKUnique();
/**
- * Sets whether Unique Columns should be shown.
+ * Sets whether PK,FK and Unique Columns should be shown.
*/
- public void setShowUnique(boolean showUnique);
+ public void setShowPKFKUnique(boolean showPKFKUnique);
+
/**
- * Indicates whether Indexed Columns will be shown.
+ * Indicates whether only PK and FK Columns will be shown.
*/
- public boolean isShowIndexed();
+ public boolean isShowPKFK();
/**
- * Sets whether Indexed Columns should be shown.
+ * Sets whether only PK and FK Columns should be shown.
*/
- public void setShowIndexed(boolean showIndexed);
+ public void setShowPKFK(boolean showThePKFK);
/**
- * Indicates whether Columns that are not PK, FK, Unique or Indexed
will be shown.
+ * Indicates whether only PK Columns will be shown.
*/
- public boolean isShowTheRest();
+ public boolean isShowPK();
/**
- * Sets whether Columns that are not PK, FK, Unique or Indexed should
be shown.
+ * Sets whether only PK Columns should be shown.
*/
- public void setShowTheRest(boolean showTheRest);
+ public void setShowPK(boolean showThePK);
/**
* Shows the schema manager dialog for this session's OLAP Schemas.
Modified:
trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java
(original)
+++ trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java
Tue Jan 20 14:31:43 2009
@@ -142,11 +142,11 @@
private boolean showFkTag = true;
private boolean showAkTag = true;
- private boolean showPrimary = true;
- private boolean showForeign = true;
- private boolean showIndexed = true;
- private boolean showUnique = true;
- private boolean showTheRest = true;
+ private boolean showAll = true;
+ private boolean show_Pk_Fk_Unique_Indexed = false;
+ private boolean show_Pk_Fk_Unique = false;
+ private boolean show_Pk_Fk = false;
+ private boolean show_Pk = false;
private List<OLAPEditSession> olapEditSessions;
@@ -871,44 +871,44 @@
}
}
- public boolean isShowPrimary() {
- return showPrimary;
+ public boolean isShowAll() {
+ return showAll;
}
- public void setShowPrimary(boolean showPrimary) {
- this.showPrimary = showPrimary;
+ public void setShowAll(boolean showAll) {
+ this.showAll = showAll;
}
- public boolean isShowForeign() {
- return showForeign;
+ public boolean isShowPKFKUniqueIndexed() {
+ return show_Pk_Fk_Unique_Indexed;
}
- public void setShowForeign(boolean showForeign) {
- this.showForeign = showForeign;
+ public void setShowPKFKUniqueIndexed(boolean showIndexed) {
+ this.show_Pk_Fk_Unique_Indexed = showIndexed;
}
- public boolean isShowIndexed() {
- return showIndexed;
+ public boolean isShowPKFKUnique() {
+ return show_Pk_Fk_Unique;
}
- public void setShowIndexed(boolean showIndexed) {
- this.showIndexed = showIndexed;
+ public void setShowPKFKUnique(boolean showPKFKUnique) {
+ this.show_Pk_Fk_Unique = showPKFKUnique;
}
-
- public boolean isShowUnique() {
- return showUnique;
+
+ public boolean isShowPKFK() {
+ return show_Pk_Fk;
}
- public void setShowUnique(boolean showUnique) {
- this.showUnique = showUnique;
+ public void setShowPKFK(boolean showPKFK) {
+ this.show_Pk_Fk = showPKFK;
}
- public boolean isShowTheRest() {
- return showTheRest;
+ public boolean isShowPK() {
+ return show_Pk;
}
- public void setShowTheRest(boolean showTheRest) {
- this.showTheRest = showTheRest;
+ public void setShowPK(boolean showPK) {
+ this.show_Pk = showPK;
}
public void showOLAPSchemaManager(Window owner) {
@@ -949,5 +949,6 @@
public PrintSettings getPrintSettings() {
return printSettings;
}
+
}
Modified: trunk/src/ca/sqlpower/architect/swingui/ProjectSettingsPanel.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/ProjectSettingsPanel.java
(original)
+++ trunk/src/ca/sqlpower/architect/swingui/ProjectSettingsPanel.java Tue
Jan 20 14:31:43 2009
@@ -63,11 +63,12 @@
private JCheckBox showPkTag;
private JCheckBox showFkTag;
private JCheckBox showAkTag;
- private JCheckBox showPrimary;
- private JCheckBox showForeign;
- private JCheckBox showIndexed;
- private JCheckBox showUnique;
- private JCheckBox showTheRest;
+
+ private JRadioButton showAll;
+ private JRadioButton show_Pk_Fk_Unique_Indexed;
+ private JRadioButton show_Pk_Fk_Unique;
+ private JRadioButton show_Pk_Fk;
+ private JRadioButton show_Pk;
public ProjectSettingsPanel(ArchitectSwingSession session) {
this.session = session;
@@ -111,24 +112,32 @@
add(new JSeparator(), cc.xyw(1, row, 2));
row++;
- add(showPrimary = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showPrimaryKeyColumns")),
cc.xy(1, row)); //$NON-NLS-1$
+ add(showAll = new JRadioButton
(Messages.getString("ProjectSettingsPanel.showAll")), cc.xy(1, row));
//$NON-NLS-1$
add(showPkTag = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showPKTags")), cc.xy(2,
row)); //$NON-NLS-1$
row++;
- add(showForeign = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showForeignKeyColumns")),
cc.xy(1, row)); //$NON-NLS-1$
+ add(show_Pk_Fk_Unique_Indexed = new
JRadioButton(Messages.getString("ProjectSettingsPanel.showPKFKUniqueIndexed")),
cc.xy(1, row)); //$NON-NLS-1$
add(showFkTag = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showFKTags")), cc.xy(2,
row)); //$NON-NLS-1$
row++;
- add(showIndexed = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showIndexedColumns")),
cc.xy(1, row)); //$NON-NLS-1$
+ add(show_Pk_Fk_Unique = new
JRadioButton(Messages.getString("ProjectSettingsPanel.showPKFKUnique")),
cc.xy(1, row)); //$NON-NLS-1$
add(showAkTag = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showAKTags")), cc.xy(2,
row)); //$NON-NLS-1$
row++;
- add(showUnique = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showUniqueColumns")),
cc.xy(1, row)); //$NON-NLS-1$
+ add(show_Pk_Fk = new
JRadioButton(Messages.getString("ProjectSettingsPanel.showPKFK")), cc.xy(1,
row)); //$NON-NLS-1$
add(new JLabel(), cc.xy(2, row));
row++;
- add(showTheRest = new
JCheckBox(Messages.getString("ProjectSettingsPanel.showRemainingColumns")),
cc.xy(1, row)); //$NON-NLS-1$
+ add(show_Pk = new
JRadioButton(Messages.getString("ProjectSettingsPanel.showPK")), cc.xy(1,
row)); //$NON-NLS-1$
add(new JLabel(), cc.xy(2, row));
+
+ ButtonGroup column_show_settings = new ButtonGroup();
+ column_show_settings.add(showAll);
+ column_show_settings.add(show_Pk_Fk_Unique_Indexed);
+ column_show_settings.add(show_Pk_Fk_Unique);
+ column_show_settings.add(show_Pk_Fk);
+ column_show_settings.add(show_Pk);
+
/*
*/
}
@@ -146,12 +155,19 @@
showPkTag.setSelected(session.isShowPkTag());
showFkTag.setSelected(session.isShowFkTag());
showAkTag.setSelected(session.isShowAkTag());
- showPrimary.setSelected(session.isShowPrimary());
- showForeign.setSelected(session.isShowForeign());
- showIndexed.setSelected(session.isShowIndexed());
- showUnique.setSelected(session.isShowUnique());
- showTheRest.setSelected(session.isShowTheRest());
- }
+
+ if (session.isShowAll()) {
+ showAll.setSelected(true);
+ } else if (session.isShowPKFKUniqueIndexed()) {
+ show_Pk_Fk_Unique_Indexed.setSelected(true);
+ } else if (session.isShowPKFKUnique()) {
+ show_Pk_Fk_Unique.setSelected(true);
+ } else if (session.isShowPKFK()) {
+ show_Pk_Fk.setSelected(true);
+ } else {
+ show_Pk.setSelected(true);
+ }
+ }
public boolean applyChanges() {
session.setSavingEntireSource(saveEntireSource.isSelected());
@@ -175,12 +191,13 @@
session.setShowPkTag(showPkTag.isSelected());
session.setShowFkTag(showFkTag.isSelected());
session.setShowAkTag(showAkTag.isSelected());
- session.setShowPrimary(showPrimary.isSelected());
- session.setShowForeign(showForeign.isSelected());
- session.setShowIndexed(showIndexed.isSelected());
- session.setShowUnique(showUnique.isSelected());
- session.setShowTheRest(showTheRest.isSelected());
-
+
+ session.setShowAll(showAll.isSelected());
+
session.setShowPKFKUniqueIndexed(show_Pk_Fk_Unique_Indexed.isSelected());
+ session.setShowPKFKUnique(show_Pk_Fk_Unique.isSelected());
+ session.setShowPKFK(show_Pk_Fk.isSelected());
+ session.setShowPK(show_Pk.isSelected());
+
session.getPlayPen().updateHiddenColumns();
return true;
Modified: trunk/src/ca/sqlpower/architect/swingui/SwingUIProject.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/SwingUIProject.java (original)
+++ trunk/src/ca/sqlpower/architect/swingui/SwingUIProject.java Tue Jan 20
14:31:43 2009
@@ -289,24 +289,24 @@
setupGenericPlayPen(pp, attributes);
// default values in playpen are true
- String showPrimary = attributes.getValue("showPrimary");
//$NON-NLS-1$
- if (showPrimary != null) {
- getSession().setShowPrimary(Boolean.valueOf(showPrimary));
+ String showPK = attributes.getValue("showPK"); //$NON-NLS-1$
+ if (showPK != null) {
+ getSession().setShowPK(Boolean.valueOf(showPK));
}
- String showForeign = attributes.getValue("showForeign");
//$NON-NLS-1$
- if (showForeign != null) {
-
getSession().setShowForeign(Boolean.valueOf(showForeign)); }
- String showIndexed = attributes.getValue("showIndexed");
//$NON-NLS-1$
- if (showIndexed != null) {
- getSession().setShowIndexed(Boolean.valueOf(showIndexed));
+ String showPKFK = attributes.getValue("showPKFK"); //$NON-NLS-1$
+ if (showPKFK != null) {
+ getSession().setShowPKFK(Boolean.valueOf(showPKFK));
}
+ String showPKFKUnique = attributes.getValue("showPKFKUnique");
//$NON-NLS-1$
+ if (showPKFKUnique != null) {
+
getSession().setShowPKFKUnique(Boolean.valueOf(showPKFKUnique));
}
- String showUnique = attributes.getValue("showUnique");
//$NON-NLS-1$
- if (showUnique != null) {
- getSession().setShowUnique(Boolean.valueOf(showUnique));
+ String showPKFKUniqueIndexed =
attributes.getValue("showPKFKUniqueIndexed"); //$NON-NLS-1$
+ if (showPKFKUniqueIndexed != null) {
+
getSession().setShowPKFKUniqueIndexed(Boolean.valueOf(showPKFKUniqueIndexed));
}
- String showTheRest = attributes.getValue("showTheRest");
//$NON-NLS-1$
- if (showTheRest != null) {
- getSession().setShowTheRest(Boolean.valueOf(showTheRest));
+ String showAll = attributes.getValue("showAll"); //$NON-NLS-1$
+ if (showAll != null) {
+ getSession().setShowAll(Boolean.valueOf(showAll));
}
String showPrimaryTag = attributes.getValue("showPrimaryTag");
//$NON-NLS-1$
@@ -972,11 +972,11 @@
tagText.append("
showPrimaryTag=\"").append(getSession().isShowPkTag()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
tagText.append("
showForeignTag=\"").append(getSession().isShowFkTag()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
tagText.append("
showAlternateTag=\"").append(getSession().isShowAkTag()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
- tagText.append("
showPrimary=\"").append(getSession().isShowPrimary()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
- tagText.append("
showForeign=\"").append(getSession().isShowForeign()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
- tagText.append("
showIndexed=\"").append(getSession().isShowIndexed()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
- tagText.append("
showUnique=\"").append(getSession().isShowUnique()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
- tagText.append("
showTheRest=\"").append(getSession().isShowTheRest()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
+ tagText.append("
showPK=\"").append(getSession().isShowPK()).append("\""); //$NON-NLS-1$
//$NON-NLS-2$
+ tagText.append("
showPKFK=\"").append(getSession().isShowPKFK()).append("\""); //$NON-NLS-1$
//$NON-NLS-2$
+ tagText.append("
showPKFKUnique=\"").append(getSession().isShowPKFKUnique()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
+ tagText.append("
showPKFKUniqueIndexed=\"").append(getSession().isShowPKFKUniqueIndexed()).append("\"");
//$NON-NLS-1$ //$NON-NLS-2$
+ tagText.append("
showAll=\"").append(getSession().isShowAll()).append("\""); //$NON-NLS-1$
//$NON-NLS-2$
}
tagText.append(">"); //$NON-NLS-1$
ioo.println(out, tagText.toString());
Modified: trunk/src/ca/sqlpower/architect/swingui/TablePane.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/TablePane.java (original)
+++ trunk/src/ca/sqlpower/architect/swingui/TablePane.java Tue Jan 20
14:31:43 2009
@@ -396,24 +396,22 @@
// if all the boxes are checked, then hide no columns, only these 3
need be
// checked. Draw a truth table if you don't believe me.
- if (!(session.isShowForeign() && session.isShowIndexed()
- && session.isShowTheRest())) {
-
+ if (!session.isShowAll()) {
+
// start with a list of all the columns, then remove the ones
that
// should be shown
hiddenColumns.addAll(getItems());
for (SQLColumn col : getItems()) {
- if (session.isShowPrimary() && col.isPrimaryKey()) {
+ if (col.isPrimaryKey()) {
hiddenColumns.remove(col);
- } else if (session.isShowForeign() && col.isForeignKey()) {
+ }
+ if (!session.isShowPK() && col.isForeignKey()) {
hiddenColumns.remove(col);
- } else if (session.isShowIndexed() && col.isIndexed()) {
+ }
+ if (!session.isShowPK() && !session.isShowPKFK() &&
col.isUniqueIndexed()) {
hiddenColumns.remove(col);
- } else if (session.isShowUnique() && col.isUniqueIndexed())
{
- hiddenColumns.remove(col);
- } else if (session.isShowTheRest() && !(col.isPrimaryKey() ||
col.isForeignKey()
- || col.isIndexed())) {
- // unique index not checked because it is a subset of
index
+ }
+ if (!session.isShowPK() && !session.isShowPKFK()
&& !session.isShowPKFKUnique() && col.isIndexed()) {
hiddenColumns.remove(col);
}
}
Modified: trunk/src/ca/sqlpower/architect/swingui/messages.properties
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/messages.properties (original)
+++ trunk/src/ca/sqlpower/architect/swingui/messages.properties Tue Jan 20
14:31:43 2009
@@ -262,12 +262,12 @@
ProjectSettingsPanel.relationshipLineStyle=Draw Relationships With:
ProjectSettingsPanel.showAKTags=Show AK Tags
ProjectSettingsPanel.showFKTags=Show FK Tags
-ProjectSettingsPanel.showForeignKeyColumns=Show Foreign Key Columns
-ProjectSettingsPanel.showIndexedColumns=Show Indexed Columns
+ProjectSettingsPanel.showAll=Show All Columns
+ProjectSettingsPanel.showPKFKUniqueIndexed=Show PK + FK + Unique + Indexed
Columns
ProjectSettingsPanel.showPKTags=Show PK Tags
-ProjectSettingsPanel.showPrimaryKeyColumns=Show Primary Key Columns
-ProjectSettingsPanel.showRemainingColumns=Show Remaining Columns
-ProjectSettingsPanel.showUniqueColumns=Show Unique Columns
+ProjectSettingsPanel.showPKFK=Show PK and FK Columns only
+ProjectSettingsPanel.showPK=Show PK Columns only
+ProjectSettingsPanel.showPKFKUnique=Show PK + FK + Unique Columns
ProjectSettingsPanel.snapshotSourceDbOption=Snapshot Entire Source
Database in Project File?
RecentMenu.clearRecentFiles=Clear Recent Files
RecentMenu.couldNotOpenFile=Couldn't open file.