You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2011/02/04 18:34:28 UTC
svn commit: r1067233 [6/7] - in /cxf/trunk:
distribution/src/main/release/samples/
distribution/src/main/release/samples/logbrowser/
distribution/src/main/release/samples/logbrowser/src/
distribution/src/main/release/samples/logbrowser/src/demo/ distri...
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.browser;
+
+import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
+
+public class SubscriptionTable extends SelectableTable<Subscription> {
+ public SubscriptionTable() {
+ super(/* hotkeys not enabled */ false);
+ }
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,158 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.browser;
+
+import javax.annotation.Nonnull;
+
+import com.google.gwt.http.client.Request;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.name.Named;
+
+import org.apache.cxf.management.web.browser.client.EventBus;
+import org.apache.cxf.management.web.browser.client.event.SelectedSubscriptionEvent;
+import org.apache.cxf.management.web.browser.client.event.SelectedSubscriptionEventHandler;
+import org.apache.cxf.management.web.browser.client.service.browser.Feed;
+import org.apache.cxf.management.web.browser.client.service.browser.FeedProxyImpl;
+import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
+import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
+import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
+import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources;
+
+@Singleton
+public class ViewerPresenter extends BasePresenter implements ViewerView.Presenter {
+
+ @Nonnull
+ private final FeedProxyImpl proxy;
+
+ @Nonnull
+ private Feed feed;
+
+ @Nonnull
+ private final ViewerView view;
+
+ @Nonnull
+ private final LogBrowserConstans constans;
+
+ @Nonnull
+ private final LogBrowserResources resources;
+
+ @Inject
+ public ViewerPresenter(@Nonnull final EventBus eventBus,
+ @Nonnull final ViewerView view,
+ @Nonnull @Named("BindStrategyForViewer") final BindStrategy bindStrategy,
+ @Nonnull final FeedProxyImpl proxy,
+ @Nonnull final LogBrowserConstans constans,
+ @Nonnull final LogBrowserResources resources) {
+ super(eventBus, view, bindStrategy);
+
+ this.view = view;
+ this.view.setPresenter(this);
+
+ this.proxy = proxy;
+ this.constans = constans;
+ this.resources = resources;
+
+ setFeed(Feed.EMPTY);
+
+ bind();
+ }
+
+ private void bind() {
+ eventBus.addHandler(SelectedSubscriptionEvent.TYPE, new SelectedSubscriptionEventHandler() {
+
+ public void onSelectedSubscription(SelectedSubscriptionEvent event) {
+ getFeed(event.getUrl());
+ }
+ });
+
+ }
+
+ public void onEntryItemClicked(final int row) {
+ assert row >= 0 && row < feed.getEntries().size();
+ view.setEntryDetails(feed.getEntries().get(row));
+ }
+
+ public void onNewerButtonClicked() {
+ getFeed(feed.getLinks().getNext());
+ }
+
+ public void onLastButtonClicked() {
+ getFeed(feed.getLinks().getLast());
+ }
+
+ public void onFirstButtonClicked() {
+ getFeed(feed.getLinks().getFirst());
+ }
+
+ public void onRefreshButtonClicked() {
+ getFeed(feed.getLinks().getSelf());
+ }
+
+ public void onOlderButtonClicked() {
+ getFeed(feed.getLinks().getPrevious());
+ }
+
+ private void setFeed(@Nonnull final Feed newFeed) {
+ feed = newFeed;
+
+ view.setEntryDetails(null);
+ view.setLinks(feed.getLinks());
+
+ if (feed.getEntries().isEmpty()) {
+ setNoEntriesMessage();
+ } else {
+ view.setEntries(feed.getEntries());
+ }
+ }
+
+ private void setNoEntriesMessage() {
+ view.setMessageInsteadOfEntries(constans.browserTabNoEntries(),
+ resources.css().browserTabNoEntriesMessage());
+ }
+
+ private void setLoadingMessage() {
+ view.setMessageInsteadOfEntries(constans.browserTabLoading(),
+ resources.css().browserTabLoadingMessage());
+ }
+
+ private void getFeed(@Nonnull final String url) {
+ setLoadingMessage();
+ proxy.getFeed(url, new FeedProxyImpl.Callback() {
+
+ @Override
+ public void onAccessDenied() {
+ setFeed(Feed.EMPTY);
+ }
+
+ @Override
+ public void onSuccess(@Nonnull final Feed newFeed) {
+ setFeed(newFeed);
+ }
+
+ @Override
+ public void onError(@Nonnull final Request request, @Nonnull final Throwable ex) {
+ setFeed(Feed.EMPTY);
+ super.onError(request, ex);
+ }
+
+ });
+ }
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.browser;
+
+import java.util.List;
+
+import org.apache.cxf.management.web.browser.client.service.browser.Entry;
+import org.apache.cxf.management.web.browser.client.service.browser.Links;
+import org.apache.cxf.management.web.browser.client.ui.View;
+
+public interface ViewerView extends View {
+
+ public interface Presenter {
+ void onEntryItemClicked(int row);
+
+ void onOlderButtonClicked();
+
+ void onNewerButtonClicked();
+
+ void onLastButtonClicked();
+
+ void onFirstButtonClicked();
+
+ void onRefreshButtonClicked();
+ }
+
+ void setMessageInsteadOfEntries(String message, String styleName);
+
+ void setEntries(List<Entry> entries);
+
+ void setEntryDetails(Entry entry);
+
+ void setLinks(Links links);
+
+ void setPresenter(Presenter presenter);
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml Fri Feb 4 17:34:24 2011
@@ -0,0 +1,107 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'
+ xmlns:logbrowser='urn:import:org.apache.cxf.management.web.browser.client.ui.browser'>
+
+ <ui:with field='res'
+ type='org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources'/>
+
+ <g:SplitLayoutPanel>
+ <g:north size='200'>
+ <g:DockLayoutPanel styleName='{res.css.browserTabToolBar}'
+ unit='EM'>
+ <g:north size='2.2'>
+
+ <g:HTMLPanel>
+ <table class='{res.css.browserTabEntryTableHeaders}'>
+ <thead style="display:none;">
+ <tr>
+ <!--TODO move this values to constans-->
+ <th width="160px"/>
+ <th width="128px"/>
+ <th/>
+ <th width="350px"/>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ Date
+ </td>
+ <td>
+ Level
+ </td>
+ <td>
+ Message
+ </td>
+ <td style="text-align:right;">
+ <g:Anchor styleName='{res.css.browserTabNavigationLink}'
+ ui:field='firstButton' href='javascript:;'>
+ « first
+ </g:Anchor>
+
+ <g:Anchor styleName='{res.css.browserTabNavigationLink}'
+ ui:field='olderButton' href='javascript:;'>
+ ‹ previous
+ </g:Anchor>
+
+ <g:Anchor styleName='{res.css.browserTabNavigationLink}'
+ ui:field='refreshButton' href='javascript:;'>
+ refresh
+ </g:Anchor>
+
+ <g:Anchor styleName='{res.css.browserTabNavigationLink}'
+ ui:field='newerButton' href='javascript:;'>
+ next ›
+ </g:Anchor>
+
+ <g:Anchor styleName='{res.css.browserTabNavigationLink}'
+ ui:field='lastButton' href='javascript:;'>
+ last »
+ </g:Anchor>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ </g:HTMLPanel>
+ </g:north>
+
+ <g:center>
+ <logbrowser:EntryTable ui:field='entryTable'
+ styleName='{res.css.browserTabEntrySelectableTable}'/>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:north>
+
+ <g:center size='200'>
+ <g:DockLayoutPanel styleName='{res.css.browserTabEntryDetailsSection}'
+ unit='EM'>
+ <g:center>
+ <g:ScrollPanel>
+ <g:HTML ui:field='entryDetails'
+ styleName='{res.css.browserTabEntryDetailsContent}'/>
+ </g:ScrollPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,207 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.browser;
+
+import java.util.List;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.uibinder.client.UiTemplate;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+import org.apache.cxf.management.web.browser.client.service.browser.Entry;
+import org.apache.cxf.management.web.browser.client.service.browser.Links;
+import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
+
+@Singleton
+public class ViewerViewImpl extends Composite implements ViewerView {
+
+ private static final DateTimeFormat DT_FORMATTER =
+ DateTimeFormat.getFormat("HH:mm:ss dd.MM.yyyy");
+
+ @UiTemplate("ViewerView.ui.xml")
+ interface ViewerViewUiBinder extends UiBinder<Widget, ViewerViewImpl> { }
+
+ private static final ViewerViewUiBinder UI_BINDER =
+ GWT.create(ViewerViewUiBinder.class);
+
+ @UiField @Nonnull
+ EntryTable entryTable;
+
+ @UiField @Nonnull
+ HTML entryDetails;
+
+ @UiField @Nonnull
+ Anchor refreshButton;
+
+ @UiField @Nonnull
+ Anchor newerButton;
+
+ @UiField @Nonnull
+ Anchor olderButton;
+
+ @UiField @Nonnull
+ Anchor lastButton;
+
+ @UiField @Nonnull
+ Anchor firstButton;
+
+ private Presenter presenter;
+
+ @Nonnull
+ private final LogBrowserConstans constans;
+
+ @Inject
+ public ViewerViewImpl(@Nonnull final LogBrowserConstans constans) {
+ this.constans = constans;
+
+ initWidget(UI_BINDER.createAndBindUi(this));
+
+ initEntryTable();
+ }
+
+ public void setEntries(@Nonnull final List<Entry> entries) {
+ entryTable.setData(entries);
+ }
+
+
+ public void setMessageInsteadOfEntries(@Nonnull final String message, @Nullable final String styleName) {
+ entryTable.setMessageInsteadOfData(message, styleName);
+ }
+
+ public void setEntryDetails(@Nullable final Entry entry) {
+ if (entry == null) {
+ entryDetails.setHTML("");
+ return;
+ }
+
+ StringBuilder sb = new StringBuilder();
+
+ if (entry.getMessage() != null) {
+ sb.append(entry.getMessage()).append("\n");
+ }
+ if (entry.getThrowable() != null) {
+ sb.append(entry.getThrowable());
+ }
+
+ entryDetails.setHTML(sb.toString());
+ }
+
+ public void setLinks(@Nonnull final Links links) {
+ olderButton.setVisible(links.previousAvailable());
+ newerButton.setVisible(links.nextAvailable());
+ refreshButton.setVisible(links.selfAvailable());
+ lastButton.setVisible(links.lastAvailable());
+ firstButton.setVisible(links.firstAvailable());
+ }
+
+ @UiHandler("firstButton")
+ void onFirstButtonClicked(@Nonnull ClickEvent event) {
+ assert presenter != null;
+ presenter.onFirstButtonClicked();
+ }
+
+ @UiHandler("newerButton")
+ void onNewerButtonClicked(@Nonnull ClickEvent event) {
+ assert presenter != null;
+ presenter.onNewerButtonClicked();
+ }
+
+ @UiHandler("refreshButton")
+ void onRefreshButtonClicked(@Nonnull ClickEvent event) {
+ assert presenter != null;
+ presenter.onRefreshButtonClicked();
+ }
+
+ @UiHandler("olderButton")
+ void onOlderButtonClicked(@Nonnull ClickEvent event) {
+ assert presenter != null;
+ presenter.onOlderButtonClicked();
+ }
+
+ @UiHandler("lastButton")
+ void onLastButtonClicked(@Nonnull ClickEvent event) {
+ assert presenter != null;
+ presenter.onLastButtonClicked();
+ }
+
+ @SuppressWarnings("unchecked")
+ private void initEntryTable() {
+ entryTable.setColumnDefinitions(
+ new SelectableTable.ColumnDefinition<Entry>() {
+
+ public String getContent(Entry entry) {
+ return DT_FORMATTER.format(entry.getEventTimestamp());
+ }
+
+ public String getWidth() {
+ return constans.browseTabDatatimeColumnWidth();
+ }
+ },
+ new SelectableTable.ColumnDefinition<Entry>() {
+
+ public String getContent(Entry entry) {
+ return entry.getLevel();
+ }
+
+ public String getWidth() {
+ return constans.browseTabLevelColumnWidth();
+ }
+ },
+ new SelectableTable.ColumnDefinition<Entry>() {
+
+ public String getContent(Entry entry) {
+ return entry.getTitle();
+ }
+
+ public String getWidth() {
+ return null;
+ }
+ }
+ );
+
+ entryTable.addSelectRowHandler(new SelectableTable.SelectRowHandler() {
+
+ public void onSelectRow(int row) {
+ assert presenter != null;
+ presenter.onEntryItemClicked(row);
+ }
+ });
+ }
+
+ public void setPresenter(Presenter presenter) {
+ this.presenter = presenter;
+ }
+
+ public Widget asWidget() {
+ return this;
+ }
+}
\ No newline at end of file
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.common;
+
+import javax.annotation.Nonnull;
+
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+
+import org.apache.cxf.management.web.browser.client.EventBus;
+import org.apache.cxf.management.web.browser.client.event.SignOutEvent;
+import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
+import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
+
+public class NavigationHeaderPresenter extends BasePresenter implements NavigationHeaderView.Presenter {
+
+ @Nonnull
+ private NavigationHeaderView view;
+
+ @Inject
+ public NavigationHeaderPresenter(@Nonnull final EventBus eventBus,
+ @Nonnull final NavigationHeaderView view,
+ @Nonnull @Named("BindStrategyForNavigationHeader") final BindStrategy bindStrategy) {
+ super(eventBus, view, bindStrategy);
+
+ this.view = view;
+ this.view.setPresenter(this);
+ }
+
+ public void onSignOutButtonClicked() {
+ eventBus.fireEvent(new SignOutEvent());
+ }
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.common;
+
+import org.apache.cxf.management.web.browser.client.ui.View;
+
+public interface NavigationHeaderView extends View {
+
+ public interface Presenter {
+ void onSignOutButtonClicked();
+ }
+
+ void setPresenter(Presenter presenter);
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml Fri Feb 4 17:34:24 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'
+ xmlns:logbrowser='urn:import:org.apache.cxf.management.web.logging.logbrowser.client.ui.browser'>
+
+ <ui:with field='res'
+ type='org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources'/>
+
+ <g:HTMLPanel>
+ <g:Hyperlink ui:field="signOutHyperlink"
+ addStyleNames="{res.css.browserTabSignOutButton}">
+ Sign out
+ </g:Hyperlink>
+ </g:HTMLPanel>
+</ui:UiBinder>
\ No newline at end of file
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.common;
+
+import javax.annotation.Nonnull;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.uibinder.client.UiTemplate;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Widget;
+
+public class NavigationHeaderViewImpl extends Composite implements NavigationHeaderView {
+
+ @UiTemplate("NavigationHeaderView.ui.xml")
+ interface NavigationHeaderViewUiBinder extends UiBinder<Widget, NavigationHeaderViewImpl> { }
+
+ private static final NavigationHeaderViewUiBinder UI_BINDER =
+ GWT.create(NavigationHeaderViewUiBinder.class);
+
+ @Nonnull
+ private Presenter presenter;
+
+ public NavigationHeaderViewImpl() {
+ initWidget(UI_BINDER.createAndBindUi(this));
+ }
+
+ @UiHandler("signOutHyperlink")
+ void onSignOutHyperlinkClicked(@Nonnull final ClickEvent event) {
+ assert presenter != null;
+ presenter.onSignOutButtonClicked();
+ }
+
+ public void setPresenter(@Nonnull final Presenter presenter) {
+ this.presenter = presenter;
+ }
+
+ public Widget asWidget() {
+ return this;
+ }
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.resources;
+
+import com.google.gwt.i18n.client.Constants;
+
+//TODO divide items into groups (like: browseTab, settingsTab etc.)
+public interface LogBrowserConstans extends Constants {
+
+ @DefaultStringValue("Application Error")
+ String errorDialogTitle();
+
+ @DefaultStringValue("Continue")
+ String errorDialogContineButton();
+
+ @DefaultStringValue("No entries")
+ String browserTabNoEntries();
+
+ @DefaultStringValue("160px")
+ String browseTabDatatimeColumnWidth();
+
+ @DefaultStringValue("128px")
+ String browseTabLevelColumnWidth();
+
+ @DefaultStringValue("350px")
+ String browseTabNavigationLinksColumnWidth();
+
+ @DefaultStringValue("Loading")
+ String browserTabLoading();
+
+ @DefaultStringValue("Edit criteria")
+ String editCriteriaDialogTitle();
+
+ @DefaultStringValue("Add endpoint")
+ String settingsTabAddSubscriptionDialogTitle();
+
+ @DefaultStringValue("Edit endpoint")
+ String settingsTabEditSubscriptionDialogTitle();
+
+ @DefaultStringValue("Name can't be empty")
+ String settingsTabSubscriptionDialogEmptyName();
+
+ @DefaultStringValue("URL can't be empty")
+ String settingsTabSubscriptionDialogEmptyUrl();
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.resources;
+
+import com.google.gwt.resources.client.CssResource;
+
+public interface LogBrowserCss extends CssResource {
+
+ String navigationSidebarSlot();
+ String viewerSlot();
+
+ /* Error Dialog styles */
+ String errorDialog();
+ String errorDialogGlass();
+ String errorDialogTitle();
+ String errorDialogButtons();
+ String errorDialogErrorType();
+
+ /* Access control tab styles */
+ String accessControlTab();
+ String accessControlTabErrorMessage();
+ String accessControlTabRememberMeCheckbox();
+ String accessControlTabSignInButton();
+
+ /* Browser tab styles*/
+ String browserTabLoadingMessage();
+ String browserTabNoEntriesMessage();
+ String browserTabSelectedRow();
+ String browserTabSignOutButton();
+ String browserTabManageSubscriptionsButton();
+ String browserTabToolBar();
+ String browserTabEntryTableHeaders();
+ String browserTabEntrySelectableTable();
+ String browserTabSubscriptionsSideBar();
+ String browserTabSubscriptionsHeader();
+ String browserTabEntryDetailsSection();
+ String browserTabEntryDetailsContent();
+ String browserTabNavigationLink();
+
+ /* Settings tab styles */
+ String settingsTabHeader();
+ String settingsTabSignOutButton();
+ String settingsTabBackButton();
+ String settingsTabTitle();
+ String settingsTabToolBar();
+ String settingsTabContent();
+ String settingsTabFeedList();
+
+ /* Feed's entry (in settings tab) styles */
+ String feedEntry();
+ String feedEntryNameLabel();
+ String feedEntryUrlLabel();
+ String feedEntryButtons();
+ String feedEntryRemoveButton();
+ String feedEntryEditButton();
+
+ /* Edit feed dialog (in settings tab) styles */
+ String editFeedDialogErrorMessage();
+ String editFeedDialogButtons();
+ String editFeedDialogAddButton();
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.resources;
+
+import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.ImageResource;
+
+public interface LogBrowserResources extends ClientBundle {
+
+ @Source("logbrowser.css")
+ LogBrowserCss css();
+
+ @Source("loader.gif")
+ ImageResource loader();
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/loader.gif
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/loader.gif?rev=1067233&view=auto
==============================================================================
Binary file - no diff available.
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/loader.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css Fri Feb 4 17:34:24 2011
@@ -0,0 +1,304 @@
+
+.navigationSidebarSlot > div {
+ position: absolute !important;
+ left: 0px;
+ top: 0px;
+ right: 0px;
+ bottom: 0px;
+}
+
+.viewerSlot > div {
+ position: absolute !important;
+ left: 0px;
+ top: 0px;
+ right: 0px;
+ bottom: 0px;
+}
+
+
+/** Error Dialog **/
+
+.errorDialog {
+ background: none;
+ border: none;
+ padding: 10px;
+ width: 600px;
+ color: #FFFFFF;
+ font-size: 15px;
+ font-family: verdana;
+}
+
+.errorDialogGlass {
+ opacity: 0.75;
+}
+
+@if user.agent safari {
+
+ .errorDialogGlass {
+ opacity: 0.80;
+ }
+}
+
+@if user.agent ie6 ie8 {
+
+ /* IE just doesn't do opacity the way we want, make our dialog
+ * stand out in a way that it can't be missed against the page
+ */
+ .errorDialog {
+ color: black;
+ background: darkgray;
+ border: 10px groove lightgrey;
+ }
+}
+
+.errorDialogTitle {
+ font-size: 30px;
+ font-weight: bold;
+ margin-bottom: 15px;
+}
+
+.errorDialogErrorType {
+ font-weight: bold;
+ white-space: nowrap;
+ margin-bottom: 15px;
+}
+
+.errorDialogButtons {
+ width: 100%;
+ margin-top: 15px;
+}
+
+/* Access controler styles */
+
+.accessControlTab {
+ margin:50px auto;
+ width:25em;
+}
+
+.accessControlTab p > label {
+ width:7em;
+ float:left;
+ text-align:right;
+ margin-right:1em;
+ display:block;
+}
+
+.accessControlTab fieldset {
+ border:3px solid #BBCDF3;
+}
+
+.accessControlTab legend {
+ padding:2px 6px;
+ font-weight:bolder;
+}
+
+.accessControlTabErrorMessage {
+ color:red;
+ margin-left: 8em;
+}
+
+.accessControlTabRememberMeCheckbox {
+ margin-left:8em;
+}
+
+.accessControlTabSignInButton button {
+ margin-left: 8em;
+}
+
+/* Browser tab styles */
+
+@sprite .browserTabLoadingMessage {
+ gwt-image: "loader";
+ background-repeat:no-repeat;
+ background-position:left;
+ color:grey;
+ font-size:large;
+ margin-top:1em;
+ text-align:right;
+ margin-left:auto;
+ margin-right:auto;
+ width:5.7em;
+ height:100%;
+}
+
+.browserTabNoEntriesMessage {
+ color:grey;
+ font-size:large;
+ height:auto;
+ margin-top:1em;
+ text-align:center;
+}
+
+.browserTabSelectedRow {
+ background: #adcce7;
+}
+
+.browserTabSelectedRow td {
+ border-top: 1px solid #88a4d6;
+ border-bottom: 1px solid #7b97d0;
+}
+
+.browserTabSignOutButton {
+ padding-top: 0.3em;
+ padding-right: 0.5em;
+ position: absolute;
+ text-align: right;
+}
+
+.browserTabManageSubscriptionsButton {
+ font-size: 11px;
+ color: #3366CC;
+ margin-left: 0.7em;
+}
+
+.browserTabToolBar {
+ border-left: 1px solid #999;
+ border-bottom: 1px solid #999;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.browserTabEntryTableHeaders {
+ background: #E3E8F3 url(gwt/standard/images/hborder.png) repeat-x scroll 0 -2003px;
+ table-layout: fixed;
+ width: 100%;
+ height: 100%;
+ border-bottom: 2px solid #BBCDF3;
+ border-top: 3px solid #BBCDF3;
+}
+
+.browserTabEntryTableHeaders td {
+ text-shadow: #fff 0 2px 2px;
+ padding: 2px 0 1px 10px;
+}
+
+.browserTabEntrySelectableTable {
+ table-layout: fixed;
+ width: 100%;
+}
+
+.browserTabEntrySelectableTable table {
+ width: 100%;
+}
+
+.browserTabEntrySelectableTable td {
+ border-top: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ padding: 2px 0 2px 10px;
+}
+
+.browserTabSubscriptionsSideBar {
+ border-right: 1px solid #999999;
+}
+
+.browserTabSubscriptionsHeader {
+ background: #E3E8F3 url(gwt/standard/images/hborder.png) repeat-x scroll 0 -2003px;
+ border-bottom: 2px solid #BBCDF3;
+ border-top: 3px solid #BBCDF3;
+ padding-left:0.7em;
+ padding-top:0.25em;
+ padding-bottom:0.2em;
+}
+
+.browserTabEntryDetailsSection {
+ border: 1px solid #999999;
+}
+
+.browserTabEntryDetailsContent {
+ white-space:pre-wrap;
+ line-height: 150%;
+ padding: 20px 40px 20px 10px;
+ font-family: monospace, serif;
+}
+
+.browserTabNavigationLink {
+ margin: 0 8px;
+}
+
+/* Settings tab styles */
+
+.settingsTabHeader {
+ background: #FFCC66 none repeat scroll 0 0;
+ padding:0.3em;
+ margin-top:0.5em;
+}
+
+.settingsTabSignOutButton {
+ padding-top: 0.3em;
+ padding-right: 0.5em;
+ text-align: right;
+}
+
+.settingsTabBackButton {
+ margin-top: 0.5em;
+ display:inline;
+}
+
+.settingsTabTitle {
+ font-size: 140%;
+ margin: 0.1em 1.5em 0 0.3em;
+ font-weight: bold;
+ display:inline;
+}
+
+.settingsTabToolBar {
+ padding-left:1em;
+ padding-top:0.5em;
+ padding-bottom:0.5em;
+ background-color:#FFEDA3;
+}
+
+.settingsTabContent {
+ background-color:#FFF7D7;
+}
+
+.settingsTabFeedList {
+ width:100%;
+ padding:0.5em;
+}
+
+/* Feed's entry (in settings tab) styles */
+
+.feedEntry {
+ border-bottom:1px solid #FFCC66;
+ padding-bottom:0.5em;
+ width:100%;
+}
+
+.feedEntryNameLabel {
+ font-weight: bold;
+}
+
+.feedEntryUrlLabel {
+ color: grey;
+ float: left;
+}
+
+.feedEntryButtons {
+ text-align:right;
+ vertical-align:center;
+}
+
+.feedEntryRemoveButton {
+}
+
+.feedEntryEditButton {
+ margin-left: 0.5em;
+ margin-right: 1em;
+}
+
+/* Edit feed dialog styles */
+
+.editFeedDialogAddButton {
+ margin:0.4em;
+}
+
+.editFeedDialogButtons {
+ text-align:right;
+}
+
+.editFeedDialogErrorMessage {
+ color:red;
+}
+
+
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,164 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.settings;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import com.google.gwt.user.client.ui.HasValue;
+import com.google.gwt.user.client.ui.HasWidgets;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.name.Named;
+
+import org.apache.cxf.management.web.browser.client.EventBus;
+import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEvent;
+import org.apache.cxf.management.web.browser.client.event.GoToBrowserEvent;
+import org.apache.cxf.management.web.browser.client.event.SignOutEvent;
+import org.apache.cxf.management.web.browser.client.service.settings.SettingsFacade;
+import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
+import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
+import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
+import org.apache.cxf.management.web.browser.client.ui.common.NavigationHeaderPresenter;
+import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
+
+@Singleton
+public class SettingsPresenter extends BasePresenter
+ implements SettingsView.Presenter, SubscriptionDialog.Presenter {
+
+ @Nonnull
+ private final SettingsView view;
+
+ @Nonnull
+ private final SettingsFacade settingsFacade;
+
+ @Nonnull
+ private final SubscriptionDialog subscriptionDialog;
+
+ @Nonnull
+ private final LogBrowserConstans constans;
+
+ @Inject
+ public SettingsPresenter(@Nonnull final EventBus eventBus,
+ @Nonnull final SettingsView view,
+ @Nonnull @Named("BindStrategyForSettings") final BindStrategy bindStrategy,
+ @Nonnull final NavigationHeaderPresenter navigationHeaderPresenter,
+ @Nonnull final SettingsFacade settingsFacade,
+ @Nonnull final SubscriptionDialog subscriptionDialog,
+ @Nonnull final LogBrowserConstans constans) {
+ super(eventBus, view, bindStrategy);
+
+ this.view = view;
+ this.settingsFacade = settingsFacade;
+ this.subscriptionDialog = subscriptionDialog;
+ this.constans = constans;
+
+ this.view.setPresenter(this);
+ this.subscriptionDialog.setPresenter(this);
+
+ navigationHeaderPresenter.go(view.getNaviagationHeaderSlot());
+
+ updateSubscriptions();
+ }
+
+ public void go(@Nonnull final HasWidgets container) {
+ container.clear();
+ container.add(view.asWidget());
+ }
+
+ public void onAddSubscriptionButtonClicked() {
+ showSubscriptionDialog(constans.settingsTabAddSubscriptionDialogTitle(), null);
+ }
+
+ public void onEditSubscriptionButtonClicked(@Nonnull final Subscription subscription) {
+ showSubscriptionDialog(constans.settingsTabEditSubscriptionDialogTitle(), subscription);
+ }
+
+ public void onRemoveSubscriptionButtonClicked(@Nonnull final Subscription subscription) {
+ settingsFacade.removeSubscription(subscription);
+ updateSubscriptions();
+ }
+
+ public void onSaveButtonClicked(@Nullable final String id,
+ @Nonnull final HasValue<String> name,
+ @Nonnull final HasValue<String> url) {
+ Map<HasValue, String> errors = validate(name, url);
+
+ if (errors.isEmpty()) {
+ String nameValue = name.getValue();
+ String urlValue = url.getValue();
+
+ if (id == null) {
+ settingsFacade.addSubscription(nameValue, urlValue);
+ } else {
+ settingsFacade.updateSubscription(new Subscription(id, nameValue, urlValue));
+ }
+
+ updateSubscriptions();
+ subscriptionDialog.hide();
+ } else {
+ subscriptionDialog.setValidationErrors(errors);
+ }
+ }
+
+ public void onCancelButtonClicked() {
+ subscriptionDialog.hide();
+ }
+
+ public void onBackHyperlinkClicked() {
+ eventBus.fireEvent(new GoToBrowserEvent());
+ }
+
+ public void onSingOutHyperlinkClicked() {
+ eventBus.fireEvent(new SignOutEvent());
+ }
+
+ private void updateSubscriptions() {
+ eventBus.fireEvent(new ChangedSubscriptionsEvent());
+ view.setData(settingsFacade.getSubscriptions());
+ }
+
+ private void showSubscriptionDialog(@Nonnull final String title, @Nullable final Subscription data) {
+ subscriptionDialog.setTitle(title);
+ subscriptionDialog.setData(data);
+ subscriptionDialog.setValidationErrors(null);
+ subscriptionDialog.center();
+ subscriptionDialog.show();
+ }
+
+ private Map<HasValue, String> validate(@Nonnull final HasValue<String> name,
+ @Nonnull final HasValue<String> url) {
+ Map<HasValue, String> errors = new HashMap<HasValue, String>();
+
+ String nameValue = name.getValue();
+ if (nameValue == null || nameValue.isEmpty()) {
+ errors.put(name, constans.settingsTabSubscriptionDialogEmptyName());
+ }
+
+ String urlValue = url.getValue();
+ if (urlValue == null || urlValue.isEmpty()) {
+ errors.put(url, constans.settingsTabSubscriptionDialogEmptyUrl());
+ }
+
+ return errors;
+ }
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.settings;
+
+import java.util.List;
+
+import com.google.gwt.user.client.ui.HasWidgets;
+
+import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
+import org.apache.cxf.management.web.browser.client.ui.View;
+
+public interface SettingsView extends View {
+
+ public interface Presenter {
+
+ void onAddSubscriptionButtonClicked();
+
+ void onEditSubscriptionButtonClicked(Subscription subscription);
+
+ void onRemoveSubscriptionButtonClicked(Subscription subscription);
+
+ void onBackHyperlinkClicked();
+
+ void onSingOutHyperlinkClicked();
+ }
+
+ HasWidgets getNaviagationHeaderSlot();
+
+ void setData(List<Subscription> subscriptions);
+
+ void setPresenter(Presenter presenter);
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml Fri Feb 4 17:34:24 2011
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+
+ <ui:with field='res'
+ type='org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources'/>
+
+ <g:DockLayoutPanel unit='EM'>
+ <g:north size='7.2'>
+ <g:HTMLPanel>
+ <g:FlowPanel ui:field="navigationHeaderSlot"/>
+
+ <div class="{res.css.settingsTabHeader}">
+ <g:Label addStyleNames="{res.css.settingsTabTitle}">
+ Settings
+ </g:Label>
+ <g:Hyperlink ui:field="backHyperlink" addStyleNames="{res.css.settingsTabBackButton}">
+ « Back to browse
+ </g:Hyperlink>
+ </div>
+ <div class="{res.css.settingsTabToolBar}">
+ <g:Button ui:field="addSubscriptionButton">
+ Add endpoint
+ </g:Button>
+ </div>
+ </g:HTMLPanel>
+ </g:north>
+
+ <g:center>
+ <g:ScrollPanel>
+ <g:HTMLPanel>
+ <div class="{res.css.settingsTabContent}">
+ <g:FlexTable ui:field="subscriptionsTable"
+ addStyleNames="{res.css.settingsTabFeedList}"/>
+ </div>
+ </g:HTMLPanel>
+ </g:ScrollPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+
+</ui:UiBinder>
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,147 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.settings;
+
+import java.util.List;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.uibinder.client.UiTemplate;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HasWidgets;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Singleton;
+
+import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
+
+@Singleton
+public class SettingsViewImpl extends Composite implements SettingsView {
+
+ @UiTemplate("SettingsView.ui.xml")
+ interface SettingsViewUiBinder extends UiBinder<Widget, SettingsViewImpl> {
+ }
+
+ private static final SettingsViewUiBinder UI_BINDER = GWT.create(SettingsViewUiBinder.class);
+
+ @UiField @Nonnull
+ FlowPanel navigationHeaderSlot;
+
+ @UiField @Nonnull
+ FlexTable subscriptionsTable;
+
+ @Nullable
+ private Presenter presenter;
+
+ public SettingsViewImpl() {
+ initWidget(UI_BINDER.createAndBindUi(this));
+ }
+
+ public HasWidgets getNaviagationHeaderSlot() {
+ return navigationHeaderSlot;
+ }
+
+ public void setData(@Nonnull final List<Subscription> subscriptions) {
+ subscriptionsTable.clear();
+
+ int row = 0;
+ for (final Subscription subscription : subscriptions) {
+ SubscriptionEntry subscriptionEntry = new SubscriptionEntry();
+
+ subscriptionEntry.nameLabel.setText(subscription.getName());
+ subscriptionEntry.urlLabel.setText(subscription.getUrl());
+
+ subscriptionEntry.editButton.addClickHandler(new ClickHandler() {
+
+ public void onClick(@Nonnull final ClickEvent event) {
+ assert presenter != null;
+ presenter.onEditSubscriptionButtonClicked(subscription);
+ }
+ });
+ subscriptionEntry.removeButton.addClickHandler(new ClickHandler() {
+
+ public void onClick(@Nonnull final ClickEvent event) {
+ assert presenter != null;
+ presenter.onRemoveSubscriptionButtonClicked(subscription);
+ }
+ });
+
+ subscriptionsTable.setWidget(row, 0, subscriptionEntry);
+
+ row++;
+ }
+ }
+
+ @UiHandler("backHyperlink")
+ void onBackHyperlinkClicked(@Nonnull final ClickEvent event) {
+ assert presenter != null;
+ presenter.onBackHyperlinkClicked();
+ }
+
+ @UiHandler("addSubscriptionButton")
+ void onAddSubscriptionButtonClicked(@Nonnull final ClickEvent event) {
+ assert presenter != null;
+ presenter.onAddSubscriptionButtonClicked();
+ }
+
+ public void setPresenter(@Nonnull final Presenter presenter) {
+ this.presenter = presenter;
+ }
+
+ @Nonnull
+ public Widget asWidget() {
+ return this;
+ }
+
+ protected static class SubscriptionEntry extends Composite {
+
+ @UiTemplate("SubscriptionEntry.ui.xml")
+ interface SubscriptionEntryUiBinder extends UiBinder<Widget, SubscriptionEntry> { }
+
+ private static final SubscriptionEntryUiBinder UI_BINDER =
+ GWT.create(SubscriptionEntryUiBinder.class);
+
+ @UiField @Nonnull
+ Label nameLabel;
+
+ @UiField @Nonnull
+ Label urlLabel;
+
+ @UiField @Nonnull
+ Button editButton;
+
+ @UiField @Nonnull
+ Button removeButton;
+
+ public SubscriptionEntry() {
+ initWidget(UI_BINDER.createAndBindUi(this));
+ }
+ }
+
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.settings;
+
+import java.util.Map;
+
+import com.google.gwt.user.client.ui.HasValue;
+
+import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
+
+public interface SubscriptionDialog {
+
+ public interface Presenter {
+
+ void onSaveButtonClicked(String id, HasValue<String> name, HasValue<String> url);
+
+ void onCancelButtonClicked();
+ }
+
+ void center();
+
+ void show();
+
+ void hide();
+
+ void setValidationErrors(Map<HasValue, String> errors);
+
+ void setTitle(String title);
+
+ void setData(Subscription subscription);
+
+ void setPresenter(Presenter presenter);
+}
\ No newline at end of file
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java Fri Feb 4 17:34:24 2011
@@ -0,0 +1,146 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.ui.settings;
+
+import java.util.Map;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiTemplate;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.HasValue;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
+
+public class SubscriptionDialogImpl extends DialogBox implements SubscriptionDialog {
+
+ @Nonnull
+ private Form form;
+
+ @Nullable
+ private Presenter presenter;
+
+ @Nullable
+ private String subscriptionId;
+
+ public SubscriptionDialogImpl() {
+ form = new Form();
+ form.nameErrorLabel.setVisible(false);
+ form.urlErrorLabel.setVisible(false);
+
+ form.cancelButton.addClickHandler(new ClickHandler() {
+
+ public void onClick(@Nonnull final ClickEvent clickEvent) {
+ assert presenter != null;
+ presenter.onCancelButtonClicked();
+ }
+ });
+ form.saveButton.addClickHandler(new ClickHandler() {
+
+ public void onClick(@Nonnull final ClickEvent clickEvent) {
+ assert presenter != null;
+ presenter.onSaveButtonClicked(subscriptionId, form.nameTextBox, form.urlTextBox);
+ }
+ });
+
+ setGlassEnabled(true);
+ setAnimationEnabled(false);
+ setAutoHideEnabled(true);
+ setWidget(form);
+ }
+
+ public void setValidationErrors(@Nullable Map<HasValue, String> errors) {
+ form.nameErrorLabel.setVisible(false);
+ form.urlErrorLabel.setVisible(false);
+
+ if (errors == null) {
+ return;
+ }
+
+ if (errors.containsKey(form.nameTextBox)) {
+ form.nameErrorLabel.setText(errors.get(form.nameTextBox));
+ form.nameErrorLabel.setVisible(true);
+ }
+ if (errors.containsKey(form.urlTextBox)) {
+ form.urlErrorLabel.setText(errors.get(form.urlTextBox));
+ form.urlErrorLabel.setVisible(true);
+ }
+ }
+
+ public void setTitle(@Nonnull final String title) {
+ setText(title);
+ }
+
+ public void setData(@Nullable final Subscription subscription) {
+ if (subscription == null) {
+ form.nameTextBox.setValue("");
+ form.urlTextBox.setValue("");
+ subscriptionId = null;
+ } else {
+ form.nameTextBox.setValue(subscription.getName());
+ form.urlTextBox.setValue(subscription.getUrl());
+ subscriptionId = subscription.getId();
+ }
+ }
+
+ public void setPresenter(@Nonnull final Presenter presenter) {
+ this.presenter = presenter;
+ }
+
+ protected static class Form extends Composite {
+
+ @UiTemplate("SubscriptionForm.ui.xml")
+ interface FormViewUiBinder extends UiBinder<Widget, Form> { }
+
+ private static final FormViewUiBinder UI_BINDER = GWT.create(FormViewUiBinder.class);
+
+ @UiField @Nonnull
+ TextBox nameTextBox;
+
+ @UiField @Nonnull
+ Label nameErrorLabel;
+
+ @UiField @Nonnull
+ TextBox urlTextBox;
+
+ @UiField @Nonnull
+ Label urlErrorLabel;
+
+ @UiField @Nonnull
+ Button saveButton;
+
+ @UiField @Nonnull
+ Button cancelButton;
+
+ public Form() {
+ initWidget(UI_BINDER.createAndBindUi(this));
+ }
+ }
+}
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml Fri Feb 4 17:34:24 2011
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+
+ <ui:with field='res'
+ type='org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources'/>
+
+ <g:HTMLPanel>
+ <table class="{res.css.feedEntry}">
+ <tr>
+ <td>
+ <g:Label ui:field="nameLabel" addStyleNames="{res.css.feedEntryNameLabel}" />
+ <g:Label ui:field="urlLabel" addStyleNames="{res.css.feedEntryUrlLabel}" />
+ </td>
+
+ <td class="{res.css.feedEntryButtons}">
+ <g:Button ui:field="removeButton" addStyleNames="{res.css.feedEntryRemoveButton}">
+ Remove
+ </g:Button>
+ <g:Button ui:field="editButton" addStyleNames="{res.css.feedEntryEditButton}">
+ Edit
+ </g:Button>
+ </td>
+ </tr>
+
+ </table>
+ </g:HTMLPanel>
+
+</ui:UiBinder>
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml?rev=1067233&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml (added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml Fri Feb 4 17:34:24 2011
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+
+ <ui:with field='res'
+ type='org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources'/>
+
+ <g:HTMLPanel>
+ <table cellspacing="6">
+ <tr>
+ <td>
+ <g:Label>Name:</g:Label>
+ </td>
+ <td>
+ <g:TextBox ui:field="nameTextBox"></g:TextBox>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <g:Label ui:field="nameErrorLabel" addStyleNames="{res.css.editFeedDialogErrorMessage}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <g:Label>URL:</g:Label>
+ </td>
+ <td>
+ <g:TextBox ui:field="urlTextBox"></g:TextBox>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <g:Label ui:field="urlErrorLabel" addStyleNames="{res.css.editFeedDialogErrorMessage}"/>
+ </td>
+ </tr>
+ </table>
+ <g:FlowPanel addStyleNames="{res.css.editFeedDialogButtons}">
+ <g:Button ui:field="cancelButton">
+ Cancel
+ </g:Button>
+ <g:Button ui:field="saveButton" addStyleNames="{res.css.editFeedDialogAddButton}">
+ Save
+ </g:Button>
+ </g:FlowPanel>
+
+ </g:HTMLPanel>
+
+</ui:UiBinder>
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml