"Sample Formatted error", "Sample System Error" });
// Style
- String currentStyle = ((Component) objectToConfigure).getStyle();
+ String currentStyle = ((Component) objectToConfigure).getStyleName();
if (currentStyle == null)
set.replaceWithSelect("style", new Object[] { null },
new Object[] { "Default" }).setNewItemsAllowed(true);
*/
public abstract String getTag();
+ /**
+ * Gets style for component. Multiple styles are joined with spaces.
+ *
+ * @return the component's styleValue of property style.
+ * @deprecated Use getStyleName() instead; renamed for consistency and to
+ * indicate that "style" should not be used to switch client
+ * side implementation, only to style the component.
+ */
+ public String getStyle() {
+ return getStyleName();
+ }
+
+ /**
+ * Sets and replaces all previous style names of the component. This method
+ * will trigger a
+ * {@link com.itmill.toolkit.terminal.Paintable.RepaintRequestEvent RepaintRequestEvent}.
+ *
+ * @param style
+ * the new style of the component.
+ * @deprecated Use setStyleName() instead; renamed for consistency and to
+ * indicate that "style" should not be used to switch client
+ * side implementation, only to style the component.
+ */
+ public void setStyle(String style) {
+ setStyleName(style);
+ }
+
/*
* Gets the component's style. Don't add a JavaDoc comment here, we use the
* default documentation from implemented interface.
*/
- public String getStyle() {
+ public String getStyleName() {
String s = "";
if (styles != null) {
for (Iterator it = styles.iterator(); it.hasNext();) {
* Sets the component's style. Don't add a JavaDoc comment here, we use the
* default documentation from implemented interface.
*/
- public void setStyle(String style) {
+ public void setStyleName(String style) {
if (style == null || "".equals(style)) {
styles = null;
requestRepaint();
*
* @return the component's styleValue of property style.
*/
- public String getStyle();
+ public String getStyleName();
/**
* Sets and replaces all previous style names of the component. This method
* @param style
* the new style of the component.
*/
- public void setStyle(String style);
-
+ public void setStyleName(String style);
+
/**
- * Adds style name to component. Handeling additional style names is
- * terminal spesicif, but in web browser enviroment they will most likely
- * become CSS classes as given on server side.
+ * Adds style name to component. Handling additional style names is terminal
+ * specific, but in web browser environment they will most likely become CSS
+ * classes as given on server side.
*
* This method will trigger a
* {@link com.itmill.toolkit.terminal.Paintable.RepaintRequestEvent RepaintRequestEvent}.
*
* @see com.itmill.toolkit.ui.Component#getStyle()
*/
- public String getStyle() {
+ public String getStyleName() {
return null;
}
}
/**
- * Custom component is allways enabled by default.
+ * Custom component is always enabled by default.
*
* @see com.itmill.toolkit.ui.Component#isEnabled()
*/
}
/**
- * Sets the look-and-feel style of the component.
+ * Custom component does not implement custom styles by default.
*
* @see com.itmill.toolkit.ui.Component#setStyle(java.lang.String)
*/
- public void setStyle(String style) {
+ public void setStyleName(String style) {
}
/**
}
/* Dependency -framework is deprecated */
- public void dependsOn(VariableOwner depended) {}
- public void removeDirectDependency(VariableOwner depended) {}
+ public void dependsOn(VariableOwner depended) {
+ }
+
+ public void removeDirectDependency(VariableOwner depended) {
+ }
+
public Set getDirectDependencies() {
return null;
}
-
/* Event functions are not implemented by default -------------------- */
/**