cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomek...@apache.org
Subject svn commit: r1032287 - in /cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui: browser/ resources/
Date Sun, 07 Nov 2010 14:42:22 GMT
Author: tomekopo
Date: Sun Nov  7 14:42:22 2010
New Revision: 1032287

URL: http://svn.apache.org/viewvc?rev=1032287&view=rev
Log:
Refactoring of user interface (not yet finished):
- moved NagivationLinks widget to Viewer widget (for simplify code);

Removed:
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/NavigationLinks.java
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/NavigationLinks.ui.xml
Modified:
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerView.ui.xml
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerViewImpl.java
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/resources/LogBrowserConstans.java

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerView.ui.xml?rev=1032287&r1=1032286&r2=1032287&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerView.ui.xml
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerView.ui.xml
Sun Nov  7 14:42:22 2010
@@ -29,10 +29,60 @@
             <g:DockLayoutPanel styleName='{res.css.browserTabToolBar}'
                                unit='EM'>
                 <g:north size='2.2'>
-                    <g:FlexTable ui:field='entryTableHeader'
-                                 styleName='{res.css.browserTabEntryTableHeaders}'
-                                 cellSpacing='0'
-                                 cellPadding='0' />
+
+                    <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:;'>
+                                            &#171; first
+                                        </g:Anchor>
+
+                                        <g:Anchor styleName='{res.css.browserTabNavigationLink}'
+                                                  ui:field='olderButton' href='javascript:;'>
+                                            &#8249; 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 &#8250;
+                                        </g:Anchor>
+
+                                        <g:Anchor styleName='{res.css.browserTabNavigationLink}'
+                                                  ui:field='lastButton' href='javascript:;'>
+                                            last &#187;
+                                        </g:Anchor>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+
+                    </g:HTMLPanel>
                 </g:north>
 
                 <g:center>

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerViewImpl.java?rev=1032287&r1=1032286&r2=1032287&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerViewImpl.java
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/browser/ViewerViewImpl.java
Sun Nov  7 14:42:22 2010
@@ -26,15 +26,14 @@ 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.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.FlexTable;
 import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HasHorizontalAlignment;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Inject;
 import org.apache.cxf.management.web.logging.logbrowser.client.service.browser.Entry;
@@ -53,18 +52,27 @@ public class ViewerViewImpl extends Comp
             GWT.create(ViewerViewUiBinder.class);
 
     @UiField @Nonnull
-    FlexTable entryTableHeader;
-
-    @UiField @Nonnull
     EntryTable entryTable;
 
     @UiField @Nonnull
     HTML entryDetails;
-    
-    private Presenter presenter;
 
-    @Nonnull
-    private NavigationLinks navigationLinks;
+    @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;
@@ -75,11 +83,7 @@ public class ViewerViewImpl extends Comp
         
         initWidget(UI_BINDER.createAndBindUi(this));
 
