Package org.pentaho.reporting.engine.classic.core.style

Examples of org.pentaho.reporting.engine.classic.core.style.StyleKey


                              final RenderNode[] finishNodes,
                              final RenderBox parentBox,
                              final StyleSheet elementStyle,
                              final ReportStateKey stateKey)
  {
    final StyleKey styleKey = ElementStyleKeys.PADDING_LEFT;
    if ((parentBox.getNodeType() & LayoutNodeTypes.MASK_BOX_INLINE) == LayoutNodeTypes.MASK_BOX_INLINE)
    {
      final StyleSheet styleSheet = bandCache.getStyleSheet(elementStyle);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      final InlineRenderBox autoParagraphBox =
View Full Code Here


    final ElementStyleSheet style = e.getStyle();
    final Iterator entries = styleExpressions.entrySet().iterator();
    while (entries.hasNext())
    {
      final Map.Entry entry = (Map.Entry) entries.next();
      final StyleKey key = (StyleKey) entry.getKey();
      final Expression ex = (Expression) entry.getValue();
      if (ex == null)
      {
        continue;
      }
      retval = true;
      ex.setRuntime(getRuntime());
      try
      {
        final Object value = evaluate(ex);
        if (value == null)
        {
          style.setStyleProperty(key, null);
        }
        else if (key.getValueType().isInstance(value))
        {
          style.setStyleProperty(key, value);
        }
        else if (value instanceof ErrorValue)
        {
          style.setStyleProperty(key, null);
        }
        else
        {
          final ValueConverter valueConverter = ConverterRegistry.getInstance().getValueConverter(key.getValueType());
          if (valueConverter != null)
          {
            // try to convert it ..
            final Object o = ConverterRegistry.toPropertyValue(String.valueOf(value), key.getValueType());
            style.setStyleProperty(key, o);
          }
          else
          {
            style.setStyleProperty(key, null);
View Full Code Here

      final Map styleExpressions = subreportFromMarker.getStyleExpressions();
      final StyleKey[] definedStyle =
          (StyleKey[]) styleExpressions.keySet().toArray(new StyleKey[styleExpressions.size()]);
      for (int i = 0; i < definedStyle.length; i++)
      {
        final StyleKey styleKey = definedStyle[i];
        report.getStyle().setStyleProperty(styleKey, subreportStyle.getStyleProperty(styleKey));
      }
      needPreProcessing = false;
    }
    else
View Full Code Here

    for (int i = 0; i < styleHandlers.size(); i++)
    {
      final StyleReadHandler handler = (StyleReadHandler) styleHandlers.get(i);
      final String keyName = handler.getName();
      final StyleKey key = StyleKey.getStyleKey(keyName);
      final DefaultStyleKeyMetaData metaData = new DefaultStyleKeyMetaData
          (key, handler.getPropertyEditor(), handler.getBundleName(), "style.",
              handler.isExpert(), handler.isPreferred(), handler.isHidden(), handler.isDeprecated());
      styles.put(key, metaData);
    }
View Full Code Here

  {

    final Map<StyleKey, Expression> map = element.getStyleExpressions();
    for (final Map.Entry<StyleKey, Expression> entry : map.entrySet())
    {
      final StyleKey styleKey = entry.getKey();
      final Expression expression = entry.getValue();

      if (expression == null)
      {
        continue;
View Full Code Here

        final Object[] oldStyleData = new Object[StyleKey.getDefinedStyleKeyCount()];
        final Object[] newStyleData = new Object[StyleKey.getDefinedStyleKeyCount()];
        for (int j = 0; j < definedPropertyNamesArray.length; j++)
        {
          final StyleKey styleKey = definedPropertyNamesArray[j];
          if (styleKey == null)
          {
            continue;
          }
          final StyleMetaData styleDescr = metaData.getStyleDescription(styleKey);
View Full Code Here

  public void updateElementStyleSheet(final ElementStyleSheet elementStyleSheet)
  {
    final StyleKey[] localKeys = this.elementStyleSheet.getDefinedPropertyNamesArray();
    for (int i = 0; i < localKeys.length; i++)
    {
      final StyleKey styleKey = localKeys[i];
      if (styleKey == null)
      {
        continue;
      }
      elementStyleSheet.setStyleProperty(styleKey, null);
    }

    for (int i = 0; i < BORDER_KEYS.length; i++)
    {
      final StyleKey styleKey = BORDER_KEYS[i];
      this.elementStyleSheet.setStyleProperty(styleKey, elementStyleSheet.getStyleProperty(styleKey));
    }

    repaint();
  }
View Full Code Here

  public void commitValues(final ElementStyleSheet styleSheet)
  {
    for (int i = 0; i < BORDER_KEYS.length; i++)
    {
      final StyleKey styleKey = BORDER_KEYS[i];
      styleSheet.setStyleProperty(styleKey, elementStyleSheet.getStyleProperty(styleKey));
    }
  }
View Full Code Here

    if (parent != null)
    {
      final StyleKey[] definedPropertyNamesArray = parent.getDefinedPropertyNamesArray();
      for (int i = 0; i < definedPropertyNamesArray.length; i++)
      {
        final StyleKey styleKey = definedPropertyNamesArray[i];
        if (styleKey == null)
        {
          continue;
        }
        setStyleProperty(styleKey, parent.getStyleProperty(styleKey));
      }
      final StyleKey[] propertyKeys = parent.getPropertyKeys();
      for (int i = 0; i < propertyKeys.length; i++)
      {
        final StyleKey propertyKey = propertyKeys[i];
        parentValues.put(propertyKey, parent.getStyleProperty(propertyKey));
      }
    }

    editedKeys.clear();
View Full Code Here

    removedKeys.clear();

    final StyleKey[] propertyKeys = getPropertyKeys();
    for (int i = 0; i < propertyKeys.length; i++)
    {
      final StyleKey propertyKey = propertyKeys[i];
      parentValues.put(propertyKey, getStyleProperty(propertyKey));
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.style.StyleKey

Copyright © 2018 www.massapicom. 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.