Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  window.js   Sprache: JAVA

 
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */


"use strict";

// Make this available to both AMD and CJS environments
define(function (require, exports, module) {
  // ReactJS
  const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
  const {
    span,
  } = require("resource://devtools/client/shared/vendor/react-dom-factories.js");

  // Reps
  const {
    getGripType,
    getURLDisplayString,
    wrapRender,
  } = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");

  const {
    MODE,
  } = require("resource://devtools/client/shared/components/reps/reps/constants.js");

  /**
   * Renders a grip representing a window.
   */


  WindowRep.propTypes = {
    mode: PropTypes.oneOf(Object.values(MODE)),
    object: PropTypes.object.isRequired,
    shouldRenderTooltip: PropTypes.bool,
  };

  function WindowRep(props) {
    const { mode, object } = props;

    if (mode === MODE.TINY) {
      const tinyTitle = getTitle(object);
      const title = getTitle(object, true);
      const location = getLocation(object);
      const config = getElementConfig({ ...props, title, location });

      return span(
        config,
        span({ className: tinyTitle.className }, tinyTitle.content)
      );
    }

    const title = getTitle(object, true);
    const location = getLocation(object);
    const config = getElementConfig({ ...props, title, location });

    return span(
      config,
      span({ className: title.className }, title.content),
      span({ className: "location" }, location)
    );
  }

  function getElementConfig(opts) {
    const { object, shouldRenderTooltip, title, location } = opts;
    let tooltip;

    if (location) {
      tooltip = `${title.content}${location}`;
    } else {
      tooltip = `${title.content}`;
    }

    return {
      "data-link-actor-id": object.actor,
      className: "objectBox objectBox-Window",
      title: shouldRenderTooltip ? tooltip : null,
    };
  }

  function getTitle(object, trailingSpace) {
    let title = object.displayClass || object.class || "Window";
    if (trailingSpace === true) {
      title = `${title} `;
    }
    return {
      className: "objectTitle",
      content: title,
    };
  }

  function getLocation(object) {
    return getURLDisplayString(object.preview.url);
  }

  // Registration
  function supportsObject(object, noGrip = false) {
    return object?.preview && getGripType(object, noGrip) == "Window";
  }

  // Exports from this module
  module.exports = {
    rep: wrapRender(WindowRep),
    supportsObject,
  };
});

Messung V0.5
C=92 H=94 G=92

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge