<jar jarfile="${project.deploy.dir}/${project.jar}">\r
<fileset dir="${project.build.dir}">\r
<include name="**/*" />\r
+ <exclude name="com/gitblit/client/**" />\r
</fileset>\r
<fileset dir="${project.resources.dir}">\r
<exclude name="thumbs.db" />\r
<exclude name="WEB-INF/web.xml" />\r
<exclude name="com/gitblit/tests/" />\r
<exclude name="com/gitblit/build/**" />\r
+ <exclude name="com/gitblit/client/**" />\r
<exclude name="com/gitblit/GitBlitServer*.class" />\r
<exclude name="com/gitblit/Launcher*.class" />\r
<exclude name="com/gitblit/MakeCertificate*.class" /> \r
import java.awt.Color;\r
import java.awt.Component;\r
import java.awt.Desktop;\r
+import java.awt.FlowLayout;\r
import java.awt.Insets;\r
import java.awt.event.ActionEvent;\r
import java.awt.event.ActionListener;\r
repositoryTablePanel.add(repositoryFilterPanel, BorderLayout.NORTH);\r
repositoryTablePanel.add(new JScrollPane(repositoriesTable), BorderLayout.CENTER);\r
\r
- JPanel repositoryControls = new JPanel();\r
+ JPanel repositoryControls = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 0));\r
repositoryControls.add(refreshRepositories);\r
repositoryControls.add(browseRepository);\r
repositoryControls.add(createRepository);\r
repositoryControls.add(editRepository);\r
repositoryControls.add(delRepository);\r
\r
- JPanel repositoriesPanel = new JPanel(new BorderLayout(margin, margin));\r
- repositoriesPanel.add(newHeaderLabel(Translation.get("gb.repositories")),\r
+ JPanel repositoriesPanel = new JPanel(new BorderLayout(margin, margin)) {\r
+\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ public Insets getInsets() {\r
+ return insets;\r
+ }\r
+ };\r
+ repositoriesPanel.add(new HeaderPanel(Translation.get("gb.repositories")),\r
BorderLayout.NORTH);\r
repositoriesPanel.add(repositoryTablePanel, BorderLayout.CENTER);\r
repositoriesPanel.add(repositoryControls, BorderLayout.SOUTH);\r
userTablePanel.add(userFilterPanel, BorderLayout.NORTH);\r
userTablePanel.add(new JScrollPane(usersTable), BorderLayout.CENTER);\r
\r
- JPanel userControls = new JPanel();\r
+ JPanel userControls = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 0));\r
userControls.add(refreshUsers);\r
userControls.add(createUser);\r
userControls.add(editUser);\r
userControls.add(delUser);\r
\r
- JPanel usersPanel = new JPanel(new BorderLayout(margin, margin));\r
- usersPanel.add(newHeaderLabel(Translation.get("gb.users")), BorderLayout.NORTH);\r
+ JPanel usersPanel = new JPanel(new BorderLayout(margin, margin)) {\r
+\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ public Insets getInsets() {\r
+ return insets;\r
+ }\r
+ };\r
+ usersPanel.add(new HeaderPanel(Translation.get("gb.users")), BorderLayout.NORTH);\r
usersPanel.add(userTablePanel, BorderLayout.CENTER);\r
usersPanel.add(userControls, BorderLayout.SOUTH);\r
\r
add(tabs, BorderLayout.CENTER);\r
}\r
\r
- private JLabel newHeaderLabel(String text) {\r
- JLabel label = new JLabel(text);\r
- label.setOpaque(true);\r
- label.setForeground(Color.white);\r
- label.setBackground(Color.gray);\r
- label.setFont(label.getFont().deriveFont(14f));\r
- return label;\r
- }\r
-\r
private void setRepositoryRenderer(RepositoriesModel.Columns col, TableCellRenderer renderer) {\r
String name = repositoriesTable.getColumnName(col.ordinal());\r
repositoriesTable.getColumn(name).setCellRenderer(renderer);\r
--- /dev/null
+/*\r
+ * Copyright 2011 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit.client;\r
+\r
+import java.awt.Color;\r
+import java.awt.FlowLayout;\r
+import java.awt.GradientPaint;\r
+import java.awt.Graphics;\r
+import java.awt.Graphics2D;\r
+import java.awt.Paint;\r
+import java.awt.geom.Point2D;\r
+import java.awt.geom.Rectangle2D;\r
+\r
+import javax.swing.JLabel;\r
+import javax.swing.JPanel;\r
+\r
+public class HeaderPanel extends JPanel {\r
+\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ private Color lightColor = new Color(0, 0, 0x60);\r
+\r
+ public HeaderPanel(String text) {\r
+ super(new FlowLayout(FlowLayout.LEFT), true);\r
+ setOpaque(true);\r
+ setBackground(new Color(0, 0, 0x20));\r
+\r
+ JLabel label = new JLabel(text);\r
+ label.setForeground(Color.white);\r
+ label.setFont(label.getFont().deriveFont(14f));\r
+ add(label);\r
+ }\r
+\r
+ @Override\r
+ public void paintComponent(Graphics oldG) {\r
+ Graphics2D g = (Graphics2D) oldG;\r
+ Point2D startPoint = new Point2D.Float(0, 0);\r
+ Point2D endPoint = new Point2D.Float(0, getHeight());\r
+ Paint gradientPaint = new GradientPaint(startPoint, lightColor, endPoint, getBackground(),\r
+ false);\r
+ g.setPaint(gradientPaint);\r
+ g.fill(new Rectangle2D.Double(0, 0, getWidth(), getHeight()));\r
+ }\r
+}\r