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

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


   * @param name the parameter name.
   * @return The value.
   */
  public Object getParameter(final String name)
  {
    final StyleKey key = keyfactory.getStyleKey(name);
    if (key == null)
    {
      throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
    }
    return styleSheet.getStyleProperty(key);
View Full Code Here


   * @param name the definition name.
   * @return The parameter class or null, if the parameter is not defined.
   */
  public Class getParameterDefinition(final String name)
  {
    final StyleKey key = keyfactory.getStyleKey(name);
    if (key == null)
    {
      throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
    }
    return key.getValueType();
  }
View Full Code Here

   * @param name  the parameter name.
   * @param value the parameter value.
   */
  public void setParameter(final String name, final Object value)
  {
    final StyleKey key = keyfactory.getStyleKey(name);
    if (key == null)
    {
      throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
    }
    styleSheet.setStyleProperty(key, value);
View Full Code Here

    // now write all defined properties of the stylesheet ...
    // this will not write ihnerited values, only the ones defined in this instance.
    final Iterator keys = elementStyleSheet.getDefinedPropertyNames();
    while (keys.hasNext())
    {
      final StyleKey key = (StyleKey) keys.next();
      if (key.isTransient() == false)
      {
        final Object value = elementStyleSheet.getStyleProperty(key);
        if (value != null)
        {
          writeKeyValue(key, value);
View Full Code Here

    }
    catch (ObjectFactoryException e)
    {
      throw new ReportWriterException("Unable to fill the parameters for key: " + key.getName(), e);
    }
    final StyleKey keyFromFactory = getReportWriter().getStyleKeyFactoryCollector()
        .getStyleKey(key.getName());
    if (keyFromFactory == null)
    {
      throw new ReportWriterException
          ("The stylekey " + key.getName() +
View Full Code Here

    it = factories.iterator();

    while (it.hasNext())
    {
      final String keyName = (String) it.next();
      final StyleKey key = cf.getStyleKey(keyName);
      rows.add(new StylekeyDescriptionRow(cf, key));
    }
  }
View Full Code Here

      final ElementStyleSheet styleSheet = report.getStyle();
      final StyleKey[] styleKeys = styleSheet.getPropertyKeys();
      for (int i = 0; i < styleKeys.length; i++)
      {
        final StyleKey styleKey = styleKeys[i];
        if (styleKey != null)
        {
          getStyle().setStyleProperty(styleKey, styleSheet.getStyleProperty(styleKey));
        }
      }
View Full Code Here

    final StyleReadHandler[] data = group.getMetaData();
    for (int i = 0; i < data.length; i++)
    {
      final StyleReadHandler handler = data[i];
      final String keyName = handler.getName();
      final StyleKey key = StyleKey.getStyleKey(keyName);
      if (key == null)
      {
        throw new ParseException("There is no such key '" + keyName + "' defined.");
      }
      final String bundle;
View Full Code Here

  {
    final Object[] objects = defaultStyleSheet.toArray();
    final StyleKey[] keys = StyleKey.getDefinedStyleKeys();
    for (int i = 0; i < keys.length; i++)
    {
      final StyleKey key = keys[i];
      if (key.isInheritable())
      {
        objects[i] = parentStyleSheet.getStyleProperty(key, null);
      }
    }
    return objects;
View Full Code Here

    final ElementStyleSheet sourceStyle = element.getStyle();
    for (int i = 0; i < definedStyleKeys.length; i++)
    {
      // copy all, even the inherited styles, as we do not add the element/band to the real parent. All we do
      // is virtual ..
      final StyleKey key = definedStyleKeys[i];
      targetStyle.setStyleProperty(key, sourceStyle.getStyleProperty(key));
    }

    final String[] attrNs = element.getAttributeNamespaces();
    for (int i = 0; i < attrNs.length; i++)
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.