As no one even reacted, I send it again....

I have attached a suggested class called QxStatusBar, which has been
attached. Additionally, I have broken out the status bar in QxWindow.
This has been done to be able to manipulate the object in a regular and
logical way. I attached all changes. I let the QxCommonViewPane be the
superclass. Is that the best choice?

I hope someone likes it. Could it be committed to the cvs?

Kent

Here comes the code...

QxStatusBar.js
--------------
/* ****************************************************************************

   qooxdoo - the new era of web interface development

   Version:
     $Id: QxStatusBar.js,v 1.1.2.2 2005/11/22 23:50:35 kols Exp $

   Copyright:
     (C) 2004-2005 by Schlund + Partner AG, Germany
         All rights reserved

   License:
     LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/

   Internet:
     * http://qooxdoo.oss.schlund.de

   Authors:
     * Kent Olsson (kols)
       <kent dot olsson at chello dot se>

**************************************************************************** */

/* ****************************************************************************

#package(statusbar)

**************************************************************************** */

function QxStatusBar(statustext) {
  QxCommonViewPane.call(this);

  if (statustext.isValidString()) {
    var statusL = this._statusText = new QxLabel(statustext);

    statusL.setPadding(1, 4);
    statusL.setSelectable(false);
    statusL.setCursor(QxConst.CORE_DEFAULT);

    layout.add(statusL);
  };
};

QxStatusBar.extend(QxCommonViewPane, "QxStatusBar");



/*
------------------------------------------------------------------------------------
  STYLES & BEHAVIOR
------------------------------------------------------------------------------------
*/

proto._applyInitialStyle = function(statustext)
{
  this.setBorder(1, QxConst.BORDER_STYLE_INSET, "windowtext");
  this.setBackgroundColor("threedface");

  var layout = new QxHorizontalBoxLayout;
  this.add(layout);
};

/*
------------------------------------------------------------------------------------
  UTILITIES
------------------------------------------------------------------------------------
*/

proto.getStatusText = function() {
  return this._statusText;
};

/*
------------------------------------------------------------------------------------
  DISPOSER
------------------------------------------------------------------------------------
*/

proto.dispose = function()
{
  if (this._statusText)
  {
    this._statusText.dispose();
    this._statusText = null;
  };
};

-------------------
Changed QxWindow.js
-------------------
the section where it is created:

  // ***********************************************************************
  //   STATUSBAR
  // ***********************************************************************

  this._statusBar = new QxStatusBar("Ready");

another change...

proto._modifyStatus = function(propValue, propOldValue, propData)
{
  this._statusBar.getStatusText().setHtml(propValue);

  return true;
};

removed the following in the dispose() method...

  if (this._statusText)
  {
    this._statusText.dispose();
    this._statusText = null;
  };





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to