Mre improvements to the Progress Bar UI

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2558 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Jiger Patel
2004-03-02 13:17:04 +00:00
parent 0204977b9d
commit 637c381ead
2 changed files with 22 additions and 5 deletions

View File

@ -50,8 +50,8 @@ plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.browser-menu=pmd-check-file pmd-
#pmd properties
pmd.renderer=None
pmd.showprogress=true
pmd.progressbar.foreground=#FFC800
pmd.progressbar.background=#FFFFFF
pmd.progressbar.foreground=#000000
pmd.progressbar.background=#FFC800

View File

@ -55,6 +55,8 @@ import errorlist.ErrorList;
import errorlist.ErrorSource;
import javax.swing.JDialog;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;
import javax.swing.plaf.basic.BasicProgressBarUI;
public class PMDJEditPlugin extends EBPlugin {
@ -607,9 +609,24 @@ public class PMDJEditPlugin extends EBPlugin {
this.view = view;
setLayout(new BorderLayout());
pBar = new JProgressBar(min,max);
pBar.setBorder(new EmptyBorder(pBar.getInsets()));
pBar.setForeground(jEdit.getColorProperty("pmd.progressbar.foreground"));
pBar.setBackground(jEdit.getColorProperty("pmd.progressbar.background"));
pBar.setUI(new BasicProgressBarUI()
{
public Color getSelectionBackground()
{
return jEdit.getColorProperty("pmd.progressbar.foreground");
}
public Color getSelectionForeground()
{
return jEdit.getColorProperty("pmd.progressbar.foreground");
}
});
//pBar.addNotify();
pBar.setBorder(new EtchedBorder(EtchedBorder.RAISED));
pBar.setToolTipText("PMD Check in Progress");
pBar.setForeground(jEdit.getColorProperty("pmd.progressbar.background")); //Color of the ProgressBar flow
pBar.setBackground(jEdit.getColorProperty("view.status.background")); //Color of the ProgressBar Background
pBar.setStringPainted(true);
add(pBar, BorderLayout.CENTER);
view.getStatus().add(pBar, BorderLayout.EAST);