org.jvnet.lafwidget.ant
Class IconGhostingAugmenter

java.lang.Object
  extended by org.jvnet.lafwidget.ant.IconGhostingAugmenter

public class IconGhostingAugmenter
extends java.lang.Object

Augments the button UI classes with icon ghosting painting. Is based on sample adapter from ASM distribution.

Author:
Kirill Grouchnikov

Nested Class Summary
protected  class IconGhostingAugmenter.AugmentClassAdapter
          Adapter for augmenting a single class.
 
Constructor Summary
IconGhostingAugmenter()
           
 
Method Summary
protected  void augmentClass(java.lang.String dir, java.lang.String name, java.lang.String paintIconMethodName)
          Augments a single class with additional UI behaviour.
static void main(java.lang.String[] args)
          Test method.
 void process(java.lang.String toStrip, java.io.File file, java.util.List<IconGhostingType> ids)
          Processes a single file or a directory, augmenting all relevant classes.
 void setVerbose(boolean isVerbose)
          Sets the verbosity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconGhostingAugmenter

public IconGhostingAugmenter()
Method Detail

augmentClass

protected void augmentClass(java.lang.String dir,
                            java.lang.String name,
                            java.lang.String paintIconMethodName)
Augments a single class with additional UI behaviour.

Parameters:
dir - Root directory for the library that contains the class.
name - Fully-qualified class name.
paintIconMethodName - Method name.
Throws:
AugmentException - If the augmentation process failed.

process

public void process(java.lang.String toStrip,
                    java.io.File file,
                    java.util.List<IconGhostingType> ids)
             throws AugmentException
Processes a single file or a directory, augmenting all relevant classes.

Parameters:
toStrip - The leading prefix to strip from the file names. Is used to create fully-qualified class name.
file - File resource (can point to a single file or to a directory).
ids - List of class-method pairs to augment.
Throws:
AugmentException - If the augmentation process failed.

setVerbose

public void setVerbose(boolean isVerbose)
Sets the verbosity.

Parameters:
isVerbose - New value for augmentation process verbosity.

main

public static void main(java.lang.String[] args)
                 throws AugmentException
Test method.

Parameters:
args -
Throws:
AugmentException