Author: sergeyhalipov
Date: 2007-06-08 10:12:06 -0400 (Fri, 08 Jun 2007)
New Revision: 1098
Modified:
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java
trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java
Log:
http://jira.jboss.com/jira/browse/RF-260
Modified:
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
---
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -31,8 +31,13 @@
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
- String tmp = (String) skin.getParameter(context, "generalTextColor");
- int intValue = HtmlColor.decode( tmp ==null? "#000000":tmp ).getRGB();
+ String skinParameter = "generalTextColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
return new Integer(intValue);
}
Modified:
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java
===================================================================
---
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -31,7 +31,12 @@
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
- String tmp = (String) skin.getParameter(context, "tipBorderColor");
+ String skinParameter = "tipBorderColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
int intValue = HtmlColor.decode( tmp ==null? "#000000":tmp ).getRGB();
return new Integer(intValue);
}
Modified:
trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java
===================================================================
---
trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -42,7 +42,13 @@
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
- String tmp = (String) skin.getParameter(context, "headerTextColor");
+ String skinParameter = "headerTextColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+
int intValue = HtmlColor.decode( tmp ==null? "#000000":tmp ).getRGB();
return new Integer(intValue);
}
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
===================================================================
---
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -37,17 +37,28 @@
MenuNodeImageData mnd = new MenuNodeImageData();
Skin skin = SkinFactory.getInstance().getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
String tmp;
int intValue;
- tmp = (String) skin.getParameter(context,"generalTextColor");
- if (tmp == null) tmp = "#4A75B5";
+ String skinParameter = "generalTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp == null || "".equals(tmp))
+ tmp = "#4A75B5";
intValue = HtmlColor.decode(tmp).getRGB();
mnd.setGeneralColor(new Integer(intValue));
- tmp = (String) skin.getParameter(context,"tabDisabledTextColor");
- if (tmp == null) tmp = "#6A92CF";
+ skinParameter = "tabDisabledTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp == null || "".equals(tmp))
+ tmp = "#6A92CF";
intValue = HtmlColor.decode(tmp).getRGB();
mnd.setDisabledColor(new Integer(intValue));
Modified:
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
===================================================================
---
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -132,10 +132,20 @@
tmp = (String) skin.getParameter(context, "interfaceLevel3D");
separatorData.setLevel3D(HtmlDimensions.decode(tmp == null ? "5" :
tmp).intValue());
- tmp = (String) skin.getParameter(context, "headerBackgroundColor");
+ String skinParameter = "headerBackgroundColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
separatorData.setBgColor(HtmlColor.decode(tmp == null ? "#4169E1" :
tmp).getRGB());
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
- tmp = (String) skin.getParameter(context, "overAllBackground");
+ skinParameter = "overAllBackground";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setGradColor(HtmlColor.decode(tmp == null ? "#FFFFFF" :
tmp).getRGB());
return separatorData;
Modified:
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
===================================================================
---
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -108,7 +108,12 @@
String tmp = (String) ((UIComponent)
data).getAttributes().get("height");
separatorData.setHeight(HtmlDimensions.decode(tmp == null ? "6" :
tmp).intValue());
- tmp = (String) skin.getParameter(context, "headerBackgroundColor");
+ String skinParameter = "headerBackgroundColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setColor(HtmlColor.decode(tmp == null ? "#4169E1" :
tmp).getRGB());
//XXX by nick - fantonov - ((UISeparator)data).getLineType() ?
Modified:
trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java
===================================================================
---
trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -50,17 +50,34 @@
protected Object getDataToStore(FacesContext context, Object data) {
SeparatorData separatorData = new SeparatorData();
Skin skin = SkinFactory.getInstance().getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
- String tmp = (String) skin.getParameter(context, "headerBackgroundColor");
+ String skinParameter = "headerBackgroundColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setHeaderBackgroundColor(HtmlColor.decode( tmp == null ?
"#224986" : tmp ).getRGB());
- tmp = (String) skin.getParameter(context, "headerGradientColor");
+ skinParameter = "headerGradientColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setHeaderGradientColor(HtmlColor.decode( tmp == null ?
"#CCCCFF" : tmp).getRGB());
- tmp = (String) skin.getParameter(context, "headerTextColor");
+ skinParameter = "headerTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setHeaderTextColor(HtmlColor.decode( tmp == null ? "#000000" :
tmp ).getRGB());
- tmp = (String) skin.getParameter(context, "headerSizeFont");
+ skinParameter = "headerSizeFont";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setFontSize(HtmlDimensions.decode( tmp == null ? "11px" : tmp
).intValue());
separatorData.setSeparatorHeight(resolveBarHeight(data));
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java
===================================================================
---
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java 2007-06-08
12:19:40 UTC (rev 1097)
+++
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java 2007-06-08
14:12:06 UTC (rev 1098)
@@ -46,23 +46,40 @@
String tmp;
int intValue;
Skin skin = SkinFactory.getInstance().getSkin(context);
- tmp = (String) skin.getParameter(context,"generalTextColor");
- if (tmp != null) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+
+ String skinParameter = "generalTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp != null && !"".equals(tmp)) {
intValue = HtmlColor.decode(tmp).getRGB();
dt.setGeneralColor(new Integer(intValue));
- } else dt.setGeneralColor(null);
+ } else
+ dt.setGeneralColor(null);
- tmp = (String) skin.getParameter(context,"controlBackgroundColor");
- if (tmp != null) {
+ skinParameter = "controlBackgroundColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp != null && !"".equals(tmp)) {
intValue = HtmlColor.decode(tmp).getRGB();
dt.setControlColor(new Integer(intValue));
- } else dt.setControlColor(null);
+ } else
+ dt.setControlColor(null);
- tmp = (String) skin.getParameter(context,"trimColor");
- if (tmp != null) {
+ skinParameter = "trimColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp != null && !"".equals(tmp)) {
intValue = HtmlColor.decode(tmp).getRGB();
dt.setTrimColor(new Integer(intValue));
- } else dt.setTrimColor(null);
+ } else
+ dt.setTrimColor(null);
return dt;
}