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 2009/03/17 19:24:47 UTC
svn commit: r755340 - in /incubator/pivot/trunk: core/src/pivot/io/
wtk/src/pivot/wtk/ wtk/src/pivot/wtk/content/ wtk/src/pivot/wtk/media/
wtk/src/pivot/wtk/skin/terra/ wtk/src/pivot/wtk/text/ wtk/src/pivot/wtkx/
Author: gbrown
Date: Tue Mar 17 18:24:47 2009
New Revision: 755340
URL: http://svn.apache.org/viewvc?rev=755340&view=rev
Log:
Don't include checkbox height in TerraListViewSkin unless checkmarks are enabled; don't fire selection change events from Spinner on model changes; minor Javadoc cleanup.
Added:
incubator/pivot/trunk/core/src/pivot/io/package.html
incubator/pivot/trunk/wtk/src/pivot/wtk/text/package.html
Modified:
incubator/pivot/trunk/wtk/src/pivot/wtk/Spinner.java
incubator/pivot/trunk/wtk/src/pivot/wtk/content/ColorItem.java
incubator/pivot/trunk/wtk/src/pivot/wtk/content/ListViewColorRenderer.java
incubator/pivot/trunk/wtk/src/pivot/wtk/media/package.html
incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraListViewSkin.java
incubator/pivot/trunk/wtk/src/pivot/wtkx/package.html
Added: incubator/pivot/trunk/core/src/pivot/io/package.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/pivot/io/package.html?rev=755340&view=auto
==============================================================================
--- incubator/pivot/trunk/core/src/pivot/io/package.html (added)
+++ incubator/pivot/trunk/core/src/pivot/io/package.html Tue Mar 17 18:24:47 2009
@@ -0,0 +1,6 @@
+<html>
+<head></head>
+<body>
+<p>Contains classes related to input/output operations.</p>
+</body>
+</html>
Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/Spinner.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/Spinner.java?rev=755340&r1=755339&r2=755340&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/Spinner.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/Spinner.java Tue Mar 17 18:24:47 2009
@@ -67,26 +67,15 @@
*/
private class ListHandler implements ListListener<Object> {
public void itemInserted(List<Object> list, int index) {
- int previousSelectedIndex = selectedIndex;
-
if (index <= selectedIndex) {
selectedIndex++;
}
// Notify listeners that items were inserted
spinnerItemListeners.itemInserted(Spinner.this, index);
-
- // If the selection was modified, notify listeners of selection
- // change
- if (previousSelectedIndex != selectedIndex) {
- spinnerSelectionListeners.selectedIndexChanged(Spinner.this,
- previousSelectedIndex);
- }
}
public void itemsRemoved(List<Object> list, int index, Sequence<Object> items) {
- int previousSelectedIndex = selectedIndex;
-
if (items == null) {
// All items were removed; clear the selection and notify
// listeners
@@ -104,12 +93,6 @@
// Notify listeners that items were removed
spinnerItemListeners.itemsRemoved(Spinner.this, index, count);
}
-
- // Notify listeners of selection change if necessary
- if (previousSelectedIndex != selectedIndex) {
- spinnerSelectionListeners.selectedIndexChanged(Spinner.this,
- previousSelectedIndex);
- }
}
public void itemUpdated(List<Object> list, int index, Object previousItem) {
@@ -119,15 +102,8 @@
public void comparatorChanged(List<Object> list,
Comparator<Object> previousComparator) {
if (list.getComparator() != null) {
- int previousSelectedIndex = selectedIndex;
-
selectedIndex = -1;
spinnerItemListeners.itemsSorted(Spinner.this);
-
- if (previousSelectedIndex != selectedIndex) {
- spinnerSelectionListeners.selectedIndexChanged(Spinner.this,
- previousSelectedIndex);
- }
}
}
}
Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/content/ColorItem.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/content/ColorItem.java?rev=755340&r1=755339&r2=755340&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/content/ColorItem.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/content/ColorItem.java Tue Mar 17 18:24:47 2009
@@ -17,6 +17,11 @@
import java.awt.Color;
+/**
+ * List item representing a color.
+ *
+ * @author gbrown
+ */
public class ColorItem {
private Color color;
private String name;
Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/content/ListViewColorRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/content/ListViewColorRenderer.java?rev=755340&r1=755339&r2=755340&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/content/ListViewColorRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/content/ListViewColorRenderer.java Tue Mar 17 18:24:47 2009
@@ -27,6 +27,11 @@
* @author gbrown
*/
public class ListViewColorRenderer extends ListViewItemRenderer {
+ /**
+ * Internal image class for rendering color swatches.
+ *
+ * @author gbrown
+ */
public static class ColorBadge extends Image {
private Color color = Color.BLACK;
public static final int SIZE = 14;
Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/media/package.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/media/package.html?rev=755340&r1=755339&r2=755340&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/media/package.html (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/media/package.html Tue Mar 17 18:24:47 2009
@@ -1,6 +1,6 @@
<html>
<head></head>
<body>
-<p>Contains classes to enable multimedia support in Pivot applications.</p>
+<p>Contains classes that provide multimedia support.</p>
</body>
</html>
Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraListViewSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraListViewSkin.java?rev=755340&r1=755339&r2=755340&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraListViewSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraListViewSkin.java Tue Mar 17 18:24:47 2009
@@ -256,8 +256,10 @@
ListView.ItemRenderer renderer = listView.getItemRenderer();
int itemHeight = renderer.getPreferredHeight(-1);
- itemHeight = Math.max(CHECKBOX.getHeight() + (checkboxPadding.top
- + checkboxPadding.bottom), itemHeight);
+ if (listView.getCheckmarksEnabled()) {
+ itemHeight = Math.max(CHECKBOX.getHeight() + (checkboxPadding.top
+ + checkboxPadding.bottom), itemHeight);
+ }
return itemHeight;
}
Added: incubator/pivot/trunk/wtk/src/pivot/wtk/text/package.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/text/package.html?rev=755340&view=auto
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/text/package.html (added)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/text/package.html Tue Mar 17 18:24:47 2009
@@ -0,0 +1,6 @@
+<html>
+<head></head>
+<body>
+<p>Contains classes representing a text object model.</p>
+</body>
+</html>
Modified: incubator/pivot/trunk/wtk/src/pivot/wtkx/package.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtkx/package.html?rev=755340&r1=755339&r2=755340&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtkx/package.html (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtkx/package.html Tue Mar 17 18:24:47 2009
@@ -1,6 +1,6 @@
<html>
<head></head>
<body>
-<p>Provides support for loading WTK components from XML.</p>
+<p>Provides support for loading WTK components and other classes from XML.</p>
</body>
</html>