Skip to content

Instantly share code, notes, and snippets.

@arjunsk
Last active August 18, 2018 07:37
Show Gist options
  • Save arjunsk/11d767cb157acbe72b5da94c11688798 to your computer and use it in GitHub Desktop.
Save arjunsk/11d767cb157acbe72b5da94c11688798 to your computer and use it in GitHub Desktop.
package solver;
import decorators.BasicWindow;
import decorators.HorizontalScrollDecorator;
import decorators.IWindow;
import decorators.VerticalScrollDecorator;
public class DecoratorDriver {
public static void main(String args[]){
IWindow windows_with_horizontal_and_vertical_scroll = //Note IWindow
new VerticalScrollDecorator( // Note how the constructors are structured
new HorizontalScrollDecorator(
new BasicWindow()
)
);
System.out.println( windows_with_horizontal_and_vertical_scroll.render(" DEMO ") );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment