A free, open-source alternative to Burp Suite: an intercepting proxy and web app security testing suite with Repeater, Intruder, Collaborator and a built-in OWASP ZAP scanner. Linux, AGPL-3.0.
Java application-securityappsecbug-bountyburp-alternativeburp-suitedasthttp-proxyinfosecintercepting-proxyjavaowaspowasp-zappenetration-testingpentestingsecuritysecurity-toolsvulnerability-scannerweb-application-securityweb-security
package opensuite.ui.theme;
import opensuite.ui.Theme;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTableUI;
import java.awt.*;
/**
* The standard table, with one addition: each run of selected rows is closed
* by a one-pixel line in the control colour above and below, so the selection
* reads as an outlined band rather than a tint alone.
*/
public class FlatTableUI extends BasicTableUI {
public static ComponentUI createUI(JComponent c) { return new FlatTableUI(); }
@Override public void paint(Graphics g, JComponent c) {
super.paint(g, c);
JTable t = table;
if (t == null || t.getRowCount() == 0 || !t.getRowSelectionAllowed()) return;
Rectangle clip = g.getClipBounds();
if (clip == null) clip = new Rectangle(0, 0, t.getWidth(), t.getHeight());
int first = Math.max(0, t.rowAtPoint(new Point(0, clip.y)));
int last = t.rowAtPoint(new Point(0, clip.y + clip.height - 1));
if (last < 0) last = t.getRowCount() - 1;
g.setColor(Theme.CONTROL);
for (int row = first; row <= last; row++) {
if (!t.isRowSelected(row)) continue;
Rectangle r = t.getCellRect(row, 0, true);
if (row == 0 || !t.isRowSelected(row - 1)) g.fillRect(0, r.y, t.getWidth(), 1);
if (row == t.getRowCount() - 1 || !t.isRowSelected(row + 1)) g.fillRect(0, r.y + r.height - 1, t.getWidth(), 1);
}
}
}