[isidorus-cvs] r547 - branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Fri Jul 1 14:58:03 UTC 2011
Author: lgiessmann
Date: Fri Jul 1 07:58:03 2011
New Revision: 547
Log:
gdl-frontend: Widgets: implemented a method that gets the GDL background-color property;
Modified:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java Fri Jul 1 04:33:23 2011 (r546)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPsis.java Fri Jul 1 07:58:03 2011 (r547)
@@ -127,7 +127,7 @@
public final static String gdlPaddingLeft = gdl + "padding-left";
public final static String gdlClear = gdl + "clear";
public final static String gdlFloat = gdl + "float";
- public final static String gdlBackGroundColor = gdl + "background-color";
+ public final static String gdlBackgroundColor = gdl + "background-color";
public final static String gdlOverflow = gdl + "overflow";
public final static String gdlOrdered = gdl + "ordered";
public final static String gdlListstyleType = gdl + "list-style-type";
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Fri Jul 1 04:33:23 2011 (r546)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Fri Jul 1 07:58:03 2011 (r547)
@@ -1072,9 +1072,32 @@
}
+ // returns a ColorValue instance that represents the background-color of this element.
+ // If a styleClass is set, only the corresponding value of the scoped occurrence is returned
+ // null, null otherwise. If the styleClass is null and no occurrence was found, the default value for this
+ // property is returned.
+ public ColorValue getBackgroundColor(String styleClass) throws InvalidGdlSchemaException {
+ Occurrence colorOcc = null;
+ if(styleClass != null){
+ colorOcc = getNoneOrOneScopedOccurrence(GdlPsis.OccurrenceType.gdlBackgroundColor, styleClass);
+ } else {
+ colorOcc = getNoneOrOneUnscopedOccurrence(GdlPsis.OccurrenceType.gdlBackgroundColor);
+ }
+
+ if(colorOcc == null && styleClass != null){
+ return null;
+ } else if(colorOcc == null) {
+ return new ColorValue("#ffffff");
+ } else {
+ return new ColorValue(colorOcc.getValue());
+ }
+ }
- // gdlBackgroundColor [gdl:hover | gdl:focus | gdl:active]
-
// gdlOverflow [gdl:hover | gdl:focus | gdl:active]
+
+
+ public void setGdlStyle(){
+ // TODO: implement
+ }
}
More information about the Isidorus-cvs
mailing list