com.ibm.mashups.enabler.runtime.skin
Interface StyleFilter


public StyleFilter

This filter interface allows for checking and filtering style changes on a runtime skin node

Since:
2.4

Method Summary
 void onChangingStyle(LayoutNode layoutNode, JSON oldStyle, JSON newStyle, FilterControl control, StyleFilterChain filterChain)
           Allows the filter to agree on style changes for the skin it is operating on.
 void onChangeStyle(LayoutNode layoutNode, JSON oldStyle, JSON newStyle, StyleFilterChain filterChain)
           allows the filter to take action on the new style attributes of the skin.
 

Method Detail

onChangingStyle

void onChangingStyle(LayoutNode layoutNode,
                     JSON oldStyle,
                     JSON newStyle,
                     FilterControl control,
                     StyleFilterChain filterChain)
Allows the filter to agree on style changes for the skin it is operating on.

Note: a filter should not make state changes on this method

Parameters:
layoutNode - LayoutNode which contains this skin. Will not be null.
oldStyle - the old style attributes of the skin and will never be null. For example:
{
  position: "absolute",
  left: "18px",
  width: "400px",
  height: "325px",
  z-index "51",
}

newStyle - updated style attributes for the skin. Will not be null. For example:
{
  position: "absolute",
  left: "18px",
  width: "400px",
  height: "325px",
  z-index "51",
}

control - object used for a filter to disagree.
filterChain - filter chain used to call the next filter in the chain

onChangeStyle

void onChangeStyle(LayoutNode layoutNode,
                   JSON oldStyle,
                   JSON newStyle,
                   StyleFilterChain filterChain)
allows the filter to take action on the new style attributes of the skin.

Parameters:
layoutNode - LayoutNode which contains this skin. Will not be null.
oldStyle - the old style attributes of the skin and will never be null. For example:
{
  position: "absolute",
  left: "18px",
  width: "400px",
  height: "325px",
  z-index "51",
}

newStyle - updated style attributes for the skin. Will not be null. For example:
{
  position: "absolute",
  left: "18px",
  width: "400px",
  height: "325px",
  z-index "51",
}

filterChain - filter chain used to call the next filter in the chain


Copyright IBM Corp. 2010 All Rights Reserved.