summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2011-05-10 10:09:08 (EDT)
committerSteffen Kriese2011-05-10 10:09:08 (EDT)
commit1d79e6ed50ed7435e647930b32239abb9f9fe502 (patch)
tree01831d53e7724bbe54495770eb0eacac94515a3a
parent319a9069dd9860c8e303c219d855c2b89d72adc8 (diff)
downloadorg.eclipse.riena-1d79e6ed50ed7435e647930b32239abb9f9fe502.zip
org.eclipse.riena-1d79e6ed50ed7435e647930b32239abb9f9fe502.tar.gz
org.eclipse.riena-1d79e6ed50ed7435e647930b32239abb9f9fe502.tar.bz2
code cleaning in demo client
-rw-r--r--org.eclipse.riena.demo.client/Riena Demo Client (eclipse look).launch6
-rw-r--r--org.eclipse.riena.demo.client/plugin.xml9
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/application/SwtDemoApplication.java5
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/AbstractEmailController.java30
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerContractController.java12
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerOverviewController.java15
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerSearchController.java3
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailCustomerController.java8
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailDraftController.java14
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailInboxController.java9
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailSentController.java15
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/lnf/EclipseTheme.java7
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerContractView.java132
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerOverviewView.java129
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerSearchView.java29
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView.java68
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView2.java91
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/DemoClientUIControlsFactory.java31
-rw-r--r--org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/RemoteClientTest.java3
19 files changed, 186 insertions, 430 deletions
diff --git a/org.eclipse.riena.demo.client/Riena Demo Client (eclipse look).launch b/org.eclipse.riena.demo.client/Riena Demo Client (eclipse look).launch
index 6a8f339..ce98762 100644
--- a/org.eclipse.riena.demo.client/Riena Demo Client (eclipse look).launch
+++ b/org.eclipse.riena.demo.client/Riena Demo Client (eclipse look).launch
@@ -17,12 +17,12 @@
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -clean -consolelog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.registry.nulltoken=true -Driena.defaultlogging=true -Driena.application.height=700 -Driena.application.width=950 -Driena.lnf=org.eclipse.riena.demo.client:org.eclipse.riena.demo.client.lnf.EclipseLnf -Driena.lnf.update.view=true"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.registry.nulltoken=true &#13;&#10;-Driena.defaultlogging=true &#13;&#10;-Driena.application.height=700 &#13;&#10;-Driena.application.width=950 &#13;&#10;-Driena.lnf=org.eclipse.riena.demo.client:org.eclipse.riena.demo.client.lnf.EclipseLnf &#13;&#10;-Driena.lnf.update.view=true"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.riena.sample.app.client.mail.product"/>
<stringAttribute key="selectedPlugin" value="org.eclipse.ui.workbench"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,org.eclipse.osgi@-1:true,org.eclipse.help@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.log@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.core.contenttype@default:default,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.core.commands@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.servletbridge.extensionbundle@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jface.databinding@default:default,org.apache.commons.logging@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.swt@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.runtime@default:true"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.riena.navigation.ui.swt@default:default,javax.servlet@default:default,org.eclipse.riena.ui.ridgets@default:default,org.eclipse.riena.demo.client@default:default,org.eclipse.riena.beans.common@default:default,org.eclipse.riena.communication.core@default:default,org.eclipse.riena.communication.factory.hessian@default:default,org.pushingpixels.trident@default:default,org.eclipse.riena.ui.core@default:default,org.eclipse.riena.ui.workarea@default:default,org.eclipse.riena.ui.ridgets.swt@default:default,org.apache.log4j@default:default,org.eclipse.riena.navigation@default:default,org.easymock@default:default,org.eclipse.riena.communication.console@default:default,org.eclipse.riena.demo.common@default:default,org.eclipse.nebula.widgets.compositetable@default:default,org.eclipse.riena.ui.filter@default:default,org.eclipse.riena.ui.swt@default:default,org.apache.commons.beanutils@default:default,org.junit@default:default,org.eclipse.riena.ui.common@default:default,org.eclipse.riena.core@default:default,org.eclipse.riena.ui.swt.rcp@default:false,org.eclipse.riena.navigation.ui@default:default,com.caucho.hessian@default:default,org.eclipse.riena.ui.ridgets.swt.optional@default:default,org.eclipse.riena.client@default:default,org.eclipse.core.net@default:default,org.apache.oro@default:default,org.eclipse.core.variables@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.swt@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.log@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.core.expressions@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.servletbridge.extensionbundle@default:false,org.eclipse.jface@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.common@2:true,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.databinding.beans@default:default,org.apache.commons.logging@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.security@default:default,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.ui@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.registry@default:default,com.ibm.icu@default:default,org.eclipse.core.jobs@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.security.win32.x86@default:false"/>
+<stringAttribute key="selected_workspace_plugins" value="org.apache.log4j@default:default,org.eclipse.riena.navigation@default:default,org.eclipse.riena.communication.core@default:default,org.eclipse.riena.ui.ridgets@default:default,javax.servlet@default:default,org.eclipse.riena.ui.ridgets.swt@default:default,org.eclipse.riena.ui.workarea@default:default,com.caucho.hessian@default:default,org.eclipse.riena.demo.client@default:default,org.eclipse.riena.ui.core@default:default,org.eclipse.riena.client@default:default,org.eclipse.riena.ui.filter@default:default,org.eclipse.riena.ui.common@default:default,org.eclipse.riena.ui.swt@default:default,org.apache.oro@default:default,org.pushingpixels.trident@default:default,org.eclipse.riena.communication.console@default:default,org.junit@default:default,org.eclipse.riena.beans.common@default:default,org.eclipse.riena.communication.factory.hessian@default:default,org.eclipse.riena.navigation.ui@default:default,org.easymock@default:default,org.eclipse.riena.ui.swt.rcp@default:false,org.eclipse.core.net@default:default,org.eclipse.riena.demo.common@default:default,org.apache.commons.beanutils@default:default,org.eclipse.riena.core@default:default,org.eclipse.riena.navigation.ui.swt@default:default,org.eclipse.core.variables@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="true"/>
diff --git a/org.eclipse.riena.demo.client/plugin.xml b/org.eclipse.riena.demo.client/plugin.xml
index b924643..bc60e8f 100644
--- a/org.eclipse.riena.demo.client/plugin.xml
+++ b/org.eclipse.riena.demo.client/plugin.xml
@@ -64,17 +64,8 @@
name="mailFolder2"
restorable="true">
</view>
- <view
- allowMultiple="true"
- class="org.eclipse.riena.demo.client.views.EmailCustomerView"
- id="riena.demo.client.customermail.mails"
- name="customerMail"
- restorable="true">
- </view>
</extension>
-
-
<extension
point="org.eclipse.riena.navigation.assemblies2">
<assembly2
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/application/SwtDemoApplication.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/application/SwtDemoApplication.java
index 7e854a7..a372acc 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/application/SwtDemoApplication.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/application/SwtDemoApplication.java
@@ -31,12 +31,9 @@ public class SwtDemoApplication extends SwtApplication {
@Override
protected IApplicationNode createModel() {
-
- final String bundleVersion = (String) Activator.getDefault().getBundle().getHeaders().get("Bundle-Version"); //$NON-NLS-1$
-
+ final String bundleVersion = Activator.getDefault().getBundle().getHeaders().get("Bundle-Version"); //$NON-NLS-1$
final IApplicationNode applicationNode = new ApplicationNode(
new NavigationNodeId("application"), "Riena Demo - " + bundleVersion); //$NON-NLS-1$ //$NON-NLS-2$
-
return applicationNode;
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/AbstractEmailController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/AbstractEmailController.java
index 9595312..7674f21 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/AbstractEmailController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/AbstractEmailController.java
@@ -38,41 +38,37 @@ public class AbstractEmailController extends SubModuleController {
protected IEmailService mailDemoService;
protected Email selectedEmail;
+ private ICustomerService customerDemoService;
+ protected EmailsResult emailsResult = new EmailsResult();
@InjectService(useRanking = true)
public void bind(final IEmailService mailDemoService) {
this.mailDemoService = mailDemoService;
}
- public void unbind(final IEmailService mailDemoService) {
+ public void unbind(@SuppressWarnings("unused")
+ final IEmailService mailDemoService) {
this.mailDemoService = null;
}
- private ICustomerService customerDemoService;
-
@InjectService(useRanking = true)
public void bind(final ICustomerService customerDemoService) {
this.customerDemoService = customerDemoService;
}
- public void unbind(final ICustomerService customerDemoService) {
+ public void unbind(@SuppressWarnings("unused")
+ final ICustomerService customerDemoService) {
this.customerDemoService = null;
}
- protected EmailsResult emailsResult = new EmailsResult();
-
- /*
- * @seeorg.eclipse.riena.navigation.ui.controllers.SubModuleController#
- * configureRidgets()
- */
@Override
public void configureRidgets() {
- final ITableRidget emails = getRidget("emailsTable"); //$NON-NLS-1$
- final ILabelRidget emailSubject = getRidget("emailSubject"); //$NON-NLS-1$
- final ILabelRidget emailFrom = getRidget("emailFrom"); //$NON-NLS-1$
- final ILabelRidget emailTo = getRidget("emailTo"); //$NON-NLS-1$
- final ILabelRidget emailDate = getRidget("emailDate"); //$NON-NLS-1$
- final ITextRidget emailBody = getRidget("emailBody"); //$NON-NLS-1$
+ final ITableRidget emails = getRidget(ITableRidget.class, "emailsTable"); //$NON-NLS-1$
+ final ILabelRidget emailSubject = getRidget(ILabelRidget.class, "emailSubject"); //$NON-NLS-1$
+ final ILabelRidget emailFrom = getRidget(ILabelRidget.class, "emailFrom"); //$NON-NLS-1$
+ final ILabelRidget emailTo = getRidget(ILabelRidget.class, "emailTo"); //$NON-NLS-1$
+ final ILabelRidget emailDate = getRidget(ILabelRidget.class, "emailDate"); //$NON-NLS-1$
+ final ITextRidget emailBody = getRidget(ITextRidget.class, "emailBody"); //$NON-NLS-1$
emails.setComparator(3, new TypedComparator<Date>());
emails.addPropertyChangeListener(new PropertyChangeListener() {
@@ -93,7 +89,7 @@ public class AbstractEmailController extends SubModuleController {
});
if (getNavigationNode().isJumpTarget()) {
- final IActionRidget openCustomerAction = getRidget("openCustomer"); //$NON-NLS-1$
+ final IActionRidget openCustomerAction = getRidget(IActionRidget.class, "openCustomer"); //$NON-NLS-1$
openCustomerAction.setText("Back to Customer"); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerContractController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerContractController.java
index 1ed0de5..12595f8 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerContractController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerContractController.java
@@ -29,23 +29,21 @@ public class CustomerContractController extends SubModuleController {
@Override
public void configureRidgets() {
-
final Customer customer = (Customer) getNavigationNode().getParent().getContext("demo.customer"); //$NON-NLS-1$
- final ITextRidget firstName = getRidget("firstname"); //$NON-NLS-1$
+ final ITextRidget firstName = getRidget(ITextRidget.class, "firstname"); //$NON-NLS-1$
firstName.bindToModel(customer, "firstName"); //$NON-NLS-1$
firstName.setMandatory(true);
- final ITextRidget lastName = getRidget("lastname"); //$NON-NLS-1$
+ final ITextRidget lastName = getRidget(ITextRidget.class, "lastname"); //$NON-NLS-1$
lastName.setMandatory(true);
lastName.bindToModel(customer, "lastName"); //$NON-NLS-1$
- final IMasterDetailsRidget master = getRidget("contracts"); //$NON-NLS-1$
+ final IMasterDetailsRidget master = getRidget(IMasterDetailsRidget.class, "contracts"); //$NON-NLS-1$
master.setDelegate(new ContractDelegate());
final String[] properties = new String[] { "contractNo", "contractValue", "status" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
final String[] headers = new String[] { "contract#", "value", "status" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
master.bindToModel(new WritableList(customer.getContracts(), Contract.class), Contract.class, properties,
headers);
- // master.updateFromModel();
}
@OnNavigationNodeEvent(event = Event.ACTIVATED)
@@ -66,7 +64,6 @@ public class CustomerContractController extends SubModuleController {
txtcontractNo.updateFromModel();
final ITextRidget txtLast = (ITextRidget) container.getRidget("description"); //$NON-NLS-1$
- // txtLast.setMandatory(true);
txtLast.bindToModel(workingCopy, "description"); //$NON-NLS-1$
txtLast.updateFromModel();
@@ -75,8 +72,7 @@ public class CustomerContractController extends SubModuleController {
txtValue.bindToModel(workingCopy, "contractValue"); //$NON-NLS-1$
txtValue.updateFromModel();
- final ITextRidget txtStatus = (ITextRidget) container.getRidget("status"); //$NON-NLS-1$
- // txtStatus.setMandatory(true);
+ final ITextRidget txtStatus = container.getRidget(ITextRidget.class, "status"); //$NON-NLS-1$
txtStatus.bindToModel(workingCopy, "status"); //$NON-NLS-1$
txtStatus.updateFromModel();
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerOverviewController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerOverviewController.java
index 52e4945..a7b1f4d 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerOverviewController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerOverviewController.java
@@ -63,14 +63,13 @@ public class CustomerOverviewController extends SubModuleController {
lastName.setMandatory(true);
lastName.bindToModel(customer, "lastName"); //$NON-NLS-1$
- ((ITextRidget) getRidget("zipcode")).bindToModel(customer.getAddress(), "zipCode"); //$NON-NLS-1$ //$NON-NLS-2$
- ((ITextRidget) getRidget("street")).bindToModel(customer.getAddress(), "street"); //$NON-NLS-1$ //$NON-NLS-2$
- ((ITextRidget) getRidget("city")).bindToModel(customer.getAddress(), "city"); //$NON-NLS-1$ //$NON-NLS-2$
- ((ITextRidget) getRidget("emailaddress")).bindToModel(customer, "emailAddress"); //$NON-NLS-1$ //$NON-NLS-2$
- ((IDateTextRidget) getRidget("birthdate")).bindToModel(customer, "birthDate"); //$NON-NLS-1$ //$NON-NLS-2$
- ((ITextRidget) getRidget("salary")).bindToModel(customer, "salary"); //$NON-NLS-1$ //$NON-NLS-2$
- ((IDecimalTextRidget) getRidget("salary")).setPrecision(2); //$NON-NLS-1$
-
+ getRidget(ITextRidget.class, "zipcode").bindToModel(customer.getAddress(), "zipCode"); //$NON-NLS-1$ //$NON-NLS-2$
+ getRidget(ITextRidget.class, "street").bindToModel(customer.getAddress(), "street"); //$NON-NLS-1$ //$NON-NLS-2$
+ getRidget(ITextRidget.class, "city").bindToModel(customer.getAddress(), "city"); //$NON-NLS-1$ //$NON-NLS-2$
+ getRidget(ITextRidget.class, "emailaddress").bindToModel(customer, "emailAddress"); //$NON-NLS-1$ //$NON-NLS-2$
+ getRidget(IDateTextRidget.class, "birthdate").bindToModel(customer, "birthDate"); //$NON-NLS-1$ //$NON-NLS-2$
+ getRidget(ITextRidget.class, "salary").bindToModel(customer, "salary"); //$NON-NLS-1$ //$NON-NLS-2$
+ getRidget(IDecimalTextRidget.class, "salary").setPrecision(2); //$NON-NLS-1$
updateAllRidgetsFromModel();
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerSearchController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerSearchController.java
index 96c8f38..9f957e6 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerSearchController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/CustomerSearchController.java
@@ -37,7 +37,8 @@ public class CustomerSearchController extends SubModuleController {
this.customerDemoService = customerDemoService;
}
- public void unbind(final ICustomerService customerDemoService) {
+ public void unbind(@SuppressWarnings("unused")
+ final ICustomerService customerDemoService) {
this.customerDemoService = null;
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailCustomerController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailCustomerController.java
index e8b79da..d447154 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailCustomerController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailCustomerController.java
@@ -26,15 +26,11 @@ public class EmailCustomerController extends AbstractEmailController {
private List<Email> customerEmailsList = new ArrayList<Email>();
- /*
- * @seeorg.eclipse.riena.navigation.ui.controllers.SubModuleController#
- * configureRidgets()
- */
@Override
public void configureRidgets() {
super.configureRidgets();
- final ITableRidget emails = getRidget("emailsTable"); //$NON-NLS-1$
+ final ITableRidget emails = getRidget(ITableRidget.class, "emailsTable"); //$NON-NLS-1$
final String[] columnHeaders = { "Subject", "Date" }; //$NON-NLS-1$//$NON-NLS-2$
final String[] columnPropertyNames = { "emailSubject", "emailDate" }; //$NON-NLS-1$//$NON-NLS-2$
@@ -54,7 +50,7 @@ public class EmailCustomerController extends AbstractEmailController {
}
// show all mails concerning this customer
emailsResult.setEmails(customerEmailsList);
- getRidget("emailsTable").updateFromModel(); //$NON-NLS-1$
+ emails.updateFromModel();
}
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailDraftController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailDraftController.java
index 1bfe60b..b5c36b1 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailDraftController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailDraftController.java
@@ -21,15 +21,11 @@ import org.eclipse.riena.ui.ridgets.swt.DateColumnFormatter;
* email draft controller
*/
public class EmailDraftController extends AbstractEmailController {
- /*
- * @seeorg.eclipse.riena.navigation.ui.controllers.SubModuleController#
- * configureRidgets()
- */
@Override
public void configureRidgets() {
super.configureRidgets();
- final ITableRidget emails = getRidget("emailsTable"); //$NON-NLS-1$
+ final ITableRidget emails = getRidget(ITableRidget.class, "emailsTable"); //$NON-NLS-1$
final String[] columnHeaders = { "To", "Subject", "Date" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
final String[] columnPropertyNames = { "emailTo", "emailSubject", "emailDate" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
@@ -45,16 +41,10 @@ public class EmailDraftController extends AbstractEmailController {
final List<Email> draftEmailList = mailDemoService.showEmailsList("Draft"); //$NON-NLS-1$
emailsResult.setEmails(draftEmailList);
- getRidget("emailsTable").updateFromModel(); //$NON-NLS-1$
+ emails.updateFromModel();
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.riena.demo.client.controllers.AbstractEmailController#
- * openCustomerWithEmailAddress()
- */
@Override
protected String openCustomerWithEmailAddress() {
return selectedEmail.getEmailTo();
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailInboxController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailInboxController.java
index c1e602c..0ce47a9 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailInboxController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailInboxController.java
@@ -21,15 +21,10 @@ import org.eclipse.riena.ui.ridgets.swt.DateColumnFormatter;
*
*/
public class EmailInboxController extends AbstractEmailController {
-
- /*
- * @seeorg.eclipse.riena.navigation.ui.controllers.SubModuleController#
- * configureRidgets()
- */
@Override
public void configureRidgets() {
super.configureRidgets();
- final ITableRidget emails = getRidget("emailsTable"); //$NON-NLS-1$
+ final ITableRidget emails = getRidget(ITableRidget.class, "emailsTable"); //$NON-NLS-1$
final String[] columnHeaders = { "From", "Subject", "Date" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
final String[] columnPropertyNames = { "emailFrom", "emailSubject", "emailDate" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
@@ -45,7 +40,7 @@ public class EmailInboxController extends AbstractEmailController {
final List<Email> inboxEmailList = mailDemoService.showEmailsList("Inbox"); //$NON-NLS-1$
emailsResult.setEmails(inboxEmailList);
- getRidget("emailsTable").updateFromModel(); //$NON-NLS-1$
+ getRidget(ITableRidget.class, "emailsTable").updateFromModel(); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailSentController.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailSentController.java
index d873561..9f2b8b6 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailSentController.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/controllers/EmailSentController.java
@@ -21,15 +21,11 @@ import org.eclipse.riena.ui.ridgets.swt.DateColumnFormatter;
* email sent controller
*/
public class EmailSentController extends AbstractEmailController {
- /*
- * @seeorg.eclipse.riena.navigation.ui.controllers.SubModuleController#
- * configureRidgets()
- */
@Override
public void configureRidgets() {
super.configureRidgets();
- final ITableRidget emails = getRidget("emailsTable"); //$NON-NLS-1$
+ final ITableRidget emails = getRidget(ITableRidget.class, "emailsTable"); //$NON-NLS-1$
final String[] columnHeaders = { "To", "Subject", "Date" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
final String[] columnPropertyNames = { "emailTo", "emailSubject", "emailDate" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
@@ -45,19 +41,12 @@ public class EmailSentController extends AbstractEmailController {
final List<Email> sentEmailList = mailDemoService.showEmailsList("Sent"); //$NON-NLS-1$
emailsResult.setEmails(sentEmailList);
- getRidget("emailsTable").updateFromModel(); //$NON-NLS-1$
+ emails.updateFromModel();
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.riena.demo.client.controllers.AbstractEmailController#
- * openCustomerWithEmailAddress()
- */
@Override
protected String openCustomerWithEmailAddress() {
-
return selectedEmail.getEmailTo();
}
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/lnf/EclipseTheme.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/lnf/EclipseTheme.java
index 67e251d..f65ca68 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/lnf/EclipseTheme.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/lnf/EclipseTheme.java
@@ -71,7 +71,7 @@ public class EclipseTheme extends RienaDefaultTheme {
lnf.putLnfResource(LnfKeyConstants.SUB_APPLICATION_SWITCHER_PASSIVE_BACKGROUND_END_COLOR,
lnf.getLnfResource(LnfKeyConstants.EMBEDDED_TITLEBAR_PASSIVE_BORDER_COLOR));
- lnf.putLnfResource("Label.foreground", new ColorLnfResource(112, 54, 190)); //$NON-NLS-1$
+ //lnf.putLnfResource("Label.foreground", new ColorLnfResource(112, 54, 190)); //$NON-NLS-1$
}
private void customizeImages(final ILnfCustomizer lnf) {
@@ -88,6 +88,11 @@ public class EclipseTheme extends RienaDefaultTheme {
}
private void customizeFonts(final ILnfCustomizer lnf) {
+
+ lnf.putLnfResource("Text.font", new FontLnfResource("Arial", 12, SWT.NORMAL)); //$NON-NLS-1$ //$NON-NLS-2$
+
+ lnf.putLnfResource("Label.font", new FontLnfResource("Arial", 10, SWT.NORMAL)); //$NON-NLS-1$ //$NON-NLS-2$
+
lnf.putLnfResource(LnfKeyConstants.TITLELESS_SHELL_FONT, new FontLnfResource("Arial", 11, SWT.BOLD)); //$NON-NLS-1$
lnf.putLnfResource(LnfKeyConstants.DIALOG_FONT, new FontLnfResource("Arial", 11, SWT.BOLD)); //$NON-NLS-1$
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerContractView.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerContractView.java
index b41e391..1c1e5ae 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerContractView.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerContractView.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.riena.demo.client.views;
-import com.swtdesigner.SWTResourceManager;
-
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
@@ -22,6 +20,7 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.riena.internal.demo.client.DemoClientUIControlsFactory;
import org.eclipse.riena.navigation.ui.swt.views.SubModuleView;
import org.eclipse.riena.ui.swt.MasterDetailsComposite;
import org.eclipse.riena.ui.swt.lnf.LnfKeyConstants;
@@ -32,47 +31,25 @@ import org.eclipse.riena.ui.swt.utils.UIControlsFactory;
*
*/
public class CustomerContractView extends SubModuleView {
- public CustomerContractView() {
- }
-
- /**
- * Create contents of the view part
- *
- * @param parent
- */
@Override
public void basicCreatePartControl(final Composite parent) {
final Composite container = new Composite(parent, SWT.NONE);
- // container.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
parent.setLayout(new FillLayout(SWT.VERTICAL));
- final Label personalLabel = new Label(container, SWT.NONE);
- personalLabel.setFont(SWTResourceManager.getFont("Arial", 8, SWT.NORMAL));
- // personalLabel.setBackground(SWTResourceManager.getColor(255, 255, 255));
- personalLabel.setText("Name"); //$NON-NLS-1$
+ final Label personalLabel = DemoClientUIControlsFactory.createSectionLabel(container, "Name"); //$NON-NLS-1$
personalLabel.setBounds(25, 20, 66, 28);
- final Label lFirstname = new Label(container, SWT.NONE);
- lFirstname.setForeground(SWTResourceManager.getColor(1, 0, 0));
- lFirstname.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lFirstname.setText("Firstname"); //$NON-NLS-1$
+ final Label lFirstname = UIControlsFactory.createLabel(container, "Firstname"); //$NON-NLS-1$
lFirstname.setBounds(130, 23, 94, 22);
- final Text firstname = new Text(container, SWT.BORDER);
- firstname.setData("binding_property", "firstname"); //$NON-NLS-1$ //$NON-NLS-2$
- firstname.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
+ final Text firstname = UIControlsFactory.createText(container, SWT.BORDER, "firstname"); //$NON-NLS-1$
firstname.setBounds(236, 20, 181, 32);
- final Label lLastname = new Label(container, SWT.NONE);
- lLastname.setForeground(SWTResourceManager.getColor(1, 0, 0));
- lLastname.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lLastname.setText("Lastname"); //$NON-NLS-1$
+ final Label lLastname = UIControlsFactory.createLabel(container, "Lastname"); //$NON-NLS-1$
lLastname.setBounds(130, 63, 93, 23);
- final Text lastname = new Text(container, SWT.BORDER);
- lastname.setData("binding_property", "lastname"); //$NON-NLS-1$ //$NON-NLS-2$
- lastname.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
+ final Text lastname = UIControlsFactory.createText(container, SWT.BORDER, "lastname"); //$NON-NLS-1$
lastname.setBounds(235, 62, 182, 32);
final Group group = new Group(container, SWT.NONE);
@@ -80,79 +57,46 @@ public class CustomerContractView extends SubModuleView {
group.setLayout(new FillLayout());
group.setBounds(130, 120, 537, 310);
- final MasterDetailsComposite mdComposite = new MasterDetailsComposite(group, SWT.NONE, SWT.BOTTOM);
- mdComposite.getTable().setFont(SWTResourceManager.getFont("Arial", 8, SWT.NORMAL));
- mdComposite.getButtonApply().setFont(SWTResourceManager.getFont("Tahoma", 10, SWT.BOLD));
- mdComposite.getButtonRemove().setFont(SWTResourceManager.getFont("Tahoma", 10, SWT.BOLD));
- mdComposite.getButtonNew().setFont(SWTResourceManager.getFont("Tahoma", 10, SWT.BOLD));
- {
- final Composite details = mdComposite.getDetails();
- details.setLayout(new GridLayout(2, false));
-
- final Label lcontractNo = UIControlsFactory.createLabel(details, "ContractNo"); //$NON-NLS-1$
- lcontractNo.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD));
- final Text contractNo = UIControlsFactory.createText(details);
- lcontractNo.setForeground(SWTResourceManager.getColor(1, 0, 0));
- final GridData gd_contractNo = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
- gd_contractNo.widthHint = 115;
- contractNo.setLayoutData(gd_contractNo);
- // contractNo.setData("binding_property", "contractno");
- mdComposite.addUIControl(contractNo, "contractno"); //$NON-NLS-1$
-
- final Label lDescription = UIControlsFactory.createLabel(details, "Description"); //$NON-NLS-1$
- lDescription.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD));
- final Text description = UIControlsFactory.createText(details);
- lDescription.setForeground(SWTResourceManager.getColor(1, 0, 0));
- final GridData gd_description = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
- gd_description.widthHint = 432;
- description.setLayoutData(gd_description);
- // description.setData("binding_property", "description");
- mdComposite.addUIControl(description, "description"); //$NON-NLS-1$
-
- final Label lValue = UIControlsFactory.createLabel(details, "Value"); //$NON-NLS-1$
- lValue.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD));
- final Text value = UIControlsFactory.createText(details);
- lValue.setForeground(SWTResourceManager.getColor(1, 0, 0));
- final GridData gd_value = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
- gd_value.widthHint = 114;
- value.setLayoutData(gd_value);
- // value.setData("binding_property", "value");
- mdComposite.addUIControl(value, "value"); //$NON-NLS-1$
-
- final Label lStatus = UIControlsFactory.createLabel(details, "Status"); //$NON-NLS-1$
- lStatus.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD));
- final Text status = UIControlsFactory.createText(details);
- lStatus.setForeground(SWTResourceManager.getColor(1, 0, 0));
- final GridData gd_status = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
- gd_status.widthHint = 114;
- status.setLayoutData(gd_status);
- // status.setData("binding_property", "status");
- mdComposite.addUIControl(status, "status"); //$NON-NLS-1$
- }
-
- // mdComposite.setData("binding_property","contracts");
- addUIControl(mdComposite, "contracts"); //$NON-NLS-1$
+ final MasterDetailsComposite mdComposite = UIControlsFactory.createMasterDetails(group, "contracts"); //$NON-NLS-1$
+ final Composite details = mdComposite.getDetails();
+ details.setLayout(new GridLayout(2, false));
+
+ UIControlsFactory.createLabel(details, "ContractNo"); //$NON-NLS-1$
+ final Text contractNo = UIControlsFactory.createText(details, SWT.BORDER, "contractno"); //$NON-NLS-1$
+ final GridData gdcontractNo = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
+ gdcontractNo.widthHint = 115;
+ contractNo.setLayoutData(gdcontractNo);
+
+ UIControlsFactory.createLabel(details, "Description"); //$NON-NLS-1$
+ final Text description = UIControlsFactory.createText(details, SWT.BORDER, "description"); //$NON-NLS-1$
+ final GridData gdDescription = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
+ gdDescription.widthHint = 432;
+ description.setLayoutData(gdDescription);
+
+ UIControlsFactory.createLabel(details, "Value"); //$NON-NLS-1$
+ final Text value = UIControlsFactory.createText(details, SWT.BORDER, "value"); //$NON-NLS-1$
+ final GridData gdValue = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
+ gdValue.widthHint = 114;
+ value.setLayoutData(gdValue);
+
+ UIControlsFactory.createLabel(details, "Status"); //$NON-NLS-1$
+ final Text status = UIControlsFactory.createText(details, SWT.BORDER, "status"); //$NON-NLS-1$
+ final GridData gdStatus = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
+ gdStatus.widthHint = 114;
+ status.setLayoutData(gdStatus);
+
mdComposite.setBounds(5, 15, 520, 350);
- final Button saveButton = new Button(container, SWT.NONE);
+ final Button saveButton = UIControlsFactory.createButton(container, "Save", "save_action"); //$NON-NLS-1$ //$NON-NLS-2$
saveButton.setBounds(625, 465, 109, 38);
- saveButton.setFont(SWTResourceManager.getFont("", 10, SWT.BOLD)); //$NON-NLS-1$
- saveButton.setData("binding_property", "savea_action"); //$NON-NLS-1$ //$NON-NLS-2$
- saveButton.setText("Save"); //$NON-NLS-1$
- final Label contractsLabel = new Label(container, SWT.NONE);
- contractsLabel.setFont(SWTResourceManager.getFont("Arial", 8, SWT.NORMAL));
- contractsLabel.setText("Contracts"); //$NON-NLS-1$
+ final Label contractsLabel = DemoClientUIControlsFactory.createSectionLabel(container, "Contracts"); //$NON-NLS-1$
contractsLabel.setBounds(25, 136, 81, 28);
- final Composite composite = new Composite(container, SWT.NONE);
- composite.setBackground(SWTResourceManager.getColor(121, 117, 168));
+ final Composite composite = UIControlsFactory.createComposite(container, SWT.NONE);
composite.setBounds(30, 105, 706, 2);
- final Composite composite2 = new Composite(container, SWT.NONE);
- composite2.setBackground(SWTResourceManager.getColor(121, 117, 168));
+ final Composite composite2 = UIControlsFactory.createComposite(container, SWT.NONE);
composite2.setBounds(0, 450, 767, 2);
-
}
-
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerOverviewView.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerOverviewView.java
index 1ac910c..ee28ab6 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerOverviewView.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerOverviewView.java
@@ -20,164 +20,87 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.riena.internal.demo.client.DemoClientUIControlsFactory;
import org.eclipse.riena.navigation.ui.swt.views.SubModuleView;
+import org.eclipse.riena.ui.swt.utils.UIControlsFactory;
/**
*
*/
public class CustomerOverviewView extends SubModuleView {
-
- public CustomerOverviewView() {
- }
-
- /**
- * Create contents of the view part
- *
- * @param parent
- */
@Override
public void basicCreatePartControl(final Composite parent) {
-
- Text salary;
- Text birthdate;
- Text city;
- Text zipcode;
- Text street;
- Text lastname;
- Text firstname;
- Text emailaddress;
-
parent.setLayout(new FillLayout());
final Composite container = new Composite(parent, SWT.NONE);
- final Label personalLabel = new Label(container, SWT.NONE);
- personalLabel.setFont(SWTResourceManager.getFont("Arial", 8, SWT.NORMAL));
- personalLabel.setText("Name"); //$NON-NLS-1$
+ final Label personalLabel = DemoClientUIControlsFactory.createSectionLabel(container, "Name"); //$NON-NLS-1$
personalLabel.setBounds(30, 27, 66, 21);
- final Label lFirstname = new Label(container, SWT.NONE);
- lFirstname.setForeground(SWTResourceManager.getColor(1, 0, 0));
- lFirstname.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lFirstname.setText("Firstname"); //$NON-NLS-1$
+ final Label lFirstname = UIControlsFactory.createLabel(container, "Firstname"); //$NON-NLS-1$
lFirstname.setBounds(150, 25, 131, 32);
- firstname = new Text(container, SWT.BORDER);
- firstname.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
+ final Text firstname = UIControlsFactory.createText(container, SWT.BORDER, "firstname"); //$NON-NLS-1$
firstname.setBounds(291, 25, 181, 32);
- addUIControl(firstname, "firstname"); //$NON-NLS-1$
- final Label lLastname = new Label(container, SWT.NONE);
- lLastname.setForeground(SWTResourceManager.getColor(1, 0, 0));
- lLastname.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lLastname.setText("Lastname"); //$NON-NLS-1$
+ final Label lLastname = UIControlsFactory.createLabel(container, "Lastname"); //$NON-NLS-1$
lLastname.setBounds(150, 67, 130, 23);
- lastname = new Text(container, SWT.BORDER);
- lastname.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
+ final Text lastname = UIControlsFactory.createText(container, SWT.BORDER, "lastname"); //$NON-NLS-1$
lastname.setBounds(290, 67, 182, 32);
- addUIControl(lastname, "lastname"); //$NON-NLS-1$
- final Label lZipcity = new Label(container, SWT.NONE);
- lZipcity.setForeground(SWTResourceManager.getColor(1, 0, 0));
+ final Label lZipcity = UIControlsFactory.createLabel(container, "Zipcode / City"); //$NON-NLS-1$
lZipcity.setBounds(150, 173, 132, 23);
- lZipcity.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lZipcity.setText("Zipcode / City"); //$NON-NLS-1$
- final Label address = new Label(container, SWT.NONE);
- address.setFont(SWTResourceManager.getFont("Arial", 8, SWT.NORMAL));
+ final Label address = DemoClientUIControlsFactory.createSectionLabel(container, "Address"); //$NON-NLS-1$
address.setBounds(30, 132, 86, 22);
- address.setText("Address"); //$NON-NLS-1$
- final Label lStreet = new Label(container, SWT.NONE);
- lStreet.setForeground(SWTResourceManager.getColor(1, 0, 0));
+ final Label lStreet = UIControlsFactory.createLabel(container, "Street"); //$NON-NLS-1$
lStreet.setBounds(150, 133, 132, 23);
- lStreet.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lStreet.setText("Street"); //$NON-NLS-1$
- street = new Text(container, SWT.BORDER);
+ final Text street = UIControlsFactory.createText(container, SWT.BORDER, "street"); //$NON-NLS-1$
street.setBounds(291, 125, 182, 32);
- street.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
- addUIControl(street, "street"); //$NON-NLS-1$
- zipcode = new Text(container, SWT.BORDER);
+ final Text zipcode = UIControlsFactory.createText(container, SWT.BORDER, "zipcode"); //$NON-NLS-1$
zipcode.setBounds(290, 165, 66, 32);
- zipcode.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
- addUIControl(zipcode, "zipcode"); //$NON-NLS-1$
- city = new Text(container, SWT.BORDER);
+ final Text city = UIControlsFactory.createText(container, SWT.BORDER, "city"); //$NON-NLS-1$
city.setBounds(377, 165, 182, 32);
- city.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
- addUIControl(city, "city"); //$NON-NLS-1$
- final Label personal = new Label(container, SWT.NONE);
- personal.setFont(SWTResourceManager.getFont("Arial", 8, SWT.NORMAL));
+ final Label personal = DemoClientUIControlsFactory.createSectionLabel(container, "Personal"); //$NON-NLS-1$
personal.setBounds(30, 232, 86, 27);
- personal.setText("Personal"); //$NON-NLS-1$
- final Label lEmailAddress = new Label(container, SWT.NONE);
- lEmailAddress.setForeground(SWTResourceManager.getColor(1, 0, 0));
+ final Label lEmailAddress = UIControlsFactory.createLabel(container, "E-mail address"); //$NON-NLS-1$
lEmailAddress.setBounds(150, 233, 131, 32);
- lEmailAddress.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lEmailAddress.setText("E-mail address"); //$NON-NLS-1$
- final Label lBirthday = new Label(container, SWT.NONE);
- lBirthday.setForeground(SWTResourceManager.getColor(1, 0, 0));
+ final Label lBirthday = UIControlsFactory.createLabel(container, "Birthdate"); //$NON-NLS-1$
lBirthday.setBounds(150, 275, 132, 32);
- lBirthday.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lBirthday.setText("Birthdate"); //$NON-NLS-1$
- final Label lSalary = new Label(container, SWT.NONE);
- lSalary.setForeground(SWTResourceManager.getColor(1, 0, 0));
+ final Label lSalary = UIControlsFactory.createLabel(container, "Salary", "salaryLabel"); //$NON-NLS-1$ //$NON-NLS-2$
lSalary.setBounds(150, 317, 132, 32);
- lSalary.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
- lSalary.setText("Salary"); //$NON-NLS-1$
- addUIControl(lSalary, "salaryLabel"); //$NON-NLS-1$
- emailaddress = new Text(container, SWT.BORDER);
- emailaddress.setData("binding_property", "emailaddress"); //$NON-NLS-1$ //$NON-NLS-2$
+ final Text emailaddress = UIControlsFactory.createText(container, SWT.BORDER, "emailaddress"); //$NON-NLS-1$
emailaddress.setBounds(291, 233, 250, 32);
- emailaddress.setFont(SWTResourceManager.getFont("", 12, SWT.NORMAL)); //$NON-NLS-1$
- addUIControl(emailaddress, "emailaddress"); //$NON-NLS-1$
- birthdate = new Text(container, SWT.BORDER);
- birthdate.setData("type", "date"); //$NON-NLS-1$ //$NON-NLS-2$
+ final Text birthdate = UIControlsFactory.createTextDate(container, "birthdate"); //$NON-NLS-1$
birthdate.setBounds(291, 275, 100, 32);
- birthdate.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
- addUIControl(birthdate, "birthdate"); //$NON-NLS-1$
- salary = new Text(container, SWT.BORDER);
+ final Text salary = UIControlsFactory.createTextDecimal(container, "salary"); //$NON-NLS-1$
salary.setBounds(291, 317, 100, 32);
- salary.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
- salary.setData("type", "decimal"); //$NON-NLS-1$ //$NON-NLS-2$
- addUIControl(salary, "salary"); //$NON-NLS-1$
- final Button saveButton = new Button(container, SWT.NONE);
- saveButton.setFont(SWTResourceManager.getFont("", 10, SWT.BOLD)); //$NON-NLS-1$
- saveButton.setText("Save"); //$NON-NLS-1$
+ final Button saveButton = UIControlsFactory.createButton(container, "Save", "saveAction"); //$NON-NLS-1$ //$NON-NLS-2$
saveButton.setBounds(500, 465, 109, 38);
- addUIControl(saveButton, "saveAction"); //$NON-NLS-1$
- final Button openEmailsButton = new Button(container, SWT.NONE);
- openEmailsButton.setFont(SWTResourceManager.getFont("", 10, SWT.BOLD)); //$NON-NLS-1$
- openEmailsButton.setText("Open Emails"); //$NON-NLS-1$
+ final Button openEmailsButton = UIControlsFactory.createButton(container, "Open Emails", "openEmailsAction"); //$NON-NLS-1$ //$NON-NLS-2$
openEmailsButton.setBounds(625, 465, 109, 38);
- addUIControl(openEmailsButton, "openEmailsAction"); //$NON-NLS-1$
- final Group grpUifilter = new Group(container, SWT.NONE);
- grpUifilter.setText("UIFilter"); //$NON-NLS-1$
+ final Group grpUifilter = UIControlsFactory.createGroup(container, "UIFilter"); //$NON-NLS-1$
grpUifilter.setBounds(576, 340, 190, 89);
- final Button buttonA = new Button(grpUifilter, SWT.TOGGLE);
+ final Button buttonA = UIControlsFactory.createButtonToggle(grpUifilter, "Restricted Content", "assistent"); //$NON-NLS-1$ //$NON-NLS-2$
buttonA.setBounds(28, 20, 143, 26);
- buttonA.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD | SWT.ITALIC)); //$NON-NLS-1$
- buttonA.setText("Restricted Content"); //$NON-NLS-1$
- addUIControl(buttonA, "assistent"); //$NON-NLS-1$
- final Button buttonB = new Button(grpUifilter, SWT.TOGGLE);
+ final Button buttonB = UIControlsFactory.createButtonToggle(grpUifilter, "Add Validation", "mandatory"); //$NON-NLS-1$ //$NON-NLS-2$
buttonB.setBounds(28, 52, 143, 26);
- buttonB.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD | SWT.ITALIC)); //$NON-NLS-1$
- buttonB.setText("Add Validation"); //$NON-NLS-1$
- addUIControl(buttonB, "mandatory"); //$NON-NLS-1$
final Composite composite = new Composite(container, SWT.NONE);
composite.setBackground(SWTResourceManager.getColor(121, 117, 168));
@@ -190,7 +113,5 @@ public class CustomerOverviewView extends SubModuleView {
final Composite composite3 = new Composite(container, SWT.NONE);
composite3.setBackground(SWTResourceManager.getColor(121, 117, 168));
composite3.setBounds(0, 450, 766, 2);
-
}
-
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerSearchView.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerSearchView.java
index dfab71c..fdcc951 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerSearchView.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/CustomerSearchView.java
@@ -29,24 +29,13 @@ import org.eclipse.riena.ui.swt.utils.UIControlsFactory;
*
*/
public class CustomerSearchView extends SubModuleView {
- public CustomerSearchView() {
- }
-
- private Table ergebnis;
-
- /**
- * Create contents of the view part
- *
- * @param parent
- */
@Override
public void basicCreatePartControl(final Composite parent) {
parent.setLayout(new FillLayout(SWT.VERTICAL));
final Composite container = new Composite(parent, SWT.NONE);
- ergebnis = UIControlsFactory.createTable(container, SWT.BORDER | SWT.FULL_SELECTION, "result"); //$NON-NLS-1$
- ergebnis.setFont(SWTResourceManager.getFont("Arial", 10, SWT.NORMAL)); //$NON-NLS-1$
+ final Table ergebnis = UIControlsFactory.createTable(container, SWT.BORDER | SWT.FULL_SELECTION, "result"); //$NON-NLS-1$
ergebnis.setBackground(SWTResourceManager.getColor(255, 255, 254));
ergebnis.setLinesVisible(true);
ergebnis.setHeaderVisible(true);
@@ -68,42 +57,34 @@ public class CustomerSearchView extends SubModuleView {
colCity.setWidth(127);
final Text suchName = UIControlsFactory.createText(container, SWT.BORDER, "searchLastName"); //$NON-NLS-1$
- suchName.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
suchName.setBounds(120, 25, 201, 32);
final Label nameLabel = UIControlsFactory.createLabel(container, "Lastname", SWT.NONE); //$NON-NLS-1$
nameLabel.setForeground(SWTResourceManager.getColor(1, 0, 0));
- nameLabel.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
nameLabel.setBounds(30, 31, 82, 26);
final Button sucheStarten = UIControlsFactory.createButton(container, "&Search", "search"); //$NON-NLS-1$//$NON-NLS-2$
- sucheStarten.setFont(SWTResourceManager.getFont("", 10, SWT.BOLD)); //$NON-NLS-1$
sucheStarten.setBounds(345, 25, 82, 32);
- final Label treffer = UIControlsFactory.createLabel(container, "no", SWT.RIGHT); //$NON-NLS-1$
+ final Label treffer = UIControlsFactory.createLabel(container, "no", SWT.RIGHT, "hits"); //$NON-NLS-1$ //$NON-NLS-2$
+ treffer.setFont(SWTResourceManager.getFont("Arial", 11, SWT.BOLD)); //$NON-NLS-1$
treffer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
- treffer.setForeground(SWTResourceManager.getColor(0, 0, 1));
- treffer.setFont(SWTResourceManager.getFont("", 12, SWT.NONE)); //$NON-NLS-1$
treffer.setBounds(665, 110, 33, 19);
- addUIControl(treffer, "hits"); //$NON-NLS-1$
final Button openCustomerButton = UIControlsFactory.createButton(container, "&Open", "open"); //$NON-NLS-1$ //$NON-NLS-2$
- openCustomerButton.setFont(SWTResourceManager.getFont("", 10, SWT.BOLD)); //$NON-NLS-1$
openCustomerButton.setBounds(250, 460, 133, 34);
final Button newCustomerButton = UIControlsFactory.createButton(container, "New", "new"); //$NON-NLS-1$ //$NON-NLS-2$
- newCustomerButton.setFont(SWTResourceManager.getFont("", 10, SWT.BOLD)); //$NON-NLS-1$
newCustomerButton.setBounds(407, 460, 133, 34);
final Label hitsLabel = UIControlsFactory.createLabel(container, "Hits", SWT.NONE); //$NON-NLS-1$
+ hitsLabel.setFont(SWTResourceManager.getFont("Arial", 11, SWT.BOLD)); //$NON-NLS-1$
hitsLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
hitsLabel.setForeground(SWTResourceManager.getColor(0, 0, 1));
- hitsLabel.setFont(SWTResourceManager.getFont("", 12, SWT.BOLD)); //$NON-NLS-1$
- hitsLabel.setBounds(703, 111, 30, 19);
+ hitsLabel.setBounds(703, 110, 30, 19);
final Composite composite = new Composite(container, SWT.BORDER);
composite.setBackground(SWTResourceManager.getColor(255, 255, 255));
composite.setBounds(-12, 86, 1027, 349);
-
}
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView.java
index e4d92aa..e6ea8d2 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView.java
@@ -12,7 +12,6 @@ package org.eclipse.riena.demo.client.views;
import com.swtdesigner.SWTResourceManager;
-import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.FillLayout;
@@ -24,128 +23,103 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.riena.navigation.ui.swt.views.SubModuleView;
+import org.eclipse.riena.ui.swt.utils.UIControlsFactory;
/**
- * abstract email view
+ * EmailView
*/
public class EmailView extends SubModuleView {
- private Table table;
-
- /**
- * the constructor
- */
- public EmailView() {
- super();
- }
-
@Override
protected void basicCreatePartControl(final Composite parent) {
-
parent.setLayout(new FillLayout(SWT.VERTICAL));
final Font boldFont11 = SWTResourceManager.getFont("Arial", 11, SWT.BOLD); //$NON-NLS-1$
final Font normalFont11 = SWTResourceManager.getFont("Arial", 11, SWT.NORMAL); //$NON-NLS-1$
final Composite container = new Composite(parent, SWT.NONE);
- table = new Table(container, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- table.setFont(SWTResourceManager.getFont("Arial", 10, SWT.NORMAL));
+ final Table table = UIControlsFactory.createTable(container, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION,
+ "emailsTable"); //$NON-NLS-1$
+ table.setFont(SWTResourceManager.getFont("Arial", 10, SWT.NORMAL)); //$NON-NLS-1$
table.setBackground(SWTResourceManager.getColor(255, 255, 254));
table.setLocation(25, 23);
table.setSize(703, 190);
table.setHeaderVisible(true);
table.setLinesVisible(true);
- addUIControl(table, "emailsTable"); //$NON-NLS-1$
final TableColumn tableColumn = new TableColumn(table, SWT.NONE);
tableColumn.setWidth(188);
- final TableColumn tableColumn_1 = new TableColumn(table, SWT.NONE);
- tableColumn_1.setWidth(349);
+ final TableColumn tableColumn1 = new TableColumn(table, SWT.NONE);
+ tableColumn1.setWidth(349);
- final TableColumn tableColumn_2 = new TableColumn(table, SWT.NONE);
- tableColumn_2.setWidth(143);
+ final TableColumn tableColumn2 = new TableColumn(table, SWT.NONE);
+ tableColumn2.setWidth(143);
- Label l = new Label(container, SWT.WRAP);
+ Label l = UIControlsFactory.createLabel(container, "Subject", SWT.WRAP); //$NON-NLS-1$
l.setLocation(25, 254);
l.setSize(58, 18);
l.setFont(boldFont11);
l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("Subject"); //$NON-NLS-1$
- final Label subjectLabel = new Label(container, SWT.NONE);
+ final Label subjectLabel = UIControlsFactory.createLabel(container, "", SWT.NONE, "emailSubject"); //$NON-NLS-1$ //$NON-NLS-2$
subjectLabel.setLocation(103, 254);
subjectLabel.setSize(619, 17);
- // subjectLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
subjectLabel.setFont(SWTResourceManager.getFont("Arial", 11, SWT.BOLD)); //$NON-NLS-1$
subjectLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(subjectLabel, "emailSubject"); //$NON-NLS-1$
- l = new Label(container, SWT.WRAP);
+ l = UIControlsFactory.createLabel(container, "From", SWT.WRAP); //$NON-NLS-1$
l.setLocation(25, 278);
l.setSize(40, 18);
l.setFont(boldFont11);
l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("From"); //$NON-NLS-1$
- final Label fromLabel = new Label(container, SWT.NONE);
+ final Label fromLabel = UIControlsFactory.createLabel(container, "", SWT.NONE, "emailFrom"); //$NON-NLS-1$ //$NON-NLS-2$
fromLabel.setLocation(103, 277);
fromLabel.setSize(302, 17);
- // fromLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
fromLabel.setFont(SWTResourceManager.getFont("Arial", 11, SWT.NORMAL)); //$NON-NLS-1$
fromLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(fromLabel, "emailFrom"); //$NON-NLS-1$
- l = new Label(container, SWT.WRAP);
+ l = UIControlsFactory.createLabel(container, "To", SWT.WRAP); //$NON-NLS-1$
l.setLocation(411, 277);
l.setSize(23, 18);
l.setFont(boldFont11);
l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("To"); //$NON-NLS-1$
- final Label toLabel = new Label(container, SWT.NONE);
+ final Label toLabel = UIControlsFactory.createLabel(container, "", SWT.NONE, "emailTo"); //$NON-NLS-1$ //$NON-NLS-2$
toLabel.setLocation(440, 277);
toLabel.setSize(282, 17);
- // toLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
toLabel.setFont(SWTResourceManager.getFont("Arial", 11, SWT.NORMAL)); //$NON-NLS-1$
toLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(toLabel, "emailTo"); //$NON-NLS-1$
- l = new Label(container, SWT.WRAP);
+ l = UIControlsFactory.createLabel(container, "Date", SWT.WRAP); //$NON-NLS-1$
l.setLocation(25, 302);
l.setSize(37, 18);
l.setFont(boldFont11);
l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("Date"); //$NON-NLS-1$
- final Label dateLabel = new Label(container, SWT.NONE);
+ final Label dateLabel = UIControlsFactory.createLabel(container, "", "emailDate"); //$NON-NLS-1$ //$NON-NLS-2$
dateLabel.setLocation(103, 300);
dateLabel.setSize(142, 17);
- // dateLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
dateLabel.setFont(normalFont11);
dateLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(dateLabel, "emailDate"); //$NON-NLS-1$
// message contents
- final Text emailBody = new Text(container, SWT.MULTI | SWT.WRAP);
+ final Text emailBody = UIControlsFactory.createText(container, SWT.MULTI | SWT.WRAP, "emailBody"); //$NON-NLS-1$
emailBody.setLocation(31, 326);
emailBody.setSize(697, 112);
- GridDataFactory.fillDefaults().grab(true, true).applyTo(emailBody);
emailBody.setFont(normalFont11);
- addUIControl(emailBody, "emailBody"); //$NON-NLS-1$
//create button
- final Button openCustomerButton = new Button(container, SWT.NONE);
+ final Button openCustomerButton = UIControlsFactory.createButton(container, "Open Customer", "openCustomer"); //$NON-NLS-1$ //$NON-NLS-2$
openCustomerButton.setBounds(580, 474, 133, 38);
openCustomerButton.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD)); //$NON-NLS-1$
- openCustomerButton.setText("Open Customer"); //$NON-NLS-1$
- addUIControl(openCustomerButton, "openCustomer"); //$NON-NLS-1$
- final Composite composite = new Composite(container, SWT.NONE);
+ final Composite composite = UIControlsFactory.createComposite(container, SWT.NONE);
composite.setBackground(SWTResourceManager.getColor(121, 117, 168));
composite.setBounds(25, 235, 1054, 2);
- final Composite composite2 = new Composite(container, SWT.NONE);
+ final Composite composite2 = UIControlsFactory.createComposite(container, SWT.NONE);
composite2.setBackground(SWTResourceManager.getColor(121, 117, 168));
composite2.setBounds(25, 457, 1054, 2);
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView2.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView2.java
index 727b892..c36bba3 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView2.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/demo/client/views/EmailView2.java
@@ -12,9 +12,7 @@ package org.eclipse.riena.demo.client.views;
import com.swtdesigner.SWTResourceManager;
-import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -24,126 +22,77 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.riena.navigation.ui.swt.views.SubModuleView;
+import org.eclipse.riena.ui.swt.utils.UIControlsFactory;
/**
- * abstract email view
+ * EmailView
*/
public class EmailView2 extends SubModuleView {
- private Table table;
-
- /**
- * the constructor
- */
- public EmailView2() {
- super();
- }
-
@Override
protected void basicCreatePartControl(final Composite parent) {
parent.setLayout(new FillLayout(SWT.VERTICAL));
- final Font boldFont11 = SWTResourceManager.getFont("Arial", 11, SWT.BOLD); //$NON-NLS-1$
- final Font normalFont11 = SWTResourceManager.getFont("Arial", 11, SWT.NORMAL); //$NON-NLS-1$
final Composite container = new Composite(parent, SWT.NONE);
- table = new Table(container, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- table.setFont(SWTResourceManager.getFont("Arial", 10, SWT.NORMAL));
- table.setBackground(SWTResourceManager.getColor(255, 255, 254));
+ final Table table = UIControlsFactory.createTable(container, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION,
+ "emailsTable"); //$NON-NLS-1$
table.setLocation(25, 23);
table.setSize(703, 190);
table.setHeaderVisible(true);
table.setLinesVisible(true);
- addUIControl(table, "emailsTable"); //$NON-NLS-1$
- final TableColumn tableColumn_1 = new TableColumn(table, SWT.NONE);
- tableColumn_1.setWidth(532);
+ final TableColumn tableColumn1 = new TableColumn(table, SWT.NONE);
+ tableColumn1.setWidth(532);
- final TableColumn tableColumn_2 = new TableColumn(table, SWT.NONE);
- tableColumn_2.setWidth(143);
+ final TableColumn tableColumn2 = new TableColumn(table, SWT.NONE);
+ tableColumn2.setWidth(143);
- Label l = new Label(container, SWT.WRAP);
+ Label l = UIControlsFactory.createLabel(container, "Subject", SWT.WRAP); //$NON-NLS-1$
l.setLocation(25, 254);
l.setSize(58, 18);
- l.setFont(boldFont11);
- l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("Subject"); //$NON-NLS-1$
- final Label subjectLabel = new Label(container, SWT.NONE);
+ final Label subjectLabel = UIControlsFactory.createLabel(container, "", SWT.NONE, "emailSubject"); //$NON-NLS-1$ //$NON-NLS-2$
subjectLabel.setLocation(103, 254);
subjectLabel.setSize(619, 17);
- // subjectLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
- subjectLabel.setFont(SWTResourceManager.getFont("Arial", 11, SWT.BOLD)); //$NON-NLS-1$
- subjectLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(subjectLabel, "emailSubject"); //$NON-NLS-1$
- l = new Label(container, SWT.WRAP);
+ l = UIControlsFactory.createLabel(container, "From", SWT.WRAP); //$NON-NLS-1$
l.setLocation(25, 278);
l.setSize(40, 18);
- l.setFont(boldFont11);
- l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("From"); //$NON-NLS-1$
- final Label fromLabel = new Label(container, SWT.NONE);
+ final Label fromLabel = UIControlsFactory.createLabel(container, "", "emailFrom"); //$NON-NLS-1$ //$NON-NLS-2$
fromLabel.setLocation(103, 277);
fromLabel.setSize(302, 17);
- // fromLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
- fromLabel.setFont(SWTResourceManager.getFont("Arial", 11, SWT.NORMAL)); //$NON-NLS-1$
- fromLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(fromLabel, "emailFrom"); //$NON-NLS-1$
- l = new Label(container, SWT.WRAP);
+ l = UIControlsFactory.createLabel(container, "To", SWT.WRAP); //$NON-NLS-1$
l.setLocation(411, 277);
l.setSize(23, 18);
- l.setFont(boldFont11);
- l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("To"); //$NON-NLS-1$
- final Label toLabel = new Label(container, SWT.NONE);
+ final Label toLabel = UIControlsFactory.createLabel(container, "", "emailTo"); //$NON-NLS-1$//$NON-NLS-2$
toLabel.setLocation(440, 277);
toLabel.setSize(282, 17);
- // toLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
- toLabel.setFont(SWTResourceManager.getFont("Arial", 11, SWT.NORMAL)); //$NON-NLS-1$
- toLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(toLabel, "emailTo"); //$NON-NLS-1$
- l = new Label(container, SWT.WRAP);
+ l = UIControlsFactory.createLabel(container, "Date", SWT.WRAP); //$NON-NLS-1$
l.setLocation(25, 302);
l.setSize(37, 18);
- l.setFont(boldFont11);
- l.setForeground(SWTResourceManager.getColor(1, 1, 1));
- l.setText("Date"); //$NON-NLS-1$
- final Label dateLabel = new Label(container, SWT.NONE);
+ final Label dateLabel = UIControlsFactory.createLabel(container, "", SWT.NONE, "emailDate"); //$NON-NLS-1$ //$NON-NLS-2$
dateLabel.setLocation(103, 300);
dateLabel.setSize(142, 17);
- // dateLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
- dateLabel.setFont(normalFont11);
- dateLabel.setForeground(SWTResourceManager.getColor(1, 1, 1));
- addUIControl(dateLabel, "emailDate"); //$NON-NLS-1$
// message contents
-
- final Text emailBody = new Text(container, SWT.MULTI | SWT.WRAP);
+ final Text emailBody = UIControlsFactory.createText(container, SWT.MULTI | SWT.WRAP, "emailBody"); //$NON-NLS-1$
emailBody.setLocation(31, 326);
emailBody.setSize(697, 112);
- GridDataFactory.fillDefaults().grab(true, true).applyTo(emailBody);
- emailBody.setFont(normalFont11);
- addUIControl(emailBody, "emailBody"); //$NON-NLS-1$
- //create button
- final Button openCustomerButton = new Button(container, SWT.NONE);
+ final Button openCustomerButton = UIControlsFactory.createButton(container, "Open Customer", "openCustomer"); //$NON-NLS-1$ //$NON-NLS-2$
openCustomerButton.setBounds(580, 474, 133, 38);
- openCustomerButton.setFont(SWTResourceManager.getFont("Arial", 10, SWT.BOLD)); //$NON-NLS-1$
- openCustomerButton.setText("Open Customer"); //$NON-NLS-1$
- addUIControl(openCustomerButton, "openCustomer"); //$NON-NLS-1$
- final Composite composite = new Composite(container, SWT.NONE);
+ final Composite composite = UIControlsFactory.createComposite(container, SWT.NONE);
composite.setBackground(SWTResourceManager.getColor(121, 117, 168));
composite.setBounds(25, 235, 1054, 2);
- final Composite composite2 = new Composite(container, SWT.NONE);
+ final Composite composite2 = UIControlsFactory.createComposite(container, SWT.NONE);
composite2.setBackground(SWTResourceManager.getColor(121, 117, 168));
composite2.setBounds(25, 457, 1054, 2);
-
}
}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/DemoClientUIControlsFactory.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/DemoClientUIControlsFactory.java
new file mode 100644
index 0000000..c38adf2
--- /dev/null
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/DemoClientUIControlsFactory.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 compeople AG and others.
+ * 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:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.internal.demo.client;
+
+import com.swtdesigner.SWTResourceManager;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.riena.ui.swt.utils.UIControlsFactory;
+
+/**
+ *
+ */
+public class DemoClientUIControlsFactory extends UIControlsFactory {
+
+ public static Label createSectionLabel(final org.eclipse.swt.widgets.Composite parent, final String text) {
+ final Label createLabel = createLabel(parent, text);
+ createLabel.setFont(SWTResourceManager.getFont("Arial", 12, SWT.BOLD)); //$NON-NLS-1$
+ return createLabel;
+ }
+
+}
diff --git a/org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/RemoteClientTest.java b/org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/RemoteClientTest.java
index 565443a..71efc2a 100644
--- a/org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/RemoteClientTest.java
+++ b/org.eclipse.riena.demo.client/src/org/eclipse/riena/internal/demo/client/RemoteClientTest.java
@@ -25,7 +25,8 @@ public class RemoteClientTest {
}
}
- public void unbind(final ICustomerService customerService) {
+ public void unbind(@SuppressWarnings("unused")
+ final ICustomerService customerService) {
System.out.println("remoteclientest: customer service unbound"); //$NON-NLS-1$
}