Examples of Measure


Examples of jmt.engine.dataAnalysis.Measure

   */
  private void updateResponseTime(JobInfo JobInfo) {
    int c = JobInfo.getJob().getJobClass().getId();
    double ArriveTime = JobInfo.getTime();
    if (responseTimePerClass != null) {
      Measure m = responseTimePerClass[c];
      if (m != null) {
        m.update(NetSystem.getTime() - ArriveTime, 1.0);
      }
    }
    if (responseTime != null) {
      responseTime.update(NetSystem.getTime() - ArriveTime, 1.0);
    }
View Full Code Here

Examples of oracle.AWXML.Measure

    // Create an aggregation map for the Cube.
    this.precomputeNA(unitsCube, "AGGMAP_UC");

    // Create a Measure for the quantities of units sold.
    Measure units = unitsCube.createMeasure();

    units.setName("UNITS_AW");
    units.setShortName("UNITS_AW");
    units.setLongName("UNITS_AW measure");
    units.setDataType("NUMBER");

    // Add the Measure to the _measures Vector.
    _measures.add(units);
    // Add the column of the Global schema relational table to the
    // _measCols Vector.
    _measCols.add("GLOBAL.UNITS_HISTORY_FACT.UNITS");

    // Create a Measure for the monetary amount of units sold.
    Measure sales = unitsCube.createMeasure();

    sales.setName("SALES_AW");
    sales.setShortName("SALES_AW");
    sales.setLongName("SALES_AW measure");
    sales.setDataType("NUMBER");
    _measures.add(sales);
    _measCols.add("GLOBAL.UNITS_HISTORY_FACT.SALES");

    // Add the detail levels for the dimensions to the _levels Vector and
    // the relational columns for the levels to the _cols Vector.
    _levels.add(monthLevel);
    _cols.add("GLOBAL.UNITS_HISTORY_FACT.MONTH_ID");
    _levels.add(shipToLevel);
    _cols.add("GLOBAL.UNITS_HISTORY_FACT.SHIP_TO_ID");
    _levels.add(itemLevel);
    _cols.add("GLOBAL.UNITS_HISTORY_FACT.ITEM_ID");
    _levels.add(channelLevel);
    _cols.add("GLOBAL.UNITS_HISTORY_FACT.CHANNEL_ID");

    // Map the columns of the relational tables to the dimensions and measures
    // of the analytic workspace Cube.
    this.createCubeMap(unitsCube, _levels, _cols, _measures, _measCols);

   
    // Create the PRICE_COST_CUBE_AW Cube and the measures to associate with it.
    this.clearCubeMapVectors();

    Cube priceCostCube = globalAW.createCube();
    priceCostCube.setName("PRICE_COST_CUBE_AW");

    _dimList.add(productDim);
    _dimList.add(timeDim);

    this.associateCubeDimensions(priceCostCube, _dimList);
    this.precomputeNA(priceCostCube, "AGGMAP_PCC");

    // Create a Measure for unit prices.
    Measure price = priceCostCube.createMeasure();

    price.setName("UNIT_PRICE_AW");
    price.setShortName("UNIT_PRICE_AW");
    price.setLongName("UNIT_PRICE_AW measure");
    price.setDataType("NUMBER");
    _measures.add(price);
    _measCols.add("GLOBAL.PRICE_AND_COST_HIST_FACT.UNIT_PRICE");

    // Create a Measure for unit costs.
    Measure cost = priceCostCube.createMeasure();

    cost.setName("UNIT_COST_AW");
    price.setShortName("UNIT_COST_AW");
    cost.setLongName("UNIT_COST_AW measure");
    cost.setDataType("NUMBER");
    _measures.add(cost);
    _measCols.add("GLOBAL.PRICE_AND_COST_HIST_FACT.UNIT_COST");
   
    _levels.add(itemLevel);
    _cols.add("GLOBAL.PRICE_AND_COST_HIST_FACT.ITEM_ID");
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

      public Markup getCurrentMarkup() {
        return Markup.valueOf("test");
      }
    };

    final Measure value = ResourceManagerUtils.getThemeMeasure(FacesContext.getCurrentInstance(), c, "testValue");

    return value;
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
    ResourceManager resourceManager = ResourceManagerFactory.getResourceManager(facesContext);
    String contextPath = facesContext.getExternalContext().getRequestContextPath();
    String sheetId = sheet.getClientId(facesContext);

    Measure sheetHeight;
    if (style.getHeight() == null) {
      // FIXME: nullpointer if height not defined
      LOG.error("no height in parent container, setting to 100");
      sheetHeight = Measure.valueOf(100);
    } else {
      sheetHeight = style.getHeight();
    }
    Measure footerHeight = getFooterHeight(facesContext, sheet);
    Measure headerHeight = getHeaderHeight(facesContext, sheet);
    String selectable = sheet.getSelectable();

    Application application = facesContext.getApplication();
    SheetState state = sheet.getSheetState(facesContext);
    List<Integer> columnWidths = sheet.getWidthList();

    final List<Integer> selectedRows = getSelectedRows(sheet, state);
    final List<UIColumn> renderedColumnList = sheet.getRenderedColumns();

    writer.startElement(HtmlElements.INPUT, null);
    writer.writeIdAttribute(sheetId + WIDTHS_POSTFIX);
    writer.writeNameAttribute(sheetId + WIDTHS_POSTFIX);
    writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
    writer.writeAttribute(HtmlAttributes.VALUE, StringUtils.joinWithSurroundingSeparator(columnWidths), false);
    writer.endElement(HtmlElements.INPUT);

    writer.startElement(HtmlElements.INPUT, null);
    writer.writeIdAttribute(sheetId + SCROLL_POSTFIX);
    writer.writeNameAttribute(sheetId + SCROLL_POSTFIX);
    writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
    Integer[] scrollPosition = sheet.getScrollPosition();
    if (scrollPosition != null) {
      String scroll = scrollPosition[0] + ";" + scrollPosition[1];
      writer.writeAttribute(HtmlAttributes.VALUE, scroll, false);
    } else {
      writer.writeAttribute(HtmlAttributes.VALUE, "", false);
    }
    writer.endElement(HtmlElements.INPUT);

    if (!UISheet.NONE.equals(selectable)) {
      writer.startElement(HtmlElements.INPUT, null);
      writer.writeIdAttribute(sheetId + SELECTED_POSTFIX);
      writer.writeNameAttribute(sheetId + SELECTED_POSTFIX);
      writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
      writer.writeAttribute(
          HtmlAttributes.VALUE, StringUtils.joinWithSurroundingSeparator(selectedRows), true);
      writer.endElement(HtmlElements.INPUT);
    }

    final boolean showHeader = sheet.isShowHeader();
    final boolean ie6SelectOneFix = showHeader
        && ClientProperties.getInstance(facesContext).getUserAgent().isMsie6()
            && ComponentUtils.findDescendant(sheet, UISelectOne.class) != null;
