james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From man...@apache.org
Subject svn commit: r882359 - in /james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor: ./ bundles/
Date Thu, 19 Nov 2009 23:30:32 GMT
Author: manolo
Date: Thu Nov 19 23:30:31 2009
New Revision: 882359

URL: http://svn.apache.org/viewvc?rev=882359&view=rev
Log:
Start adding 'wysiwyg' capabilities for composing and editing emails in Hupa.

Added:
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Editor.java
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Toolbar.java
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/ToolbarConstants.java
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ToolbarImages.java
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/backColors.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/bold.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/createLink.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fontSizes.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fonts.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/foreColors.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/hr.gif 
 (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/indent.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/insertImage.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/italic.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyCenter.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyLeft.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyRight.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ol.gif 
 (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/outdent.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeFormat.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeLink.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/strikeThrough.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/subscript.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/superscript.gif
  (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ul.gif 
 (with props)
    james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/underline.gif
  (with props)

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Editor.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Editor.java?rev=882359&view=auto
==============================================================================
--- james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Editor.java (added)
+++ james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Editor.java Thu
Nov 19 23:30:31 2009
@@ -0,0 +1,71 @@
+/****************************************************************
+ * 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.hupa.widgets.editor;
+
+import com.google.gwt.user.client.ui.HasHTML;
+
+import com.google.gwt.user.client.ui.RichTextArea;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+
+/**
+ * Wysiwyg editor for composing and editing emails in Hupa
+ */
+public class Editor extends VerticalPanel implements HasHTML {
+
+    RichTextArea area = new RichTextArea();
+    
+    public Editor() {
+        area.ensureDebugId("hupa-editor-area");
+        // Note: rich-area is created in an iframe, so Hupa's style sheets 
+        // are not available, unless we inject then to the generated iframe
+        area.setSize("100%", "20em");
+        
+        Toolbar toolbar = new Toolbar(area);
+        toolbar.ensureDebugId("hupa-editor-toolbar");
+        toolbar.setWidth("100%");
+        
+        setStyleName("hupa-editor");
+        add(toolbar);
+        add(area);
+
+    }
+    
+    @Override
+    public void setSize(String width, String height) {
+        area.setSize(width, height);
+    }
+
+    public String getHTML() {
+        return area.getHTML();
+    }
+
+    public void setHTML(String html) {
+        area.setHTML(html);
+    }
+
+    public String getText() {
+        return area.getText();
+    }
+
+    public void setText(String text) {
+        area.setText(text);
+    }
+    
+}
\ No newline at end of file

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Toolbar.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Toolbar.java?rev=882359&view=auto
==============================================================================
--- james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Toolbar.java (added)
+++ james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/Toolbar.java Thu
Nov 19 23:30:31 2009
@@ -0,0 +1,319 @@
+/****************************************************************
+ * 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.                                           *
+ ****************************************************************/
+/**
+ * Much of this code has been taken from the GWT Showcase example
+ * which is licensed under Apache License v2.0
+ * 
+ * This class is necessary while GWT library doesn't provide any 
+ * toolbar to be used with its RichTextArea widget.
+ */
+package org.apache.hupa.widgets.editor;
+
+import org.apache.hupa.widgets.editor.bundles.ToolbarImages;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ChangeEvent;
+import com.google.gwt.event.dom.client.ChangeHandler;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.KeyDownEvent;
+import com.google.gwt.event.dom.client.KeyDownHandler;
+import com.google.gwt.event.dom.client.KeyUpEvent;
+import com.google.gwt.event.dom.client.KeyUpHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.PushButton;
+import com.google.gwt.user.client.ui.RichTextArea;
+import com.google.gwt.user.client.ui.ToggleButton;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.RichTextArea.FontSize;
+
+/**
+ * Toolbar for use with {@link RichTextArea}. It provides a simple UI for all
+ * rich text formatting, dynamically displayed only for the available
+ * functionality.
+ */
+public class Toolbar extends Composite {
+
+    private class EventHandler implements ClickHandler, ChangeHandler, KeyUpHandler, KeyDownHandler
{
+        public void onChange(ChangeEvent event) {
+            Widget sender = (Widget) event.getSource();
+
+            if (sender == backColors) {
+                basic.setBackColor(backColors.getValue(backColors.getSelectedIndex()));
+                backColors.setSelectedIndex(0);
+            } else if (sender == foreColors) {
+                basic.setForeColor(foreColors.getValue(foreColors.getSelectedIndex()));
+                foreColors.setSelectedIndex(0);
+            } else if (sender == fonts) {
+                basic.setFontName(fonts.getValue(fonts.getSelectedIndex()));
+                fonts.setSelectedIndex(0);
+            } else if (sender == fontSizes) {
+                basic.setFontSize(fontSizesConstants[fontSizes.getSelectedIndex() - 1]);
+                fontSizes.setSelectedIndex(0);
+            }
+        }
+
+        public void onClick(ClickEvent event) {
+            Widget sender = (Widget) event.getSource();
+
+            if (sender == bold) {
+                basic.toggleBold();
+            } else if (sender == italic) {
+                basic.toggleItalic();
+            } else if (sender == underline) {
+                basic.toggleUnderline();
+            } else if (sender == subscript) {
+                basic.toggleSubscript();
+            } else if (sender == superscript) {
+                basic.toggleSuperscript();
+            } else if (sender == strikethrough) {
+                extended.toggleStrikethrough();
+            } else if (sender == indent) {
+                extended.rightIndent();
+            } else if (sender == outdent) {
+                extended.leftIndent();
+            } else if (sender == justifyLeft) {
+                basic.setJustification(RichTextArea.Justification.LEFT);
+            } else if (sender == justifyCenter) {
+                basic.setJustification(RichTextArea.Justification.CENTER);
+            } else if (sender == justifyRight) {
+                basic.setJustification(RichTextArea.Justification.RIGHT);
+            } else if (sender == insertImage) {
+                String url = Window.prompt("Enter an image URL:", "http://");
+                if (url != null) {
+                    extended.insertImage(url);
+                }
+            } else if (sender == createLink) {
+                String url = Window.prompt("Enter a link URL:", "http://");
+                if (url != null) {
+                    extended.createLink(url);
+                }
+            } else if (sender == removeLink) {
+                extended.removeLink();
+            } else if (sender == hr) {
+                extended.insertHorizontalRule();
+            } else if (sender == ol) {
+                extended.insertOrderedList();
+            } else if (sender == ul) {
+                extended.insertUnorderedList();
+            } else if (sender == removeFormat) {
+                extended.removeFormat();
+            } else if (sender == richText) {
+                updateStatus();
+            }
+        }
+
+        boolean first = true;
+
+        public void onKeyDown(KeyDownEvent event) {
+            if (first) {
+                Widget sender = (Widget) event.getSource();
+                RichTextArea area = (RichTextArea) sender;
+                area.getExtendedFormatter().selectAll();
+                area.getExtendedFormatter().setFontName("Arial");
+                area.getExtendedFormatter().setFontSize(FontSize.X_SMALL);
+                first = false;
+            }
+        }
+
+        public void onKeyUp(KeyUpEvent event) {
+            Widget sender = (Widget) event.getSource();
+            if (sender == richText) {
+                updateStatus();
+            }
+        }
+    }
+
+    private static final RichTextArea.FontSize[] fontSizesConstants = new RichTextArea.FontSize[]
{ RichTextArea.FontSize.XX_SMALL, RichTextArea.FontSize.X_SMALL, RichTextArea.FontSize.SMALL,
+            RichTextArea.FontSize.MEDIUM, RichTextArea.FontSize.LARGE, RichTextArea.FontSize.X_LARGE,
RichTextArea.FontSize.XX_LARGE };
+
+    private ToolbarImages images = (ToolbarImages) GWT.create(ToolbarImages.class);
+    private ToolbarConstants strings = (ToolbarConstants) GWT.create(ToolbarConstants.class);
+    private EventHandler handler = new EventHandler();
+
+    private RichTextArea richText;
+    private RichTextArea.BasicFormatter basic;
+    private RichTextArea.ExtendedFormatter extended;
+
+    private VerticalPanel outer = new VerticalPanel();
+    private HorizontalPanel topPanel = new HorizontalPanel();
+    private HorizontalPanel bottomPanel = new HorizontalPanel();
+    private ToggleButton bold;
+    private ToggleButton italic;
+    private ToggleButton underline;
+    private ToggleButton subscript;
+    private ToggleButton superscript;
+    private ToggleButton strikethrough;
+    private PushButton indent;
+    private PushButton outdent;
+    private PushButton justifyLeft;
+    private PushButton justifyCenter;
+    private PushButton justifyRight;
+    private PushButton hr;
+    private PushButton ol;
+    private PushButton ul;
+    private PushButton insertImage;
+    private PushButton createLink;
+    private PushButton removeLink;
+    private PushButton removeFormat;
+
+    private ListBox backColors;
+    private ListBox foreColors;
+    private ListBox fonts;
+    private ListBox fontSizes;
+
+    /**
+     * Creates a new toolbar that drives the given rich text area.
+     * 
+     * @param richText
+     *            the rich text area to be controlled
+     */
+    public Toolbar(RichTextArea richText) {
+        this.richText = richText;
+        this.basic = richText.getBasicFormatter();
+        this.extended = richText.getExtendedFormatter();
+
+        outer.add(topPanel);
+        outer.add(bottomPanel);
+        topPanel.setWidth("100%");
+        bottomPanel.setWidth("100%");
+
+        initWidget(outer);
+        setStyleName("gwt-RichTextToolbar");
+        richText.addStyleName("hasRichTextToolbar");
+
+        if (basic != null) {
+            topPanel.add(bold = createToggleButton(images.bold(), strings.editor_bold()));
+            topPanel.add(italic = createToggleButton(images.italic(), strings.editor_italic()));
+            topPanel.add(underline = createToggleButton(images.underline(), strings.editor_underline()));
+            topPanel.add(subscript = createToggleButton(images.subscript(), strings.editor_subscript()));
+            topPanel.add(superscript = createToggleButton(images.superscript(), strings.editor_superscript()));
+            topPanel.add(justifyLeft = createPushButton(images.justifyLeft(), strings.editor_justifyLeft()));
+            topPanel.add(justifyCenter = createPushButton(images.justifyCenter(), strings.editor_justifyCenter()));
+            topPanel.add(justifyRight = createPushButton(images.justifyRight(), strings.editor_justifyRight()));
+        }
+
+        if (extended != null) {
+            topPanel.add(strikethrough = createToggleButton(images.strikeThrough(), strings.editor_strikeThrough()));
+            topPanel.add(indent = createPushButton(images.indent(), strings.editor_indent()));
+            topPanel.add(outdent = createPushButton(images.outdent(), strings.editor_outdent()));
+            topPanel.add(hr = createPushButton(images.hr(), strings.editor_hr()));
+            topPanel.add(ol = createPushButton(images.ol(), strings.editor_ol()));
+            topPanel.add(ul = createPushButton(images.ul(), strings.editor_ul()));
+            topPanel.add(insertImage = createPushButton(images.insertImage(), strings.editor_insertImage()));
+            topPanel.add(createLink = createPushButton(images.createLink(), strings.editor_createLink()));
+            topPanel.add(removeLink = createPushButton(images.removeLink(), strings.editor_removeLink()));
+            topPanel.add(removeFormat = createPushButton(images.removeFormat(), strings.editor_removeFormat()));
+        }
+
+        if (basic != null) {
+            bottomPanel.add(backColors = createColorList("Background"));
+            bottomPanel.add(foreColors = createColorList("Foreground"));
+            bottomPanel.add(fonts = createFontList());
+            bottomPanel.add(fontSizes = createFontSizes());
+
+            richText.addKeyDownHandler(handler);
+            richText.addKeyUpHandler(handler);
+            richText.addClickHandler(handler);
+        }
+    }
+
+    private ListBox createColorList(String caption) {
+        ListBox lb = new ListBox();
+        lb.addChangeHandler(handler);
+        lb.setVisibleItemCount(1);
+
+        lb.addItem(caption);
+        lb.addItem(strings.editor_white(), "white");
+        lb.addItem(strings.editor_black(), "black");
+        lb.addItem(strings.editor_red(), "red");
+        lb.addItem(strings.editor_green(), "green");
+        lb.addItem(strings.editor_yellow(), "yellow");
+        lb.addItem(strings.editor_blue(), "blue");
+        return lb;
+    }
+
+    private ListBox createFontList() {
+        ListBox lb = new ListBox();
+        lb.addChangeHandler(handler);
+        lb.setVisibleItemCount(1);
+
+        lb.addItem(strings.editor_font(), "");
+        lb.addItem(strings.editor_normal(), "");
+        lb.addItem("Times New Roman", "Times New Roman");
+        lb.addItem("Arial", "Arial");
+        lb.addItem("Courier New", "Courier New");
+        lb.addItem("Georgia", "Georgia");
+        lb.addItem("Trebuchet", "Trebuchet");
+        lb.addItem("Verdana", "Verdana");
+        return lb;
+    }
+
+    private ListBox createFontSizes() {
+        ListBox lb = new ListBox();
+        lb.addChangeHandler(handler);
+        lb.setVisibleItemCount(1);
+
+        lb.addItem(strings.editor_size());
+        lb.addItem(strings.editor_xxsmall());
+        lb.addItem(strings.editor_xsmall());
+        lb.addItem(strings.editor_small());
+        lb.addItem(strings.editor_medium());
+        lb.addItem(strings.editor_large());
+        lb.addItem(strings.editor_xlarge());
+        lb.addItem(strings.editor_xxlarge());
+        return lb;
+    }
+
+    private PushButton createPushButton(AbstractImagePrototype img, String tip) {
+        PushButton pb = new PushButton(img.createImage());
+        pb.addClickHandler(handler);
+        pb.setTitle(tip);
+        return pb;
+    }
+
+    private ToggleButton createToggleButton(AbstractImagePrototype img, String tip) {
+        ToggleButton tb = new ToggleButton(img.createImage());
+        tb.addClickHandler(handler);
+        tb.setTitle(tip);
+        return tb;
+    }
+
+    /**
+     * Updates the status of all the stateful buttons.
+     */
+    private void updateStatus() {
+        if (basic != null) {
+            bold.setDown(basic.isBold());
+            italic.setDown(basic.isItalic());
+            underline.setDown(basic.isUnderlined());
+            subscript.setDown(basic.isSubscript());
+            superscript.setDown(basic.isSuperscript());
+        }
+
+        if (extended != null) {
+            strikethrough.setDown(extended.isStrikethrough());
+        }
+    }
+}

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/ToolbarConstants.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/ToolbarConstants.java?rev=882359&view=auto
==============================================================================
--- james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/ToolbarConstants.java
(added)
+++ james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/ToolbarConstants.java
Thu Nov 19 23:30:31 2009
@@ -0,0 +1,115 @@
+package org.apache.hupa.widgets.editor;
+
+import com.google.gwt.i18n.client.Constants;
+
+/**
+ * This {@link Constants} interface is used to make the toolbar's strings
+ * internationalizable.
+ */
+public interface ToolbarConstants extends Constants {
+    @DefaultStringValue("Toggle Bold")
+    public String editor_bold();
+
+    @DefaultStringValue("Create Link")
+    public String editor_createLink();
+
+    @DefaultStringValue("Insert Horizontal Rule")
+    public String editor_hr();
+
+    @DefaultStringValue("Indent Right")
+    public String editor_indent();
+
+    @DefaultStringValue("Insert Image")
+    public String editor_insertImage();
+
+    @DefaultStringValue("Toggle Italic")
+    public String editor_italic();
+
+    @DefaultStringValue("Center")
+    public String editor_justifyCenter();
+
+    @DefaultStringValue("Left Justify")
+    public String editor_justifyLeft();
+
+    @DefaultStringValue("Right Justify")
+    public String editor_justifyRight();
+
+    @DefaultStringValue("Insert Ordered List")
+    public String editor_ol();
+
+    @DefaultStringValue("Indent Left")
+    public String editor_outdent();
+
+    @DefaultStringValue("Remove Formatting")
+    public String editor_removeFormat();
+
+    @DefaultStringValue("Remove Link")
+    public String editor_removeLink();
+
+    @DefaultStringValue("Toggle Strikethrough")
+    public String editor_strikeThrough();
+
+    @DefaultStringValue("Toggle Subscript")
+    public String editor_subscript();
+
+    @DefaultStringValue("Toggle Superscript")
+    public String editor_superscript();
+
+    @DefaultStringValue("Insert Unordered List")
+    public String editor_ul();
+
+    @DefaultStringValue("Toggle Underline")
+    public String editor_underline();
+
+    @DefaultStringValue("Color")
+    public String editor_color();
+
+    @DefaultStringValue("Black")
+    public String editor_black();
+
+    @DefaultStringValue("White")
+    public String editor_white();
+
+    @DefaultStringValue("Red")
+    public String editor_red();
+
+    @DefaultStringValue("Green")
+    public String editor_green();
+
+    @DefaultStringValue("Yellow")
+    public String editor_yellow();
+
+    @DefaultStringValue("Blue")
+    public String editor_blue();
+
+    @DefaultStringValue("Font")
+    public String editor_font();
+
+    @DefaultStringValue("Normal")
+    public String editor_normal();
+
+    @DefaultStringValue("Size")
+    public String editor_size();
+
+    @DefaultStringValue("XX-Small")
+    public String editor_xxsmall();
+
+    @DefaultStringValue("X-Small")
+    public String editor_xsmall();
+
+    @DefaultStringValue("Small")
+    public String editor_small();
+
+    @DefaultStringValue("Medium")
+    public String editor_medium();
+
+    @DefaultStringValue("Large")
+    public String editor_large();
+
+    @DefaultStringValue("X-Large")
+    public String editor_xlarge();
+
+    @DefaultStringValue("XX-Large")
+    public String editor_xxlarge();
+
+}

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ToolbarImages.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ToolbarImages.java?rev=882359&view=auto
==============================================================================
--- james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ToolbarImages.java
(added)
+++ james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ToolbarImages.java
Thu Nov 19 23:30:31 2009
@@ -0,0 +1,51 @@
+package org.apache.hupa.widgets.editor.bundles;
+
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.ImageBundle;
+
+
+
+    /**
+     * This {@link ImageBundle} is used for all the button icons. Using an image
+     * bundle allows all of these images to be packed into a single image, which
+     * saves a lot of HTTP requests, drastically improving startup time.
+     */
+    public interface ToolbarImages extends ImageBundle {
+
+        AbstractImagePrototype bold();
+
+        AbstractImagePrototype createLink();
+
+        AbstractImagePrototype hr();
+
+        AbstractImagePrototype indent();
+
+        AbstractImagePrototype insertImage();
+
+        AbstractImagePrototype italic();
+
+        AbstractImagePrototype justifyCenter();
+
+        AbstractImagePrototype justifyLeft();
+
+        AbstractImagePrototype justifyRight();
+
+        AbstractImagePrototype ol();
+
+        AbstractImagePrototype outdent();
+
+        AbstractImagePrototype removeFormat();
+
+        AbstractImagePrototype removeLink();
+
+        AbstractImagePrototype strikeThrough();
+
+        AbstractImagePrototype subscript();
+
+        AbstractImagePrototype superscript();
+
+        AbstractImagePrototype ul();
+
+        AbstractImagePrototype underline();
+    }
+

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/backColors.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/backColors.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/backColors.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/bold.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/bold.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/bold.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/createLink.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/createLink.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/createLink.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fontSizes.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fontSizes.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fontSizes.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fonts.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fonts.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/fonts.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/foreColors.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/foreColors.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/foreColors.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/hr.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/hr.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/hr.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/indent.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/indent.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/indent.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/insertImage.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/insertImage.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/insertImage.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/italic.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/italic.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/italic.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyCenter.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyCenter.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyCenter.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyLeft.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyLeft.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyLeft.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyRight.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyRight.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/justifyRight.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ol.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ol.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ol.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/outdent.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/outdent.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/outdent.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeFormat.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeFormat.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeFormat.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeLink.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeLink.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/removeLink.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/strikeThrough.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/strikeThrough.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/strikeThrough.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/subscript.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/subscript.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/subscript.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/superscript.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/superscript.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/superscript.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ul.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ul.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/ul.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/underline.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/underline.gif?rev=882359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/editor/bundles/underline.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message