Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Leicht2011-06-08 13:31:26 +0000
committerStephan Leicht2011-06-08 13:31:26 +0000
commit4332dae17b066f3b7ee2496e835499f6158503a1 (patch)
tree4e45a5767c2ea0d1512aaa9676693541840eef5f
parentf6485a8c6370b684cd0cd2e88bdb53f5f1d048ce (diff)
downloadorg.eclipse.scout.rt-4332dae17b066f3b7ee2496e835499f6158503a1.tar.gz
org.eclipse.scout.rt-4332dae17b066f3b7ee2496e835499f6158503a1.tar.xz
org.eclipse.scout.rt-4332dae17b066f3b7ee2496e835499f6158503a1.zip
RESOLVED - bug 348678: Smartfield Warn-Text
https://bugs.eclipse.org/bugs/show_bug.cgi?id=348678
-rw-r--r--org.eclipse.scout.rt.client/Release Notes.txt7
-rw-r--r--org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/fields/smartfield/SmartTableForm.java57
-rw-r--r--org.eclipse.scout.rt.ui.swing/Release Notes.txt7
-rw-r--r--org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/form/fields/tablefield/SwingTableStatus.java15
4 files changed, 50 insertions, 36 deletions
diff --git a/org.eclipse.scout.rt.client/Release Notes.txt b/org.eclipse.scout.rt.client/Release Notes.txt
index d2e4a1df9f..ac08358f09 100644
--- a/org.eclipse.scout.rt.client/Release Notes.txt
+++ b/org.eclipse.scout.rt.client/Release Notes.txt
@@ -438,3 +438,10 @@ A menu opened in empty space should not consider any selection on a row.
Thus the menu should open anyway (not querying the selection status of any row).
Migration:
None
+
+06.06.211 sle
+bugzilla 348678
+bsi ticket 102'728
+Smartfield Warn-Text: When a Smartfield-Proposal opens with more than the aloud rows a Warning apears. This is to close to the left border and the color is not styleable.
+Solution: The SmartTableForm had a Label under the table. This label was removed and instead we use the existing TableStatus.
+Migration: None \ No newline at end of file
diff --git a/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/fields/smartfield/SmartTableForm.java b/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/fields/smartfield/SmartTableForm.java
index e080f8212c..a4cc28c4fd 100644
--- a/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/fields/smartfield/SmartTableForm.java
+++ b/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/fields/smartfield/SmartTableForm.java
@@ -14,6 +14,7 @@ import org.eclipse.scout.commons.CompareUtility;
import org.eclipse.scout.commons.TriState;
import org.eclipse.scout.commons.annotations.Order;
import org.eclipse.scout.commons.exception.ProcessingException;
+import org.eclipse.scout.commons.exception.ProcessingStatus;
import org.eclipse.scout.commons.job.JobEx;
import org.eclipse.scout.commons.logger.IScoutLogger;
import org.eclipse.scout.commons.logger.ScoutLogManager;
@@ -25,12 +26,10 @@ import org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractStringColumn;
import org.eclipse.scout.rt.client.ui.form.AbstractFormHandler;
import org.eclipse.scout.rt.client.ui.form.fields.button.AbstractButton;
import org.eclipse.scout.rt.client.ui.form.fields.groupbox.AbstractGroupBox;
-import org.eclipse.scout.rt.client.ui.form.fields.labelfield.AbstractLabelField;
import org.eclipse.scout.rt.client.ui.form.fields.radiobuttongroup.AbstractRadioButtonGroup;
import org.eclipse.scout.rt.client.ui.form.fields.smartfield.SmartTableForm.MainBox.ActiveStateRadioButtonGroup;
import org.eclipse.scout.rt.client.ui.form.fields.smartfield.SmartTableForm.MainBox.NewButton;
import org.eclipse.scout.rt.client.ui.form.fields.smartfield.SmartTableForm.MainBox.ResultTableField;
-import org.eclipse.scout.rt.client.ui.form.fields.smartfield.SmartTableForm.MainBox.StatusField;
import org.eclipse.scout.rt.client.ui.form.fields.tablefield.AbstractTableField;
import org.eclipse.scout.rt.shared.ScoutTexts;
import org.eclipse.scout.rt.shared.services.lookup.ILookupCallFetcher;
@@ -59,8 +58,8 @@ public class SmartTableForm extends AbstractSmartFieldProposalForm {
}
final String textNonNull = text;
final int maxCount = getSmartField().getBrowseMaxRowCount();
- getStatusField().setValue(ScoutTexts.get("searchingProposals"));
- getStatusField().setVisible(true);
+ getResultTableField().setTablePopulateStatus(new ProcessingStatus(ScoutTexts.get("searchingProposals"), ProcessingStatus.WARNING));
+ getResultTableField().setTablePopulateStatus(null);
//async load of data
if (m_dataLoadJob != null) {
m_dataLoadJob.cancel();
@@ -145,17 +144,25 @@ public class SmartTableForm extends AbstractSmartFieldProposalForm {
table.setTableChanging(false);
}
String statusText = null;
+ int severity = ProcessingStatus.INFO;
if (failed != null) {
statusText = failed.getStatus().getMessage();
+ severity = ProcessingStatus.ERROR;
}
else if (rows.length <= 0) {
statusText = ScoutTexts.get("SmartFieldCannotComplete", getSearchText());
+ severity = ProcessingStatus.WARNING;
}
else if (rows.length > getSmartField().getBrowseMaxRowCount()) {
statusText = ScoutTexts.get("SmartFieldMoreThanXRows", "" + getSmartField().getBrowseMaxRowCount());
+ severity = ProcessingStatus.INFO;
+ }
+ if (statusText != null) {
+ getResultTableField().setTablePopulateStatus(new ProcessingStatus(statusText, severity));
+ }
+ else {
+ getResultTableField().setTablePopulateStatus(null);
}
- getStatusField().setValue(statusText);
- getStatusField().setVisible(statusText != null);
if (getNewButton().isEnabled()) {
getNewButton().setVisible(table.getRowCount() <= 0);
}
@@ -218,10 +225,6 @@ public class SmartTableForm extends AbstractSmartFieldProposalForm {
/*
* Fields
*/
- public StatusField getStatusField() {
- return getFieldByClass(StatusField.class);
- }
-
public NewButton getNewButton() {
return getFieldByClass(NewButton.class);
}
@@ -275,6 +278,16 @@ public class SmartTableForm extends AbstractSmartFieldProposalForm {
return true;
}
+ @Override
+ protected boolean getConfiguredTableStatusVisible() {
+ return true;
+ }
+
+ @Override
+ protected void execUpdateTableStatus() {
+ //nop
+ }
+
/*
* inner table
*/
@@ -462,30 +475,6 @@ public class SmartTableForm extends AbstractSmartFieldProposalForm {
}
}// end field
- @Order(50)
- public class StatusField extends AbstractLabelField {
- @Override
- protected boolean getConfiguredLabelVisible() {
- return false;
- }
-
- @Override
- protected int getConfiguredGridH() {
- return 1;
- }
-
- @Override
- protected String getConfiguredForegroundColor() {
- return "FF0000";
- }
-
- @Override
- protected double getConfiguredGridWeightY() {
- return 0;
- }
-
- }// end field
-
}// end main box
/*
diff --git a/org.eclipse.scout.rt.ui.swing/Release Notes.txt b/org.eclipse.scout.rt.ui.swing/Release Notes.txt
index abaf44c0a2..4922df66eb 100644
--- a/org.eclipse.scout.rt.ui.swing/Release Notes.txt
+++ b/org.eclipse.scout.rt.ui.swing/Release Notes.txt
@@ -105,3 +105,10 @@ Solution:
That implies that popup does not close, if user still holds the left mouse button pressed. Scout model is only updated and popup closed after releasing the mouse button.
By holding the mouse button pressed, the user can now scroll across the time entry list for ease of usability.
Migration: None
+
+06.06.211 sle
+bugzilla 348678
+bsi ticket 102'728
+Smartfield Warn-Text: When a Smartfield-Proposal opens with more than the aloud rows a Warning apears. This is to close to the left border and the color is not styleable.
+Solution: The SmartTableForm had a Label under the table. This label was removed and instead we use the existing TableStatus.
+Migration: None \ No newline at end of file
diff --git a/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/form/fields/tablefield/SwingTableStatus.java b/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/form/fields/tablefield/SwingTableStatus.java
index 5b6131dd00..febb723695 100644
--- a/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/form/fields/tablefield/SwingTableStatus.java
+++ b/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/form/fields/tablefield/SwingTableStatus.java
@@ -18,6 +18,7 @@ import javax.swing.border.EmptyBorder;
import javax.swing.plaf.BorderUIResource;
import org.eclipse.scout.commons.exception.IProcessingStatus;
+import org.eclipse.scout.rt.client.ui.form.IForm;
import org.eclipse.scout.rt.client.ui.form.fields.tablefield.ITableField;
import org.eclipse.scout.rt.ui.swing.ISwingEnvironment;
import org.eclipse.scout.rt.ui.swing.LogicalGridData;
@@ -41,7 +42,12 @@ public class SwingTableStatus implements ISwingTableStatus {
m_populateLabel.setBorder(new BorderUIResource(new EmptyBorder(0, 4, 0, 0)));
}
//set synth name AFTER setting ui border
- m_populateLabel.setName("Synth.TableStatus");
+ if (model.getForm() != null && IForm.VIEW_ID_PAGE_TABLE.equals(model.getForm().getDisplayViewId())) {
+ m_populateLabel.setName("Synth.WideTableStatus");
+ }
+ else {
+ m_populateLabel.setName("Synth.TableStatus");
+ }
LogicalGridData tableGridData = LogicalGridDataBuilder.createField(m_env, model.getGridData());
LogicalGridData gd = new LogicalGridData();
gd.gridx = tableGridData.gridx;
@@ -59,7 +65,12 @@ public class SwingTableStatus implements ISwingTableStatus {
m_selectionLabel.setBorder(new BorderUIResource(new EmptyBorder(0, 4, 0, 0)));
}
//set synth name AFTER setting ui border
- m_selectionLabel.setName("Synth.TableStatus");
+ if (model.getForm() != null && IForm.VIEW_ID_PAGE_TABLE.equals(model.getForm().getDisplayViewId())) {
+ m_selectionLabel.setName("Synth.WideTableStatus");
+ }
+ else {
+ m_selectionLabel.setName("Synth.TableStatus");
+ }
tableGridData = LogicalGridDataBuilder.createField(m_env, model.getGridData());
gd = new LogicalGridData();
gd.gridx = tableGridData.gridx;

Back to the top