Package com.cedarsoft.spring.rcp.jide

Source Code of com.cedarsoft.spring.rcp.jide.JideComponentFactory

package com.cedarsoft.spring.rcp.jide;

import com.jidesoft.action.CommandBar;
import com.jidesoft.swing.JideTabbedPane;
import org.springframework.richclient.factory.DefaultComponentFactory;

import javax.swing.JComponent;
import javax.swing.JTabbedPane;
import javax.swing.plaf.InsetsUIResource;

/**
*
*/
public class JideComponentFactory extends DefaultComponentFactory {
  private boolean borderPainted = true;
  private boolean paintBackground = true;


  @Override
  public JTabbedPane createTabbedPane() {
    //            return super.createTabbedPane();
    JideTabbedPane tabbedPane = new JideTabbedPane();
    tabbedPane.setBoldActiveTab( true );
    tabbedPane.setShowTabArea( true );
    tabbedPane.setHideOneTab( false );
    tabbedPane.setContentBorderInsets( new InsetsUIResource( 2, 2, 2, 2 ) );

    return tabbedPane;
  }

  @Override
  public JComponent createToolBar() {
    CommandBar commandBar = new CommandBar( CommandBar.HORIZONTAL );
    commandBar.setBorderPainted( borderPainted );
    commandBar.setPaintBackground( paintBackground );
    //    commandBar.setChangingContainer( true );
    //    commandBar.setFloatable( true );
    //    commandBar.setPreferredRowCount( 1 );
    //    commandBar.setStretch( true );
    //    commandBar.setRearrangable( true );
    return commandBar;
    //    return super.createToolBar();
  }

  //  @Override
  //  public JTextArea createTextArea() {
  //    //    return super.createTextArea();
  //    return new AutoResizingTextArea( 1 );
  //  }
  //
  //  @Override
  //  public JTextArea createTextArea( int rows, int columns ) {
  //    //    return super.createTextArea( rows, columns );
  //    return new AutoResizingTextArea( rows, columns );
  //  }
}
TOP

Related Classes of com.cedarsoft.spring.rcp.jide.JideComponentFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.