├── .gitignore
├── BUILD
├── LICENSE
├── README
├── lib
├── gwt-html5-storage.jar
├── gwt-image-loader-1.1.1.jar
├── gwt-log-2.6.2.jar
└── gwt-validation-0.9a-without-hibernate.jar
├── src
├── eu
│ └── maydu
│ │ └── gwt
│ │ └── validation
│ │ └── client
│ │ └── i18n
│ │ └── StandardValidationMessagesImpl_nl.properties
└── org
│ ├── appfuse
│ └── client
│ │ ├── Appfuse.gwt.xml
│ │ └── widget
│ │ ├── BulletList.java
│ │ ├── ListItem.java
│ │ ├── MultipleTextBox.java
│ │ ├── Paragraph.java
│ │ └── Span.java
│ └── onesocialweb
│ └── gwt
│ ├── OswClient.gwt.xml
│ └── client
│ ├── OswClient.java
│ ├── OswEntryPoint.java
│ ├── exception
│ └── MissingWindowFactoryException.java
│ ├── handler
│ ├── ActivityButtonHandler.java
│ ├── ContactButtonHandler.java
│ ├── LoginHandler.java
│ ├── PictureHandler.java
│ └── VideoHandler.java
│ ├── i18n
│ ├── CustomValidation.java
│ ├── CustomValidationMessages.java
│ ├── CustomValidationMessagesImpl.java
│ ├── CustomValidationMessagesImpl.properties
│ ├── CustomValidationMessagesImpl_nl.properties
│ ├── UserInterfaceMessages.java
│ ├── UserInterfaceMessages.properties
│ ├── UserInterfaceMessages_nl.properties
│ ├── UserInterfaceText.java
│ ├── UserInterfaceText.properties
│ └── UserInterfaceText_nl.properties
│ ├── task
│ ├── DefaultTaskEvent.java
│ ├── DefaultTaskInfo.java
│ ├── TaskEvent.java
│ ├── TaskInfo.java
│ └── TaskMonitor.java
│ ├── ui
│ ├── application
│ │ ├── AbstractApplication.java
│ │ ├── ActivityApplication.java
│ │ ├── ContactsApplication.java
│ │ └── PreferencesApplication.java
│ ├── dialog
│ │ ├── AbstractDialog.java
│ │ ├── AlertDialog.java
│ │ ├── LoginDialog.java
│ │ ├── PictureChooserDialog.java
│ │ ├── PicturePreviewDialog.java
│ │ └── VideoChooserDialog.java
│ ├── event
│ │ ├── ComponentAdapter.java
│ │ ├── ComponentEvent.java
│ │ ├── ComponentHelper.java
│ │ └── ComponentListener.java
│ ├── menu
│ │ ├── Command.java
│ │ ├── MainMenu.java
│ │ └── MenuCommand.java
│ ├── widget
│ │ ├── AvatarUploadField.java
│ │ ├── ConfirmLabel.java
│ │ ├── DateField.java
│ │ ├── DeletableLabel.java
│ │ ├── DropdownList.java
│ │ ├── EditableFollowingList.java
│ │ ├── EditableRelationsList.java
│ │ ├── ErrorLabel.java
│ │ ├── FieldLabel.java
│ │ ├── GenderEditField.java
│ │ ├── ListSelector.java
│ │ ├── NameEditField.java
│ │ ├── PictureThumbnail.java
│ │ ├── PrivacySelector.java
│ │ ├── PrivacySelectorHeader.java
│ │ ├── ProgressBar.java
│ │ ├── SingleUploader.java
│ │ ├── StyledButton.java
│ │ ├── StyledFlowPanel.java
│ │ ├── StyledHorizontalPanel.java
│ │ ├── StyledLabel.java
│ │ ├── StyledTextBox.java
│ │ ├── StyledTooltipImage.java
│ │ ├── TooltipPushButton.java
│ │ ├── VideoThumbnail.java
│ │ ├── activity
│ │ │ ├── AbstractActivityPanel.java
│ │ │ ├── ActivityButtons.java
│ │ │ ├── ActivityItemView.java
│ │ │ ├── FeedPanel.java
│ │ │ └── InboxPanel.java
│ │ ├── compose
│ │ │ ├── AbstractAttachmentPanel.java
│ │ │ ├── Attachment.java
│ │ │ ├── MultiplePictureAttachmentPanel.java
│ │ │ ├── NewActivityPanel.java
│ │ │ ├── PrivacyAttachmentPanel.java
│ │ │ ├── RecipientList.java
│ │ │ ├── RecipientOracle.java
│ │ │ ├── ShoutAttachmentPanel.java
│ │ │ ├── SinglePictureAttachmentPanel.java
│ │ │ └── TextareaUpdate.java
│ │ └── contact
│ │ │ ├── AbstractContactPanel.java
│ │ │ ├── ContactButtons.java
│ │ │ ├── ContactItemView.java
│ │ │ ├── ContactPanel.java
│ │ │ └── SearchPanel.java
│ └── window
│ │ ├── AbstractWindow.java
│ │ ├── AbstractWindowFactory.java
│ │ ├── ContactsWindow.java
│ │ ├── ContactsWindowFactory.java
│ │ ├── FeedWindow.java
│ │ ├── FeedWindowFactory.java
│ │ ├── PreferencesWindow.java
│ │ ├── PreferencesWindowFactory.java
│ │ ├── ProfileWindow.java
│ │ ├── ProfileWindowFactory.java
│ │ └── WindowFactory.java
│ ├── util
│ ├── FormLayoutHelper.java
│ ├── FormatHelper.java
│ └── OSWUrlBuilder.java
│ └── validation
│ └── CustomLabelTextAction.java
└── war
├── OswClient.html
├── OswClient.html.sample
├── WEB-INF
├── lib
│ ├── emite-0.4.7-proxies.jar
│ └── gwt-servlet.jar
├── logging.properties
└── web.xml.sample
├── images
├── corner.png
├── corner_ie6.png
├── hborder.png
├── hborder_ie6.png
├── ie6
│ ├── corner_dialog_topleft.png
│ ├── corner_dialog_topright.png
│ ├── hborder_blue_shadow.png
│ ├── hborder_gray_shadow.png
│ ├── vborder_blue_shadow.png
│ └── vborder_gray_shadow.png
├── vborder.png
└── vborder_ie6.png
├── standard.css
└── themes
└── osw
├── OswClient.css
├── assets
├── 08-chat.png
├── ajax-loader.gif
├── alert-overlay.png
├── avatar-loader.gif
├── bg2.gif
├── button-bg-hi.png
├── button-bg.gif
├── button-bg.png
├── default-avatar-big.png
├── default-avatar.png
├── i-attachment.png
├── i-available.png
├── i-away.png
├── i-block.png
├── i-camera2.png
├── i-chat.png
├── i-chat2.png
├── i-chatty.png
├── i-close2.png
├── i-comment.png
├── i-connected.png
├── i-delete.png
├── i-deny.png
├── i-dnd.png
├── i-edit.png
├── i-event2.png
├── i-following.png
├── i-info.png
├── i-key.png
├── i-like.png
├── i-link3.png
├── i-location.png
├── i-message.png
├── i-more.png
├── i-movie2.png
├── i-msg.png
├── i-new.png
├── i-notavailable.png
├── i-notconnected.png
├── i-ok.png
├── i-ok2.png
├── i-private-r.png
├── i-profile.png
├── i-relation-oneway-from.png
├── i-relation-oneway-to.png
├── i-relation-twoway.png
├── i-relation.png
├── i-reply.png
├── i-share.png
├── i-shout-r.png
├── i-shout.png
├── i-tags-r.png
├── i-tags.png
├── i-unfollowing.png
├── i-unknown.png
├── i-visibility.png
├── i-xaway.png
├── logo.png
├── search.png
├── tab-shadow.png
├── tabbar-shadow.png
├── toolButton.png
└── warning_icon_small.gif
├── fonts
├── SIL Open Font License 1.1.txt
├── TitilliumText1.eot
├── TitilliumText1.ttf
├── TitilliumText250wt.eot
├── TitilliumText250wt.ttf
├── TitilliumText400wt.eot
├── TitilliumText400wt.ttf
├── TitilliumText600wt.eot
├── TitilliumText600wt.ttf
├── TitilliumText800wt.eot
├── TitilliumText800wt.ttf
├── TitilliumText999wt.eot
├── TitilliumText999wt.ttf
├── Titillium_title03.eot
├── Titillium_title03.ttf
└── stylesheet.css
└── styles
├── core.css
├── global-forms.css
└── reset.css
/.gitignore:
--------------------------------------------------------------------------------
1 | .classpath
2 | .project
3 | .settings
4 | war/OswClient
5 | war/OswClient.html
6 | war/WEB-INF/classes
7 | war/WEB-INF/web.xml
8 | .DS_Store
9 | *.orig
10 |
--------------------------------------------------------------------------------
/BUILD:
--------------------------------------------------------------------------------
1 | 1- Compiling the Onesocialweb GWT library
2 |
3 | - Create a new project in eclipse based on these source files
4 | - Make it a GWT project and add the GWT libs
5 | - Add JUnit 4 on the build path
6 | - Copy the file /war/WEB-INF/web.xml.sample to web.xml and edit it if required
7 | - Compile the GWT project using "GWT Compile" in the Google contextual menu
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Onesocialweb web client, built using Google Web Toolkit.
2 | Released under an Apache 2.0 License (see LICENSE).
3 | Copyright 2010 Vodafone Group Services Limited.
4 |
5 | All documentation and tutorials available on http://onesocialweb.org
6 |
7 | Version 0.6.1 - Released September 28th 2010
8 |
--------------------------------------------------------------------------------
/lib/gwt-html5-storage.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onesocialweb/osw-web/08cb94f7744d1bc726c88e9e5506dcc9a4904672/lib/gwt-html5-storage.jar
--------------------------------------------------------------------------------
/lib/gwt-image-loader-1.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onesocialweb/osw-web/08cb94f7744d1bc726c88e9e5506dcc9a4904672/lib/gwt-image-loader-1.1.1.jar
--------------------------------------------------------------------------------
/lib/gwt-log-2.6.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onesocialweb/osw-web/08cb94f7744d1bc726c88e9e5506dcc9a4904672/lib/gwt-log-2.6.2.jar
--------------------------------------------------------------------------------
/lib/gwt-validation-0.9a-without-hibernate.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onesocialweb/osw-web/08cb94f7744d1bc726c88e9e5506dcc9a4904672/lib/gwt-validation-0.9a-without-hibernate.jar
--------------------------------------------------------------------------------
/src/eu/maydu/gwt/validation/client/i18n/StandardValidationMessagesImpl_nl.properties:
--------------------------------------------------------------------------------
1 | notNull = Must be given
2 | isNull = Should not be given
3 | equal = Should be equal
4 | notEqual = Should not be equal
5 | notEmpty = Mustn''t be empty
6 | min = Minimum value for this field is ''{0}''. You entered ''{1}''
7 | max = Maximum value for this field is ''{0}''. You entered ''{1}''
8 | notInRange = Value ''{2}'' lies beyond the boundaries [{0},{1}]
9 | notAnInteger = Number is not an integer
10 | notExactly = Mustn't be ''{0}''
11 | exactly = Value must be ''{0}''
12 | notAnInteger = Not a whole number
13 | notALong = Not a whole number
14 | notAFloat = Not a floating point number
15 | notADouble = Not a floating point number
16 | length = Needs a length between ''{0}'' and ''{1}''. Was ''{2}''
17 | stringsNotEqual = Strings must be equal
18 | mustSelectValue = Please select a value
19 | validator_assertFalse=Assertion failed
20 | validator_assertTrue=Assertion failed
21 | validator_future=Must be a future date
22 | validator_length=Length not correct
23 | validator_max=Too big
24 | validator_min=Too small
25 | validator_notNull=Must be given
26 | validator_past=Must be a past date
27 | validator_pattern=Incorrect pattern
28 | validator_range=Not in range
29 | validator_size=Incorrect number of elements
30 | validator_email=Not a well-formed email address
31 | validator_notEmpty=May not be null or empty
32 | validator_digits=Numeric value out of bounds
33 | validator_creditCard=Invalid credit card number
34 | validator_ean=Invalid EAN
35 | noDateGiven = No date entered
36 | unparsableDate = Wrong date format
37 | notARegEx = No valid regular expression given
38 | regexNotFulfilled = The text does not fulfill the given regular expression
39 | notAValidCharacter = Not a valid character: ''{0}''
40 | notAValidEmail = ''{0}'' is not a valid email address
41 | notAValidTimeWithoutSeconds = ''{0}'' is not a valid time (seconds must not be given)
42 | notAValidTimeWithSecondsOptionally = ''{0}'' is not a valid time (seconds may be given)
43 | notAValidTimeWithSecondsRequired = ''{0}'' is not a valid time (seconds must be given)
--------------------------------------------------------------------------------
/src/org/appfuse/client/Appfuse.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/org/appfuse/client/widget/BulletList.java:
--------------------------------------------------------------------------------
1 | package org.appfuse.client.widget;
2 |
3 | import com.google.gwt.user.client.DOM;
4 | import com.google.gwt.user.client.ui.ComplexPanel;
5 | import com.google.gwt.user.client.ui.Widget;
6 |
7 | public class BulletList extends ComplexPanel {
8 | public BulletList() {
9 | setElement(DOM.createElement("UL"));
10 | }
11 |
12 | public void add(Widget w) {
13 | super.add(w, getElement());
14 | }
15 |
16 | public void insert(Widget w, int beforeIndex) {
17 | super.insert(w, getElement(), beforeIndex, true);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/org/appfuse/client/widget/ListItem.java:
--------------------------------------------------------------------------------
1 | package org.appfuse.client.widget;
2 |
3 | import com.google.gwt.event.dom.client.BlurEvent;
4 | import com.google.gwt.event.dom.client.BlurHandler;
5 | import com.google.gwt.event.dom.client.ClickEvent;
6 | import com.google.gwt.event.dom.client.ClickHandler;
7 | import com.google.gwt.event.dom.client.HasBlurHandlers;
8 | import com.google.gwt.event.dom.client.HasClickHandlers;
9 | import com.google.gwt.event.dom.client.HasKeyDownHandlers;
10 | import com.google.gwt.event.dom.client.KeyDownEvent;
11 | import com.google.gwt.event.dom.client.KeyDownHandler;
12 | import com.google.gwt.event.shared.HandlerRegistration;
13 | import com.google.gwt.user.client.DOM;
14 | import com.google.gwt.user.client.ui.ComplexPanel;
15 | import com.google.gwt.user.client.ui.HasHTML;
16 | import com.google.gwt.user.client.ui.HasText;
17 | import com.google.gwt.user.client.ui.Widget;
18 |
19 | public class ListItem extends ComplexPanel implements HasText, HasHTML,
20 | HasClickHandlers, HasKeyDownHandlers, HasBlurHandlers {
21 | HandlerRegistration clickHandler;
22 |
23 | public ListItem() {
24 | setElement(DOM.createElement("LI"));
25 | }
26 |
27 | public void add(Widget w) {
28 | super.add(w, getElement());
29 | }
30 |
31 | public void insert(Widget w, int beforeIndex) {
32 | super.insert(w, getElement(), beforeIndex, true);
33 | }
34 |
35 | public String getText() {
36 | return DOM.getInnerText(getElement());
37 | }
38 |
39 | public void setText(String text) {
40 | DOM.setInnerText(getElement(), (text == null) ? "" : text);
41 | }
42 |
43 | public void setId(String id) {
44 | DOM.setElementAttribute(getElement(), "id", id);
45 | }
46 |
47 | public String getHTML() {
48 | return DOM.getInnerHTML(getElement());
49 | }
50 |
51 | public void setHTML(String html) {
52 | DOM.setInnerHTML(getElement(), (html == null) ? "" : html);
53 | }
54 |
55 | public HandlerRegistration addClickHandler(ClickHandler handler) {
56 | return addDomHandler(handler, ClickEvent.getType());
57 | }
58 |
59 | public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) {
60 | return addDomHandler(handler, KeyDownEvent.getType());
61 | }
62 |
63 | public HandlerRegistration addBlurHandler(BlurHandler handler) {
64 | return addDomHandler(handler, BlurEvent.getType());
65 | }
66 | }
--------------------------------------------------------------------------------
/src/org/appfuse/client/widget/MultipleTextBox.java:
--------------------------------------------------------------------------------
1 | package org.appfuse.client.widget;
2 |
3 | import com.google.gwt.dom.client.Document;
4 | import com.google.gwt.dom.client.Element;
5 | import com.google.gwt.dom.client.InputElement;
6 | import com.google.gwt.user.client.ui.TextBoxBase;
7 |
8 | public class MultipleTextBox extends TextBoxBase {
9 | /**
10 | * Creates an empty multiple text box.
11 | */
12 | public MultipleTextBox() {
13 | this(Document.get().createTextInputElement(), "gwt-TextBox");
14 | }
15 |
16 | /**
17 | * This constructor may be used by subclasses to explicitly use an existing
18 | * element. This element must be an element whose type is 'text'.
19 | *
20 | * @param element
21 | * the element to be used
22 | */
23 | protected MultipleTextBox(Element element) {
24 | super(element);
25 | assert InputElement.as(element).getType().equalsIgnoreCase("text");
26 | }
27 |
28 | MultipleTextBox(Element element, String styleName) {
29 | super(element);
30 | if (styleName != null) {
31 | setStyleName(styleName);
32 | }
33 | }
34 |
35 | @Override
36 | public String getText() {
37 | String wholeString = super.getText();
38 | String lastString = wholeString;
39 | if (wholeString != null && !wholeString.trim().equals("")) {
40 | int lastComma = wholeString.trim().lastIndexOf(",");
41 | if (lastComma > 0) {
42 | lastString = wholeString.trim().substring(lastComma + 1);
43 | }
44 | }
45 | return lastString;
46 | }
47 |
48 | @Override
49 | public void setText(String text) {
50 | String wholeString = super.getText();
51 | if (text != null && text.equals("")) {
52 | super.setText(text);
53 | } else {
54 | // Clean last text, to replace with new value, for example, if new
55 | // text is v.zaprudnevd@gmail.com:
56 | // "manuel@we-r-you.com, v" need to be replaced with:
57 | // "manuel@we-r-you.com, v.zaprudnevd@gmail.com, "
58 | if (wholeString != null) {
59 | int lastComma = wholeString.trim().lastIndexOf(",");
60 | if (lastComma > 0) {
61 | wholeString = wholeString.trim().substring(0, lastComma);
62 | } else {
63 | wholeString = "";
64 | }
65 |
66 | if (!wholeString.trim().endsWith(",")
67 | && !wholeString.trim().equals("")) {
68 | wholeString = wholeString + ", ";
69 | }
70 |
71 | wholeString = wholeString + text + ", ";
72 | super.setText(wholeString);
73 | }
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/src/org/appfuse/client/widget/Paragraph.java:
--------------------------------------------------------------------------------
1 | package org.appfuse.client.widget;
2 |
3 | import com.google.gwt.user.client.DOM;
4 | import com.google.gwt.user.client.ui.HasText;
5 | import com.google.gwt.user.client.ui.Widget;
6 |
7 | /**
8 | * This widget is to create
9 | *
10 | * elements in a page.
11 | */
12 | public class Paragraph extends Widget implements HasText {
13 |
14 | public Paragraph() {
15 | setElement(DOM.createElement("p"));
16 | }
17 |
18 | public Paragraph(String text) {
19 | this();
20 | setText(text);
21 | }
22 |
23 | public String getText() {
24 | return getElement().getInnerText();
25 | }
26 |
27 | public void setText(String text) {
28 | getElement().setInnerText(text);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/org/appfuse/client/widget/Span.java:
--------------------------------------------------------------------------------
1 | package org.appfuse.client.widget;
2 |
3 | import com.google.gwt.user.client.DOM;
4 | import com.google.gwt.user.client.ui.HTML;
5 | import com.google.gwt.user.client.ui.HasText;
6 |
7 | /**
8 | * This widget is to create elements in a page.
9 | */
10 | public class Span extends HTML implements HasText {
11 |
12 | public Span() {
13 | super(DOM.createElement("span"));
14 | }
15 |
16 | public Span(String text) {
17 | this();
18 | setText(text);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/OswClient.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/OswEntryPoint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client;
18 |
19 | import org.onesocialweb.gwt.client.ui.window.ContactsWindowFactory;
20 | import org.onesocialweb.gwt.client.ui.window.FeedWindowFactory;
21 | import org.onesocialweb.gwt.client.ui.window.PreferencesWindowFactory;
22 | import org.onesocialweb.gwt.client.ui.window.ProfileWindowFactory;
23 | import org.onesocialweb.gwt.client.ui.window.WindowFactory;
24 |
25 | import com.allen_sauer.gwt.log.client.DivLogger;
26 | import com.allen_sauer.gwt.log.client.Log;
27 | import com.google.gwt.core.client.EntryPoint;
28 | import com.google.gwt.user.client.ui.FlowPanel;
29 | import com.google.gwt.user.client.ui.Widget;
30 |
31 | public class OswEntryPoint implements EntryPoint {
32 |
33 | public void onModuleLoad() {
34 |
35 | // Prepare a few things to get our pattern right
36 | WindowFactory.getInstance().registerFactory(new ProfileWindowFactory());
37 | WindowFactory.getInstance().registerFactory(new FeedWindowFactory());
38 | WindowFactory.getInstance().registerFactory(
39 | new PreferencesWindowFactory());
40 | WindowFactory.getInstance()
41 | .registerFactory(new ContactsWindowFactory());
42 |
43 | // Hide logger before login
44 | FlowPanel hideLogger = new FlowPanel();
45 | hideLogger.addStyleName("hidelogger");
46 | Widget divLogger = Log.getLogger(DivLogger.class).getWidget();
47 | hideLogger.add(divLogger);
48 |
49 | // Start the application
50 | OswClient.getInstance().start();
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/exception/MissingWindowFactoryException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.exception;
18 |
19 | @SuppressWarnings("serial")
20 | public class MissingWindowFactoryException extends Exception {
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/handler/ActivityButtonHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.handler;
18 |
19 | import org.onesocialweb.gwt.client.ui.widget.activity.ActivityItemView;
20 |
21 | public interface ActivityButtonHandler {
22 |
23 | public void handleShow(int top, ActivityItemView sa);
24 |
25 | public void handleHide();
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/handler/ContactButtonHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.handler;
18 |
19 | import org.onesocialweb.gwt.client.ui.widget.contact.ContactItemView;
20 |
21 | public interface ContactButtonHandler {
22 |
23 | public void handleShow(int top, ContactItemView contact);
24 |
25 | public void handleHide();
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/handler/LoginHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.handler;
18 |
19 | public interface LoginHandler {
20 |
21 | public void handleLogin(boolean success);
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/handler/PictureHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.handler;
18 |
19 | public interface PictureHandler {
20 |
21 | public void handlePicture(String pictureUrl);
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/handler/VideoHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.handler;
18 |
19 | public interface VideoHandler {
20 |
21 | public void handleEmbeddedVideo(String source);
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/CustomValidation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.i18n;
18 |
19 | import eu.maydu.gwt.validation.client.i18n.StandardValidationMessages;
20 | import eu.maydu.gwt.validation.client.i18n.ValidationMessages;
21 |
22 | public class CustomValidation extends ValidationMessages {
23 |
24 | public CustomValidation(StandardValidationMessages messages) {
25 | super(messages);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/CustomValidationMessagesImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.i18n;
18 |
19 | import com.google.gwt.i18n.client.Messages;
20 |
21 | public interface CustomValidationMessagesImpl extends Messages {
22 |
23 | public String length(int minLength, int maxLength);
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/CustomValidationMessagesImpl.properties:
--------------------------------------------------------------------------------
1 | length = Needs a length between ''{0}'' and ''{1}''.
2 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/CustomValidationMessagesImpl_nl.properties:
--------------------------------------------------------------------------------
1 | length = Gebruik meer dan ''{0}'' en minder dan ''{1}'' karakters.
2 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/UserInterfaceMessages.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.i18n;
18 |
19 | import com.google.gwt.i18n.client.Messages;
20 |
21 | public interface UserInterfaceMessages extends Messages {
22 |
23 | // Errors
24 |
25 | // ******
26 | // Labels
27 | // ******
28 | String ListedAsTags(String tags);
29 | String YouHaveNConnections(int connections);
30 | String WelcomeToServer(String servername);
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/UserInterfaceMessages.properties:
--------------------------------------------------------------------------------
1 | # errors
2 |
3 | # labels
4 | ListedAsTags = Listed as: {0}
5 | YouHaveNConnections = You have {0} connection(s)
6 | WelcomeToServer = Welcome to {0}
7 |
8 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/UserInterfaceMessages_nl.properties:
--------------------------------------------------------------------------------
1 | # errors
2 |
3 | # labels
4 | ListedAsTags = Op jouw lijsten: {0}
5 | YouHaveNConnections = Je hebt {0} connectie(s)
6 | WelcomeToServer = Welkom bij {0}
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/UserInterfaceText.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.i18n;
18 |
19 | import com.google.gwt.i18n.client.Constants;
20 |
21 | public interface UserInterfaceText extends Constants {
22 |
23 | // Titles
24 | String Welcome();
25 | String OopsCannotSearch();
26 | String WorkingOnThis();
27 | String Oops();
28 | String CannotAddPicture();
29 | String Privacy();
30 | String ImagePreview();
31 |
32 | // Buttons / Tabs
33 | String OK();
34 | String Save();
35 | String Cancel();
36 | String Login();
37 | String Logout();
38 | String Register();
39 | String Search();
40 | String Share();
41 | String FromUrl();
42 | String Upload();
43 | String ManagePerson();
44 | String ProfileAndContact();
45 | String Account();
46 | String Add();
47 |
48 | // Labels
49 | String YourUsername();
50 | String YourPassword();
51 | String ChooseUsername();
52 | String ChoosePassword();
53 | String EnterYourEmail();
54 | String EnterCode();
55 | String Following();
56 | String RememberMe();
57 | String Url();
58 | String Bio();
59 | String OnYourLists();
60 | String Followers();
61 | String FollowingPeople();
62 | String DisplayName();
63 | String FullName();
64 | String Birthday();
65 | String Gender();
66 | String Email();
67 | String Telephone();
68 | String Website();
69 | String ViewProfileOf();
70 | String YourLists();
71 | String Avatar();
72 | String General();
73 | String YourIdentity();
74 | String UserName();
75 | String FirstName();
76 | String Surname();
77 | String WhoCanSeeUpdate();
78 | String With();
79 | String ChangeLocale();
80 | String Language();
81 | String ShoutTo();
82 | String Pictures();
83 | String To();
84 | String VisibleTo();
85 |
86 | // Application / window names
87 | String Activities();
88 | String Preferences();
89 | String Contacts();
90 | String Profile();
91 |
92 | // Field Values
93 | String Male();
94 | String Female();
95 | String NotKnown();
96 | String NotApplicable();
97 | String Everyone();
98 | String You();
99 |
100 | // Tooltips
101 | String ShowSearchPanel();
102 | String HideSearchPanel();
103 | String ShowUpdatePanel();
104 | String HideUpdatePanel();
105 | String ViewProfile();
106 | String Chatty();
107 | String Away();
108 | String DoNotDisturb();
109 | String ExtendedAway();
110 | String Online();
111 | String NotAvailable();
112 | String DeleteFromContacts();
113 | String ShoutToContact();
114 | String FollowPerson();
115 | String UnfollowPerson();
116 | String SendPrivateMessage();
117 | String ChatWithPerson();
118 | String AddPicture();
119 | String ChangePrivacy();
120 | String ShoutToContacts();
121 | String EditProfile();
122 | String BackToDefault();
123 | String AddAvatar();
124 | String ClearPeople();
125 | String RemovePicture();
126 | String RemovePictures();
127 | String ShowPreview();
128 |
129 | // Instructions
130 | String PleaseUseUserAtDomain();
131 | String AccountUnavailable();
132 | String SelectFile();
133 | String SelectPictureUrl();
134 | String AddOrRemovePerson();
135 | String IdentityFixed();
136 | String SetLanguage();
137 |
138 | // Notifications
139 | String FetchingProfile();
140 | String FeatureNotImplemented();
141 | String FetchingActivities();
142 | String NoActivitiesAvailable();
143 | String UpdatingStatus();
144 | String UpdateSuccess();
145 | String WaitForUpload();
146 | String FetchingFollowers();
147 | String FetchingFollowing();
148 | String NoFollowers();
149 | String NoFollowing();
150 | String EmptyUpdate();
151 |
152 | // Error
153 | String FailedToGetProfile();
154 | String LoginFailure();
155 | String UpdateFailure();
156 |
157 | // Months
158 | String January();
159 | String February();
160 | String March();
161 | String April();
162 | String May();
163 | String June();
164 | String July();
165 | String August();
166 | String September();
167 | String October();
168 | String November();
169 | String December();
170 |
171 | }
172 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/i18n/UserInterfaceText.properties:
--------------------------------------------------------------------------------
1 | # titles
2 | Welcome = Welcome to OneSocialWeb
3 | OopsCannotSearch = Oops, cannot search this!
4 | WorkingOnThis = We're working on this
5 | Oops = Oops!
6 | CannotAddPicture = Cannot add picture yet
7 | Privacy = privacy
8 | ImagePreview = Image preview
9 |
10 | # buttons / tabs
11 | OK = OK
12 | Save = Save
13 | Cancel = Cancel
14 | Login = Sign in
15 | Logout = Sign out
16 | Register = Register
17 | Search = Search
18 | Share = Share
19 | FromUrl = From Url
20 | Upload = Upload
21 | ManagePerson = Manage persoon
22 | ProfileAndContact = Profile & Contact
23 | Account = Account
24 | Add = Add
25 |
26 | # labels
27 | YourUsername = Your username
28 | YourPassword = Your password
29 | ChooseUsername = Pick a username
30 | ChoosePassword = Pick a password
31 | EnterYourEmail = Enter your email address
32 | EnterCode = Enter your registration code
33 | Following = Following
34 | RememberMe = Remember me
35 | Url = Url:
36 | Bio = Bio
37 | OnYourLists = On your lists:
38 | Followers = Followers
39 | FollowingPeople = Followin
40 | DisplayName = Display name
41 | FullName = Full name
42 | Birthday = Birthday
43 | Gender = Gender
44 | Email = Email
45 | Telephone = Telephone
46 | Website = Website
47 | ViewProfileOf = View profile of:
48 | YourLists = Your lists
49 | Avatar = Avatar
50 | General = General
51 | YourIdentity = Your identity
52 | UserName = User name
53 | FirstName = First name
54 | Surname = Surname
55 | WhoCanSeeUpdate = Who can see this update:
56 | With = With:
57 | ChangeLocale = Change website language
58 | Language = Website Language
59 | ShoutTo = Shout to
60 | Pictures = Pictures
61 | To = to
62 | VisibleTo = Visible to:
63 |
64 | # applications & windows
65 | Activities = What's up
66 | Preferences = Preferences
67 | Contacts = Contacts
68 | Profile = Profile
69 |
70 | # field values
71 | Female = Female
72 | Male = Male
73 | NotKnown = Unknown
74 | NotApplicable = Not applicable
75 | Everyone = Everyone
76 | You = You
77 |
78 | # tooltips
79 | ShowSearchPanel = Show search panel
80 | HideSearchPanel = Hide search panel
81 | ShowUpdatePanel = Show status update panel
82 | HideUpdatePanel = Hide status update panel
83 | ViewProfile = View profile
84 | Chatty = In a chatty mood!
85 | Away = Away
86 | DoNotDisturb = Do not disturb
87 | ExtendedAway = Away for a while
88 | Online = Online
89 | NotAvailable = Not available
90 | DeleteFromContacts = Delete from your contacts
91 | ShoutToContact = Shout and send a public message to this person
92 | FollowPerson = Follow person
93 | UnfollowPerson = Unfollow person
94 | SendPrivateMessage = Send private message
95 | ChatWithPerson = Chat with this person
96 | AddPicture = Add picture
97 | ChangePrivacy = Change privacy settings
98 | ShoutToContacts = Shout publicly to specific people
99 | EditProfile = Edit profile
100 | BackToDefault = Back to default settings
101 | AddAvatar = Add avatar image
102 | ClearPeople = Remove everyone
103 | RemovePicture = Remove picture
104 | RemovePictures = Remove pictures
105 | ShowPreview = Show preview of original
106 |
107 | # instructions
108 | PleaseUseUserAtDomain = Please use the format name@domain e.g. alice@wonderland.lit
109 | AccountUnavailable = Maybe the account does not exist or the server is not available at the moment. Please doublecheck the socialweb address or try again later.
110 | SelectFile = Select a file.
111 | SelectPictureUrl = Select a picture link.
112 | AddOrRemovePerson = Add or remove person from your lists below.
113 | IdentityFixed = Please note that this identity cannot be changed.
114 | SetLanguage = Choose your preferred language below. This will be stored in your browser and the page will reload. \n You may need to login again.
115 | EmptyUpdate = Is that really all you have to say? Please try again!
116 |
117 | # notifications
118 | FetchingProfile = Fetching the profile
119 | FeatureNotImplemented = Sorry this feature is not yet implemented.
120 | FetchingActivities = Fetching activities
121 | NoActivitiesAvailable = No activities available
122 | UpdatingStatus = Sending status update
123 | UpdateSuccess = Your update has been posted
124 | WaitForUpload = Please wait for the file to upload first, then try again
125 | FetchingFollowers = Fetching followers
126 | FetchingFollowing = Fetching people you follow
127 | NoFollowers = There are no followers
128 | NoFollowing = This person is not following anyone yet
129 |
130 | # errors
131 | FailedToGetProfile = Failed to get profile
132 | LoginFailure = User does not exist or wrong password. Please try again!
133 | UpdateFailure = Failed to update your status
134 |
135 | # months
136 | January = January
137 | February = February
138 | March = March
139 | April = April
140 | May = May
141 | June = June
142 | July = July
143 | August = August
144 | September = September
145 | October = October
146 | November = November
147 | December = December
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/task/DefaultTaskEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.task;
18 |
19 | public class DefaultTaskEvent implements TaskEvent {
20 |
21 | private final Type type;
22 |
23 | private final TaskInfo task;
24 |
25 | public DefaultTaskEvent(Type type, TaskInfo task) {
26 | this.type = type;
27 | this.task = task;
28 | }
29 |
30 | @Override
31 | public TaskInfo getTask() {
32 | return task;
33 | }
34 |
35 | @Override
36 | public Type getType() {
37 | return type;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/task/DefaultTaskInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.task;
18 |
19 | import org.onesocialweb.gwt.client.task.TaskEvent.Type;
20 | import org.onesocialweb.gwt.util.ObservableHelper;
21 | import org.onesocialweb.gwt.util.Observer;
22 |
23 | public class DefaultTaskInfo implements TaskInfo {
24 |
25 | private final ObservableHelper observableHelper = new ObservableHelper();
26 |
27 | private final boolean hasProgress;
28 |
29 | private float progress = 0;
30 |
31 | private String message;
32 |
33 | private Status status = Status.running;
34 |
35 | public DefaultTaskInfo(String message, boolean hasProgress) {
36 | this.message = message;
37 | this.hasProgress = hasProgress;
38 | }
39 |
40 | @Override
41 | public String getMessage() {
42 | return message;
43 | }
44 |
45 | @Override
46 | public float getProgress() {
47 | return progress;
48 | }
49 |
50 | @Override
51 | public Status getStatus() {
52 | return status;
53 | }
54 |
55 | @Override
56 | public boolean hasProgress() {
57 | return hasProgress;
58 | }
59 |
60 | @Override
61 | public void registerEventHandler(Observer handler) {
62 | observableHelper.registerEventHandler(handler);
63 | }
64 |
65 | @Override
66 | public void unregisterEventHandler(Observer handler) {
67 | observableHelper.unregisterEventHandler(handler);
68 | }
69 |
70 | public void setMessage(String message) {
71 | this.message = message;
72 | observableHelper.fireEvent(new DefaultTaskEvent(Type.updated, this));
73 | }
74 |
75 | public void setProgress(float progress) {
76 | this.progress = progress;
77 | observableHelper.fireEvent(new DefaultTaskEvent(Type.updated, this));
78 | }
79 |
80 | public void complete(String message, Status status) {
81 | this.status = status;
82 | this.message = message;
83 | observableHelper.fireEvent(new DefaultTaskEvent(Type.completed, this));
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/task/TaskEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.task;
18 |
19 | import org.onesocialweb.gwt.util.Event;
20 |
21 | public interface TaskEvent extends Event {
22 |
23 | public enum Type {
24 | added, updated, completed
25 | };
26 |
27 | public Type getType();
28 |
29 | public TaskInfo getTask();
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/task/TaskInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.task;
18 |
19 | import org.onesocialweb.gwt.util.Observable;
20 |
21 | public interface TaskInfo extends Observable {
22 |
23 | public enum Status {
24 | running, succes, failure
25 | };
26 |
27 | public Status getStatus();
28 |
29 | public String getMessage();
30 |
31 | public boolean hasProgress();
32 |
33 | public float getProgress();
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/task/TaskMonitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.task;
18 |
19 | import java.util.ArrayList;
20 | import java.util.Collections;
21 | import java.util.List;
22 |
23 | import org.onesocialweb.gwt.client.task.TaskEvent.Type;
24 | import org.onesocialweb.gwt.util.Observable;
25 | import org.onesocialweb.gwt.util.ObservableHelper;
26 | import org.onesocialweb.gwt.util.Observer;
27 |
28 | public class TaskMonitor implements Observable {
29 |
30 | private static TaskMonitor instance;
31 |
32 | private final ObservableHelper observableHelper = new ObservableHelper();
33 |
34 | private final List tasks = new ArrayList();
35 |
36 | private final TaskHandler handler = new TaskHandler();
37 |
38 | public static TaskMonitor getInstance() {
39 | if (instance == null) {
40 | instance = new TaskMonitor();
41 | }
42 | return instance;
43 | }
44 |
45 | @Override
46 | public void registerEventHandler(Observer handler) {
47 | observableHelper.registerEventHandler(handler);
48 | }
49 |
50 | @Override
51 | public void unregisterEventHandler(Observer handler) {
52 | observableHelper.unregisterEventHandler(handler);
53 | }
54 |
55 | public void addTask(TaskInfo task) {
56 | tasks.add(task);
57 | task.registerEventHandler(handler);
58 | observableHelper.fireEvent(new DefaultTaskEvent(TaskEvent.Type.added,
59 | task));
60 | }
61 |
62 | public List getTasks() {
63 | return Collections.unmodifiableList(tasks);
64 | }
65 |
66 | private class TaskHandler implements Observer {
67 |
68 | @Override
69 | public void handleEvent(TaskEvent event) {
70 | if (event.getType().equals(Type.completed)) {
71 | tasks.remove(event.getTask());
72 | observableHelper.fireEvent(event);
73 | }
74 | }
75 |
76 | }
77 |
78 | // private constructor to maintain singleton
79 | private TaskMonitor() {
80 | //
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/application/ActivityApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.application;
18 |
19 | import org.onesocialweb.gwt.client.ui.window.FeedWindow;
20 |
21 | public class ActivityApplication extends AbstractApplication {
22 |
23 | public ActivityApplication() {
24 | super(2);
25 | }
26 |
27 | @Override
28 | protected void onInit() {
29 | // Initialize the slots
30 | getSlot(0).setSlotDimensions(0, 0, 50, 100);
31 | getSlot(1).setSlotDimensions(0, 50, 50, 100);
32 |
33 | // Add default window to specific slots
34 | addWindow(FeedWindow.class.toString(), 0);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/application/ContactsApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.application;
18 |
19 | import org.onesocialweb.gwt.client.ui.window.ContactsWindow;
20 |
21 | public class ContactsApplication extends AbstractApplication {
22 |
23 | public ContactsApplication() {
24 | super(2);
25 | }
26 |
27 | @Override
28 | protected void onInit() {
29 |
30 | // Init the application slots
31 | getSlot(0).setSlotDimensions(0, 0, 50, 100);
32 | getSlot(1).setSlotDimensions(0, 50, 50, 100);
33 |
34 | // add default window to specific slots
35 | addWindow(ContactsWindow.class.toString(), 0);
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/application/PreferencesApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.application;
18 |
19 | import org.onesocialweb.gwt.client.ui.window.PreferencesWindow;
20 |
21 | public class PreferencesApplication extends AbstractApplication {
22 |
23 | public PreferencesApplication() {
24 | super(1);
25 | }
26 |
27 | @Override
28 | protected void onInit() {
29 | // Set the application slot dimensions
30 | getSlot(0).setSlotDimensions(0, 0, 100, 100);
31 |
32 | // Add default window to specific slots
33 | addWindow(PreferencesWindow.class.toString(), 0);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/dialog/AbstractDialog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.dialog;
18 |
19 | import com.google.gwt.event.logical.shared.ResizeEvent;
20 | import com.google.gwt.event.logical.shared.ResizeHandler;
21 | import com.google.gwt.user.client.Window;
22 | import com.google.gwt.user.client.ui.DialogBox;
23 |
24 | public abstract class AbstractDialog extends DialogBox {
25 |
26 | public AbstractDialog() {
27 | // set styles
28 | this.setStylePrimaryName("dialog");
29 |
30 | this.setModal(true);
31 |
32 | Window.addResizeHandler(new ResizeHandler() {
33 | public void onResize(ResizeEvent event) {
34 | // make sure dialog is always centered
35 | if (isShowing())
36 | center();
37 | }
38 | });
39 |
40 | }
41 |
42 | public void hide() {
43 | super.hide();
44 | onHide();
45 | }
46 |
47 | public void show() {
48 | super.show();
49 | onShow();
50 | }
51 |
52 | protected abstract void onShow();
53 |
54 | protected abstract void onHide();
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/dialog/AlertDialog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.dialog;
18 |
19 | import org.onesocialweb.gwt.client.i18n.UserInterfaceText;
20 |
21 | import com.google.gwt.core.client.GWT;
22 | import com.google.gwt.event.dom.client.ClickEvent;
23 | import com.google.gwt.event.dom.client.ClickHandler;
24 | import com.google.gwt.user.client.ui.Button;
25 | import com.google.gwt.user.client.ui.HorizontalPanel;
26 | import com.google.gwt.user.client.ui.Label;
27 | import com.google.gwt.user.client.ui.VerticalPanel;
28 |
29 | public class AlertDialog extends AbstractDialog {
30 |
31 | // internationalization
32 | private UserInterfaceText uiText = (UserInterfaceText) GWT
33 | .create(UserInterfaceText.class);
34 |
35 | // private final LoginHandler loginHandler;
36 | private static AlertDialog instance;
37 | private Button buttonOK = new Button(uiText.OK());
38 | private Label message = new Label();
39 |
40 | public static AlertDialog getInstance() {
41 | if (instance == null) {
42 | instance = new AlertDialog();
43 | }
44 | return instance;
45 | }
46 |
47 | public void showDialog(String message, String title) {
48 | setText(title);
49 | this.message.setText(message);
50 | center();
51 | buttonOK.setFocus(true);
52 | }
53 |
54 | private AlertDialog() {
55 |
56 | // Create dialog
57 | VerticalPanel vpanel1 = new VerticalPanel();
58 | HorizontalPanel buttoncontainer = new HorizontalPanel();
59 |
60 | vpanel1.add(message);
61 | vpanel1.add(buttoncontainer);
62 |
63 | buttoncontainer.add(buttonOK);
64 | buttoncontainer.setStyleName("dialogButtons");
65 |
66 | setWidth("300px");
67 | setWidget(vpanel1);
68 |
69 | buttonOK.addClickHandler(new ClickHandler() {
70 | public void onClick(ClickEvent event) {
71 |
72 | AlertDialog.getInstance().hide();
73 | }
74 | });
75 |
76 | }
77 |
78 | @Override
79 | protected void onHide() {
80 | // TODO Auto-generated method stub
81 |
82 | }
83 |
84 | @Override
85 | protected void onShow() {
86 | // TODO Auto-generated method stub
87 |
88 | }
89 |
90 | }
91 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/dialog/PicturePreviewDialog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.dialog;
18 |
19 | import org.onesocialweb.gwt.client.i18n.UserInterfaceText;
20 | import org.onesocialweb.gwt.client.ui.widget.StyledFlowPanel;
21 |
22 | import com.google.gwt.core.client.GWT;
23 | import com.google.gwt.event.dom.client.ClickEvent;
24 | import com.google.gwt.event.dom.client.ClickHandler;
25 | import com.google.gwt.event.logical.shared.ResizeEvent;
26 | import com.google.gwt.event.logical.shared.ResizeHandler;
27 | import com.google.gwt.event.shared.HandlerRegistration;
28 | import com.google.gwt.user.client.Window;
29 | import com.google.gwt.user.client.ui.Button;
30 | import com.google.gwt.user.client.ui.HorizontalPanel;
31 | import com.google.gwt.user.client.ui.Image;
32 | import com.google.gwt.user.client.ui.VerticalPanel;
33 |
34 | public class PicturePreviewDialog extends AbstractDialog {
35 |
36 | // internationalization
37 | private UserInterfaceText uiText = (UserInterfaceText) GWT
38 | .create(UserInterfaceText.class);
39 |
40 | // private final LoginHandler loginHandler;
41 | private static PicturePreviewDialog instance;
42 | private Button buttonOK = new Button(uiText.OK());
43 | private final Image image = new Image();
44 | private final StyledFlowPanel wrapper = new StyledFlowPanel("wrapper");
45 |
46 | private HandlerRegistration resizehandler;
47 |
48 | public static PicturePreviewDialog getInstance() {
49 | if (instance == null) {
50 | instance = new PicturePreviewDialog();
51 | }
52 | return instance;
53 | }
54 |
55 | public void showDialog(String url, String title) {
56 | setText(title);
57 | image.setUrl(url);
58 | center();
59 | buttonOK.setFocus(true);
60 | }
61 |
62 | private PicturePreviewDialog() {
63 |
64 | // Create dialog
65 | VerticalPanel vpanel1 = new VerticalPanel();
66 | HorizontalPanel buttoncontainer = new HorizontalPanel();
67 |
68 | wrapper.add(image);
69 | vpanel1.add(wrapper);
70 | vpanel1.add(buttoncontainer);
71 |
72 | buttoncontainer.add(buttonOK);
73 | buttoncontainer.setStyleName("dialogButtons");
74 |
75 | setWidget(vpanel1);
76 |
77 | buttonOK.addClickHandler(new ClickHandler() {
78 | public void onClick(ClickEvent event) {
79 |
80 | PicturePreviewDialog.getInstance().hide();
81 | }
82 | });
83 |
84 | }
85 |
86 | public void updateSize() {
87 | Integer height = Math.round((Window.getClientHeight())) - 200;
88 | Integer width = Math.round((Window.getClientWidth())) - 100;
89 |
90 | if (image.getHeight() > height && image.getWidth() > width) {
91 | wrapper.getElement().setAttribute(
92 | "style",
93 | "height: " + Integer.toString(height) + "px; width: "
94 | + Integer.toString(width) + "px;");
95 | center();
96 | } else if (image.getWidth() > width) {
97 | wrapper.getElement().setAttribute("style",
98 | "width: " + Integer.toString(width) + "px;");
99 | center();
100 | } else if (image.getHeight() > height) {
101 | wrapper.getElement().setAttribute(
102 | "style",
103 | "height: " + Integer.toString(height) + "px; width: "
104 | + Integer.toString(image.getWidth() + 15) + "px;");
105 | center();
106 | } else {
107 | wrapper.getElement().setAttribute("style", "");
108 | center();
109 | }
110 |
111 | }
112 |
113 | @Override
114 | protected void onHide() {
115 | resizehandler.removeHandler();
116 | ;
117 |
118 | }
119 |
120 | @Override
121 | protected void onShow() {
122 | updateSize();
123 | // handlers
124 | resizehandler = Window.addResizeHandler(new ResizeHandler() {
125 | public void onResize(ResizeEvent event) {
126 | updateSize();
127 | }
128 | });
129 | }
130 |
131 | }
132 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/event/ComponentAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.event;
18 |
19 | public abstract class ComponentAdapter implements ComponentListener {
20 |
21 | @Override
22 | public void componentHidden(ComponentEvent e) {
23 |
24 | }
25 |
26 | @Override
27 | public void componentMoved(ComponentEvent e) {
28 |
29 | }
30 |
31 | @Override
32 | public void componentResized(ComponentEvent e) {
33 |
34 | }
35 |
36 | @Override
37 | public void componentShown(ComponentEvent e) {
38 |
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/event/ComponentEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.event;
18 |
19 | public class ComponentEvent {
20 |
21 | private final Object source;
22 |
23 | public ComponentEvent(Object source) {
24 | this.source = source;
25 | }
26 |
27 | public Object getSource() {
28 | return source;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/event/ComponentHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.event;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | public class ComponentHelper {
23 |
24 | private final List listeners = new ArrayList();
25 |
26 | public void addComponentListener(ComponentListener listener) {
27 | listeners.add(listener);
28 | }
29 |
30 | public void removeComponentListener(ComponentListener listener) {
31 | listeners.remove(listener);
32 | }
33 |
34 | public void fireComponentHidden(Object source) {
35 | final ComponentEvent event = new ComponentEvent(source);
36 | fireComponentHidden(event);
37 | }
38 |
39 | public void fireComponentHidden(ComponentEvent event) {
40 | for (ComponentListener listener : listeners) {
41 | listener.componentHidden(event);
42 | }
43 | }
44 |
45 | public void fireComponentShown(Object source) {
46 | final ComponentEvent event = new ComponentEvent(source);
47 | fireComponentShown(event);
48 | }
49 |
50 | public void fireComponentShown(ComponentEvent event) {
51 | for (ComponentListener listener : listeners) {
52 | listener.componentShown(event);
53 | }
54 | }
55 |
56 | public void fireComponentMoved(Object source) {
57 | final ComponentEvent event = new ComponentEvent(source);
58 | fireComponentMoved(event);
59 | }
60 |
61 | public void fireComponentMoved(ComponentEvent event) {
62 | for (ComponentListener listener : listeners) {
63 | listener.componentMoved(event);
64 | }
65 | }
66 |
67 | public void fireComponentResized(Object source) {
68 | final ComponentEvent event = new ComponentEvent(source);
69 | fireComponentResized(event);
70 | }
71 |
72 | public void fireComponentResized(ComponentEvent event) {
73 | for (ComponentListener listener : listeners) {
74 | listener.componentResized(event);
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/event/ComponentListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.event;
18 |
19 | public interface ComponentListener {
20 |
21 | public void componentHidden(ComponentEvent e);
22 |
23 | public void componentMoved(ComponentEvent e);
24 |
25 | public void componentResized(ComponentEvent e);
26 |
27 | public void componentShown(ComponentEvent e);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/menu/Command.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.menu;
18 |
19 | public interface Command {
20 | public void execute();
21 | }
22 |
--------------------------------------------------------------------------------
/src/org/onesocialweb/gwt/client/ui/menu/MainMenu.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Vodafone Group Services Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.onesocialweb.gwt.client.ui.menu;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | import org.onesocialweb.gwt.client.OswClient;
23 |
24 | import com.google.gwt.event.dom.client.ClickEvent;
25 | import com.google.gwt.event.dom.client.ClickHandler;
26 | import com.google.gwt.user.client.ui.Button;
27 | import com.google.gwt.user.client.ui.FlowPanel;
28 | import com.google.gwt.user.client.ui.Image;
29 | import com.google.gwt.user.client.ui.RootPanel;
30 |
31 | public class MainMenu extends FlowPanel {
32 |
33 | private final List commands;
34 | private final List