summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Geiger2018-02-21 09:42:35 -0500
committerStefan Geiger2018-02-21 09:42:35 -0500
commit46d25513cd485a09b2ad7aab728f259e2025a8b8 (patch)
tree0f5d7ca789c81665a8254236598b37bb8ae656b6
parente42976028b65c6674fbfb9b0382b216f8950b0e0 (diff)
parente3c3fff8da52ccd1e70e53edec64d0da7e5db198 (diff)
downloadorg.eclipse.riena-46d25513cd485a09b2ad7aab728f259e2025a8b8.zip
org.eclipse.riena-46d25513cd485a09b2ad7aab728f259e2025a8b8.tar.gz
org.eclipse.riena-46d25513cd485a09b2ad7aab728f259e2025a8b8.tar.xz
Merge branch 'release/20180221_6_2_0_stable'v20180221_6_2_0_stable
-rw-r--r--org.eclipse.riena.build3/maps/build.map8
-rw-r--r--org.eclipse.riena.releng/Riena on 3.x.target66
-rw-r--r--org.eclipse.riena.ui.ridgets.swt/.settings/.api_filters11
-rw-r--r--org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/LabelRidget.java5
-rw-r--r--org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/AbstractLabelRidget.java50
-rw-r--r--org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/views/AbstractDialogView.java3
6 files changed, 97 insertions, 46 deletions
diff --git a/org.eclipse.riena.build3/maps/build.map b/org.eclipse.riena.build3/maps/build.map
index 6e695ac..045d623 100644
--- a/org.eclipse.riena.build3/maps/build.map
+++ b/org.eclipse.riena.build3/maps/build.map
@@ -129,7 +129,7 @@ plugin@org.w3c.dom.smil,1.0.1=p2IU,id=org.w3c.dom.smil,repository=http://downloa
plugin@org.w3c.dom.svg,1.1.0=p2IU,id=org.w3c.dom.svg,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20170120165020/repository/
# nebula
-plugin@org.eclipse.nebula.widgets.compositetable,1.0.0=p2IU,id=org.eclipse.nebula.widgets.compositetable,repository=http://download.eclipse.org/technology/nebula/snapshot/
-plugin@org.eclipse.nebula.widgets.compositetable.source,1.0.0=p2IU,id=org.eclipse.nebula.widgets.compositetable.source,repository=http://download.eclipse.org/technology/nebula/snapshot/
-plugin@org.eclipse.nebula.widgets.grid,1.0.0=p2IU,id=org.eclipse.nebula.widgets.grid,repository=http://download.eclipse.org/technology/nebula/snapshot/
-plugin@org.eclipse.nebula.widgets.grid.source,1.0.0=p2IU,id=org.eclipse.nebula.widgets.grid.source,repository=http://download.eclipse.org/technology/nebula/snapshot/
+plugin@org.eclipse.nebula.widgets.compositetable,1.0.0=p2IU,id=org.eclipse.nebula.widgets.compositetable,repository=http://download.eclipse.org/nebula/releases/1.0.0
+plugin@org.eclipse.nebula.widgets.compositetable.source,1.0.0=p2IU,id=org.eclipse.nebula.widgets.compositetable.source,repository=http://download.eclipse.org/nebula/releases/1.0.0
+plugin@org.eclipse.nebula.widgets.grid,1.0.0=p2IU,id=org.eclipse.nebula.widgets.grid,repository=http://download.eclipse.org/nebula/releases/1.0.0
+plugin@org.eclipse.nebula.widgets.grid.source,1.0.0=p2IU,id=org.eclipse.nebula.widgets.grid.source,repository=http://download.eclipse.org/nebula/releases/1.0.0
diff --git a/org.eclipse.riena.releng/Riena on 3.x.target b/org.eclipse.riena.releng/Riena on 3.x.target
index d077bcd..3c334e9 100644
--- a/org.eclipse.riena.releng/Riena on 3.x.target
+++ b/org.eclipse.riena.releng/Riena on 3.x.target
@@ -1,34 +1,32 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.8"?>
-
-<target name="Riena on 3.x" sequenceNumber="26">
-<locations>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.rcp.id" version="3.8.2.M20130131-0800"/>
-<unit id="org.eclipse.rcp.source.feature.group" version="3.8.2.v20130118-180157-96BuGOZFxwOAeG8Ofmqicz0tPK"/>
-<unit id="org.eclipse.rcp.sdk.id" version="3.8.2.M20130131-0800"/>
-<unit id="org.eclipse.equinox.sdk.feature.group" version="3.8.0.v20121212-203907-7M7fA78g4_y-edvtH0ZcEC5NOFTB"/>
-<repository location="http://download.eclipse.org/eclipse/updates/3.8"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.nebula.widgets.grid.feature.feature.group" version="1.0.0.201409040043"/>
-<unit id="org.eclipse.nebula.widgets.compositetable.feature.feature.group" version="1.0.0.201409040043"/>
-<repository location="http://download.eclipse.org/technology/nebula/archives/Q32014/release"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.junit" version="4.11.0.v201303080030"/>
-<unit id="org.easymock.source" version="2.4.0.v20090202-0900"/>
-<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
-<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
-<unit id="org.pushingpixels.trident" version="1.2.0.v201305152020"/>
-<unit id="org.apache.oro.source" version="2.0.8.v201005080400"/>
-<unit id="org.junit.source" version="4.11.0.v201303080030"/>
-<unit id="org.pushingpixels.trident.source" version="1.2.0.v201305152020"/>
-<unit id="org.apache.commons.beanutils.source" version="1.8.0.v201205091237"/>
-<unit id="org.apache.oro" version="2.0.8.v201005080400"/>
-<unit id="org.apache.commons.beanutils" version="1.8.0.v201205091237"/>
-<unit id="org.easymock" version="2.4.0.v20090202-0900"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/"/>
-</location>
-</locations>
-</target>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.8"?><target name="Riena on 3.x" sequenceNumber="28">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.nebula.widgets.compositetable.feature.feature.group" version="1.0.0.201605312033"/>
+<unit id="org.eclipse.nebula.widgets.grid.feature.feature.group" version="1.0.0.201605312033"/>
+<repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.equinox.sdk.feature.group" version="3.8.0.v20121212-203907-7M7fA78g4_y-edvtH0ZcEC5NOFTB"/>
+<unit id="org.eclipse.rcp.id" version="3.8.2.M20130131-0800"/>
+<unit id="org.eclipse.rcp.sdk.id" version="3.8.2.M20130131-0800"/>
+<unit id="org.eclipse.rcp.source.feature.group" version="3.8.2.v20130118-180157-96BuGOZFxwOAeG8Ofmqicz0tPK"/>
+<repository location="http://download.eclipse.org/eclipse/updates/3.8"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.apache.commons.beanutils" version="1.8.0.v201205091237"/>
+<unit id="org.apache.commons.beanutils.source" version="1.8.0.v201205091237"/>
+<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
+<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
+<unit id="org.apache.oro" version="2.0.8.v201005080400"/>
+<unit id="org.apache.oro.source" version="2.0.8.v201005080400"/>
+<unit id="org.easymock" version="2.4.0.v20090202-0900"/>
+<unit id="org.easymock.source" version="2.4.0.v20090202-0900"/>
+<unit id="org.junit" version="4.11.0.v201303080030"/>
+<unit id="org.junit.source" version="4.11.0.v201303080030"/>
+<unit id="org.pushingpixels.trident" version="1.2.0.v201305152020"/>
+<unit id="org.pushingpixels.trident.source" version="1.2.0.v201305152020"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/"/>
+</location>
+</locations>
+</target>
diff --git a/org.eclipse.riena.ui.ridgets.swt/.settings/.api_filters b/org.eclipse.riena.ui.ridgets.swt/.settings/.api_filters
new file mode 100644
index 0000000..0cbc3c4
--- /dev/null
+++ b/org.eclipse.riena.ui.ridgets.swt/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.riena.ui.ridgets.swt" version="2">
+ <resource path="src/org/eclipse/riena/ui/ridgets/swt/AbstractLabelRidget.java" type="org.eclipse.riena.ui.ridgets.swt.AbstractLabelRidget">
+ <filter comment="new abstract Method for getting the Image from Label Widget" id="336695337">
+ <message_arguments>
+ <message_argument value="org.eclipse.riena.ui.ridgets.swt.AbstractLabelRidget"/>
+ <message_argument value="getUIControlImage()"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/LabelRidget.java b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/LabelRidget.java
index 86573b7..67fe118 100644
--- a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/LabelRidget.java
+++ b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/internal/ui/ridgets/swt/LabelRidget.java
@@ -44,6 +44,11 @@ public class LabelRidget extends AbstractLabelRidget {
}
@Override
+ protected Image getUIControlImage() {
+ return getUIControl().getImage();
+ }
+
+ @Override
protected void setUIControlText(final String text) {
getUIControl().setText(text);
}
diff --git a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/AbstractLabelRidget.java b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/AbstractLabelRidget.java
index 2c27858..2924125 100644
--- a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/AbstractLabelRidget.java
+++ b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/AbstractLabelRidget.java
@@ -42,10 +42,13 @@ public abstract class AbstractLabelRidget extends AbstractValueRidget implements
private IconSize iconSize;
private URL iconLocation;
private boolean textAlreadyInitialized;
+ private boolean iconAlreadyInitalized;
+ private Image imageFromUiControl;
private boolean useRidgetIcon;
public AbstractLabelRidget() {
textAlreadyInitialized = false;
+ iconAlreadyInitalized = false;
useRidgetIcon = false;
}
@@ -62,6 +65,7 @@ public abstract class AbstractLabelRidget extends AbstractValueRidget implements
@Override
protected void bindUIControl() {
initText();
+ initIcon();
updateUIText();
updateUIIcon();
}
@@ -82,6 +86,23 @@ public abstract class AbstractLabelRidget extends AbstractValueRidget implements
}
}
+ private void initIcon() {
+ if (iconIDIsEmpty() && !iconAlreadyInitalized) {
+ final Control control = getUIControl();
+ if (control != null && !control.isDisposed()) {
+ final Image uiControlImage = getUIControlImage();
+ if (uiControlImage != null) {
+ imageFromUiControl = uiControlImage;
+ iconAlreadyInitalized = true;
+ }
+ }
+ }
+ }
+
+ private boolean iconIDIsEmpty() {
+ return iconID == null || iconID == EMPTY_STRING;
+ }
+
/**
* {@inheritDoc}
* <p>
@@ -158,6 +179,7 @@ public abstract class AbstractLabelRidget extends AbstractValueRidget implements
public void setText(final String text) {
final String oldValue = this.text;
this.text = text;
+ useRidgetIcon = false;
updateUIText();
firePropertyChange(PROPERTY_TEXT_INTERNAL, oldValue, this.text);
firePropertyChange(ILabelRidget.PROPERTY_TEXT, oldValue, this.text);
@@ -180,8 +202,16 @@ public abstract class AbstractLabelRidget extends AbstractValueRidget implements
*/
protected abstract String getUIControlText();
+ /**
+ * @since 6.2
+ */
+ protected abstract Image getUIControlImage();
+
private void updateUIText() {
if (getUIControl() != null) {
+ if (getUIControlText().equals(text)) {
+ setUIControlText(EMPTY_STRING);
+ }
setUIControlText(text);
}
}
@@ -193,19 +223,25 @@ public abstract class AbstractLabelRidget extends AbstractValueRidget implements
private void updateUIIcon() {
if (getUIControl() != null) {
- Image image = null;
- if (getIcon() != null) {
- image = getManagedImage(getIcon(), iconSize);
- } else if (iconLocation != null) {
- final String key = iconLocation.toExternalForm();
- image = getManagedImage(key);
- }
+ final Image image = getManagedImage();
if ((image != null) || useRidgetIcon) {
setUIControlImage(image);
+ } else if (iconAlreadyInitalized) {
+ setUIControlImage(imageFromUiControl);
}
}
}
+ private Image getManagedImage() {
+ if (getIcon() != null) {
+ return getManagedImage(getIcon(), iconSize);
+ } else if (iconLocation != null) {
+ final String key = iconLocation.toExternalForm();
+ return getManagedImage(key);
+ }
+ return null;
+ }
+
/**
* Sets the controls image.
*/
diff --git a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/views/AbstractDialogView.java b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/views/AbstractDialogView.java
index 476a959..d35a5b3 100644
--- a/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/views/AbstractDialogView.java
+++ b/org.eclipse.riena.ui.ridgets.swt/src/org/eclipse/riena/ui/ridgets/swt/views/AbstractDialogView.java
@@ -43,6 +43,7 @@ import org.eclipse.riena.ui.swt.lnf.LnfKeyConstants;
import org.eclipse.riena.ui.swt.lnf.LnfManager;
import org.eclipse.riena.ui.swt.utils.SWTControlFinder;
import org.eclipse.riena.ui.swt.utils.ShellHelper;
+import org.eclipse.riena.ui.swt.utils.SwtUtilities;
import org.eclipse.riena.ui.swt.utils.UIControlsFactory;
/**
@@ -297,7 +298,7 @@ public abstract class AbstractDialogView extends Dialog {
private Integer getStatuslineHeight() {
if (statusLine) {
- return LnfManager.getLnf().getIntegerSetting(LnfKeyConstants.DIALOG_STATUSLINE_HEIGHT);
+ return SwtUtilities.convertYToDpi(LnfManager.getLnf().getIntegerSetting(LnfKeyConstants.DIALOG_STATUSLINE_HEIGHT));
} else {
return 0;
}