summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit
diff options
context:
space:
mode:
authorMarko Grönroos <magi@iki.fi>2009-01-11 18:28:55 +0000
committerMarko Grönroos <magi@iki.fi>2009-01-11 18:28:55 +0000
commit9b096dc2bde410fe1a67081237a9bd633571734b (patch)
treed4a86a8a2275bccae90f5f2665d8f0bdaa276332 /src/com/itmill/toolkit
parent119df7c8c082b1d47bc37e94b582b5661b1a9a64 (diff)
downloadvaadin-framework-9b096dc2bde410fe1a67081237a9bd633571734b.tar.gz
vaadin-framework-9b096dc2bde410fe1a67081237a9bd633571734b.zip
Use Alignment.* constants instead of layout-specific *Layout.ALIGNMENT_* constants in setComponentAlignment() in demos. Fixes #2432 for the demos.
svn changeset:6494/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit')
-rw-r--r--src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java7
-rw-r--r--src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java4
-rw-r--r--src/com/itmill/toolkit/automatedtests/featurebrowser/NotificationExample.java4
-rw-r--r--src/com/itmill/toolkit/automatedtests/featurebrowser/RichTextExample.java4
-rw-r--r--src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java7
-rw-r--r--src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java4
-rw-r--r--src/com/itmill/toolkit/demo/featurebrowser/NotificationExample.java4
-rw-r--r--src/com/itmill/toolkit/demo/featurebrowser/RichTextExample.java4
-rw-r--r--src/com/itmill/toolkit/demo/reservation/ReservationApplication.java5
-rw-r--r--src/com/itmill/toolkit/demo/sampler/SamplerApplication.java33
-rw-r--r--src/com/itmill/toolkit/demo/sampler/features/blueprints/ProminentPrimaryActionExample.java11
-rw-r--r--src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java3
-rw-r--r--src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationErrorExample.java3
-rw-r--r--src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanizedExample.java3
-rw-r--r--src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTrayExample.java3
-rw-r--r--src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarningExample.java3
16 files changed, 44 insertions, 58 deletions
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java
index 499aa60f15..5edbca6ea2 100644
--- a/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java
+++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/FeatureBrowser.java
@@ -15,6 +15,7 @@ import com.itmill.toolkit.data.util.IndexedContainer;
import com.itmill.toolkit.terminal.ExternalResource;
import com.itmill.toolkit.terminal.ThemeResource;
import com.itmill.toolkit.ui.AbstractSelect;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.Component;
import com.itmill.toolkit.ui.Embedded;
@@ -259,8 +260,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
wbLayout.addComponent(b);
exp.addComponent(wbLayout);
- exp.setComponentAlignment(wbLayout, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_TOP);
+ exp.setComponentAlignment(wbLayout, Alignment.TOP_RIGHT);
ts = new TabSheet();
ts.setSizeFull();
@@ -273,8 +273,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
+ " | <a href=\"http://www.itmill.com/documentation/\">Documentation</a>");
status.setContentMode(Label.CONTENT_XHTML);
exp.addComponent(status);
- exp.setComponentAlignment(status, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ exp.setComponentAlignment(status, Alignment.MIDDLE_RIGHT);
// select initial section ("All")
tree.setValue(rootId);
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
index 1f7825d661..902eef0446 100644
--- a/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
+++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
@@ -8,6 +8,7 @@ import java.util.Date;
import com.itmill.toolkit.terminal.PaintException;
import com.itmill.toolkit.terminal.PaintTarget;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.Label;
@@ -54,8 +55,7 @@ public class JavaScriptAPIExample extends CustomComponent {
}
});
main.addComponent(b);
- main.setComponentAlignment(b, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ main.setComponentAlignment(b, Alignment.MIDDLE_RIGHT);
//
Label l = new Label(
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/NotificationExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/NotificationExample.java
index 30a86e9ad0..101f3714c7 100644
--- a/src/com/itmill/toolkit/automatedtests/featurebrowser/NotificationExample.java
+++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/NotificationExample.java
@@ -6,6 +6,7 @@ package com.itmill.toolkit.automatedtests.featurebrowser;
import com.itmill.toolkit.data.Item;
import com.itmill.toolkit.ui.AbstractSelect;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.NativeSelect;
@@ -89,7 +90,6 @@ public class NotificationExample extends CustomComponent {
}
});
main.addComponent(b);
- main.setComponentAlignment(b, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ main.setComponentAlignment(b, Alignment.MIDDLE_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/RichTextExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/RichTextExample.java
index 1ea2fba00d..e5c08f00fa 100644
--- a/src/com/itmill/toolkit/automatedtests/featurebrowser/RichTextExample.java
+++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/RichTextExample.java
@@ -4,6 +4,7 @@
package com.itmill.toolkit.automatedtests.featurebrowser;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.Label;
@@ -56,8 +57,7 @@ public class RichTextExample extends CustomComponent {
}
});
main.addComponent(b);
- main.setComponentAlignment(b, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ main.setComponentAlignment(b, Alignment.MIDDLE_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java b/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
index c0dcadc09a..b717cc17ca 100644
--- a/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
+++ b/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
@@ -15,6 +15,7 @@ import com.itmill.toolkit.data.util.IndexedContainer;
import com.itmill.toolkit.terminal.ExternalResource;
import com.itmill.toolkit.terminal.ThemeResource;
import com.itmill.toolkit.ui.AbstractSelect;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.Component;
import com.itmill.toolkit.ui.Embedded;
@@ -258,8 +259,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
wbLayout.addComponent(b);
exp.addComponent(wbLayout);
- exp.setComponentAlignment(wbLayout, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_TOP);
+ exp.setComponentAlignment(wbLayout, Alignment.TOP_RIGHT);
ts = new TabSheet();
ts.setSizeFull();
@@ -272,8 +272,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
+ " | <a href=\"http://www.itmill.com/documentation/\">Documentation</a>");
status.setContentMode(Label.CONTENT_XHTML);
exp.addComponent(status);
- exp.setComponentAlignment(status, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ exp.setComponentAlignment(status, Alignment.MIDDLE_RIGHT);
// select initial section ("All")
tree.setValue(rootId);
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java b/src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java
index 8ffcf04e9d..44dad1a193 100644
--- a/src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java
+++ b/src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java
@@ -8,6 +8,7 @@ import java.util.Date;
import com.itmill.toolkit.terminal.PaintException;
import com.itmill.toolkit.terminal.PaintTarget;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.Label;
@@ -54,8 +55,7 @@ public class JavaScriptAPIExample extends CustomComponent {
}
});
main.addComponent(b);
- main.setComponentAlignment(b, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ main.setComponentAlignment(b, Alignment.MIDDLE_RIGHT);
//
Label l = new Label(
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/NotificationExample.java b/src/com/itmill/toolkit/demo/featurebrowser/NotificationExample.java
index c7c77b3164..98480baaa4 100644
--- a/src/com/itmill/toolkit/demo/featurebrowser/NotificationExample.java
+++ b/src/com/itmill/toolkit/demo/featurebrowser/NotificationExample.java
@@ -6,6 +6,7 @@ package com.itmill.toolkit.demo.featurebrowser;
import com.itmill.toolkit.data.Item;
import com.itmill.toolkit.ui.AbstractSelect;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.NativeSelect;
@@ -89,7 +90,6 @@ public class NotificationExample extends CustomComponent {
}
});
main.addComponent(b);
- main.setComponentAlignment(b, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ main.setComponentAlignment(b, Alignment.MIDDLE_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/RichTextExample.java b/src/com/itmill/toolkit/demo/featurebrowser/RichTextExample.java
index e38ad6cb13..2bced566a1 100644
--- a/src/com/itmill/toolkit/demo/featurebrowser/RichTextExample.java
+++ b/src/com/itmill/toolkit/demo/featurebrowser/RichTextExample.java
@@ -4,6 +4,7 @@
package com.itmill.toolkit.demo.featurebrowser;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.Label;
@@ -56,8 +57,7 @@ public class RichTextExample extends CustomComponent {
}
});
main.addComponent(b);
- main.setComponentAlignment(b, VerticalLayout.ALIGNMENT_RIGHT,
- VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
+ main.setComponentAlignment(b, Alignment.MIDDLE_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java b/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java
index 6c7ce5b9a0..0cd7dfde03 100644
--- a/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java
+++ b/src/com/itmill/toolkit/demo/reservation/ReservationApplication.java
@@ -16,6 +16,7 @@ import com.itmill.toolkit.data.Container;
import com.itmill.toolkit.data.Item;
import com.itmill.toolkit.data.Property.ValueChangeEvent;
import com.itmill.toolkit.data.Property.ValueChangeListener;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.Label;
import com.itmill.toolkit.ui.OrderedLayout;
@@ -106,9 +107,7 @@ public class ReservationApplication extends Application {
reservationButton = new Button("Make reservation", this,
"makeReservation");
infoLayout.addComponent(reservationButton);
- infoLayout.setComponentAlignment(reservationButton,
- OrderedLayout.ALIGNMENT_HORIZONTAL_CENTER,
- OrderedLayout.ALIGNMENT_VERTICAL_CENTER);
+ infoLayout.setComponentAlignment(reservationButton, Alignment.MIDDLE_CENTER);
map = new GoogleMap();
map.setWidth("250px");
diff --git a/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java b/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java
index 13d09bd6d1..10dd8ebabe 100644
--- a/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java
+++ b/src/com/itmill/toolkit/demo/sampler/SamplerApplication.java
@@ -17,6 +17,7 @@ import com.itmill.toolkit.terminal.ClassResource;
import com.itmill.toolkit.terminal.ExternalResource;
import com.itmill.toolkit.terminal.Resource;
import com.itmill.toolkit.terminal.ThemeResource;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.ComboBox;
import com.itmill.toolkit.ui.Component;
@@ -175,15 +176,12 @@ public class SamplerApplication extends Application {
// Upper left logo
Component logo = createLogo();
nav.addComponent(logo);
- nav.setComponentAlignment(logo, HorizontalLayout.ALIGNMENT_LEFT,
- HorizontalLayout.ALIGNMENT_VERTICAL_CENTER);
+ nav.setComponentAlignment(logo, Alignment.MIDDLE_LEFT);
// Breadcrumbs
nav.addComponent(breadcrumbs);
nav.setExpandRatio(breadcrumbs, 1);
- nav.setComponentAlignment(breadcrumbs,
- HorizontalLayout.ALIGNMENT_LEFT,
- HorizontalLayout.ALIGNMENT_VERTICAL_CENTER);
+ nav.setComponentAlignment(breadcrumbs, Alignment.MIDDLE_LEFT);
// invisible analytics -component
nav.addComponent(webAnalytics);
@@ -200,20 +198,17 @@ public class SamplerApplication extends Application {
// Previous sample
Button b = createPrevButton();
nav.addComponent(b);
- nav.setComponentAlignment(b, HorizontalLayout.ALIGNMENT_LEFT,
- HorizontalLayout.ALIGNMENT_VERTICAL_CENTER);
+ nav.setComponentAlignment(b, Alignment.MIDDLE_LEFT);
// Next sample
b = createNextButton();
nav.addComponent(b);
- nav.setComponentAlignment(b, HorizontalLayout.ALIGNMENT_LEFT,
- HorizontalLayout.ALIGNMENT_VERTICAL_CENTER);
+ nav.setComponentAlignment(b, Alignment.MIDDLE_LEFT);
// "Search" combobox
// TODO add input prompt
Component search = createSearch();
nav.addComponent(search);
- nav.setComponentAlignment(search, HorizontalLayout.ALIGNMENT_LEFT,
- HorizontalLayout.ALIGNMENT_VERTICAL_CENTER);
+ nav.setComponentAlignment(search, Alignment.MIDDLE_LEFT);
// togglebar
mainExpand.addComponent(toggleBar);
@@ -240,16 +235,12 @@ public class SamplerApplication extends Application {
Component treeSwitch = createTreeSwitch();
toggleBar.addComponent(treeSwitch);
toggleBar.setExpandRatio(treeSwitch, 1);
- toggleBar.setComponentAlignment(treeSwitch,
- HorizontalLayout.ALIGNMENT_RIGHT,
- HorizontalLayout.ALIGNMENT_VERTICAL_CENTER);
+ toggleBar.setComponentAlignment(treeSwitch, Alignment.MIDDLE_RIGHT);
// List/grid/coverflow
Component mode = createModeSwitch();
toggleBar.addComponent(mode);
- toggleBar.setComponentAlignment(mode,
- HorizontalLayout.ALIGNMENT_RIGHT,
- HorizontalLayout.ALIGNMENT_VERTICAL_CENTER);
+ toggleBar.setComponentAlignment(mode, Alignment.MIDDLE_RIGHT);
}
@@ -648,15 +639,11 @@ public class SamplerApplication extends Application {
grid.setRows(grid.getCursorY() + 1);
grid.addComponent(title, 0, grid.getCursorY(), grid
.getColumns() - 1, grid.getCursorY());
- grid.setComponentAlignment(title,
- GridLayout.ALIGNMENT_LEFT,
- GridLayout.ALIGNMENT_VERTICAL_CENTER);
+ grid.setComponentAlignment(title, Alignment.MIDDLE_LEFT);
} else {
title.setStyleName("subsection");
grid.addComponent(title);
- grid.setComponentAlignment(title,
- GridLayout.ALIGNMENT_LEFT,
- GridLayout.ALIGNMENT_TOP);
+ grid.setComponentAlignment(title, Alignment.MIDDLE_LEFT);
}
} else {
diff --git a/src/com/itmill/toolkit/demo/sampler/features/blueprints/ProminentPrimaryActionExample.java b/src/com/itmill/toolkit/demo/sampler/features/blueprints/ProminentPrimaryActionExample.java
index 8d4a01e316..0d590e3a29 100644
--- a/src/com/itmill/toolkit/demo/sampler/features/blueprints/ProminentPrimaryActionExample.java
+++ b/src/com/itmill/toolkit/demo/sampler/features/blueprints/ProminentPrimaryActionExample.java
@@ -1,5 +1,6 @@
package com.itmill.toolkit.demo.sampler.features.blueprints;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.Button.ClickEvent;
@@ -33,8 +34,7 @@ public class ProminentPrimaryActionExample extends OrderedLayout implements
Button secondary = new Button("or Sign in", this);
secondary.setStyleName(Button.STYLE_LINK);
horiz.addComponent(secondary);
- horiz.setComponentAlignment(secondary, ALIGNMENT_LEFT,
- ALIGNMENT_VERTICAL_CENTER);
+ horiz.setComponentAlignment(secondary, Alignment.MIDDLE_LEFT);
}
{ // Login / Forgot password?
@@ -45,14 +45,11 @@ public class ProminentPrimaryActionExample extends OrderedLayout implements
addComponent(vert);
Button primary = new Button("Login", this);
vert.addComponent(primary);
- vert.setComponentAlignment(primary, OrderedLayout.ALIGNMENT_RIGHT,
- OrderedLayout.ALIGNMENT_BOTTOM);
+ vert.setComponentAlignment(primary, Alignment.BOTTOM_RIGHT);
Button secondary = new Button("Forgot your password?", this);
secondary.setStyleName(Button.STYLE_LINK);
vert.addComponent(secondary);
- vert.setComponentAlignment(secondary,
- OrderedLayout.ALIGNMENT_RIGHT,
- OrderedLayout.ALIGNMENT_BOTTOM);
+ vert.setComponentAlignment(secondary, Alignment.BOTTOM_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java
index 4863156106..c56cfdab96 100644
--- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java
+++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationCustomExample.java
@@ -2,6 +2,7 @@ package com.itmill.toolkit.demo.sampler.features.notifications;
import com.itmill.toolkit.data.Item;
import com.itmill.toolkit.data.Property;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.NativeSelect;
import com.itmill.toolkit.ui.OrderedLayout;
@@ -73,7 +74,7 @@ public class NotificationCustomExample extends OrderedLayout {
}
});
addComponent(show);
- setComponentAlignment(show, ALIGNMENT_RIGHT, ALIGNMENT_VERTICAL_CENTER);
+ setComponentAlignment(show, Alignment.MIDDLE_RIGHT);
}
diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationErrorExample.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationErrorExample.java
index e8442e654e..066a52d727 100644
--- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationErrorExample.java
+++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationErrorExample.java
@@ -1,5 +1,6 @@
package com.itmill.toolkit.demo.sampler.features.notifications;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.TextField;
@@ -34,7 +35,7 @@ public class NotificationErrorExample extends OrderedLayout {
}
});
addComponent(show);
- setComponentAlignment(show, ALIGNMENT_RIGHT, ALIGNMENT_VERTICAL_CENTER);
+ setComponentAlignment(show, Alignment.MIDDLE_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanizedExample.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanizedExample.java
index 11e904391c..3a65f04f65 100644
--- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanizedExample.java
+++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationHumanizedExample.java
@@ -1,5 +1,6 @@
package com.itmill.toolkit.demo.sampler.features.notifications;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.TextField;
@@ -29,7 +30,7 @@ public class NotificationHumanizedExample extends OrderedLayout {
}
});
addComponent(show);
- setComponentAlignment(show, ALIGNMENT_RIGHT, ALIGNMENT_VERTICAL_CENTER);
+ setComponentAlignment(show, Alignment.MIDDLE_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTrayExample.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTrayExample.java
index a22feb5cc5..414bb7bc59 100644
--- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTrayExample.java
+++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationTrayExample.java
@@ -1,5 +1,6 @@
package com.itmill.toolkit.demo.sampler.features.notifications;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.TextField;
@@ -31,7 +32,7 @@ public class NotificationTrayExample extends OrderedLayout {
}
});
addComponent(show);
- setComponentAlignment(show, ALIGNMENT_RIGHT, ALIGNMENT_VERTICAL_CENTER);
+ setComponentAlignment(show, Alignment.MIDDLE_RIGHT);
}
}
diff --git a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarningExample.java b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarningExample.java
index e5fd3f43d5..462b2acd83 100644
--- a/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarningExample.java
+++ b/src/com/itmill/toolkit/demo/sampler/features/notifications/NotificationWarningExample.java
@@ -1,5 +1,6 @@
package com.itmill.toolkit.demo.sampler.features.notifications;
+import com.itmill.toolkit.ui.Alignment;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.TextField;
@@ -31,7 +32,7 @@ public class NotificationWarningExample extends OrderedLayout {
}
});
addComponent(show);
- setComponentAlignment(show, ALIGNMENT_RIGHT, ALIGNMENT_VERTICAL_CENTER);
+ setComponentAlignment(show, Alignment.MIDDLE_RIGHT);
}
}