[kune-commits] r841 - in trunk/src/main/java/org/ourproject/kune:
chat/client docs/client platf/client/rpc
platf/client/services platf/client/tool
workspace/client/ui/newtmp/skel
vjrj
vjrj at ourproject.org
Mon Aug 11 03:20:41 CEST 2008
Author: vjrj
Date: 2008-08-11 03:20:37 +0200 (Mon, 11 Aug 2008)
New Revision: 841
Added:
trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
Removed:
trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/rpc/MockedService.java
trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteServiceMocked.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorView.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTrigger.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTriggerDefault.java
Modified:
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java
Log:
Ws refactoring
Copied: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java (from rev 840, trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -0,0 +1,102 @@
+package org.ourproject.kune.chat.client;
+
+import org.ourproject.kune.chat.client.cnt.ChatContent;
+import org.ourproject.kune.chat.client.cnt.ChatContentPresenter;
+import org.ourproject.kune.chat.client.cnt.info.ChatInfo;
+import org.ourproject.kune.chat.client.cnt.info.ui.ChatInfoPanel;
+import org.ourproject.kune.chat.client.cnt.room.ChatRoom;
+import org.ourproject.kune.chat.client.cnt.room.ChatRoomControl;
+import org.ourproject.kune.chat.client.cnt.room.ChatRoomControlPresenter;
+import org.ourproject.kune.chat.client.cnt.room.ChatRoomPresenter;
+import org.ourproject.kune.chat.client.cnt.room.ui.ChatRoomControlPanel;
+import org.ourproject.kune.chat.client.cnt.room.ui.ChatRoomPanel;
+import org.ourproject.kune.chat.client.ctx.ChatContext;
+import org.ourproject.kune.chat.client.ctx.ChatContextPresenter;
+import org.ourproject.kune.chat.client.ctx.rooms.RoomsAdmin;
+import org.ourproject.kune.chat.client.ctx.rooms.RoomsAdminPresenter;
+import org.ourproject.kune.platf.client.app.Application;
+import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.platf.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.component.WorkspaceDeckPanel;
+import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.workspace.client.socialnet.GroupMembersSummary;
+import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItems;
+import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
+
+import com.calclab.emiteuimodule.client.EmiteUIDialog;
+import com.calclab.suco.client.modules.AbstractModule;
+import com.calclab.suco.client.provider.Factory;
+import com.calclab.suco.client.scopes.SingletonScope;
+
+public class ChatClientModule extends AbstractModule {
+
+ public ChatClientModule() {
+ }
+
+ @Override
+ public void onLoad() {
+
+ register(SingletonScope.class, new Factory<ChatInfo>(ChatInfo.class) {
+ public ChatInfo create() {
+ return new ChatInfoPanel();
+ }
+ });
+
+ register(SingletonScope.class, new Factory<ChatContent>(ChatContent.class) {
+ public ChatContent create() {
+ final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
+ final ChatContentPresenter presenter = new ChatContentPresenter($(EmiteUIDialog.class), panel,
+ $$(ChatInfo.class), $$(ChatRoom.class));
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<ChatContext>(ChatContext.class) {
+ public ChatContext create() {
+ final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
+ final ChatContextPresenter presenter = new ChatContextPresenter(panel, $$(RoomsAdmin.class));
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<ChatRoomControl>(ChatRoomControl.class) {
+ public ChatRoomControl create() {
+ final ChatRoomControlPresenter presenter = new ChatRoomControlPresenter();
+ final ChatRoomControlPanel panel = new ChatRoomControlPanel($(I18nUITranslationService.class),
+ presenter);
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<ChatRoom>(ChatRoom.class) {
+ public ChatRoom create() {
+ final ChatRoomPanel panel = new ChatRoomPanel($(WorkspaceSkeleton.class));
+ final ChatRoomPresenter presenter = new ChatRoomPresenter(panel);
+ return presenter;
+ }
+ });
+ register(SingletonScope.class, new Factory<RoomsAdmin>(RoomsAdmin.class) {
+ public RoomsAdmin create() {
+ final RoomsAdminPresenter presenter = new RoomsAdminPresenter($(ContextItems.class),
+ $(I18nUITranslationService.class), $$(StateManager.class), $(Session.class),
+ $$(ContentServiceAsync.class));
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<ChatClientTool>(ChatClientTool.class) {
+ public ChatClientTool create() {
+ return new ChatClientTool($(Session.class), $(Application.class), $(I18nUITranslationService.class),
+ $(EmiteUIDialog.class), $(WorkspaceSkeleton.class), $$(GroupMembersSummary.class),
+ $(ToolSelector.class), $(WsThemePresenter.class), $$(ChatContent.class), $$(ChatContext.class));
+ }
+ });
+
+ $(ChatClientTool.class);
+
+ }
+}
Deleted: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,102 +0,0 @@
-package org.ourproject.kune.chat.client;
-
-import org.ourproject.kune.chat.client.cnt.ChatContent;
-import org.ourproject.kune.chat.client.cnt.ChatContentPresenter;
-import org.ourproject.kune.chat.client.cnt.info.ChatInfo;
-import org.ourproject.kune.chat.client.cnt.info.ui.ChatInfoPanel;
-import org.ourproject.kune.chat.client.cnt.room.ChatRoom;
-import org.ourproject.kune.chat.client.cnt.room.ChatRoomControl;
-import org.ourproject.kune.chat.client.cnt.room.ChatRoomControlPresenter;
-import org.ourproject.kune.chat.client.cnt.room.ChatRoomPresenter;
-import org.ourproject.kune.chat.client.cnt.room.ui.ChatRoomControlPanel;
-import org.ourproject.kune.chat.client.cnt.room.ui.ChatRoomPanel;
-import org.ourproject.kune.chat.client.ctx.ChatContext;
-import org.ourproject.kune.chat.client.ctx.ChatContextPresenter;
-import org.ourproject.kune.chat.client.ctx.rooms.RoomsAdmin;
-import org.ourproject.kune.chat.client.ctx.rooms.RoomsAdminPresenter;
-import org.ourproject.kune.platf.client.app.Application;
-import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.platf.client.tool.ToolSelector;
-import org.ourproject.kune.workspace.client.component.WorkspaceDeckPanel;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.socialnet.GroupMembersSummary;
-import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItems;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
-
-import com.calclab.emiteuimodule.client.EmiteUIDialog;
-import com.calclab.suco.client.modules.AbstractModule;
-import com.calclab.suco.client.provider.Factory;
-import com.calclab.suco.client.scopes.SingletonScope;
-
-public class ChatClientNewModule extends AbstractModule {
-
- public ChatClientNewModule() {
- }
-
- @Override
- public void onLoad() {
-
- register(SingletonScope.class, new Factory<ChatInfo>(ChatInfo.class) {
- public ChatInfo create() {
- return new ChatInfoPanel();
- }
- });
-
- register(SingletonScope.class, new Factory<ChatContent>(ChatContent.class) {
- public ChatContent create() {
- final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
- final ChatContentPresenter presenter = new ChatContentPresenter($(EmiteUIDialog.class), panel,
- $$(ChatInfo.class), $$(ChatRoom.class));
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<ChatContext>(ChatContext.class) {
- public ChatContext create() {
- final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
- final ChatContextPresenter presenter = new ChatContextPresenter(panel, $$(RoomsAdmin.class));
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<ChatRoomControl>(ChatRoomControl.class) {
- public ChatRoomControl create() {
- final ChatRoomControlPresenter presenter = new ChatRoomControlPresenter();
- final ChatRoomControlPanel panel = new ChatRoomControlPanel($(I18nUITranslationService.class),
- presenter);
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<ChatRoom>(ChatRoom.class) {
- public ChatRoom create() {
- final ChatRoomPanel panel = new ChatRoomPanel($(WorkspaceSkeleton.class));
- final ChatRoomPresenter presenter = new ChatRoomPresenter(panel);
- return presenter;
- }
- });
- register(SingletonScope.class, new Factory<RoomsAdmin>(RoomsAdmin.class) {
- public RoomsAdmin create() {
- final RoomsAdminPresenter presenter = new RoomsAdminPresenter($(ContextItems.class),
- $(I18nUITranslationService.class), $$(StateManager.class), $(Session.class),
- $$(ContentServiceAsync.class));
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<ChatClientTool>(ChatClientTool.class) {
- public ChatClientTool create() {
- return new ChatClientTool($(Session.class), $(Application.class), $(I18nUITranslationService.class),
- $(EmiteUIDialog.class), $(WorkspaceSkeleton.class), $$(GroupMembersSummary.class),
- $(ToolSelector.class), $(WsThemePresenter.class), $$(ChatContent.class), $$(ChatContext.class));
- }
- });
-
- $(ChatClientTool.class);
-
- }
-}
Copied: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java (from rev 840, trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -0,0 +1,139 @@
+package org.ourproject.kune.docs.client;
+
+import org.ourproject.kune.docs.client.cnt.DocumentContent;
+import org.ourproject.kune.docs.client.cnt.DocumentContentPresenter;
+import org.ourproject.kune.docs.client.cnt.folder.FolderEditor;
+import org.ourproject.kune.docs.client.cnt.folder.FolderEditorPresenter;
+import org.ourproject.kune.docs.client.cnt.folder.ui.FolderEditorPanel;
+import org.ourproject.kune.docs.client.cnt.folder.viewer.FolderViewer;
+import org.ourproject.kune.docs.client.cnt.folder.viewer.FolderViewerPresenter;
+import org.ourproject.kune.docs.client.cnt.folder.viewer.FolderViewerView;
+import org.ourproject.kune.docs.client.cnt.folder.viewer.ui.FolderViewerPanel;
+import org.ourproject.kune.docs.client.cnt.reader.DocumentReader;
+import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderControl;
+import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderControlPresenter;
+import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderControlView;
+import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderPresenter;
+import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderView;
+import org.ourproject.kune.docs.client.cnt.reader.ui.DocumentReaderControlPanel;
+import org.ourproject.kune.docs.client.cnt.reader.ui.DocumentReaderPanel;
+import org.ourproject.kune.docs.client.ctx.DocumentContext;
+import org.ourproject.kune.docs.client.ctx.DocumentContextPresenter;
+import org.ourproject.kune.docs.client.ctx.admin.AdminContext;
+import org.ourproject.kune.docs.client.ctx.admin.AdminContextPresenter;
+import org.ourproject.kune.docs.client.ctx.admin.AdminContextView;
+import org.ourproject.kune.docs.client.ctx.admin.ui.AdminContextPanel;
+import org.ourproject.kune.docs.client.ctx.folder.FolderContext;
+import org.ourproject.kune.docs.client.ctx.folder.FolderContextPresenter;
+import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
+import org.ourproject.kune.platf.client.services.KuneErrorHandler;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.platf.client.tool.ToolSelector;
+import org.ourproject.kune.platf.client.ui.rate.RateIt;
+import org.ourproject.kune.workspace.client.component.WorkspaceDeckPanel;
+import org.ourproject.kune.workspace.client.editor.TextEditor;
+import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.workspace.client.tags.TagsSummary;
+import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItems;
+import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.ui.newtmp.title.EntitySubTitlePresenter;
+import org.ourproject.kune.workspace.client.ui.newtmp.title.EntityTitlePresenter;
+
+import com.calclab.suco.client.modules.AbstractModule;
+import com.calclab.suco.client.provider.Factory;
+import com.calclab.suco.client.scopes.SingletonScope;
+
+public class DocumentClientModule extends AbstractModule {
+
+ public DocumentClientModule() {
+ }
+
+ @Override
+ public void onLoad() {
+ final I18nUITranslationService i18n = $(I18nUITranslationService.class);
+ final WorkspaceSkeleton ws = $(WorkspaceSkeleton.class);
+
+ register(SingletonScope.class, new Factory<DocumentClientTool>(DocumentClientTool.class) {
+ public DocumentClientTool create() {
+ return new DocumentClientTool(i18n, $(ToolSelector.class), $(WsThemePresenter.class),
+ $(WorkspaceSkeleton.class), $$(DocumentContent.class), $$(DocumentContext.class));
+ }
+ });
+
+ register(SingletonScope.class, new Factory<AdminContext>(AdminContext.class) {
+ public AdminContext create() {
+ final AdminContextPresenter presenter = new AdminContextPresenter($(Session.class),
+ $(StateManager.class), $$(TagsSummary.class), $$(ContentServiceAsync.class),
+ $(EntityTitlePresenter.class), $(EntitySubTitlePresenter.class));
+ final AdminContextView view = new AdminContextPanel(presenter, i18n);
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<DocumentContent>(DocumentContent.class) {
+ public DocumentContent create() {
+ final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
+ final DocumentContentPresenter presenter = new DocumentContentPresenter($(StateManager.class),
+ $(I18nUITranslationService.class), $(KuneErrorHandler.class), panel, $(Session.class),
+ $(RateIt.class), $$(DocumentReader.class), $$(DocumentReaderControl.class),
+ $$(TextEditor.class), $$(FolderViewer.class), $$(FolderEditor.class),
+ $$(ContentServiceAsync.class));
+ return presenter;
+ }
+ });
+ register(SingletonScope.class, new Factory<DocumentContext>(DocumentContext.class) {
+ public DocumentContext create() {
+ final WorkspaceDeckPanel view = new WorkspaceDeckPanel();
+ final DocumentContextPresenter presenter = new DocumentContextPresenter(view, $$(FolderContext.class),
+ $$(AdminContext.class));
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<DocumentReader>(DocumentReader.class) {
+ public DocumentReader create() {
+ final DocumentReaderView view = new DocumentReaderPanel(ws);
+ final DocumentReaderPresenter presenter = new DocumentReaderPresenter(view);
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<DocumentReaderControl>(DocumentReaderControl.class) {
+ public DocumentReaderControl create() {
+ final DocumentReaderControlPresenter presenter = new DocumentReaderControlPresenter();
+ final DocumentReaderControlView view = new DocumentReaderControlPanel(presenter, i18n, ws);
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<FolderContext>(FolderContext.class) {
+ public FolderContext create() {
+ final FolderContextPresenter presenter = new FolderContextPresenter($(ContextItems.class),
+ $(StateManager.class), $(Session.class), i18n, $$(ContentServiceAsync.class));
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<FolderEditor>(FolderEditor.class) {
+ public FolderEditor create() {
+ final FolderEditorPanel view = new FolderEditorPanel();
+ final FolderEditorPresenter presenter = new FolderEditorPresenter(view);
+ return presenter;
+ }
+ });
+
+ register(SingletonScope.class, new Factory<FolderViewer>(FolderViewer.class) {
+ public FolderViewer create() {
+ final FolderViewerView view = new FolderViewerPanel(ws);
+ final FolderViewerPresenter presenter = new FolderViewerPresenter(view);
+ return presenter;
+ }
+ });
+
+ $(DocumentClientTool.class);
+ }
+}
Deleted: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,139 +0,0 @@
-package org.ourproject.kune.docs.client;
-
-import org.ourproject.kune.docs.client.cnt.DocumentContent;
-import org.ourproject.kune.docs.client.cnt.DocumentContentPresenter;
-import org.ourproject.kune.docs.client.cnt.folder.FolderEditor;
-import org.ourproject.kune.docs.client.cnt.folder.FolderEditorPresenter;
-import org.ourproject.kune.docs.client.cnt.folder.ui.FolderEditorPanel;
-import org.ourproject.kune.docs.client.cnt.folder.viewer.FolderViewer;
-import org.ourproject.kune.docs.client.cnt.folder.viewer.FolderViewerPresenter;
-import org.ourproject.kune.docs.client.cnt.folder.viewer.FolderViewerView;
-import org.ourproject.kune.docs.client.cnt.folder.viewer.ui.FolderViewerPanel;
-import org.ourproject.kune.docs.client.cnt.reader.DocumentReader;
-import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderControl;
-import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderControlPresenter;
-import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderControlView;
-import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderPresenter;
-import org.ourproject.kune.docs.client.cnt.reader.DocumentReaderView;
-import org.ourproject.kune.docs.client.cnt.reader.ui.DocumentReaderControlPanel;
-import org.ourproject.kune.docs.client.cnt.reader.ui.DocumentReaderPanel;
-import org.ourproject.kune.docs.client.ctx.DocumentContext;
-import org.ourproject.kune.docs.client.ctx.DocumentContextPresenter;
-import org.ourproject.kune.docs.client.ctx.admin.AdminContext;
-import org.ourproject.kune.docs.client.ctx.admin.AdminContextPresenter;
-import org.ourproject.kune.docs.client.ctx.admin.AdminContextView;
-import org.ourproject.kune.docs.client.ctx.admin.ui.AdminContextPanel;
-import org.ourproject.kune.docs.client.ctx.folder.FolderContext;
-import org.ourproject.kune.docs.client.ctx.folder.FolderContextPresenter;
-import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
-import org.ourproject.kune.platf.client.services.KuneErrorHandler;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.platf.client.tool.ToolSelector;
-import org.ourproject.kune.platf.client.ui.rate.RateIt;
-import org.ourproject.kune.workspace.client.component.WorkspaceDeckPanel;
-import org.ourproject.kune.workspace.client.editor.TextEditor;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.tags.TagsSummary;
-import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItems;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
-import org.ourproject.kune.workspace.client.ui.newtmp.title.EntitySubTitlePresenter;
-import org.ourproject.kune.workspace.client.ui.newtmp.title.EntityTitlePresenter;
-
-import com.calclab.suco.client.modules.AbstractModule;
-import com.calclab.suco.client.provider.Factory;
-import com.calclab.suco.client.scopes.SingletonScope;
-
-public class DocumentClientNewModule extends AbstractModule {
-
- public DocumentClientNewModule() {
- }
-
- @Override
- public void onLoad() {
- final I18nUITranslationService i18n = $(I18nUITranslationService.class);
- final WorkspaceSkeleton ws = $(WorkspaceSkeleton.class);
-
- register(SingletonScope.class, new Factory<DocumentClientTool>(DocumentClientTool.class) {
- public DocumentClientTool create() {
- return new DocumentClientTool(i18n, $(ToolSelector.class), $(WsThemePresenter.class),
- $(WorkspaceSkeleton.class), $$(DocumentContent.class), $$(DocumentContext.class));
- }
- });
-
- register(SingletonScope.class, new Factory<AdminContext>(AdminContext.class) {
- public AdminContext create() {
- final AdminContextPresenter presenter = new AdminContextPresenter($(Session.class),
- $(StateManager.class), $$(TagsSummary.class), $$(ContentServiceAsync.class),
- $(EntityTitlePresenter.class), $(EntitySubTitlePresenter.class));
- final AdminContextView view = new AdminContextPanel(presenter, i18n);
- presenter.init(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<DocumentContent>(DocumentContent.class) {
- public DocumentContent create() {
- final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
- final DocumentContentPresenter presenter = new DocumentContentPresenter($(StateManager.class),
- $(I18nUITranslationService.class), $(KuneErrorHandler.class), panel, $(Session.class),
- $(RateIt.class), $$(DocumentReader.class), $$(DocumentReaderControl.class),
- $$(TextEditor.class), $$(FolderViewer.class), $$(FolderEditor.class),
- $$(ContentServiceAsync.class));
- return presenter;
- }
- });
- register(SingletonScope.class, new Factory<DocumentContext>(DocumentContext.class) {
- public DocumentContext create() {
- final WorkspaceDeckPanel view = new WorkspaceDeckPanel();
- final DocumentContextPresenter presenter = new DocumentContextPresenter(view, $$(FolderContext.class),
- $$(AdminContext.class));
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<DocumentReader>(DocumentReader.class) {
- public DocumentReader create() {
- final DocumentReaderView view = new DocumentReaderPanel(ws);
- final DocumentReaderPresenter presenter = new DocumentReaderPresenter(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<DocumentReaderControl>(DocumentReaderControl.class) {
- public DocumentReaderControl create() {
- final DocumentReaderControlPresenter presenter = new DocumentReaderControlPresenter();
- final DocumentReaderControlView view = new DocumentReaderControlPanel(presenter, i18n, ws);
- presenter.init(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<FolderContext>(FolderContext.class) {
- public FolderContext create() {
- final FolderContextPresenter presenter = new FolderContextPresenter($(ContextItems.class),
- $(StateManager.class), $(Session.class), i18n, $$(ContentServiceAsync.class));
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<FolderEditor>(FolderEditor.class) {
- public FolderEditor create() {
- final FolderEditorPanel view = new FolderEditorPanel();
- final FolderEditorPresenter presenter = new FolderEditorPresenter(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<FolderViewer>(FolderViewer.class) {
- public FolderViewer create() {
- final FolderViewerView view = new FolderViewerPanel(ws);
- final FolderViewerPresenter presenter = new FolderViewerPresenter(view);
- return presenter;
- }
- });
-
- $(DocumentClientTool.class);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/MockedService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/MockedService.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/MockedService.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,59 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package org.ourproject.kune.platf.client.rpc;
-
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class MockedService {
- public static boolean isTest;
-
- public static interface Delayer {
- void run();
- }
-
- @SuppressWarnings("unchecked")
- protected void answer(final Object response, final AsyncCallback callback) {
- delay(new Delayer() {
- public void run() {
- callback.onSuccess(response);
- }
- });
- }
-
- protected void delay(final Delayer timer) {
- if (isTest) {
- timer.run();
- } else {
- schedule(timer);
- }
- }
-
- private void schedule(final Delayer delayer) {
- Timer timer = new Timer() {
- public void run() {
- delayer.run();
- }
- };
- timer.schedule(1500);
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteServiceMocked.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteServiceMocked.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteServiceMocked.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,32 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package org.ourproject.kune.platf.client.rpc;
-
-import org.ourproject.kune.platf.client.dto.InitDataDTO;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class SiteServiceMocked extends MockedService implements SiteServiceAsync {
-
- public void getInitData(final String userHash, final AsyncCallback<InitDataDTO> callback) {
- }
-
-}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,7 +1,7 @@
package org.ourproject.kune.platf.client.services;
-import org.ourproject.kune.chat.client.ChatClientNewModule;
-import org.ourproject.kune.docs.client.DocumentClientNewModule;
+import org.ourproject.kune.chat.client.ChatClientModule;
+import org.ourproject.kune.docs.client.DocumentClientModule;
import org.ourproject.kune.platf.client.app.Application;
import org.ourproject.kune.platf.client.app.ApplicationDefault;
import org.ourproject.kune.platf.client.app.HistoryWrapper;
@@ -23,7 +23,6 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.platf.client.state.StateManagerDefault;
import org.ourproject.kune.platf.client.tool.ToolSelector;
-import org.ourproject.kune.platf.client.tool.ToolSelectorPanel;
import org.ourproject.kune.platf.client.tool.ToolSelectorPresenter;
import org.ourproject.kune.platf.client.ui.QuickTipsHelper;
import org.ourproject.kune.platf.client.ui.rate.RateIt;
@@ -554,8 +553,6 @@
public ToolSelector create() {
final ToolSelectorPresenter presenter = new ToolSelectorPresenter($(StateManager.class),
$(WsThemePresenter.class));
- final ToolSelectorPanel panel = new ToolSelectorPanel(presenter, ws);
- presenter.init(panel);
return presenter;
}
});
@@ -588,8 +585,8 @@
}
});
- install(ProviderRegisterStrategy.registerOnlyIfNotRegistered, new EmiteUIModule(),
- new DocumentClientNewModule(), new ChatClientNewModule());
+ install(ProviderRegisterStrategy.registerOnlyIfNotRegistered, new EmiteUIModule(), new DocumentClientModule(),
+ new ChatClientModule());
$(SitePublicSpaceLink.class);
$(SiteMessage.class);
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPanel.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPanel.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,94 +0,0 @@
-package org.ourproject.kune.platf.client.tool;
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.ourproject.kune.platf.client.tool.ToolTrigger.TriggerListener;
-import org.ourproject.kune.platf.client.ui.HasColor;
-import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
-
-import com.google.gwt.user.client.ui.Hyperlink;
-import com.google.gwt.user.client.ui.SimplePanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-public class ToolSelectorPanel extends VerticalPanel implements ToolSelectorView {
-
- private static final String ITEM_SELECTED = "kune-GroupToolsBar-itemSelected";
- private static final String ITEM_NOT_SELECTED = "kune-GroupToolsBar-itemNotSelected";
- private Widget currentTab;
- private final HashMap<String, Widget> tabs;
-
- public ToolSelectorPanel(final ToolSelectorPresenter presenter, final WorkspaceSkeleton ws) {
- tabs = new HashMap<String, Widget>();
- currentTab = null;
- addStyleName("kune-GroupToolsBar");
- ws.getEntitySummary().addInTools(this);
- }
-
- public void addItem(final ToolTrigger trigger) {
- final int nextIndex = this.getWidgetCount();
- final Widget menuItem = createItem(nextIndex, trigger);
- setTabSelected(menuItem, false);
- tabs.put(trigger.getName(), menuItem);
- this.add(menuItem);
- }
-
- public void selectItem(final String toolName) {
- if (currentTab != null) {
- setTabSelected(currentTab, false);
- }
- currentTab = getWidget(toolName);
- setTabSelected(currentTab, true);
- }
-
- public void setTabsColors(final String selectedColor, final String unSelectedColor) {
- final Iterator<Widget> iter = tabs.values().iterator();
- while (iter.hasNext()) {
- final Widget w = iter.next();
- if (w == currentTab) {
- ((HasColor) w).setColor(selectedColor);
- } else {
- ((HasColor) w).setColor(unSelectedColor);
- }
- }
- }
-
- public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
- // TODO Auto-generated method stub
-
- }
-
- private Widget createItem(final int index, final ToolTrigger trigger) {
- final SimplePanel menuItem = new SimplePanel();
- addStyleName("Tab");
- final Hyperlink hl = new Hyperlink(trigger.getLabel(), "");
- trigger.setListener(new TriggerListener() {
- public void onStateChanged(final String encoded) {
- hl.setTargetHistoryToken(encoded);
- }
- });
- menuItem.add(hl);
- return new RoundedBorderDecorator(menuItem, RoundedBorderDecorator.RIGHT);
- }
-
- private Widget getWidget(final String toolName) {
- return tabs.get(toolName);
- }
-
- private void setTabSelected(final Widget tab, final boolean isSelected) {
- if (isSelected) {
- tab.removeStyleName(ITEM_NOT_SELECTED);
- tab.addStyleName(ITEM_SELECTED);
- } else {
- tab.removeStyleName(ITEM_SELECTED);
- tab.addStyleName(ITEM_NOT_SELECTED);
- }
- // tring color = isSelected ? colorTheme.getToolSelected() :
- // colorTheme.getToolUnselected();
- // ((HasColor) tab).setColor(color);
- }
-
-}
\ No newline at end of file
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -2,16 +2,13 @@
import java.util.HashMap;
-import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
import com.calclab.suco.client.signal.Slot2;
public class ToolSelectorPresenter implements ToolSelector {
- private ToolSelectorView view;
private final HashMap<String, ToolSelectorItem> tools;
public ToolSelectorPresenter(final StateManager stateManager, final WsThemePresenter wsThemePresenter) {
@@ -26,11 +23,6 @@
onToolChanged(oldTool, newTool);
}
});
- wsThemePresenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
- public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
- view.setTheme(oldTheme, newTheme);
- }
- });
}
public void addTool(final ToolSelectorItem item) {
@@ -45,14 +37,6 @@
item.setSelected(false);
}
- public View getView() {
- return view;
- }
-
- public void init(final ToolSelectorView view) {
- this.view = view;
- }
-
void onGroupChanged(final String newGroupName) {
for (final String name : tools.keySet()) {
tools.get(name).setGroupShortName(newGroupName);
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorView.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorView.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,9 +0,0 @@
-package org.ourproject.kune.platf.client.tool;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
-
-public interface ToolSelectorView extends View {
-
- void setTheme(WsTheme oldTheme, WsTheme newTheme);
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTrigger.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTrigger.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTrigger.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,35 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package org.ourproject.kune.platf.client.tool;
-
-public interface ToolTrigger {
-
- public interface TriggerListener {
- void onStateChanged(String encoded);
- }
-
- String getName();
-
- String getLabel();
-
- void setListener(TriggerListener listener);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTriggerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTriggerDefault.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolTriggerDefault.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package org.ourproject.kune.platf.client.tool;
-
-import org.ourproject.kune.platf.client.dto.StateToken;
-
-public class ToolTriggerDefault implements ToolTrigger {
- private final String toolName;
- private final String label;
- private TriggerListener listener;
-
- public ToolTriggerDefault(final String toolName, final String caption) {
- this.toolName = toolName;
- this.label = caption;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getName() {
- return toolName;
- }
-
- public void setListener(final TriggerListener listener) {
- this.listener = listener;
- }
-
- public void setState(final String encoded) {
- listener.onStateChanged(encoded);
- }
-
- public void setState(final StateToken stateToken) {
- setState(stateToken.getEncoded());
- }
-
-}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java 2008-08-10 04:29:30 UTC (rev 840)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java 2008-08-11 01:20:37 UTC (rev 841)
@@ -2,6 +2,7 @@
import org.ourproject.kune.platf.client.ui.DefaultBorderLayout;
+import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.Toolbar;
@@ -13,12 +14,15 @@
private final Panel entitySummary;
private final DefaultBorderLayout mainPanel;
private final Toolbar trayBar;
+ private final VerticalPanel vpTools;
public EntitySummary() {
mainPanel = new DefaultBorderLayout();
entityTools = new Panel();
entityTools.setLayout(new FitLayout());
entityTools.setAutoHeight(true);
+ vpTools = new VerticalPanel();
+ entityTools.add(vpTools);
entitySummary = new Panel();
entityTools.setBorder(false);
entitySummary.setBorder(false);
@@ -38,10 +42,12 @@
}
public void addInTools(final Widget widget) {
- entityTools.add(widget);
- entityTools.render(widget.getElement());
+ vpTools.add(widget);
+ // entityTools.render(widget.getElement());
if (entityTools.isRendered()) {
+ entityTools.syncSize();
entityTools.doLayout(false);
+ mainPanel.doLayoutIfNeeded();
}
}
More information about the kune-commits
mailing list