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.
16 package com
.intellij
.execution
.testframework
.ui
;
18 import com
.intellij
.execution
.ExecutionBundle
;
19 import com
.intellij
.openapi
.progress
.util
.ColorProgressBar
;
27 public class TestStatusLine
extends JPanel
{
28 protected final ColorProgressBar myProgressBar
= new ColorProgressBar();
29 protected final JLabel myState
= new JLabel(ExecutionBundle
.message("junit.runing.info.starting.label"));
31 public TestStatusLine() {
32 super(new GridLayout(1, 2));
34 final JPanel progressPanel
= new JPanel(new GridBagLayout());
36 progressPanel
.add(myProgressBar
, new GridBagConstraints(0, 0, 0, 0, 1, 1, GridBagConstraints
.CENTER
, GridBagConstraints
.HORIZONTAL
, new Insets(0, 0, 0, 0), 0, 0));
37 myProgressBar
.setColor(ColorProgressBar
.GREEN
);
40 public void setStatusColor(Color color
) {
41 myProgressBar
.setColor(color
);
44 public Color
getStatusColor() {
45 return myProgressBar
.getColor();
48 public void setFraction(double v
) {
49 myProgressBar
.setFraction(v
);
52 public void setText(String progressStatus_text
) {
53 myState
.setText(progressStatus_text
);