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/01 22:02:22 UTC
svn commit: r959762 - in /pivot/trunk:
tutorials/src/org/apache/pivot/tutorials/explorer/tools/
tutorials/src/org/apache/pivot/tutorials/layout/
tutorials/src/org/apache/pivot/tutorials/webqueries/
wtk-terra/src/org/apache/pivot/wtk/skin/terra/ wtk/src...
Author: gbrown
Date: Thu Jul 1 20:02:21 2010
New Revision: 959762
URL: http://svn.apache.org/viewvc?rev=959762&view=rev
Log:
Style cleanup.
Added:
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/command_button_styles.json
- copied unchanged from r959631, pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/command_button.json
pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentStyleListener.java
Removed:
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/command_button.json
Modified:
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentStyleInspectorSkin.java
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_cell.bxml
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.bxml
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.bxml
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/expense_sheet.bxml
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.bxml
pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentListener.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentStyleInspectorSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentStyleInspectorSkin.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentStyleInspectorSkin.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentStyleInspectorSkin.java Thu Jul 1 20:02:21 2010
@@ -20,11 +20,11 @@ import java.util.Comparator;
import org.apache.pivot.collections.ArrayList;
import org.apache.pivot.wtk.Component;
-import org.apache.pivot.wtk.ComponentListener;
+import org.apache.pivot.wtk.ComponentStyleListener;
import org.apache.pivot.wtk.Form;
class ComponentStyleInspectorSkin extends ComponentInspectorSkin {
- private ComponentListener componentHandler = new ComponentListener.Adapter() {
+ private ComponentStyleListener componentStyleHandler = new ComponentStyleListener.Adapter() {
@Override
public void styleUpdated(Component component, String key, Object previousValue) {
Component.StyleDictionary styles = component.getStyles();
@@ -45,11 +45,11 @@ class ComponentStyleInspectorSkin extend
clearControls();
if (previousSource != null) {
- previousSource.getComponentListeners().remove(componentHandler);
+ previousSource.getComponentStyleListeners().remove(componentStyleHandler);
}
if (source != null) {
- source.getComponentListeners().add(componentHandler);
+ source.getComponentStyleListeners().add(componentStyleHandler);
Component.StyleDictionary styles = source.getStyles();
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_cell.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_cell.bxml?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_cell.bxml (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_cell.bxml Thu Jul 1 20:02:21 2010
@@ -105,7 +105,7 @@ limitations under the License.
<TablePane.Row height="24">
<BoxPane styles="{spacing:6,horizontalAlignment:'right'}">
<PushButton buttonData="OK"
- styles="org/apache/pivot/wtk/skin/terra/command_button.json"
+ styles="/org/apache/pivot/wtk/skin/terra/command_button_styles.json"
ButtonPressListener.buttonPressed="sheet.close(true)"/>
</BoxPane>
</TablePane.Row>
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.bxml?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.bxml (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.bxml Thu Jul 1 20:02:21 2010
@@ -132,7 +132,7 @@ limitations under the License.
<TablePane.Row height="24">
<BoxPane styles="{spacing:6,horizontalAlignment:'right'}">
<PushButton bxml:id="okButton" buttonData="OK"
- styles="org/apache/pivot/wtk/skin/terra/command_button.json"
+ styles="/org/apache/pivot/wtk/skin/terra/command_button_styles.json"
ButtonPressListener.buttonPressed="sheet.close(true)"/>
</BoxPane>
</TablePane.Row>
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.bxml?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.bxml (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.bxml Thu Jul 1 20:02:21 2010
@@ -126,7 +126,7 @@ limitations under the License.
<TablePane.Row height="24">
<BoxPane styles="{spacing:6,horizontalAlignment:'right'}">
<PushButton bxml:id="okButton" buttonData="OK"
- styles="org/apache/pivot/wtk/skin/terra/command_button.json"
+ styles="/org/apache/pivot/wtk/skin/terra/command_button_styles.json"
ButtonPressListener.buttonPressed="sheet.close(true)"/>
</BoxPane>
</TablePane.Row>
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/expense_sheet.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/expense_sheet.bxml?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/expense_sheet.bxml (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/expense_sheet.bxml Thu Jul 1 20:02:21 2010
@@ -75,9 +75,9 @@ limitations under the License.
<TablePane.Row height="-1">
<BoxPane styles="{fill:true, horizontalAlignment:'right'}">
<PushButton bxml:id="cancelButton" buttonData="%cancel"
- styles="org/apache/pivot/wtk/skin/terra/command_button.json"/>
+ styles="/org/apache/pivot/wtk/skin/terra/command_button_styles.json"/>
<PushButton bxml:id="okButton" buttonData="%ok"
- styles="org/apache/pivot/wtk/skin/terra/command_button.json"/>
+ styles="/org/apache/pivot/wtk/skin/terra/command_button_styles.json"/>
</BoxPane>
</TablePane.Row>
</TablePane>
Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java Thu Jul 1 20:02:21 2010
@@ -65,7 +65,7 @@ public class TerraAlertSkin extends Terr
private static Map<String, ?> commandButtonStyles;
static {
- URL location = TerraAlertSkin.class.getResource("command_button.json");
+ URL location = TerraAlertSkin.class.getResource("command_button_styles.json");
try {
InputStream inputStream = location.openStream();
Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java Thu Jul 1 20:02:21 2010
@@ -65,7 +65,7 @@ public class TerraPromptSkin extends Ter
private static Map<String, ?> commandButtonStyles;
static {
- URL location = TerraPromptSkin.class.getResource("command_button.json");
+ URL location = TerraPromptSkin.class.getResource("command_button_styles.json");
try {
InputStream inputStream = location.openStream();
Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java Thu Jul 1 20:02:21 2010
@@ -170,7 +170,7 @@ public final class TerraTheme extends Th
if (location == null) {
load(getClass().getResource("TerraTheme_default.json"));
} else {
- load(ThreadUtilities.getClassLoader().getResource(location));
+ load(ThreadUtilities.getClassLoader().getResource(location.substring(1)));
}
}
Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.bxml?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.bxml (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/terra_file_browser_sheet_skin.bxml Thu Jul 1 20:02:21 2010
@@ -42,9 +42,9 @@ limitations under the License.
<TablePane.Row height="-1">
<BoxPane styles="{horizontalAlignment:'right', verticalAlignment:'center'}">
<PushButton bxml:id="okButton" buttonData="%ok"
- styles="@command_button.json"/>
+ styles="@command_button_styles.json"/>
<PushButton bxml:id="cancelButton" buttonData="%cancel"
- styles="@command_button.json"/>
+ styles="@command_button_styles.json"/>
</BoxPane>
</TablePane.Row>
</TablePane>
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java Thu Jul 1 20:02:21 2010
@@ -30,7 +30,6 @@ import org.apache.pivot.beans.PropertyNo
import org.apache.pivot.collections.ArrayList;
import org.apache.pivot.collections.Dictionary;
import org.apache.pivot.collections.HashMap;
-import org.apache.pivot.collections.HashSet;
import org.apache.pivot.collections.Map;
import org.apache.pivot.collections.Sequence;
import org.apache.pivot.json.JSONSerializer;
@@ -52,8 +51,7 @@ public abstract class Component implemen
/**
* Style dictionary implementation.
*/
- public final class StyleDictionary implements
- Dictionary<String, Object>, Iterable<String> {
+ public final class StyleDictionary implements Dictionary<String, Object>, Iterable<String> {
private StyleDictionary() {
}
@@ -68,8 +66,7 @@ public abstract class Component implemen
try {
previousValue = styles.put(key, value);
- customStyles.add(key);
- componentListeners.styleUpdated(Component.this, key, previousValue);
+ componentStyleListeners.styleUpdated(Component.this, key, previousValue);
} catch(PropertyNotFoundException exception) {
System.err.println("\"" + key + "\" is not a valid style for "
+ Component.this);
@@ -80,8 +77,7 @@ public abstract class Component implemen
@Override
public Object remove(String key) {
- customStyles.remove(key);
- return null;
+ throw new UnsupportedOperationException();
}
@Override
@@ -328,13 +324,6 @@ public abstract class Component implemen
}
@Override
- public void styleUpdated(Component component, String styleKey, Object previousValue) {
- for (ComponentListener listener : this) {
- listener.styleUpdated(component, styleKey, previousValue);
- }
- }
-
- @Override
public void cursorChanged(Component component, Cursor previousCursor) {
for (ComponentListener listener : this) {
listener.cursorChanged(component, previousCursor);
@@ -419,6 +408,30 @@ public abstract class Component implemen
}
}
+ private static class ComponentStyleListenerList
+ extends ListenerList<ComponentStyleListener> implements ComponentStyleListener {
+ @Override
+ public void styleUpdated(Component component, String styleKey, Object previousValue) {
+ for (ComponentStyleListener listener : this) {
+ listener.styleUpdated(component, styleKey, previousValue);
+ }
+ }
+
+ @Override
+ public void styleClassNameAdded(Component component, String styleClassName) {
+ for (ComponentStyleListener listener : this) {
+ listener.styleClassNameAdded(component, styleClassName);
+ }
+ }
+
+ @Override
+ public void styleClassNameRemoved(Component component, String styleClassName) {
+ for (ComponentStyleListener listener : this) {
+ listener.styleClassNameRemoved(component, styleClassName);
+ }
+ }
+ }
+
private static class ComponentMouseListenerList extends ListenerList<ComponentMouseListener>
implements ComponentMouseListener {
@Override
@@ -571,11 +584,6 @@ public abstract class Component implemen
// The currently installed skin, or null if no skin is installed
private Skin skin = null;
- private BeanAdapter styles = null;
- private StyleDictionary styleDictionary = new StyleDictionary();
-
- // Custom style keys
- private HashSet<String> customStyles = new HashSet<String>();
// Preferred width and height values explicitly set by the user
private int preferredWidth = -1;
@@ -635,6 +643,10 @@ public abstract class Component implemen
// The component's name
private String name = null;
+ // The component's styles and style class names
+ private BeanAdapter styles = null;
+ private StyleDictionary styleDictionary = new StyleDictionary();
+
// User data
private HashMap<String, Object> userData = new HashMap<String, Object>();
private UserDataDictionary userDataDictionary = new UserDataDictionary();
@@ -649,6 +661,7 @@ public abstract class Component implemen
private ComponentListenerList componentListeners = new ComponentListenerList();
private ComponentStateListenerList componentStateListeners = new ComponentStateListenerList();
private ComponentDecoratorListenerList componentDecoratorListeners = new ComponentDecoratorListenerList();
+ private ComponentStyleListenerList componentStyleListeners = new ComponentStyleListenerList();
private ComponentMouseListenerList componentMouseListeners = new ComponentMouseListenerList();
private ComponentMouseButtonListenerList componentMouseButtonListeners = new ComponentMouseButtonListenerList();
private ComponentMouseWheelListenerList componentMouseWheelListeners = new ComponentMouseWheelListenerList();
@@ -767,12 +780,6 @@ public abstract class Component implemen
}
if (type == componentClass) {
- // Cache the values of custom styles
- HashMap<String, Object> styles = new HashMap<String, Object>();
- for (String key : customStyles) {
- styles.put(key, styleDictionary.get(key));
- }
-
try {
setSkin(skinClass.newInstance());
} catch(InstantiationException exception) {
@@ -780,9 +787,6 @@ public abstract class Component implemen
} catch(IllegalAccessException exception) {
throw new IllegalArgumentException(exception);
}
-
- // Re-apply custom styles
- setStyles(styles);
}
}
@@ -2441,17 +2445,7 @@ public abstract class Component implemen
}
/**
- * Returns the user data dictionary.
- */
- public UserDataDictionary getUserData() {
- return userDataDictionary;
- }
-
- /**
- * Returns a dictionary instance representing the component's style
- * properties. This is effectively a pass-through to the skin's dictionary
- * implementation. It allows callers to modify the properties of the skin
- * without directly obtaining a reference to the skin.
+ * Returns the component's style dictionary.
*/
public final StyleDictionary getStyles() {
return styleDictionary;
@@ -2461,6 +2455,7 @@ public abstract class Component implemen
* Applies a set of styles.
*
* @param styles
+ * A map containing the styles to apply.
*/
public void setStyles(Map<String, ?> styles) {
if (styles == null) {
@@ -2476,10 +2471,7 @@ public abstract class Component implemen
* Applies a set of styles.
*
* @param styles
- * The location of the styles to apply. If the styles have been previously
- * applied, they will be retrieved from the resource cache in the
- * application context. Otherwise, they will be loaded from the given
- * location and added to the cache before being applied.
+ * The location of the styles to apply.
*/
@SuppressWarnings("unchecked")
public void setStyles(URL styles) throws IOException, SerializationException {
@@ -2487,44 +2479,36 @@ public abstract class Component implemen
throw new IllegalArgumentException("styles is null.");
}
- Map<String, Object> cachedStyles =
- (Map<String, Object>)ApplicationContext.getResourceCache().get(styles);
-
- if (cachedStyles == null) {
- JSONSerializer jsonSerializer = new JSONSerializer();
- cachedStyles =
- (Map<String, Object>)jsonSerializer.readObject(styles.openStream());
-
- ApplicationContext.getResourceCache().put(styles, cachedStyles);
- }
-
- setStyles(cachedStyles);
+ JSONSerializer jsonSerializer = new JSONSerializer();
+ setStyles((Map<String, ?>)jsonSerializer.readObject(styles.openStream()));
}
/**
- * Applies a set of styles encoded as a JSON string.
+ * Applies a set of styles.
*
* @param styles
+ * The styles encoded as a JSON string.
*/
- public void setStyles(String styles) {
+ public void setStyles(String styles) throws IOException, SerializationException {
if (styles == null) {
throw new IllegalArgumentException("styles is null.");
}
- try {
- if (styles.charAt(0) == '{') {
- setStyles(JSONSerializer.parseMap(styles));
- } else {
- setStyles(ThreadUtilities.getClassLoader().getResource(styles));
- }
- } catch (IOException exception) {
- throw new IllegalArgumentException(exception);
- } catch (SerializationException exception) {
- throw new IllegalArgumentException(exception);
+ if (styles.charAt(0) == '/') {
+ setStyles(ThreadUtilities.getClassLoader().getResource(styles.substring(1)));
+ } else {
+ setStyles(JSONSerializer.parseMap(styles));
}
}
/**
+ * Returns the user data dictionary.
+ */
+ public UserDataDictionary getUserData() {
+ return userDataDictionary;
+ }
+
+ /**
* Gets the specified component attribute. While attributes can be used to
* store arbitrary data, they are intended to be used by containers to store
* layout-related metadata in their child components.
@@ -2729,6 +2713,10 @@ public abstract class Component implemen
return componentDecoratorListeners;
}
+ public ListenerList<ComponentStyleListener> getComponentStyleListeners() {
+ return componentStyleListeners;
+ }
+
public ListenerList<ComponentMouseListener> getComponentMouseListeners() {
return componentMouseListeners;
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentListener.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentListener.java Thu Jul 1 20:02:21 2010
@@ -56,10 +56,6 @@ public interface ComponentListener {
}
@Override
- public void styleUpdated(Component component, String styleKey, Object previousValue) {
- }
-
- @Override
public void cursorChanged(Component component, Cursor previousCursor) {
}
@@ -149,15 +145,6 @@ public interface ComponentListener {
public void visibleChanged(Component component);
/**
- * Called when a component style has been updated.
- *
- * @param component
- * @param styleKey
- * @param previousValue
- */
- public void styleUpdated(Component component, String styleKey, Object previousValue);
-
- /**
* Called when a component's cursor has changed.
*
* @param component
Added: pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentStyleListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentStyleListener.java?rev=959762&view=auto
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentStyleListener.java (added)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ComponentStyleListener.java Thu Jul 1 20:02:21 2010
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pivot.wtk;
+
+/**
+ * Component style listener interface.
+ */
+public interface ComponentStyleListener {
+ /**
+ * Component style listener adapter.
+ */
+ public static class Adapter implements ComponentStyleListener {
+ public void styleUpdated(Component component, String styleKey, Object previousValue) {
+ }
+
+ public void styleClassNameAdded(Component component, String styleClassName) {
+ }
+
+ public void styleClassNameRemoved(Component component, String styleClassName) {
+ }
+ }
+
+ /**
+ * Called when a component style has been updated.
+ *
+ * @param component
+ * @param styleKey
+ * @param previousValue
+ */
+ public void styleUpdated(Component component, String styleKey, Object previousValue);
+
+ /**
+ * Called when a style class name has been added.
+ *
+ * @param component
+ * @param styleClassName
+ */
+ public void styleClassNameAdded(Component component, String styleClassName);
+
+ /**
+ * Called when a style class name has been removed.
+ *
+ * @param component
+ * @param styleClassName
+ */
+ public void styleClassNameRemoved(Component component, String styleClassName);
+}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java Thu Jul 1 20:02:21 2010
@@ -519,11 +519,6 @@ public class TableViewRowEditor implemen
}
@Override
- public void styleUpdated(Component component, String styleKey, Object previousValue) {
- // No-op
- }
-
- @Override
public void cursorChanged(Component component, Cursor previousCursor) {
// No-op
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java?rev=959762&r1=959761&r2=959762&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java Thu Jul 1 20:02:21 2010
@@ -204,11 +204,6 @@ public abstract class ComponentSkin impl
}
@Override
- public void styleUpdated(Component component, String styleKey, Object previousValue) {
- // No-op
- }
-
- @Override
public void cursorChanged(Component component, Cursor previousCursor) {
// No-op
}