public Style(Style style){
  this(style.getFgColor(),style.getBgColor(),style.getFont(),style.getBgTransparency(),style.getBgImage());
  setPadding(style.padding[Component.TOP],style.padding[Component.BOTTOM],style.padding[Component.LEFT],style.padding[Component.RIGHT]);
  setMargin(style.margin[Component.TOP],style.margin[Component.BOTTOM],style.margin[Component.LEFT],style.margin[Component.RIGHT]);
  setPaddingUnit(style.paddingUnit);
  setMarginUnit(style.marginUnit);
  setBorder(style.getBorder());
  opacity=style.opacity;
  modifiedFlag=0;
  align=style.align;
  backgroundType=style.backgroundType;
  backgroundAlignment=style.backgroundAlignment;
  textDecoration=style.textDecoration;
  if (style.backgroundGradient != null) {
    backgroundGradient=new Object[style.backgroundGradient.length];
    System.arraycopy(style.backgroundGradient,0,backgroundGradient,0,backgroundGradient.length);
  }
}

public Style ( Style style ) { this ( style . getFgColor ( ) , style . getBgColor ( ) , style . getFont ( ) , style . getBgTransparency ( ) , style . getBgImage ( ) ) ; setPadding ( style . padding [ Component . TOP ] , style . padding [ Component . BOTTOM ] , style . padding [ Component . LEFT ] , style . padding [ Component . RIGHT ] ) ; setMargin ( style . margin [ Component . TOP ] , style . margin [ Component . BOTTOM ] , style . margin [ Component . LEFT ] , style . margin [ Component . RIGHT ] ) ; setPaddingUnit ( style . paddingUnit ) ; setMarginUnit ( style . marginUnit ) ; setBorder ( style . getBorder ( ) ) ; opacity = style . opacity ; modifiedFlag = 0 ; align = style . align ; backgroundType = style . backgroundType ; backgroundAlignment = style . backgroundAlignment ; textDecoration = style . textDecoration ; if ( style . backgroundGradient != null ) { backgroundGradient = new Object [ style . backgroundGradient . length ] ; System . arraycopy ( style . backgroundGradient , 0 , backgroundGradient , 0 , backgroundGradient . length ) ; } }
creates a full copy of the given style . notice that if the original style was modified manually ( by invoking setters on it ) it would not chnage when changing a theme / look and feel , however this newly created style would change in such a case .
