From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit, gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command
---
src/com/gitblit/client/HeaderPanel.java | 39 ++++++++++++++++++++++++++++++++-------
1 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/src/com/gitblit/client/HeaderPanel.java b/src/com/gitblit/client/HeaderPanel.java
index 0df2914..3cd89a7 100644
--- a/src/com/gitblit/client/HeaderPanel.java
+++ b/src/com/gitblit/client/HeaderPanel.java
@@ -17,13 +17,16 @@
import java.awt.BasicStroke;
import java.awt.Color;
-import java.awt.FlowLayout;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
+import java.awt.GridLayout;
+import java.awt.Insets;
import java.awt.Paint;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
@@ -35,20 +38,42 @@
private static final long serialVersionUID = 1L;
+ private final Insets insets = new Insets(5, 5, 5, 5);
+
private Color lightColor = new Color(0, 0, 0x60);
+ private JLabel headerLabel;
+
+ private JLabel refreshLabel;
+
public HeaderPanel(String text, String icon) {
- super(new FlowLayout(FlowLayout.LEFT), true);
+ // super(new FlowLayout(FlowLayout.LEFT), true);
+ super(new GridLayout(1, 2, 5, 5), true);
setOpaque(true);
setBackground(new Color(0, 0, 0x20));
- JLabel label = new JLabel(text);
+ headerLabel = new JLabel(text);
if (!StringUtils.isEmpty(icon)) {
- label.setIcon(new ImageIcon(getClass().getResource("/" + icon)));
+ headerLabel.setIcon(new ImageIcon(getClass().getResource("/" + icon)));
}
- label.setForeground(Color.white);
- label.setFont(label.getFont().deriveFont(14f));
- add(label);
+ headerLabel.setForeground(Color.white);
+ headerLabel.setFont(headerLabel.getFont().deriveFont(14f));
+ add(headerLabel);
+
+ refreshLabel = new JLabel("", JLabel.RIGHT);
+ refreshLabel.setForeground(Color.white);
+ add(refreshLabel);
+ }
+
+ public void setText(String text) {
+ headerLabel.setText(text);
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ refreshLabel.setText("refreshed " + df.format(new Date()));
+ }
+
+ @Override
+ public Insets getInsets() {
+ return insets;
}
@Override
--
Gitblit v1.9.1