View Javadoc

1   package org.devaki.nextobjects.ui.components;
2   /*
3   
4   nextobjects Copyright (C) 2001-2005 Emmanuel Florent
5   
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by the
8   Free Software Foundation; either version 2 of the License, or (at your
9   option) any later version.
10  
11  This program is distributed in the hope that it will
12  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13  of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the GNU General Public License for more details.
15  
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc., 59
18  Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  
20  */
21  import javax.swing.JSplitPane;
22  /***
23   * This class overwrite of the 'JSplitPane' component
24    * @author     <a href="mailto:eflorent@devaki.org">Emmanuel Florent</a>
25   */
26  public class CustomSplitPane extends JSplitPane
27  {
28      /***
29       * Create a 'CustomSplitPane' object
30       * @param orientation Orientation of the splitter
31       * @param dividerLocation Location between the splitter and the border
32       */
33      public CustomSplitPane(final int orientation, final int dividerLocation)
34      {
35          super(orientation, true);
36          // Specify the location between the splitter and the border
37          this.setDividerLocation(dividerLocation);
38          // Define that the split Panel can be expanded by clicking on the arrows
39          this.setOneTouchExpandable(true);
40      }
41  }