James Moger
2011-10-16 4b430b4b02e96f0257fb70f1aacab1269b0c2aec
src/com/gitblit/client/Utils.java
@@ -15,19 +15,33 @@
 */
package com.gitblit.client;
import java.awt.Color;
import java.awt.Component;
import java.text.MessageFormat;
import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableColumnModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableModel;
import com.gitblit.Constants.RpcRequest;
public class Utils {
   public static JTable newTable(TableModel model) {
      JTable table = new JTable(model);
      table.setCellSelectionEnabled(false);
      table.setRowSelectionAllowed(true);
      table.getTableHeader().setReorderingAllowed(false);
      table.setGridColor(new Color(0xd9d9d9));
      table.setBackground(Color.white);
      table.setDefaultRenderer(Date.class, new DateCellRenderer(null, Color.orange.darker()));
      return table;
   }
   public static void explainForbidden(Component c, RpcRequest request) {
      String msg = MessageFormat.format(
            "The request \"{0}\" has been forbidden by the Gitblit server.", request.name());