From commitstiffanychang@example.com Wed May 05 09:16:23 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 69795 invoked from network); 5 May 2010 09:16:22 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 May 2010 09:16:22 -0000 Received: (qmail 91795 invoked by uid 500); 5 May 2010 09:16:22 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 91767 invoked by uid 500); 5 May 2010 09:16:21 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 91759 invoked by uid 99); 5 May 2010 09:16:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 09:16:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 09:16:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F36F023888AD; Wed, 5 May 2010 09:15:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941213 - in /pivot/trunk: tests/src/org/apache/pivot/tests/ wtk/src/org/apache/pivot/wtk/ wtk/src/org/apache/pivot/wtk/skin/ Date: Wed, 05 May 2010 09:15:25 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: noelgrandin Date: Wed May 5 09:15:25 2010 New Revision: 941213 URL: http://svn.apache.org/viewvc?rev=941213&view=rev Log: PIVOT-377 Provide access to the window in popup button components Modified: pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java pivot/trunk/tests/src/org/apache/pivot/tests/color_list_button_test.wtkx pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java Modified: pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java (original) +++ pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java Wed May 5 09:15:25 2010 @@ -18,20 +18,28 @@ package org.apache.pivot.tests; import org.apache.pivot.collections.Map; import org.apache.pivot.wtk.Application; -import org.apache.pivot.wtk.Component; +import org.apache.pivot.wtk.BoxPane; import org.apache.pivot.wtk.DesktopApplicationContext; import org.apache.pivot.wtk.Display; import org.apache.pivot.wtk.Frame; +import org.apache.pivot.wtk.ListButton; +import org.apache.pivot.wtk.effects.ReflectionDecorator; import org.apache.pivot.wtkx.WTKXSerializer; public class ColorListButtonTest implements Application { private Frame frame = null; - + private ListButton listButton = null; + @Override public void startup(Display display, Map<String, String> properties) throws Exception { WTKXSerializer wtkxSerializer = new WTKXSerializer(); - frame = new Frame((Component)wtkxSerializer.readObject(getClass().getResource("color_list_button_test.wtkx"))); + BoxPane boxPane = (BoxPane) wtkxSerializer.readObject(this, "color_list_button_test.wtkx"); + listButton = (ListButton)wtkxSerializer.get("listButton"); + // test the getListPopup() method + listButton.getListPopup().getDecorators().add(new ReflectionDecorator()); + + frame = new Frame(boxPane); frame.setTitle("Color List Button Test"); frame.setPreferredSize(480, 360); frame.open(display); Modified: pivot/trunk/tests/src/org/apache/pivot/tests/color_list_button_test.wtkx URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/color_list_button_test.wtkx?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/tests/src/org/apache/pivot/tests/color_list_button_test.wtkx (original) +++ pivot/trunk/tests/src/org/apache/pivot/tests/color_list_button_test.wtkx Wed May 5 09:15:25 2010 @@ -19,7 +19,7 @@ limitations under the License. <BoxPane xmlns:wtkx="http://pivot.apache.org/wtkx" xmlns:collections="org.apache.pivot.collections" xmlns:content="org.apache.pivot.wtk.content" xmlns="org.apache.pivot.wtk"> - <ListButton selectedIndex="0"> + <ListButton wtkx:id="listButton" selectedIndex="0"> <listData> <collections:ArrayList> <content:ColorItem color="#000000" name="Black"/> Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java Wed May 5 09:15:25 2010 @@ -104,6 +104,15 @@ public class CalendarButton extends Butt } } + /** + * CalendarButton skin interface. CalendarButton skins must implement + * this interface to facilitate additional communication between the + * component and the skin. + */ + public interface Skin { + public Window getListPopup(); + } + private int year; private int month; @@ -146,6 +155,23 @@ public class CalendarButton extends Butt setSelectedDate(new CalendarDate()); } + @Override + protected void setSkin(org.apache.pivot.wtk.Skin skin) { + if (!(skin instanceof CalendarButton.Skin)) { + throw new IllegalArgumentException("Skin class must implement " + + CalendarButton.Skin.class.getName()); + } + + super.setSkin(skin); + } + + /** + * @return the popup window associated with this components skin + */ + public Window getListPopup() { + return ((CalendarButton.Skin) getSkin()).getListPopup(); + } + /** * @throws UnsupportedOperationException * This method is not supported by CalendarButton. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java Wed May 5 09:15:25 2010 @@ -76,6 +76,15 @@ public class ColorChooserButton extends } } + /** + * ColorChooserButton skin interface. ColorChooserButton skins must implement + * this interface to facilitate additional communication between the + * component and the skin. + */ + public interface Skin { + public Window getListPopup(); + } + private Color selectedColor = null; private String selectedColorKey = null; @@ -101,6 +110,23 @@ public class ColorChooserButton extends installThemeSkin(ColorChooserButton.class); } + @Override + protected void setSkin(org.apache.pivot.wtk.Skin skin) { + if (!(skin instanceof ColorChooserButton.Skin)) { + throw new IllegalArgumentException("Skin class must implement " + + ColorChooserButton.Skin.class.getName()); + } + + super.setSkin(skin); + } + + /** + * @return the popup window associated with this components skin + */ + public Window getListPopup() { + return ((ColorChooserButton.Skin) getSkin()).getListPopup(); + } + /** * @throws UnsupportedOperationException * This method is not supported by ColorChooserButton. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java Wed May 5 09:15:25 2010 @@ -119,6 +119,15 @@ public class ListButton extends Button { } } + /** + * ListButton skin interface. ListButton skins must implement + * this interface to facilitate additional communication between the + * component and the skin. + */ + public interface Skin { + public Window getListPopup(); + } + private List<?> listData; private ListView.ItemRenderer itemRenderer; private int selectedIndex = -1; @@ -180,6 +189,23 @@ public class ListButton extends Button { installThemeSkin(ListButton.class); } + @Override + protected void setSkin(org.apache.pivot.wtk.Skin skin) { + if (!(skin instanceof ListButton.Skin)) { + throw new IllegalArgumentException("Skin class must implement " + + ListButton.Skin.class.getName()); + } + + super.setSkin(skin); + } + + /** + * @return the popup window associated with this components skin + */ + public Window getListPopup() { + return ((ListButton.Skin) getSkin()).getListPopup(); + } + /** * @throws UnsupportedOperationException * This method is not supported by ListButton. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java Wed May 5 09:15:25 2010 @@ -48,6 +48,15 @@ public class MenuButton extends Button { } } + /** + * MenuButton skin interface. MenuButton skins must implement + * this interface to facilitate additional communication between the + * component and the skin. + */ + public interface Skin { + public Window getListPopup(); + } + private Menu menu = null; private boolean repeatable = false; @@ -61,6 +70,23 @@ public class MenuButton extends Button { } @Override + protected void setSkin(org.apache.pivot.wtk.Skin skin) { + if (!(skin instanceof MenuButton.Skin)) { + throw new IllegalArgumentException("Skin class must implement " + + MenuButton.Skin.class.getName()); + } + + super.setSkin(skin); + } + + /** + * @return the popup window associated with this components skin + */ + public Window getListPopup() { + return ((MenuButton.Skin) getSkin()).getListPopup(); + } + + @Override public void setToggleButton(boolean toggleButton) { throw new UnsupportedOperationException("Menu buttons cannot be toggle buttons."); } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java Wed May 5 09:15:25 2010 @@ -47,7 +47,7 @@ import org.apache.pivot.wtk.WindowStateL * concrete subclasses. */ public abstract class CalendarButtonSkin extends ButtonSkin - implements CalendarButtonListener, CalendarButtonSelectionListener { + implements CalendarButton.Skin, CalendarButtonListener, CalendarButtonSelectionListener { protected Calendar calendar; protected Window calendarPopup; @@ -176,6 +176,12 @@ public abstract class CalendarButtonSkin calendar.setLocale(calendarButton.getLocale()); } + // CalendarButton.Skin methods + + public Window getListPopup() { + return calendarPopup; + } + // Component state events @Override public void enabledChanged(Component component) { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java Wed May 5 09:15:25 2010 @@ -37,7 +37,7 @@ import org.apache.pivot.wtk.WindowStateL * Abstract base class for color chooser button skins. */ public abstract class ColorChooserButtonSkin extends ButtonSkin - implements ColorChooserButtonSelectionListener { + implements ColorChooserButton.Skin, ColorChooserButtonSelectionListener { /** * A focusable window class used by color chooser button skins. */ @@ -187,6 +187,12 @@ public abstract class ColorChooserButton colorChooserButton.getColorChooserButtonSelectionListeners().add(this); } + // ColorChooserButton.Skin methods + + public Window getListPopup() { + return colorChooserPopup; + } + // ComponentStateListener methods @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java Wed May 5 09:15:25 2010 @@ -44,7 +44,7 @@ import org.apache.pivot.wtk.WindowStateL * concrete subclasses. */ public abstract class ListButtonSkin extends ButtonSkin - implements ListButtonListener, ListButtonSelectionListener { + implements ListButton.Skin, ListButtonListener, ListButtonSelectionListener { protected ListView listView; protected Window listViewPopup; @@ -173,6 +173,12 @@ public abstract class ListButtonSkin ext listView.setItemRenderer(listButton.getItemRenderer()); } + // ListButton.Skin methods + + public Window getListPopup() { + return listViewPopup; + } + // Component state events @Override public void enabledChanged(Component component) { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java?rev=941213&r1=941212&r2=941213&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java Wed May 5 09:15:25 2010 @@ -33,7 +33,7 @@ import org.apache.pivot.wtk.WindowStateL * Abstract base class for menu button skins. */ public abstract class MenuButtonSkin extends ButtonSkin - implements MenuButtonListener { + implements MenuButton.Skin, MenuButtonListener { protected boolean pressed = false; protected MenuPopup menuPopup = new MenuPopup(); @@ -80,6 +80,12 @@ public abstract class MenuButtonSkin ext menuPopup.getWindowStateListeners().add(menuPopupWindowStateListener); } + // MenuButton.Skin methods + + public Window getListPopup() { + return menuPopup; + } + // Component state events @Override public void enabledChanged(Component component) { From commitstiffanychang@example.com Wed May 05 11:26:51 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 96681 invoked from network); 5 May 2010 11:26:51 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 May 2010 11:26:51 -0000 Received: (qmail 51254 invoked by uid 500); 5 May 2010 11:26:51 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 51221 invoked by uid 500); 5 May 2010 11:26:50 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 51213 invoked by uid 99); 5 May 2010 11:26:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 11:26:50 +0000 X-ASF-Spam-Status: No, hits=-1001.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 11:26:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C7C87238888F; Wed, 5 May 2010 11:25:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941254 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Date: Wed, 05 May 2010 11:25:50 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> Author: noelgrandin Date: Wed May 5 11:25:50 2010 New Revision: 941254 URL: http://svn.apache.org/viewvc?rev=941254&view=rev Log: PIVOT-381 Handle Home and End keys in TextArea, as in TextInput Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java?rev=941254&r1=941253&r2=941254&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Wed May 5 11:25:50 2010 @@ -2227,6 +2227,28 @@ public class TextAreaSkin extends Compon consumed = true; } + } else if (keyCode == Keyboard.KeyCode.HOME) { + // Move the caret to the beginning of the text + if (Keyboard.isPressed(Keyboard.Modifier.SHIFT)) { + textArea.setSelection(0, textArea.getSelectionStart()); + } else { + textArea.setSelection(0, 0); + } + scrollCharacterToVisible(0); + + consumed = true; + } else if (keyCode == Keyboard.KeyCode.END) { + // Move the caret to the end of the text + if (Keyboard.isPressed(Keyboard.Modifier.SHIFT)) { + int selectionStart = textArea.getSelectionStart(); + textArea.setSelection(selectionStart, textArea.getCharacterCount() + - selectionStart); + } else { + textArea.setSelection(textArea.getCharacterCount() - 1, 0); + } + scrollCharacterToVisible(textArea.getCharacterCount() - 1); + + consumed = true; } else { consumed = super.keyPressed(component, keyCode, keyLocation); } From commitstiffanychang@example.com Wed May 05 12:15:09 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 6204 invoked from network); 5 May 2010 12:15:09 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 May 2010 12:15:09 -0000 Received: (qmail 95597 invoked by uid 500); 5 May 2010 12:15:09 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 95555 invoked by uid 500); 5 May 2010 12:15:09 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 95547 invoked by uid 99); 5 May 2010 12:15:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 12:15:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 12:15:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1F77323888CD; Wed, 5 May 2010 12:14:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941264 - in /pivot/trunk: ./ tests/src/org/apache/pivot/tests/ wtk-terra/src/org/apache/pivot/wtk/skin/terra/ wtk/src/org/apache/pivot/wtk/ wtk/src/org/apache/pivot/wtk/skin/ Date: Wed, 05 May 2010 12:14:13 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: noelgrandin Date: Wed May 5 12:14:13 2010 New Revision: 941264 URL: http://svn.apache.org/viewvc?rev=941264&view=rev Log: PIVOT-419 Add Ability to Add tooltipText for Tabs in a TabPane. Modified: pivot/trunk/ (props changed) pivot/trunk/tests/src/org/apache/pivot/tests/panorama_test.wtkx pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Propchange: pivot/trunk/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed May 5 12:14:13 2010 @@ -0,0 +1,6 @@ +.settings +.classpath +.project +container-child-access.6aug.patch +bin +noel Modified: pivot/trunk/tests/src/org/apache/pivot/tests/panorama_test.wtkx URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/panorama_test.wtkx?rev=941264&r1=941263&r2=941264&view=diff ============================================================================== --- pivot/trunk/tests/src/org/apache/pivot/tests/panorama_test.wtkx (original) +++ pivot/trunk/tests/src/org/apache/pivot/tests/panorama_test.wtkx Wed May 5 12:14:13 2010 @@ -20,7 +20,7 @@ limitations under the License. xmlns:wtkx="http://pivot.apache.org/wtkx" xmlns="org.apache.pivot.wtk"> <tabs> - <Label TabPane.label="Tab 1" preferredWidth="320" preferredHeight="240" text="Tab 1"/> + <Label TabPane.tooltipText="Tooltip1" TabPane.label="Tab 1" preferredWidth="320" preferredHeight="240" text="Tab 1"/> <Label TabPane.label="Tab 2" preferredWidth="320" preferredHeight="240" text="Tab 2"/> <Label TabPane.label="Tab 3" preferredWidth="320" preferredHeight="240" text="Tab 3"/> <Label TabPane.label="Tab 4" preferredWidth="320" preferredHeight="240" text="Tab 4"/> Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java?rev=941264&r1=941263&r2=941264&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java Wed May 5 12:14:13 2010 @@ -1407,4 +1407,13 @@ public class TerraTabPaneSkin extends Co invalidateComponent(); } + + @Override + public void tooltipTextChanged(TabPane tabPane, Component component, String previousTooltipText) { + int i = tabPane.getTabs().indexOf(component); + buttonBoxPane.get(i).setTooltipText(TabPane.getTooltipText(component)); + buttonBoxPane.get(i).invalidate(); + + invalidateComponent(); + } } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java?rev=941264&r1=941263&r2=941264&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java Wed May 5 12:14:13 2010 @@ -133,7 +133,8 @@ public class TabPane extends Container { private enum Attribute { LABEL, ICON, - CLOSEABLE; + CLOSEABLE, + TOOLTIP; } private static class TabPaneListenerList extends ListenerList<TabPaneListener> @@ -210,6 +211,13 @@ public class TabPane extends Container { listener.closeableChanged(tabPane, component); } } + + @Override + public void tooltipTextChanged(TabPane tabPane, Component component, String previousTooltipText) { + for (TabPaneAttributeListener listener : this) { + listener.tooltipTextChanged(tabPane, component, previousTooltipText); + } + } } private int selectedIndex = -1; @@ -394,5 +402,35 @@ public class TabPane extends Container { } } } + + /** + * Returns the tab component's tooltip text. + * + * @return + * The tab component's tooltip text, or <tt>null</tt> if no tooltip is + * specified. + */ + public static String getTooltipText(Component component) { + return (String)component.getAttribute(Attribute.TOOLTIP); + } + + /** + * Sets the tab component's tooltip text. + * + * @param tooltipText + * The tab component's tooltip text, or <tt>null</tt> for no tooltip. + */ + public static void setTooltipText(Component component, String tooltipText) { + String previousTooltipText = (String)component.setAttribute(Attribute.TOOLTIP, tooltipText); + + if (previousTooltipText != tooltipText) { + Container parent = component.getParent(); + + if (parent instanceof TabPane) { + TabPane tabPane = (TabPane)parent; + tabPane.tabPaneAttributeListeners.tooltipTextChanged(tabPane, component, previousTooltipText); + } + } + } } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java?rev=941264&r1=941263&r2=941264&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java Wed May 5 12:14:13 2010 @@ -37,6 +37,11 @@ public interface TabPaneAttributeListene @Override public void closeableChanged(TabPane tabPane, Component component) { } + + @Override + public void tooltipTextChanged(TabPane tabPane, Component component, + String previousTooltipText) { + } } /** @@ -64,4 +69,12 @@ public interface TabPaneAttributeListene * @param component */ public void closeableChanged(TabPane tabPane, Component component); + + /** + * Called when a tab's tooltipText attribute has changed. + * + * @param tabPane + * @param component + */ + public void tooltipTextChanged(TabPane tabPane, Component component, String previousTooltipText); } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java?rev=941264&r1=941263&r2=941264&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Wed May 5 12:14:13 2010 @@ -148,7 +148,7 @@ public class TablePaneSkin extends Conta int columnSpan = TablePane.getColumnSpan(component); if (columnSpan > 1) { - // We might need to adjust column widths to accomodate + // We might need to adjust column widths to accommodate // this spanning cell. First, we find out if any of the // spanned cells are default width and how much space // we've allocated thus far for those cells @@ -1122,14 +1122,24 @@ public class TablePaneSkin extends Conta int preferredHeight = 0; - for (int j = 0, n = row.getLength(), m = columns.getLength(); j < n && j < m; j++) { - Component component = row.get(j); + int columnIndex = 0; + for (int i = 0, n = row.getLength(); i < n; i++) { + Component component = row.get(i); if (component != null && component.isVisible() && TablePane.getRowSpan(component) == 1) { + int colSpan = TablePane.getColumnSpan(component); + + int colSpannedWidth = 0; + for (int j = 0; j < colSpan && (columnIndex + j) < columnWidths.length; j++) { + colSpannedWidth += columnWidths[columnIndex + j]; + } preferredHeight = Math.max(preferredHeight, - component.getPreferredHeight(columnWidths[j])); + component.getPreferredHeight(colSpannedWidth)); + + columnIndex += colSpan; + if (columnIndex >= columns.getLength()) break; } } @@ -1239,7 +1249,7 @@ public class TablePaneSkin extends Conta int columnSpan = TablePane.getColumnSpan(component); if (columnSpan > 1) { - // We might need to adjust column widths to accomodate + // We might need to adjust column widths to accommodate // this spanning cell. First, we find out if any of the // spanned cells are default width and how much space // we've allocated thus far for those cells From commitstiffanychang@example.com Wed May 05 12:54:11 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 19448 invoked from network); 5 May 2010 12:54:10 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 May 2010 12:54:10 -0000 Received: (qmail 42979 invoked by uid 500); 5 May 2010 12:54:10 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 42947 invoked by uid 500); 5 May 2010 12:54:10 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 42939 invoked by uid 99); 5 May 2010 12:54:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 12:54:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 12:54:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7FE0923888EA; Wed, 5 May 2010 12:53:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941272 - in /pivot/trunk/wtk/src/org/apache/pivot/wtk: TextArea.java skin/TextAreaSkin.java Date: Wed, 05 May 2010 12:53:17 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: noelgrandin Date: Wed May 5 12:53:17 2010 New Revision: 941272 URL: http://svn.apache.org/viewvc?rev=941272&view=rev Log: PIVOT-371 Support word navigation in TextInput and TextArea also fix OutOfBounds checks in TextArea#setSelection Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java?rev=941272&r1=941271&r2=941272&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java Wed May 5 12:53:17 2010 @@ -688,12 +688,21 @@ public class TextArea extends Component } if (selectionLength < 0) { - throw new IllegalArgumentException("selectionLength is negative."); + throw new IllegalArgumentException("selectionLength is negative, selectionLength=" + selectionLength); } - if (selectionStart < 0 - || selectionStart + selectionLength > document.getCharacterCount()) { - throw new IndexOutOfBoundsException(); + if (selectionStart < 0) { + throw new IndexOutOfBoundsException("selectionStart < 0, selectionStart=" + selectionStart); + } + + if (selectionStart >= document.getCharacterCount()) { + throw new IndexOutOfBoundsException("selectionStart=" + selectionStart + + ", document.characterCount=" + document.getCharacterCount()); + } + + if (selectionStart + selectionLength > document.getCharacterCount()) { + throw new IndexOutOfBoundsException("selectionStart=" + selectionStart + ", selectionLength=" + selectionLength + + ", document.characterCount=" + document.getCharacterCount()); } int previousSelectionStart = this.selectionStart; Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java?rev=941272&r1=941271&r2=941272&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Wed May 5 12:53:17 2010 @@ -2078,6 +2078,22 @@ public class TextAreaSkin extends Compon selectionStart--; selectionLength++; } + } else if (Keyboard.isPressed(Keyboard.Modifier.CTRL)) { + // Move the caret to the start of the next word to our left + if (selectionStart > 0) { + // first, skip over any space immediately to our left + while (selectionStart > 0 + && Character.isWhitespace(document.getCharacterAt(selectionStart - 1))) { + selectionStart--; + } + // then, skip over any word-letters to our left + while (selectionStart > 0 + && !Character.isWhitespace(document.getCharacterAt(selectionStart - 1))) { + selectionStart--; + } + + selectionLength = 0; + } } else { // Clear the selection and move the caret back by one // character @@ -2107,6 +2123,25 @@ public class TextAreaSkin extends Compon textArea.setSelection(selectionStart, selectionLength); scrollCharacterToVisible(selectionStart + selectionLength); + } else if (Keyboard.isPressed(Keyboard.Modifier.CTRL)) { + // Move the caret to the start of the next word to our right + if (selectionStart < document.getCharacterCount()) { + // first, skip over any word-letters to our right + while (selectionStart < document.getCharacterCount() - 1 + && !Character.isWhitespace(document.getCharacterAt(selectionStart))) { + selectionStart++; + } + // then, skip over any space immediately to our right + while (selectionStart < document.getCharacterCount() - 1 + && Character.isWhitespace(document.getCharacterAt(selectionStart))) { + selectionStart++; + } + + textArea.setSelection(selectionStart, 0); + scrollCharacterToVisible(selectionStart); + + caretX = caret.x; + } } else { // Clear the selection and move the caret forward by one // character From commitstiffanychang@example.com Wed May 05 13:22:09 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 23659 invoked from network); 5 May 2010 13:22:09 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 May 2010 13:22:09 -0000 Received: (qmail 77904 invoked by uid 500); 5 May 2010 13:22:09 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 77878 invoked by uid 500); 5 May 2010 13:22:09 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 77870 invoked by uid 99); 5 May 2010 13:22:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 13:22:09 +0000 X-ASF-Spam-Status: No, hits=-1063.7 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 13:22:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9293623888AD; Wed, 5 May 2010 13:21:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941277 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Date: Wed, 05 May 2010 13:21:18 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> Author: noelgrandin Date: Wed May 5 13:21:18 2010 New Revision: 941277 URL: http://svn.apache.org/viewvc?rev=941277&view=rev Log: revert accidental commit in revision 941264 Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java?rev=941277&r1=941276&r2=941277&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Wed May 5 13:21:18 2010 @@ -148,7 +148,7 @@ public class TablePaneSkin extends Conta int columnSpan = TablePane.getColumnSpan(component); if (columnSpan > 1) { - // We might need to adjust column widths to accommodate + // We might need to adjust column widths to accomodate // this spanning cell. First, we find out if any of the // spanned cells are default width and how much space // we've allocated thus far for those cells @@ -1122,24 +1122,14 @@ public class TablePaneSkin extends Conta int preferredHeight = 0; - int columnIndex = 0; - for (int i = 0, n = row.getLength(); i < n; i++) { - Component component = row.get(i); + for (int j = 0, n = row.getLength(), m = columns.getLength(); j < n && j < m; j++) { + Component component = row.get(j); if (component != null && component.isVisible() && TablePane.getRowSpan(component) == 1) { - int colSpan = TablePane.getColumnSpan(component); - - int colSpannedWidth = 0; - for (int j = 0; j < colSpan && (columnIndex + j) < columnWidths.length; j++) { - colSpannedWidth += columnWidths[columnIndex + j]; - } preferredHeight = Math.max(preferredHeight, - component.getPreferredHeight(colSpannedWidth)); - - columnIndex += colSpan; - if (columnIndex >= columns.getLength()) break; + component.getPreferredHeight(columnWidths[j])); } } @@ -1249,7 +1239,7 @@ public class TablePaneSkin extends Conta int columnSpan = TablePane.getColumnSpan(component); if (columnSpan > 1) { - // We might need to adjust column widths to accommodate + // We might need to adjust column widths to accomodate // this spanning cell. First, we find out if any of the // spanned cells are default width and how much space // we've allocated thus far for those cells From commitstiffanychang@example.com Thu May 06 11:38:32 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 7128 invoked from network); 6 May 2010 11:38:32 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 6 May 2010 11:38:32 -0000 Received: (qmail 80760 invoked by uid 500); 6 May 2010 11:38:32 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 80723 invoked by uid 500); 6 May 2010 11:38:32 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 80714 invoked by uid 99); 6 May 2010 11:38:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 11:38:31 +0000 X-ASF-Spam-Status: No, hits=-1269.7 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 11:38:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CBEBE23888FE; Thu, 6 May 2010 11:37:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941672 - in /pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra: TerraLinkButtonSkin.java TerraListButtonSkin.java TerraTabPaneSkin.java Date: Thu, 06 May 2010 11:37:39 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> Author: gbrown Date: Thu May 6 11:37:39 2010 New Revision: 941672 URL: http://svn.apache.org/viewvc?rev=941672&view=rev Log: Add indexed color setters to TerraLinkButtonSkin and TerraListButtonSkin. Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraLinkButtonSkin.java pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListButtonSkin.java pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraLinkButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraLinkButtonSkin.java?rev=941672&r1=941671&r2=941672&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraLinkButtonSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraLinkButtonSkin.java Thu May 6 11:37:39 2010 @@ -147,6 +147,11 @@ public class TerraLinkButtonSkin extends setColor(GraphicsUtilities.decodeColor(color)); } + public final void setColor(int color) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setColor(theme.getColor(color)); + } + public Color getDisabledColor() { return disabledColor; } @@ -167,4 +172,9 @@ public class TerraLinkButtonSkin extends setDisabledColor(GraphicsUtilities.decodeColor(disabledColor)); } + + public final void setDisabledColor(int disabledColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setDisabledColor(theme.getColor(disabledColor)); + } } Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListButtonSkin.java?rev=941672&r1=941671&r2=941672&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListButtonSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListButtonSkin.java Thu May 6 11:37:39 2010 @@ -382,6 +382,11 @@ public class TerraListButtonSkin extends setColor(GraphicsUtilities.decodeColor(color)); } + public final void setColor(int color) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setColor(theme.getColor(color)); + } + public Color getDisabledColor() { return disabledColor; } @@ -403,6 +408,11 @@ public class TerraListButtonSkin extends setDisabledColor(GraphicsUtilities.decodeColor(disabledColor)); } + public final void setDisabledColor(int disabledColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setDisabledColor(theme.getColor(disabledColor)); + } + public Color getBackgroundColor() { return backgroundColor; } @@ -426,6 +436,11 @@ public class TerraListButtonSkin extends setBackgroundColor(GraphicsUtilities.decodeColor(backgroundColor)); } + public final void setBackgroundColor(int backgroundColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setBackgroundColor(theme.getColor(backgroundColor)); + } + public Color getDisabledBackgroundColor() { return disabledBackgroundColor; } @@ -448,6 +463,11 @@ public class TerraListButtonSkin extends setDisabledBackgroundColor(GraphicsUtilities.decodeColor(disabledBackgroundColor)); } + public final void setDisabledBackgroundColor(int disabledBackgroundColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setDisabledBackgroundColor(theme.getColor(disabledBackgroundColor)); + } + public Color getBorderColor() { return borderColor; } @@ -470,6 +490,11 @@ public class TerraListButtonSkin extends setBorderColor(GraphicsUtilities.decodeColor(borderColor)); } + public final void setBorderColor(int borderColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setBorderColor(theme.getColor(borderColor)); + } + public Color getDisabledBorderColor() { return disabledBorderColor; } @@ -491,6 +516,11 @@ public class TerraListButtonSkin extends setDisabledBorderColor(GraphicsUtilities.decodeColor(disabledBorderColor)); } + public final void setDisabledBorderColor(int disabledBorderColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setDisabledBorderColor(theme.getColor(disabledBorderColor)); + } + public Insets getPadding() { return padding; } Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java?rev=941672&r1=941671&r2=941672&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java Thu May 6 11:37:39 2010 @@ -1407,7 +1407,7 @@ public class TerraTabPaneSkin extends Co invalidateComponent(); } - + @Override public void tooltipTextChanged(TabPane tabPane, Component component, String previousTooltipText) { int i = tabPane.getTabs().indexOf(component); From commitstiffanychang@example.com Thu May 06 11:42:32 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 8102 invoked from network); 6 May 2010 11:42:32 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 6 May 2010 11:42:32 -0000 Received: (qmail 89187 invoked by uid 500); 6 May 2010 11:42:32 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 89149 invoked by uid 500); 6 May 2010 11:42:31 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 89141 invoked by uid 99); 6 May 2010 11:42:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 11:42:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 11:42:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9E0BF23888FE; Thu, 6 May 2010 11:41:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941674 - /pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java Date: Thu, 06 May 2010 11:41:38 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: gbrown Date: Thu May 6 11:41:38 2010 New Revision: 941674 URL: http://svn.apache.org/viewvc?rev=941674&view=rev Log: Add indexed color setters to TerraCalendarButtonSkin. Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java?rev=941674&r1=941673&r2=941674&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarButtonSkin.java Thu May 6 11:41:38 2010 @@ -353,6 +353,11 @@ public class TerraCalendarButtonSkin ext setColor(GraphicsUtilities.decodeColor(color)); } + public final void setColor(int color) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setColor(theme.getColor(color)); + } + public Color getDisabledColor() { return disabledColor; } @@ -374,6 +379,11 @@ public class TerraCalendarButtonSkin ext setDisabledColor(GraphicsUtilities.decodeColor(disabledColor)); } + public final void setDisabledColor(int disabledColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setDisabledColor(theme.getColor(disabledColor)); + } + public Color getBackgroundColor() { return backgroundColor; } @@ -397,6 +407,11 @@ public class TerraCalendarButtonSkin ext setBackgroundColor(GraphicsUtilities.decodeColor(backgroundColor)); } + public final void setBackgroundColor(int backgroundColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setBackgroundColor(theme.getColor(backgroundColor)); + } + public Color getDisabledBackgroundColor() { return disabledBackgroundColor; } @@ -419,6 +434,11 @@ public class TerraCalendarButtonSkin ext setDisabledBackgroundColor(GraphicsUtilities.decodeColor(disabledBackgroundColor)); } + public final void setDisabledBackgroundColor(int disabledBackgroundColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setDisabledBackgroundColor(theme.getColor(disabledBackgroundColor)); + } + public Color getBorderColor() { return borderColor; } @@ -441,6 +461,11 @@ public class TerraCalendarButtonSkin ext setBorderColor(GraphicsUtilities.decodeColor(borderColor)); } + public final void setBorderColor(int borderColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setBorderColor(theme.getColor(borderColor)); + } + public Color getDisabledBorderColor() { return disabledBorderColor; } @@ -462,6 +487,11 @@ public class TerraCalendarButtonSkin ext setDisabledBorderColor(GraphicsUtilities.decodeColor(disabledBorderColor)); } + public final void setDisabledBorderColor(int disabledBorderColor) { + TerraTheme theme = (TerraTheme)Theme.getTheme(); + setDisabledBorderColor(theme.getColor(disabledBorderColor)); + } + public Insets getPadding() { return padding; } From commitstiffanychang@example.com Thu May 06 11:43:04 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 8211 invoked from network); 6 May 2010 11:43:04 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 6 May 2010 11:43:04 -0000 Received: (qmail 89314 invoked by uid 500); 6 May 2010 11:43:04 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 89281 invoked by uid 500); 6 May 2010 11:43:04 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 89273 invoked by uid 99); 6 May 2010 11:43:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 11:43:04 +0000 X-ASF-Spam-Status: No, hits=-1274.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 11:43:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3E34323889E1; Thu, 6 May 2010 11:42:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941675 - in /pivot/trunk: tests/src/org/apache/pivot/tests/ wtk/src/org/apache/pivot/wtk/ wtk/src/org/apache/pivot/wtk/skin/ Date: Thu, 06 May 2010 11:42:12 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> Author: gbrown Date: Thu May 6 11:42:11 2010 New Revision: 941675 URL: http://svn.apache.org/viewvc?rev=941675&view=rev Log: Trim whitespace. Modified: pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Modified: pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java (original) +++ pivot/trunk/tests/src/org/apache/pivot/tests/ColorListButtonTest.java Thu May 6 11:42:11 2010 @@ -29,7 +29,7 @@ import org.apache.pivot.wtkx.WTKXSeriali public class ColorListButtonTest implements Application { private Frame frame = null; private ListButton listButton = null; - + @Override public void startup(Display display, Map<String, String> properties) throws Exception { @@ -38,7 +38,7 @@ public class ColorListButtonTest impleme listButton = (ListButton)wtkxSerializer.get("listButton"); // test the getListPopup() method listButton.getListPopup().getDecorators().add(new ReflectionDecorator()); - + frame = new Frame(boxPane); frame.setTitle("Color List Button Test"); frame.setPreferredSize(480, 360); Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java Thu May 6 11:42:11 2010 @@ -110,9 +110,9 @@ public class CalendarButton extends Butt * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getListPopup(); } - + private int year; private int month; @@ -164,14 +164,14 @@ public class CalendarButton extends Butt super.setSkin(skin); } - + /** * @return the popup window associated with this components skin */ public Window getListPopup() { return ((CalendarButton.Skin) getSkin()).getListPopup(); } - + /** * @throws UnsupportedOperationException * This method is not supported by CalendarButton. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java Thu May 6 11:42:11 2010 @@ -82,9 +82,9 @@ public class ColorChooserButton extends * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getListPopup(); } - + private Color selectedColor = null; private String selectedColorKey = null; @@ -119,14 +119,14 @@ public class ColorChooserButton extends super.setSkin(skin); } - + /** * @return the popup window associated with this components skin */ public Window getListPopup() { return ((ColorChooserButton.Skin) getSkin()).getListPopup(); } - + /** * @throws UnsupportedOperationException * This method is not supported by ColorChooserButton. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java Thu May 6 11:42:11 2010 @@ -125,9 +125,9 @@ public class ListButton extends Button { * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getListPopup(); } - + private List<?> listData; private ListView.ItemRenderer itemRenderer; private int selectedIndex = -1; Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java Thu May 6 11:42:11 2010 @@ -54,9 +54,9 @@ public class MenuButton extends Button { * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getListPopup(); } - + private Menu menu = null; private boolean repeatable = false; @@ -78,14 +78,14 @@ public class MenuButton extends Button { super.setSkin(skin); } - + /** * @return the popup window associated with this components skin */ public Window getListPopup() { return ((MenuButton.Skin) getSkin()).getListPopup(); } - + @Override public void setToggleButton(boolean toggleButton) { throw new UnsupportedOperationException("Menu buttons cannot be toggle buttons."); Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPane.java Thu May 6 11:42:11 2010 @@ -211,7 +211,7 @@ public class TabPane extends Container { listener.closeableChanged(tabPane, component); } } - + @Override public void tooltipTextChanged(TabPane tabPane, Component component, String previousTooltipText) { for (TabPaneAttributeListener listener : this) { @@ -402,7 +402,7 @@ public class TabPane extends Container { } } } - + /** * Returns the tab component's tooltip text. * Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TabPaneAttributeListener.java Thu May 6 11:42:11 2010 @@ -37,7 +37,7 @@ public interface TabPaneAttributeListene @Override public void closeableChanged(TabPane tabPane, Component component) { } - + @Override public void tooltipTextChanged(TabPane tabPane, Component component, String previousTooltipText) { @@ -69,7 +69,7 @@ public interface TabPaneAttributeListene * @param component */ public void closeableChanged(TabPane tabPane, Component component); - + /** * Called when a tab's tooltipText attribute has changed. * Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TextArea.java Thu May 6 11:42:11 2010 @@ -694,14 +694,14 @@ public class TextArea extends Component if (selectionStart < 0) { throw new IndexOutOfBoundsException("selectionStart < 0, selectionStart=" + selectionStart); } - + if (selectionStart >= document.getCharacterCount()) { throw new IndexOutOfBoundsException("selectionStart=" + selectionStart + ", document.characterCount=" + document.getCharacterCount()); } - + if (selectionStart + selectionLength > document.getCharacterCount()) { - throw new IndexOutOfBoundsException("selectionStart=" + selectionStart + ", selectionLength=" + selectionLength + throw new IndexOutOfBoundsException("selectionStart=" + selectionStart + ", selectionLength=" + selectionLength + ", document.characterCount=" + document.getCharacterCount()); } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java Thu May 6 11:42:11 2010 @@ -181,7 +181,7 @@ public abstract class CalendarButtonSkin public Window getListPopup() { return calendarPopup; } - + // Component state events @Override public void enabledChanged(Component component) { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java Thu May 6 11:42:11 2010 @@ -192,7 +192,7 @@ public abstract class ColorChooserButton public Window getListPopup() { return colorChooserPopup; } - + // ComponentStateListener methods @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java Thu May 6 11:42:11 2010 @@ -178,7 +178,7 @@ public abstract class ListButtonSkin ext public Window getListPopup() { return listViewPopup; } - + // Component state events @Override public void enabledChanged(Component component) { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java Thu May 6 11:42:11 2010 @@ -85,7 +85,7 @@ public abstract class MenuButtonSkin ext public Window getListPopup() { return menuPopup; } - + // Component state events @Override public void enabledChanged(Component component) { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java?rev=941675&r1=941674&r2=941675&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Thu May 6 11:42:11 2010 @@ -2082,7 +2082,7 @@ public class TextAreaSkin extends Compon // Move the caret to the start of the next word to our left if (selectionStart > 0) { // first, skip over any space immediately to our left - while (selectionStart > 0 + while (selectionStart > 0 && Character.isWhitespace(document.getCharacterAt(selectionStart - 1))) { selectionStart--; } @@ -2091,7 +2091,7 @@ public class TextAreaSkin extends Compon && !Character.isWhitespace(document.getCharacterAt(selectionStart - 1))) { selectionStart--; } - + selectionLength = 0; } } else { @@ -2136,10 +2136,10 @@ public class TextAreaSkin extends Compon && Character.isWhitespace(document.getCharacterAt(selectionStart))) { selectionStart++; } - + textArea.setSelection(selectionStart, 0); scrollCharacterToVisible(selectionStart); - + caretX = caret.x; } } else { From commitstiffanychang@example.com Thu May 06 22:09:42 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 72697 invoked from network); 6 May 2010 22:09:42 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 6 May 2010 22:09:42 -0000 Received: (qmail 78143 invoked by uid 500); 6 May 2010 22:09:42 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 78110 invoked by uid 500); 6 May 2010 22:09:42 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 78102 invoked by uid 99); 6 May 2010 22:09:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 22:09:42 +0000 X-ASF-Spam-Status: No, hits=-1278.7 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 22:09:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 390292388900; Thu, 6 May 2010 22:08:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941952 - in /pivot/trunk/wtk/src/org/apache/pivot/wtk: CalendarButton.java ColorChooserButton.java ListButton.java MenuButton.java skin/CalendarButtonSkin.java skin/ColorChooserButtonSkin.java skin/ListButtonSkin.java skin/MenuButtonSkin.java Date: Thu, 06 May 2010 22:08:51 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> Author: gbrown Date: Thu May 6 22:08:50 2010 New Revision: 941952 URL: http://svn.apache.org/viewvc?rev=941952&view=rev Log: Update popup accessor methods for naming consistency. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/CalendarButton.java Thu May 6 22:08:50 2010 @@ -110,7 +110,7 @@ public class CalendarButton extends Butt * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getCalendarPopup(); } private int year; @@ -169,7 +169,7 @@ public class CalendarButton extends Butt * @return the popup window associated with this components skin */ public Window getListPopup() { - return ((CalendarButton.Skin) getSkin()).getListPopup(); + return ((CalendarButton.Skin) getSkin()).getCalendarPopup(); } /** Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ColorChooserButton.java Thu May 6 22:08:50 2010 @@ -82,7 +82,7 @@ public class ColorChooserButton extends * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getColorChooserPopup(); } private Color selectedColor = null; @@ -124,7 +124,7 @@ public class ColorChooserButton extends * @return the popup window associated with this components skin */ public Window getListPopup() { - return ((ColorChooserButton.Skin) getSkin()).getListPopup(); + return ((ColorChooserButton.Skin) getSkin()).getColorChooserPopup(); } /** Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ListButton.java Thu May 6 22:08:50 2010 @@ -125,7 +125,7 @@ public class ListButton extends Button { * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getListViewPopup(); } private List<?> listData; @@ -203,7 +203,7 @@ public class ListButton extends Button { * @return the popup window associated with this components skin */ public Window getListPopup() { - return ((ListButton.Skin) getSkin()).getListPopup(); + return ((ListButton.Skin) getSkin()).getListViewPopup(); } /** Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java Thu May 6 22:08:50 2010 @@ -54,7 +54,7 @@ public class MenuButton extends Button { * component and the skin. */ public interface Skin { - public Window getListPopup(); + public Window getMenuPopup(); } private Menu menu = null; @@ -83,7 +83,7 @@ public class MenuButton extends Button { * @return the popup window associated with this components skin */ public Window getListPopup() { - return ((MenuButton.Skin) getSkin()).getListPopup(); + return ((MenuButton.Skin) getSkin()).getMenuPopup(); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/CalendarButtonSkin.java Thu May 6 22:08:50 2010 @@ -178,7 +178,7 @@ public abstract class CalendarButtonSkin // CalendarButton.Skin methods - public Window getListPopup() { + public Window getCalendarPopup() { return calendarPopup; } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ColorChooserButtonSkin.java Thu May 6 22:08:50 2010 @@ -189,7 +189,7 @@ public abstract class ColorChooserButton // ColorChooserButton.Skin methods - public Window getListPopup() { + public Window getColorChooserPopup() { return colorChooserPopup; } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ListButtonSkin.java Thu May 6 22:08:50 2010 @@ -175,7 +175,7 @@ public abstract class ListButtonSkin ext // ListButton.Skin methods - public Window getListPopup() { + public Window getListViewPopup() { return listViewPopup; } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java?rev=941952&r1=941951&r2=941952&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MenuButtonSkin.java Thu May 6 22:08:50 2010 @@ -82,7 +82,7 @@ public abstract class MenuButtonSkin ext // MenuButton.Skin methods - public Window getListPopup() { + public Window getMenuPopup() { return menuPopup; } From commitstiffanychang@example.com Fri May 07 14:18:36 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 50967 invoked from network); 7 May 2010 14:18:36 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 7 May 2010 14:18:36 -0000 Received: (qmail 42370 invoked by uid 500); 7 May 2010 14:18:36 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 42341 invoked by uid 500); 7 May 2010 14:18:36 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 42333 invoked by uid 99); 7 May 2010 14:18:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 14:18:35 +0000 X-ASF-Spam-Status: No, hits=-1283.1 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 14:18:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 55B7623888FE; Fri, 7 May 2010 14:17:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942078 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Date: Fri, 07 May 2010 14:17:45 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> Author: gbrown Date: Fri May 7 14:17:45 2010 New Revision: 942078 URL: http://svn.apache.org/viewvc?rev=942078&view=rev Log: Resolve issue PIVOT-485. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java?rev=942078&r1=942077&r2=942078&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Fri May 7 14:17:45 2010 @@ -999,7 +999,7 @@ public class TextAreaSkin extends Compon } int end; - if (lineWidth <= breakWidth) { + if (lineWidth < breakWidth) { end = ci.getEndIndex(); } else { if (lastWhitespaceIndex == -1) { From commitstiffanychang@example.com Fri May 07 14:24:42 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 53413 invoked from network); 7 May 2010 14:24:42 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 7 May 2010 14:24:42 -0000 Received: (qmail 57390 invoked by uid 500); 7 May 2010 14:24:42 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 57360 invoked by uid 500); 7 May 2010 14:24:42 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 57352 invoked by uid 99); 7 May 2010 14:24:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 14:24:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 14:24:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 295BA2388A43; Fri, 7 May 2010 14:23:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942083 - in /pivot/trunk/wtk/src/org/apache/pivot/wtk: BindType.java TextInput.java Date: Fri, 07 May 2010 14:23:49 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: gbrown Date: Fri May 7 14:23:48 2010 New Revision: 942083 URL: http://svn.apache.org/viewvc?rev=942083&view=rev Log: Minor Javadoc updates. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/BindType.java pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/BindType.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/BindType.java?rev=942083&r1=942082&r2=942083&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/BindType.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/BindType.java Fri May 7 14:23:48 2010 @@ -16,27 +16,25 @@ */ package org.apache.pivot.wtk; -import org.apache.pivot.collections.Dictionary; - /** * Defines a bind type. */ public enum BindType { /** - * The binding will only be processed for {@link Component#load(Dictionary)} + * The binding will only be processed for {@link Component#load(Object)} * operations. */ LOAD, /** - * The binding will only be processed for {@link Component#store(Dictionary)} + * The binding will only be processed for {@link Component#store(Object)} * operations. */ STORE, /** - * The binding will be process for both {@link Component#load(Dictionary)} - * and {@link Component#store(Dictionary)} operations. + * The binding will be process for both {@link Component#load(Object)} + * and {@link Component#store(Object)} operations. */ BOTH } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java?rev=942083&r1=942082&r2=942083&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java Fri May 7 14:23:48 2010 @@ -344,22 +344,19 @@ public class TextInput extends Component } /** - * Inserts a single character into the text input's content. + * Inserts a single character into the text input's content. The character + * replaces the current selection. * * @param character * The character to insert. - * - * @param index - * The index of the insertion point within the existing text. If equal to - * the current character count, the new text is appended to the existing - * content. */ public void insert(char character) { insert(Character.toString(character)); } /** - * Inserts text into the text input's content. + * Inserts text into the text input's content. The text replaces the current + * selection. * * @param text * The text to insert. From commitstiffanychang@example.com Mon May 10 13:26:46 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 38564 invoked from network); 10 May 2010 13:26:46 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 10 May 2010 13:26:46 -0000 Received: (qmail 10293 invoked by uid 500); 10 May 2010 13:26:46 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 10257 invoked by uid 500); 10 May 2010 13:26:45 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 10249 invoked by uid 99); 10 May 2010 13:26:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 May 2010 13:26:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 May 2010 13:26:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 29AD2238897A; Mon, 10 May 2010 13:25:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942729 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java Date: Mon, 10 May 2010 13:25:46 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: gbrown Date: Mon May 10 13:25:45 2010 New Revision: 942729 URL: http://svn.apache.org/viewvc?rev=942729&view=rev Log: Fix index out of bounds exception in TextNode. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java?rev=942729&r1=942728&r2=942729&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java Mon May 10 13:25:45 2010 @@ -58,7 +58,8 @@ public final class TextNode extends Node @Override public char next() { - return setIndex(index < endIndex ? index + 1 : DONE); + return setIndex(getCharacterCount() > 0 + && index < endIndex ? index + 1 : DONE); } @Override @@ -68,7 +69,8 @@ public final class TextNode extends Node @Override public char current() { - return (index < endIndex) ? getCharacterAt(index) : DONE; + return (getCharacterCount() > 0 + && index < endIndex) ? getCharacterAt(index) : DONE; } @Override From commitstiffanychang@example.com Mon May 10 18:31:35 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 56739 invoked from network); 10 May 2010 18:31:35 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 10 May 2010 18:31:35 -0000 Received: (qmail 43846 invoked by uid 500); 10 May 2010 18:31:35 -0000 Delivered-To: tiffanychang@example.com Received: (qmail 43809 invoked by uid 500); 10 May 2010 18:31:35 -0000 Mailing-List: contact tiffanychang@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:tiffanychang@example.com> List-Unsubscribe: <mailto:tiffanychang@example.com> List-Post: <mailto:tiffanychang@example.com> List-Id: <commits.pivot.apache.org> Reply-To: tiffanychang@example.com Delivered-To: mailing list tiffanychang@example.com Received: (qmail 43801 invoked by uid 99); 10 May 2010 18:31:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 May 2010 18:31:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 May 2010 18:31:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8A88723888E4; Mon, 10 May 2010 18:30:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942839 - in /pivot/trunk/wtk/src/org/apache/pivot/wtk: skin/TextAreaSkin.java text/TextNode.java Date: Mon, 10 May 2010 18:30:34 -0000 To: tiffanychang@example.com From: tiffanychang@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <tiffanychang@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: gbrown Date: Mon May 10 18:30:34 2010 New Revision: 942839 URL: http://svn.apache.org/viewvc?rev=942839&view=rev Log: Minor update to PIVOT-485 fix. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java?rev=942839&r1=942838&r2=942839&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Mon May 10 18:30:34 2010 @@ -999,16 +999,20 @@ public class TextAreaSkin extends Compon } int end; - if (lineWidth < breakWidth) { - end = ci.getEndIndex(); + if (textNode.getCharacterCount() == 0) { + end = start; } else { - if (lastWhitespaceIndex == -1) { - end = ci.getIndex() - 1; - if (end <= start) { - end = start + 1; - } + if (lineWidth < breakWidth) { + end = ci.getEndIndex(); } else { - end = lastWhitespaceIndex + 1; + if (lastWhitespaceIndex == -1) { + end = ci.getIndex() - 1; + if (end <= start) { + end = start + 1; + } + } else { + end = lastWhitespaceIndex + 1; + } } } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java?rev=942839&r1=942838&r2=942839&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/text/TextNode.java Mon May 10 18:30:34 2010 @@ -58,8 +58,7 @@ public final class TextNode extends Node @Override public char next() { - return setIndex(getCharacterCount() > 0 - && index < endIndex ? index + 1 : DONE); + return setIndex(index < endIndex ? index + 1 : DONE); } @Override @@ -69,8 +68,7 @@ public final class TextNode extends Node @Override public char current() { - return (getCharacterCount() > 0 - && index < endIndex) ? getCharacterAt(index) : DONE; + return (index < endIndex) ? getCharacterAt(index) : DONE; } @Override From commitstiffanychang@example.com Mon May 10 22:39:44 2010 Return-Path: <commitstiffanychang@example.com> Delivered-To: tiffanychang@example.com Received: (qmail 42662 invoked from network); 10 May 2010 22:39:44 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 10 May 2010 22:39:44 -0000
{'source': 'Apache Software Foundation Public Mail Archives'}