001    package com.sptci.rwt.webui.style;
002    
003    import nextapp.echo2.app.Button;
004    import nextapp.echo2.app.Label;
005    import nextapp.echo2.app.SplitPane;
006    import nextapp.echo2.app.text.TextComponent;
007    
008    import com.sptci.echo2.style.button.No;
009    import com.sptci.echo2.style.button.Yes;
010    
011    import com.sptci.rwt.webui.BatchQueryExecutorView;
012    import com.sptci.rwt.webui.MainView;
013    import com.sptci.rwt.webui.QueryExecutorView;
014    
015    /**
016     * The {@link nextapp.echo2.app.StyleSheet} for the application.
017     *
018     * <p>&copy; Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
019     * @author Rakesh Vidyadharan 2007-09-30
020     * @version $Id: StyleSheet.java 4123 2008-05-25 21:49:01Z rakesh $
021     */
022    public class StyleSheet extends com.sptci.epng.style.StyleSheet
023    {
024      /** Over-ridden to add additional methods. */
025      @Override
026      protected void init()
027      {
028        super.init();
029        addSplitPaneStyles();
030      }
031    
032      /** Over-ridden to add additional styles for buttons. */
033      @Override
034      protected void addButtonStyles()
035      {
036        super.addButtonStyles();
037        addStyle( Button.class, "Accept.Button", new Yes() );
038        addStyle( Button.class, "Cancel.Button", new No() );
039      }
040    
041      /** Over-ridden to add application specific styles. */
042      @Override
043      protected void addLabelStyles()
044      {
045        super.addLabelStyles();
046        addStyle( Label.class, "Title.Label", new GridTitleLabel() );
047        addStyle( Label.class, "Save.Label", new SaveLabel() );
048      }
049    
050      /**
051       * Add styles for the split panes used to layout the application content pane.
052       */
053      protected void addSplitPaneStyles()
054      {
055        addStyle( SplitPane.class, MainView.class.getName() + ".mainSplitPane",
056            new MainSplitPane() );
057        addStyle( SplitPane.class, MainView.class.getName() + ".displayArea",
058            new DisplayArea() );
059        
060        addStyle( SplitPane.class,
061            BatchQueryExecutorView.class.getName() + ".splitPane",
062            new BatchQueryExecutorPane() );
063        addStyle( SplitPane.class,
064            QueryExecutorView.class.getName() + ".splitPane",
065            new QueryExecutorPane() );
066      }
067      
068      /** Add styles for text components specific for the application. */
069      @Override
070      protected void addTextStyles()
071      {
072        super.addTextStyles();
073        addStyle( TextComponent.class, "Query.TextComponent", new Query() );
074      }
075    }