-
-        initNavigationLinks();
-        initEntryTableHeader();
-
-        initEntryTable();        
+        initEntryTable();
     }
 
     public void setEntries(@Nonnull final List<Entry> entries) {
@@ -110,66 +114,41 @@ public class ViewerViewImpl extends Comp
     }
 
     public void setLinks(@Nonnull final Links links) {
-        navigationLinks.olderButton.setVisible(links.previousAvailable());
-        navigationLinks.newerButton.setVisible(links.nextAvailable());
-        navigationLinks.refreshButton.setVisible(links.selfAvailable());
-        navigationLinks.lastButton.setVisible(links.lastAvailable());
-        navigationLinks.firstButton.setVisible(links.firstAvailable());
-    }
-    
-    private void initNavigationLinks() {
-        navigationLinks = new NavigationLinks();
-
-        navigationLinks.firstButton.addClickHandler(new ClickHandler() {
-
-            public void onClick(@Nonnull final ClickEvent clickEvent) {
-                assert presenter != null;
-                presenter.onFirstButtonClicked();
-            }
-        });
-        navigationLinks.newerButton.addClickHandler(new ClickHandler() {
-
-            public void onClick(@Nonnull final ClickEvent clickEvent) {
-                assert presenter != null;
-                presenter.onNewerButtonClicked();
-            }
-        });
-        navigationLinks.refreshButton.addClickHandler(new ClickHandler() {
-
-            public void onClick(@Nonnull final ClickEvent clickEvent) {
-                assert presenter != null;
-                presenter.onRefreshButtonClicked();
-            }
-        });
-        navigationLinks.olderButton.addClickHandler(new ClickHandler() {
+        olderButton.setVisible(links.previousAvailable());
+        newerButton.setVisible(links.nextAvailable());
+        refreshButton.setVisible(links.selfAvailable());
+        lastButton.setVisible(links.lastAvailable());
+        firstButton.setVisible(links.firstAvailable());
+    }
 
-            public void onClick(@Nonnull final ClickEvent clickEvent) {
-                assert presenter != null;
-                presenter.onOlderButtonClicked();
-            }
-        });
-        navigationLinks.lastButton.addClickHandler(new ClickHandler() {
+    @UiHandler("firstButton")
+    void onFirstButtonClicked(@Nonnull ClickEvent event) {
+        assert presenter != null;
+        presenter.onFirstButtonClicked();
+    }
 
-            public void onClick(@Nonnull final ClickEvent clickEvent) {
-                assert presenter != null;
-                presenter.onLastButtonClicked();
-            }
-        });
+    @UiHandler("newerButton")
+    void onNewerButtonClicked(@Nonnull ClickEvent event) {
+        assert presenter != null;
+        presenter.onNewerButtonClicked();
     }
 
-    private void initEntryTableHeader() {
-        assert navigationLinks != null;
+    @UiHandler("refreshButton")
+    void onRefreshButtonClicked(@Nonnull ClickEvent event) {
+        assert presenter != null;
+        presenter.onRefreshButtonClicked();
+    }
 
-        entryTableHeader.getColumnFormatter().setWidth(0, constans.browseTabDatatimeColumnWidth());
-        entryTableHeader.getColumnFormatter().setWidth(1, constans.browseTabLevelColumnWidth());
-        entryTableHeader.getColumnFormatter().setWidth(3, constans.browseTabNavigationLinksColumnWidth());
-
-        entryTableHeader.setText(0, 0, constans.browseTabDatatimeHeader());
-        entryTableHeader.setText(0, 1, constans.browseTabLevelHeader());
-        entryTableHeader.setText(0, 2, constans.browseTabMessageHeader());
-        entryTableHeader.setWidget(0, 3, navigationLinks);
+    @UiHandler("olderButton")
+    void onOlderButtonClicked(@Nonnull ClickEvent event) {
+        assert presenter != null;
+        presenter.onOlderButtonClicked();
+    }
 
-        entryTableHeader.getCellFormatter().setHorizontalAlignment(0, 3, HasHorizontalAlignment.ALIGN_RIGHT);
+    @UiHandler("lastButton")
+    void onLastButtonClicked(@Nonnull ClickEvent event) {
+        assert presenter != null;
+        presenter.onLastButtonClicked();
     }
 
     private void initEntryTable() {

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/resources/LogBrowserConstans.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/resources/LogBrowserConstans.java?rev=1032287&r1=1032286&r2=1032287&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/resources/LogBrowserConstans.java
(original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/logbrowser/client/ui/resources/LogBrowserConstans.java
Sun Nov  7 14:42:22 2010
@@ -33,21 +33,12 @@ public interface LogBrowserConstans exte
     @DefaultStringValue("No entries")
     String browserTabNoEntries();
 
-    @DefaultStringValue("Date")
-    String browseTabDatatimeHeader();
-
     @DefaultStringValue("160px")
     String browseTabDatatimeColumnWidth();
 
-    @DefaultStringValue("Level")
-    String browseTabLevelHeader();
-
     @DefaultStringValue("128px")
     String browseTabLevelColumnWidth();
 
-    @DefaultStringValue("Message")
-    String browseTabMessageHeader();
-
     @DefaultStringValue("350px")
     String browseTabNavigationLinksColumnWidth();
 



Mime
View raw message