You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/07/21 02:51:47 UTC
svn commit: r966063 - in /pivot/trunk:
demos/src/org/apache/pivot/demos/richtexteditor/
wtk/src/org/apache/pivot/wtk/skin/ wtk/src/org/apache/pivot/wtk/text/
Author: gbrown
Date: Wed Jul 21 00:51:46 2010
New Revision: 966063
URL: http://svn.apache.org/viewvc?rev=966063&view=rev
Log:
Trim whitespace.
Modified:
pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/document.bxml
pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/richtexteditor.bxml
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBlockView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBulletedListView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinDocumentView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListItemView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNodeView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNumberedListView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinSpanView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinVerticalElementView.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/text/BulletedList.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/text/NumberedList.java
Modified: pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/document.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/document.bxml?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/document.bxml (original)
+++ pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/document.bxml Wed Jul 21 00:51:46 2010
@@ -32,79 +32,79 @@ limitations under the License.
<Paragraph>abcd</Paragraph>
<NumberedList style="decimal">
<List.Item>
- <Paragraph>item1</Paragraph>
+ <Paragraph>item1</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item2</Paragraph>
+ <Paragraph>item2</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item3</Paragraph>
+ <Paragraph>item3</Paragraph>
</List.Item>
</NumberedList>
<NumberedList style="lower_alpha">
<List.Item>
- <Paragraph>item1</Paragraph>
+ <Paragraph>item1</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item2</Paragraph>
+ <Paragraph>item2</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item3</Paragraph>
+ <Paragraph>item3</Paragraph>
</List.Item>
</NumberedList>
<NumberedList style="upper_alpha">
<List.Item>
- <Paragraph>item1</Paragraph>
+ <Paragraph>item1</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item2</Paragraph>
+ <Paragraph>item2</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item3</Paragraph>
+ <Paragraph>item3</Paragraph>
</List.Item>
</NumberedList>
<NumberedList style="lower_roman">
<List.Item>
- <Paragraph>item1</Paragraph>
+ <Paragraph>item1</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item2</Paragraph>
+ <Paragraph>item2</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item3</Paragraph>
+ <Paragraph>item3</Paragraph>
</List.Item>
</NumberedList>
<NumberedList style="upper_roman">
<List.Item>
- <Paragraph>item1</Paragraph>
+ <Paragraph>item1</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item2</Paragraph>
+ <Paragraph>item2</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item3</Paragraph>
+ <Paragraph>item3</Paragraph>
</List.Item>
</NumberedList>
<BulletedList style="CIRCLE">
<List.Item>
- <Paragraph>item1</Paragraph>
+ <Paragraph>item1</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item2</Paragraph>
+ <Paragraph>item2</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item3</Paragraph>
+ <Paragraph>item3</Paragraph>
</List.Item>
</BulletedList>
<BulletedList style="CIRCLE_OUTLINE">
<List.Item>
- <Paragraph>item1</Paragraph>
+ <Paragraph>item1</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item2</Paragraph>
+ <Paragraph>item2</Paragraph>
</List.Item>
<List.Item>
- <Paragraph>item3</Paragraph>
+ <Paragraph>item3</Paragraph>
</List.Item>
</BulletedList>
</Document>
Modified: pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/richtexteditor.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/richtexteditor.bxml?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/richtexteditor.bxml (original)
+++ pivot/trunk/demos/src/org/apache/pivot/demos/richtexteditor/richtexteditor.bxml Wed Jul 21 00:51:46 2010
@@ -34,19 +34,19 @@ limitations under the License.
<PushButton bxml:id="underlineButton" buttonData="Underline"/>
<PushButton bxml:id="strikethroughButton" buttonData="Strikethrough"/>
<Label text=" "/> <!-- spacer -->
- <Label text="Foreground"/>
- <ColorChooserButton bxml:id="foregroundColorChooserButton" selectedColor="#000000"/>
- <Label text="Background"/>
- <ColorChooserButton bxml:id="backgroundColorChooserButton" selectedColor="#ffffff"/>
+ <Label text="Foreground"/>
+ <ColorChooserButton bxml:id="foregroundColorChooserButton" selectedColor="#000000"/>
+ <Label text="Background"/>
+ <ColorChooserButton bxml:id="backgroundColorChooserButton" selectedColor="#ffffff"/>
<Label text=" "/> <!-- spacer -->
- <Label text="Font"/>
+ <Label text="Font"/>
<ListButton bxml:id="fontFamilyListButton"/>
<ListButton bxml:id="fontSizeListButton"/>
<Label text=" "/> <!-- spacer -->
- <Label text="Horizontal Align"/>
- <PushButton bxml:id="alignLeftButton" buttonData="Left"/>
- <PushButton bxml:id="alignCentreButton" buttonData="Centre"/>
- <PushButton bxml:id="alignRightButton" buttonData="Right"/>
+ <Label text="Horizontal Align"/>
+ <PushButton bxml:id="alignLeftButton" buttonData="Left"/>
+ <PushButton bxml:id="alignCentreButton" buttonData="Centre"/>
+ <PushButton bxml:id="alignRightButton" buttonData="Right"/>
<Label text=" "/> <!-- spacer -->
<Checkbox bxml:id="wrapTextCheckbox" buttonData="Wrap Text" selected="false"/>
</FlowPane>
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBlockView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBlockView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBlockView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBlockView.java Wed Jul 21 00:51:46 2010
@@ -26,7 +26,7 @@ abstract class TextAreaSkinBlockView ext
public TextAreaSkinBlockView(Block block) {
super(block);
}
-
+
@Override
protected void attach() {
super.attach();
@@ -34,7 +34,7 @@ abstract class TextAreaSkinBlockView ext
Block block = (Block)getNode();
block.getBlockListeners().add(this);
}
-
+
@Override
protected void detach() {
super.detach();
@@ -42,7 +42,7 @@ abstract class TextAreaSkinBlockView ext
Block block = (Block)getNode();
block.getBlockListeners().remove(this);
}
-
+
@Override
public void horizontalAlignmentChanged(Block block, HorizontalAlignment previousHorizontalAlignment) {
invalidate();
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBulletedListView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBulletedListView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBulletedListView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinBulletedListView.java Wed Jul 21 00:51:46 2010
@@ -40,7 +40,7 @@ class TextAreaSkinBulletedListView exten
BulletedList bulletedList = (BulletedList)getNode();
bulletedList.getBulletedListListeners().remove(this);
}
-
+
@Override
public void validate() {
if (!isValid()) {
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinDocumentView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinDocumentView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinDocumentView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinDocumentView.java Wed Jul 21 00:51:46 2010
@@ -39,7 +39,7 @@ class TextAreaSkinDocumentView extends T
super.invalidate();
textAreaSkin.invalidateComponent();
}
-
+
@Override
public void validate() {
if (!isValid()) {
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListItemView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListItemView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListItemView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListItemView.java Wed Jul 21 00:51:46 2010
@@ -25,22 +25,22 @@ class TextAreaSkinListItemView extends T
private TextNode indexTextNode;
private TextAreaSkinTextNodeView indexTextNodeView;
-
+
public TextAreaSkinListItemView(TextAreaSkin textAreaSkin, org.apache.pivot.wtk.text.List.Item listItem) {
super(textAreaSkin, listItem);
-
+
this.indexTextNode = new TextNode("");
}
-
+
@Override
protected void attach() {
super.attach();
-
+
// add an extra TextNodeView to render the index text
- indexTextNodeView = new TextAreaSkinTextNodeView(textAreaSkin, indexTextNode);
+ indexTextNodeView = new TextAreaSkinTextNodeView(textAreaSkin, indexTextNode);
insert(indexTextNodeView, 0);
}
-
+
public void setIndexText(String indexText) {
indexTextNode.setText(indexText);
indexTextNodeView.validate();
@@ -53,7 +53,7 @@ class TextAreaSkinListItemView extends T
indexTextNodeView.validate();
indexTextNodeView.setLocation(0, 0);
-
+
int breakWidth = getBreakWidth() - indexTextNodeView.getWidth();
int itemsWidth = 0;
int itemsY = 0;
@@ -61,7 +61,7 @@ class TextAreaSkinListItemView extends T
// skip the first item, it's the indexText nodeView
Iterator<TextAreaSkinNodeView> iterator = this.iterator();
iterator.next();
-
+
for ( ; iterator.hasNext(); ) {
TextAreaSkinNodeView nodeView = iterator.next();
nodeView.setBreakWidth(breakWidth);
@@ -72,7 +72,7 @@ class TextAreaSkinListItemView extends T
itemsWidth = Math.max(itemsWidth, nodeView.getWidth());
itemsY += nodeView.getHeight();
}
-
+
int width = itemsWidth + indexTextNodeView.getWidth();
int height = Math.max(itemsY, indexTextNodeView.getHeight());
@@ -81,7 +81,7 @@ class TextAreaSkinListItemView extends T
super.validate();
}
}
-
+
public int getIndexTextWidth() {
return indexTextNodeView.getWidth();
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinListView.java Wed Jul 21 00:51:46 2010
@@ -5,15 +5,15 @@ import org.apache.pivot.wtk.text.List;
class TextAreaSkinListView extends TextAreaSkinVerticalElementView {
protected int maxIndexTextWidth;
-
+
public TextAreaSkinListView(TextAreaSkin textAreaSkin, List list) {
super(textAreaSkin, list);
}
-
+
public int getMaxIndexTextWidth() {
return maxIndexTextWidth;
}
-
+
@Override
public void validate() {
if (!isValid()) {
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNodeView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNodeView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNodeView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNodeView.java Wed Jul 21 00:51:46 2010
@@ -197,7 +197,7 @@ abstract class TextAreaSkinNodeView impl
* Used by TextAreaSkinParagraphView when it breaks child nodes into multiple views.
*/
public abstract TextAreaSkinNodeView getNext();
-
+
public abstract int getInsertionPoint(int x, int y);
public abstract int getNextInsertionPoint(int x, int from, FocusTraversalDirection direction);
public abstract int getRowIndex(int offset);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNumberedListView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNumberedListView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNumberedListView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinNumberedListView.java Wed Jul 21 00:51:46 2010
@@ -32,20 +32,20 @@ class TextAreaSkinNumberedListView exten
}
}
- private static final RomanValue[] ROMAN_VALUE_TABLE = {
+ private static final RomanValue[] ROMAN_VALUE_TABLE = {
new RomanValue(1000, "M"),
- new RomanValue(900, "CM"),
- new RomanValue(500, "D"),
+ new RomanValue(900, "CM"),
+ new RomanValue(500, "D"),
new RomanValue(400, "CD"),
- new RomanValue(100, "C"),
- new RomanValue(90, "XC"),
+ new RomanValue(100, "C"),
+ new RomanValue(90, "XC"),
new RomanValue(50, "L"),
- new RomanValue(40, "XL"),
- new RomanValue(10, "X"),
+ new RomanValue(40, "XL"),
+ new RomanValue(10, "X"),
new RomanValue(9, "IX"),
- new RomanValue(5, "V"),
- new RomanValue(4, "IV"),
- new RomanValue(1, "I")
+ new RomanValue(5, "V"),
+ new RomanValue(4, "IV"),
+ new RomanValue(1, "I")
};
private static String int2roman(int n) {
@@ -65,7 +65,7 @@ class TextAreaSkinNumberedListView exten
private static String int2alpha(int n) {
return (char)('A' + n - 1) + "";
}
-
+
public TextAreaSkinNumberedListView(TextAreaSkin textAreaSkin, NumberedList numberedList) {
super(textAreaSkin, numberedList);
}
@@ -85,7 +85,7 @@ class TextAreaSkinNumberedListView exten
NumberedList numberedList = (NumberedList)getNode();
numberedList.getNumberedListListeners().remove(this);
}
-
+
@Override
public void validate() {
if (!isValid()) {
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java Wed Jul 21 00:51:46 2010
@@ -60,7 +60,7 @@ class TextAreaSkinParagraphView extends
if (!isValid()) {
// Remove and re-create the child views, because of line-breaking, a single TextNode
// may be added as many TextAreaSkinTextNodeView's.
-
+
// Break the views into multiple rows
int breakWidth = getBreakWidth();
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinSpanView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinSpanView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinSpanView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinSpanView.java Wed Jul 21 00:51:46 2010
@@ -47,7 +47,7 @@ class TextAreaSkinSpanView extends TextA
}
// TODO like TextAreaSkinTextNodeView, I need to implement line-breaking
-
+
int breakWidth = getBreakWidth();
int width = 0;
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinVerticalElementView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinVerticalElementView.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinVerticalElementView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinVerticalElementView.java Wed Jul 21 00:51:46 2010
@@ -32,7 +32,7 @@ abstract class TextAreaSkinVerticalEleme
super(element);
this.textAreaSkin = textAreaSkin;
}
-
+
@Override
protected void attach() {
super.attach();
@@ -86,7 +86,7 @@ abstract class TextAreaSkinVerticalEleme
public TextAreaSkinNodeView getNext() {
return null;
}
-
+
@Override
public int getInsertionPoint(int x, int y) {
int offset = -1;
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/text/BulletedList.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/text/BulletedList.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/text/BulletedList.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/text/BulletedList.java Wed Jul 21 00:51:46 2010
@@ -26,9 +26,9 @@ public class BulletedList extends List {
* List bullet styles.
*/
public enum Style {
- /** unicode character 0x2022 aka. "BULLET" */
- CIRCLE,
- /** unicode character 0x25e6 aka. "WHITE BULLET" */
+ /** unicode character 0x2022 aka. "BULLET" */
+ CIRCLE,
+ /** unicode character 0x25e6 aka. "WHITE BULLET" */
CIRCLE_OUTLINE
}
@@ -78,7 +78,7 @@ public class BulletedList extends List {
setStyle(Style.valueOf(style.toUpperCase()));
}
-
+
@Override
public BulletedList duplicate(boolean recursive) {
return new BulletedList(this, recursive);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/text/NumberedList.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/text/NumberedList.java?rev=966063&r1=966062&r2=966063&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/text/NumberedList.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/text/NumberedList.java Wed Jul 21 00:51:46 2010
@@ -17,7 +17,6 @@
package org.apache.pivot.wtk.text;
import org.apache.pivot.util.ListenerList;
-import org.apache.pivot.wtk.FileBrowserSheet.Mode;
/**
* Element representing a numbered list.
@@ -80,7 +79,7 @@ public class NumberedList extends List {
setStyle(Style.valueOf(style.toUpperCase()));
}
-
+
@Override
public NumberedList duplicate(boolean recursive) {
return new NumberedList(this, recursive);