// BEGIN RENDER BODY CONTENT
    Style bodyStyle = new Style();
    bodyStyle.setPosition(Position.RELATIVE);
    Measure tableBodyWidth = sheet.getCurrentWidth().subtractNotNegative(getContentBorder(facesContext, sheet));
    bodyStyle.setWidth(tableBodyWidth);
    if (sheet.isPagingVisible()) {
      sheetHeight = sheetHeight.subtract(footerHeight);
    }
    if (ie6SelectOneFix) {
      bodyStyle.setTop(headerHeight);
    }
    if (showHeader) {
      sheetHeight = sheetHeight.subtract(headerHeight);
    }
    bodyStyle.setHeight(sheetHeight);

    writer.startElement(HtmlElements.DIV, null);
    writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "data_div");
    writer.writeClassAttribute(Classes.create(sheet, "body"));

    if (!showHeader || ie6SelectOneFix) {
      bodyStyle.setPaddingTop(Measure.ZERO);
    }

    writer.writeStyleAttribute(bodyStyle);
    bodyStyle.setHeight(null);
    bodyStyle.setTop(null);
    Style sheetBodyStyle = new Style(bodyStyle);
    if (sheet.getNeedVerticalScrollbar() == null) {
      LOG.warn("Value of needVerticalScrollbar undefined!"); // why this value isn't set by the layout manager?
    } else {
      if (sheet.getNeedVerticalScrollbar()) {
        tableBodyWidth = tableBodyWidth.subtractNotNegative(getVerticalScrollbarWeight(facesContext, sheet));
      }
    }
    sheetBodyStyle.setWidth(tableBodyWidth);

    writer.startElement(HtmlElements.TABLE, null);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

  }

  @Override
  public Measure getPreferredHeight(FacesContext facesContext, Configurable component) {
    final UISheet sheet = (UISheet) component;
    Measure headerHeight = getHeaderHeight(facesContext, sheet);
    Measure rowHeight = getRowHeight(facesContext, sheet);
    Measure footerHeight = getFooterHeight(facesContext, sheet);
    int rows = sheet.getRows();
    if (rows == 0) {
      rows = sheet.getRowCount();
    }
    if (rows == -1) {
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

    String value = null;
    try {
      value = (String) facesContext.getExternalContext().getRequestParameterMap().get(name);
      if (StringUtils.isNotBlank(value)) {
        StringTokenizer tokenizer = new StringTokenizer(value, ";");
        Measure vertical = Measure.valueOf(tokenizer.nextToken());
        Measure horizontal = Measure.valueOf(tokenizer.nextToken());
        if (vertical.greaterThan(Measure.valueOf(30)) || vertical.lessThan(Measure.valueOf(3))
           || horizontal.greaterThan(Measure.valueOf(30)) || horizontal.lessThan(Measure.valueOf(3))) {
          LOG.error("Ignoring strange values: vertical=" + vertical + " horizontal=" + horizontal);
        } else {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
          client.setVerticalScrollbarWeight(vertical);
          client.setHorizontalScrollbarWeight(horizontal);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

    writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "content");
    Style style = new Style(facesContext, page);
    // XXX position the div, so that the scrollable area is correct.
    // XXX better to take this fact into layout management.
    // XXX is also useful in boxes, etc.
    Measure border = getBorderBottom(facesContext, page);
    style.setHeight(page.getCurrentHeight().subtract(border));
    style.setTop(border);
    writer.writeStyleAttribute(style);
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

  }

  @Override
  public Measure getWidth(FacesContext facesContext, Configurable component) {
    // width of the actual browser window
    Measure width = (Measure) FacesContext.getCurrentInstance().getExternalContext()
        .getRequestMap().get("tobago-page-clientDimension-width");
    if (width != null) {
      return width;
    } else {
      return super.getWidth(facesContext, component);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

  }

  @Override
  public Measure getHeight(FacesContext facesContext, Configurable component) {
    // height of the actual browser window
    Measure height = (Measure) FacesContext.getCurrentInstance().getExternalContext()
        .getRequestMap().get("tobago-page-clientDimension-height");
    if (height != null) {
      return height;
    } else {
      return super.getHeight(facesContext, component);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.Measure

  public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
    UIToolBar toolBar = (UIToolBar) component;

    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(context);

    Measure width = Measure.valueOf(-1);
    for (UIComponent command : (List<UIComponent>) toolBar.getChildren()) {
      if (command instanceof AbstractUICommandBase) {
        width = renderToolbarCommand(context, toolBar, (AbstractUICommandBase) command, writer, width);
      } else if (command instanceof UIToolBarSeparator) {
        width = renderSeparator(context, toolBar, (UIToolBarSeparator) command, writer, width);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.