RichTextToolbar sample added to KitchenSink.
Review by: ecc
bruce
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@848 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/KitchenSink.gwt.xml b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/KitchenSink.gwt.xml
index a00202e..3859231 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/KitchenSink.gwt.xml
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/KitchenSink.gwt.xml
@@ -1,5 +1,6 @@
<module>
<inherits name='com.google.gwt.user.User'/>
+ <inherits name="com.google.gwt.i18n.I18N"/>
<entry-point class='com.google.gwt.sample.kitchensink.client.KitchenSink'/>
<stylesheet src='KitchenSink.css'/>
</module>
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar$Strings.properties b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar$Strings.properties
new file mode 100644
index 0000000..363b704
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar$Strings.properties
@@ -0,0 +1,35 @@
+bold = Toggle Bold
+createLink = Create Link
+hr = Insert Horizontal Rule
+indent = Indent Right
+insertImage = Insert Image
+italic = Toggle Italic
+justifyCenter = Center
+justifyLeft = Left Justify
+justifyRight = Right Justify
+ol = Insert Ordered List
+outdent = Indent Left
+removeFormat = Remove Formatting
+removeLink = Remove Link
+strikeThrough = Toggle Strikethrough
+subscript = Toggle Subscript
+superscript = Toggle Superscript
+ul = Insert Unordered List
+underline = Toggle Underline
+color = Color
+black = Black
+white = White
+red = Red
+green = Green
+yellow = Yellow
+blue = Blue
+font = Font
+normal = Normal
+size = Size
+xxsmall = XX-Small
+xsmall = X-Small
+small = Small
+medium = Medium
+large = Large
+xlarge = X-Large
+xxlarge = XX-Large
\ No newline at end of file
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar.java
new file mode 100644
index 0000000..43f7f9f
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar.java
@@ -0,0 +1,489 @@
+/*
+ * Copyright 2006 Google Inc.
+ *
+ * Licensed 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 com.google.gwt.sample.kitchensink.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.user.client.ImageBundle;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.KeyboardListener;
+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.Widget;
+
+/**
+ * A sample 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 RichTextToolbar extends Composite {
+
+ /**
+ * 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 Images extends ImageBundle {
+
+ /**
+ * @gwt.resource bold.gif
+ */
+ AbstractImagePrototype bold();
+
+ /**
+ * @gwt.resource createLink.gif
+ */
+ AbstractImagePrototype createLink();
+
+ /**
+ * @gwt.resource hr.gif
+ */
+ AbstractImagePrototype hr();
+
+ /**
+ * @gwt.resource indent.gif
+ */
+ AbstractImagePrototype indent();
+
+ /**
+ * @gwt.resource insertImage.gif
+ */
+ AbstractImagePrototype insertImage();
+
+ /**
+ * @gwt.resource italic.gif
+ */
+ AbstractImagePrototype italic();
+
+ /**
+ * @gwt.resource justifyCenter.gif
+ */
+ AbstractImagePrototype justifyCenter();
+
+ /**
+ * @gwt.resource justifyLeft.gif
+ */
+ AbstractImagePrototype justifyLeft();
+
+ /**
+ * @gwt.resource justifyRight.gif
+ */
+ AbstractImagePrototype justifyRight();
+
+ /**
+ * @gwt.resource ol.gif
+ */
+ AbstractImagePrototype ol();
+
+ /**
+ * @gwt.resource outdent.gif
+ */
+ AbstractImagePrototype outdent();
+
+ /**
+ * @gwt.resource removeFormat.gif
+ */
+ AbstractImagePrototype removeFormat();
+
+ /**
+ * @gwt.resource removeLink.gif
+ */
+ AbstractImagePrototype removeLink();
+
+ /**
+ * @gwt.resource strikeThrough.gif
+ */
+ AbstractImagePrototype strikeThrough();
+
+ /**
+ * @gwt.resource subscript.gif
+ */
+ AbstractImagePrototype subscript();
+
+ /**
+ * @gwt.resource superscript.gif
+ */
+ AbstractImagePrototype superscript();
+
+ /**
+ * @gwt.resource ul.gif
+ */
+ AbstractImagePrototype ul();
+
+ /**
+ * @gwt.resource underline.gif
+ */
+ AbstractImagePrototype underline();
+ }
+
+ /**
+ * We use an inner EventListener class to avoid exposing event methods on the
+ * RichTextToolbar itself.
+ */
+ private class EventListener implements ClickListener, ChangeListener,
+ KeyboardListener {
+
+ public void onChange(Widget sender) {
+ 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);
+ }
+
+ if (sender == richText) {
+ updateStatus();
+ }
+ }
+
+ public void onClick(Widget sender) {
+ 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) {
+ // We use the RichTextArea's onKeyUp event to update the toolbar status.
+ // This will catch any cases where the user moves the cursur using the
+ // keyboard, or uses one of the browser's built-in keyboard shortcuts.
+ updateStatus();
+ }
+ }
+
+ public void onKeyDown(Widget sender, char keyCode, int modifiers) {
+ }
+
+ public void onKeyPress(Widget sender, char keyCode, int modifiers) {
+ }
+
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ if (sender == richText) {
+ // We use the RichTextArea's onKeyUp event to update the toolbar status.
+ // This will catch any cases where the user moves the cursur using the
+ // keyboard, or uses one of the browser's built-in keyboard shortcuts.
+ updateStatus();
+ }
+ }
+ }
+
+ /**
+ * This {@link Constants} interface is used to make the toolbar's strings
+ * internationalizable.
+ */
+ public interface Strings extends Constants {
+
+ String bold();
+
+ String createLink();
+
+ String hr();
+
+ String indent();
+
+ String insertImage();
+
+ String italic();
+
+ String justifyCenter();
+
+ String justifyLeft();
+
+ String justifyRight();
+
+ String ol();
+
+ String outdent();
+
+ String removeFormat();
+
+ String removeLink();
+
+ String strikeThrough();
+
+ String subscript();
+
+ String superscript();
+
+ String ul();
+
+ String underline();
+
+ String color();
+
+ String black();
+
+ String white();
+
+ String red();
+
+ String green();
+
+ String yellow();
+
+ String blue();
+
+ String font();
+
+ String normal();
+
+ String size();
+
+ String xxsmall();
+
+ String xsmall();
+
+ String small();
+
+ String medium();
+
+ String large();
+
+ String xlarge();
+
+ String xxlarge();
+ }
+
+ 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 Images images = (Images) GWT.create(Images.class);
+ private Strings strings = (Strings) GWT.create(Strings.class);
+ private EventListener listener = new EventListener();
+
+ private RichTextArea richText;
+ private RichTextArea.BasicFormatter basic;
+ private RichTextArea.ExtendedFormatter extended;
+
+ private HorizontalPanel panel = 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 RichTextToolbar(RichTextArea richText) {
+ this.richText = richText;
+ this.basic = richText.getBasicFormatter();
+ this.extended = richText.getExtendedFormatter();
+
+ initWidget(panel);
+ setStyleName("gwt-RichTextToolbar");
+
+ if (basic != null) {
+ panel.add(bold = createToggleButton(images.bold(), strings.bold()));
+ panel.add(italic = createToggleButton(images.italic(), strings.italic()));
+ panel.add(underline = createToggleButton(images.underline(),
+ strings.underline()));
+ panel.add(subscript = createToggleButton(images.subscript(),
+ strings.subscript()));
+ panel.add(superscript = createToggleButton(images.superscript(),
+ strings.superscript()));
+ panel.add(justifyLeft = createPushButton(images.justifyLeft(),
+ strings.justifyLeft()));
+ panel.add(justifyCenter = createPushButton(images.justifyCenter(),
+ strings.justifyCenter()));
+ panel.add(justifyRight = createPushButton(images.justifyRight(),
+ strings.justifyRight()));
+ }
+
+ if (extended != null) {
+ panel.add(strikethrough = createToggleButton(images.strikeThrough(),
+ strings.strikeThrough()));
+ panel.add(indent = createPushButton(images.indent(), strings.indent()));
+ panel.add(outdent = createPushButton(images.outdent(), strings.outdent()));
+ panel.add(hr = createPushButton(images.hr(), strings.hr()));
+ panel.add(ol = createPushButton(images.ol(), strings.ol()));
+ panel.add(ul = createPushButton(images.ul(), strings.ul()));
+ panel.add(insertImage = createPushButton(images.insertImage(),
+ strings.insertImage()));
+ panel.add(createLink = createPushButton(images.createLink(),
+ strings.createLink()));
+ panel.add(removeLink = createPushButton(images.removeLink(),
+ strings.removeLink()));
+ panel.add(removeFormat = createPushButton(images.removeFormat(),
+ strings.removeFormat()));
+ }
+
+ if (basic != null) {
+ panel.add(backColors = createColorList("Background"));
+ panel.add(foreColors = createColorList("Foreground"));
+ panel.add(fonts = createFontList());
+ panel.add(fontSizes = createFontSizes());
+
+ // We only use these listeners for updating status, so don't hook them up
+ // unless at least basic editing is supported.
+ richText.addChangeListener(listener);
+ richText.addKeyboardListener(listener);
+ richText.addClickListener(listener);
+ }
+ }
+
+ private ListBox createColorList(String caption) {
+ ListBox lb = new ListBox();
+ lb.addChangeListener(listener);
+ lb.setVisibleItemCount(1);
+
+ lb.addItem(caption);
+ lb.addItem(strings.white(), "white");
+ lb.addItem(strings.black(), "black");
+ lb.addItem(strings.red(), "red");
+ lb.addItem(strings.green(), "green");
+ lb.addItem(strings.yellow(), "yellow");
+ lb.addItem(strings.blue(), "blue");
+ return lb;
+ }
+
+ private ListBox createFontList() {
+ ListBox lb = new ListBox();
+ lb.addChangeListener(listener);
+ lb.setVisibleItemCount(1);
+
+ lb.addItem(strings.font(), "");
+ lb.addItem(strings.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.addChangeListener(listener);
+ lb.setVisibleItemCount(1);
+
+ lb.addItem(strings.size());
+ lb.addItem(strings.xxsmall());
+ lb.addItem(strings.xsmall());
+ lb.addItem(strings.small());
+ lb.addItem(strings.medium());
+ lb.addItem(strings.large());
+ lb.addItem(strings.xlarge());
+ lb.addItem(strings.xxlarge());
+ return lb;
+ }
+
+ private PushButton createPushButton(AbstractImagePrototype img, String tip) {
+ PushButton pb = new PushButton(img.createImage());
+ pb.addClickListener(listener);
+ pb.setTitle(tip);
+ return pb;
+ }
+
+ private ToggleButton createToggleButton(AbstractImagePrototype img, String tip) {
+ ToggleButton tb = new ToggleButton(img.createImage());
+ tb.addClickListener(listener);
+ 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());
+ }
+ }
+}
+
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java
index 5e90ed5..95c7131 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java
@@ -17,10 +17,11 @@
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
import com.google.gwt.user.client.ui.PasswordTextBox;
+import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.TextBoxBase;
@@ -60,12 +61,25 @@
panel.add(createTextThing(passwordText));
panel.add(new HTML("Text area:"));
panel.add(createTextThing(textArea));
+ panel.add(new HTML("Rich text area:"));
+ panel.add(createRichText());
initWidget(panel);
}
public void onShow() {
}
+ private Widget createRichText() {
+ RichTextArea area = new RichTextArea();
+ RichTextToolbar tb = new RichTextToolbar(area);
+
+ VerticalPanel p = new VerticalPanel();
+ p.add(tb);
+ p.add(area);
+ area.setWidth("100%");
+ return p;
+ }
+
private Widget createTextThing(final TextBoxBase textBox) {
HorizontalPanel p = new HorizontalPanel();
p.setSpacing(4);
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/backColors.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/backColors.gif
new file mode 100644
index 0000000..ddfc1ce
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/backColors.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/bold.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/bold.gif
new file mode 100644
index 0000000..249e5af
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/bold.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/createLink.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/createLink.gif
new file mode 100644
index 0000000..3ab9e59
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/createLink.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/fontSizes.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/fontSizes.gif
new file mode 100644
index 0000000..c2f4c8c
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/fontSizes.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/fonts.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/fonts.gif
new file mode 100644
index 0000000..1629cab
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/fonts.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/foreColors.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/foreColors.gif
new file mode 100644
index 0000000..2bb89ef
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/foreColors.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/hr.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/hr.gif
new file mode 100644
index 0000000..3fb1607
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/hr.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/indent.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/indent.gif
new file mode 100644
index 0000000..8b837f0
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/indent.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/insertImage.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/insertImage.gif
new file mode 100644
index 0000000..db61c9a
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/insertImage.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/italic.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/italic.gif
new file mode 100644
index 0000000..2b0a5a0
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/italic.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyCenter.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyCenter.gif
new file mode 100644
index 0000000..7d22640
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyCenter.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyLeft.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyLeft.gif
new file mode 100644
index 0000000..3c0f350
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyLeft.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyRight.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyRight.gif
new file mode 100644
index 0000000..99ee258
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/justifyRight.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/ol.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/ol.gif
new file mode 100644
index 0000000..833bb40
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/ol.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/outdent.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/outdent.gif
new file mode 100644
index 0000000..be86624
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/outdent.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/removeFormat.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/removeFormat.gif
new file mode 100644
index 0000000..a4339c0
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/removeFormat.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/removeLink.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/removeLink.gif
new file mode 100644
index 0000000..522ab4b
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/removeLink.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/strikethrough.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/strikethrough.gif
new file mode 100644
index 0000000..6b174c8
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/strikethrough.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/subscript.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/subscript.gif
new file mode 100644
index 0000000..04bba05
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/subscript.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/superscript.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/superscript.gif
new file mode 100644
index 0000000..ac478ee
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/superscript.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/ul.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/ul.gif
new file mode 100644
index 0000000..01380db
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/ul.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/underline.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/underline.gif
new file mode 100644
index 0000000..82bae11
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/underline.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css
index a6fe034..f06ba0a 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css
@@ -172,6 +172,139 @@
.gwt-StackPanel .gwt-StackPanelItem-selected {
}
+.gwt-PushButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 1px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
+}
+
+.gwt-PushButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 1px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
+}
+
+.gwt-PushButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-PushButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-ToggleButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 1px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
+}
+
+.gwt-ToggleButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 1px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
+}
+
+.gwt-ToggleButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-ToggleButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextArea {
+ border: 1px solid black;
+ background-color: white;
+}
+
+.gwt-RichTextToolbar {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ margin-right: 2px;
+ border: 1px solid transparent;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-right: 2px;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-right: 2px;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-right: 2px;
+ border: 1px solid transparent;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-HorizontalSplitPanel {
+ border: 8px solid #C3D9FF;
+ margin: 8px;
+}
+
+.gwt-HorizontalSplitPanel .splitter {
+ background-color: #C3D9FF;
+}
+
+.gwt-VerticalSplitPanel {
+}
+
+.gwt-VerticalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ height: 8px;
+}
+
/* -------------------------------------------------------------------------- */
.ks-Sink {
border: 8px solid #C3D9FF;