2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com
.intellij
.ui
;
25 public class TitledSeparator
extends JPanel
{
26 private final JLabel myLabel
= new JLabel();
28 public TitledSeparator() {
29 setLayout(new GridBagLayout());
30 add(myLabel
, new GridBagConstraints(0,0,1,0,0,0,GridBagConstraints
.WEST
, GridBagConstraints
.NONE
, new Insets(0,5,0,5), 0,0));
31 JSeparator separator
= new JSeparator(SwingConstants
.HORIZONTAL
);
32 add(separator
, new GridBagConstraints(1,0,GridBagConstraints
.REMAINDER
,0,1,0,GridBagConstraints
.CENTER
, GridBagConstraints
.HORIZONTAL
, new Insets(0,0,0,5), 0,0));
35 public TitledSeparator(String text
) {
40 public String
getText() {
41 return myLabel
.getText();
43 public void setText(String text
) {
44 myLabel
.setText(text
);
47 public void setTitleFont(Font font
) {
48 myLabel
.setFont(font
);