Hello Everybody.

I have a question regarding Tils great Table widget: How can I customize 
the appearance of the "cell has focus style"?

There is an appearance entry called "table-data-cell" which seems to be 
intended to handle the appearance (among others) of the "cell has focus 
style" with the 3 pixel blue border. I want to disable the extra focus 
styling of the current cell.

But this appearance is never applied through setAppearance in any of the 
classes. I suspected the natural location for this in 
"qx.ui.table.DefaultDataCellRenderer". How can I change this? I tried to 
redefine the "table-data-cell" this way:

   qx.theme.appearance.DefaultAppearanceTheme._appearances = 
qx.lang.Object.carefullyMergeWith({
  "table-data-cell" :
  {
    setup : function()
    {
      this.border = new qx.renderer.border.Border;
      this.border.set({ rightColor:"#eeeeee", rightStyle 
:qx.renderer.border.Border.STYLE_SOLID, rightWidth:1,
                 bottomColor:"#eeeeee", bottomStyle 
:qx.renderer.border.Border.STYLE_SOLID, bottomWidth:1 });
      this.focusedBorder = new qx.renderer.border.Border(1, 
qx.renderer.border.Border.STYLE_SOLID, "#b3d9ff");

      this.font = new qx.renderer.font.Font(11, '"Segoe UI", Corbel, 
Calibri, Tahoma, "Lucida Sans Unicode", sans-serif');

      this.color = new qx.renderer.color.ColorObject("windowText");
      this.selectedColor = new 
qx.renderer.color.ColorObject("highlightText");
      this.selectedBgColor = new qx.renderer.color.ColorObject("highlight");
      this.evenBackground = new qx.renderer.color.ColorObject("green");
      this.oddBackground = new qx.renderer.color.ColorObject("blue");
      this.focusedBackground = new qx.renderer.color.ColorObject("red");
      this.focusedSelectedBackground = new 
qx.renderer.color.ColorObject("#5a8ad3");
    },

    initial : function(vWidget, vTheme)
    {
      var properties = {
        cursor : qx.constant.Core.DEFAULT,
        border : this.border,
        paddingLeft : 2,
        paddingRight : 2,
        selectable: false
      }
      if (vWidget.setFont) {
        properties.font = this.font;
      }
      return properties;
    },

    state : function(vWidget, vTheme, vStates)
    {
      var ret = {
        color : vStates.selected ? this.selectedColor : this.color
      }

      if (vStates.focusedRow) {
        ret.backgroundColor = vStates.selected ? 
this.focusedSelectedBackground : this.focusedBackground;
      } else {
        ret.backgroundColor = (vStates.selected ? this.selectedBgColor : 
(vStates.even ? this.evenBackground : this.oddBackground));
      }

      return ret;
    }
  }});




What is the "right" way doing this ?

Thank you for your help.

Best regards.

-- 
Mit freundlichen Grüßen
Dietrich Streifert
Visionet GmbH


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to