use of com.jsql.view.swing.ui.FlatButtonMouseAdapter in project jsql-injection by ron190.
the class ManagerBruteForce method initializePanelButton.
private JPanel initializePanelButton() {
var lastLine = new JPanel();
lastLine.setOpaque(false);
lastLine.setLayout(new BoxLayout(lastLine, BoxLayout.X_AXIS));
lastLine.setPreferredSize(new Dimension(0, 26));
lastLine.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, UiUtil.COLOR_COMPONENT_BORDER), BorderFactory.createEmptyBorder(1, 0, 1, 1)));
this.run = new JButtonStateful("BRUTEFORCE_RUN_BUTTON_LABEL");
I18nViewUtil.addComponentForKey("BRUTEFORCE_RUN_BUTTON_LABEL", this.run);
this.run.setToolTipText(I18nUtil.valueByKey("BRUTEFORCE_RUN_BUTTON_TOOLTIP"));
this.run.setName("managerBruterRun");
this.run.setContentAreaFilled(false);
this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
this.run.setBackground(new Color(200, 221, 242));
this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
this.run.addActionListener(new ActionBruteForce(this));
this.loader = new JLabel(UiUtil.ICON_LOADER_GIF);
this.loader.setVisible(false);
lastLine.add(Box.createHorizontalGlue());
lastLine.add(this.loader);
lastLine.add(Box.createRigidArea(new Dimension(5, 0)));
lastLine.add(this.run);
return lastLine;
}
use of com.jsql.view.swing.ui.FlatButtonMouseAdapter in project jsql-injection by ron190.
the class DialogTranslate method initializeLastLine.
private JPanel initializeLastLine() {
var lastLine = new JPanel();
lastLine.setLayout(new BoxLayout(lastLine, BoxLayout.LINE_AXIS));
lastLine.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
this.buttonSend.setContentAreaFilled(false);
this.buttonSend.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
this.buttonSend.setBackground(new Color(200, 221, 242));
this.buttonSend.setToolTipText(String.join("", "<html>", "<b>Send your translation to the developer</b><br>", "Your translation will be integrated in the next version of jSQL", "</html>"));
this.buttonSend.addMouseListener(new FlatButtonMouseAdapter(this.buttonSend));
this.buttonSend.addActionListener(actionEvent -> {
if (this.textToTranslate.getText().equals(this.textBeforeChange)) {
LOGGER.log(LogLevel.CONSOLE_ERROR, "Nothing changed, translate a piece of text then click on Send");
return;
}
// Escape Markdown character # for h1 in .properties
String clientDescription = this.textToTranslate.getText().replace("\\\\", "\\\\\\\\").replaceAll("(?m)^#", "\\\\#").replace("<", "\\<");
MediatorHelper.model().getMediatorUtils().getGitUtil().sendReport(clientDescription, ShowOnConsole.YES, DialogTranslate.this.language + " translation");
DialogTranslate.this.setVisible(false);
});
this.setLayout(new BorderLayout());
this.progressBarTranslation.setUI(new BasicProgressBarUI());
this.progressBarTranslation.setOpaque(false);
this.progressBarTranslation.setStringPainted(true);
this.progressBarTranslation.setValue(0);
lastLine.add(this.progressBarTranslation);
lastLine.add(Box.createGlue());
lastLine.add(this.buttonSend);
return lastLine;
}
use of com.jsql.view.swing.ui.FlatButtonMouseAdapter in project jsql-injection by ron190.
the class ManagerAdminPage method initializeRunButton.
private void initializeRunButton() {
this.defaultText = "ADMIN_PAGE_RUN_BUTTON_LABEL";
this.run = new JButtonStateful(this.defaultText);
I18nViewUtil.addComponentForKey("ADMIN_PAGE_RUN_BUTTON_LABEL", this.run);
this.run.setToolTipText(I18nUtil.valueByKey("ADMIN_PAGE_RUN_BUTTON_TOOLTIP"));
this.run.setContentAreaFilled(false);
this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
this.run.setBackground(new Color(200, 221, 242));
this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
this.run.addActionListener(actionEvent -> this.runSearch());
this.loader.setVisible(false);
}
use of com.jsql.view.swing.ui.FlatButtonMouseAdapter in project jsql-injection by ron190.
the class ManagerUpload method initializeRunButton.
private void initializeRunButton(final JTextField shellURL) {
this.run = new JButtonStateful(this.defaultText);
I18nViewUtil.addComponentForKey(this.defaultText, this.run);
this.run.setToolTipText(I18nUtil.valueByKey("UPLOAD_RUN_BUTTON_TOOLTIP"));
this.run.setEnabled(false);
this.run.setContentAreaFilled(false);
this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
this.run.setBackground(new Color(200, 221, 242));
this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
this.run.addActionListener(actionEvent -> this.initializeRunAction(shellURL));
}
use of com.jsql.view.swing.ui.FlatButtonMouseAdapter in project jsql-injection by ron190.
the class PanelPreferences method initializePanelProxy.
private void initializePanelProxy() {
panelProxy.setLayout(new BoxLayout(panelProxy, BoxLayout.Y_AXIS));
panelProxy.setBorder(this.panelBorder);
final var buttonCheckIp = new JButton("Check your IP");
buttonCheckIp.addActionListener(new ActionCheckIP());
buttonCheckIp.setToolTipText("<html><b>Verify what public IP address is used by jSQL</b><br>" + "Usually it's your own public IP if you don't use a proxy. If you use a proxy<br>" + "like TOR then your public IP is hidden and another one is used instead.</html>");
buttonCheckIp.setContentAreaFilled(true);
buttonCheckIp.setBorder(UiUtil.BORDER_ROUND_BLU);
var flatButtonMouseAdapter = new FlatButtonMouseAdapter(buttonCheckIp);
flatButtonMouseAdapter.setContentVisible(true);
buttonCheckIp.addMouseListener(flatButtonMouseAdapter);
var labelProxy = new JLabel("<html><b>Proxy</b> / Settings for tools like Burp and Tor</html>");
panelProxy.removeAll();
panelProxy.add(labelProxy, BorderLayout.NORTH);
panelProxy.add(this.panelProxyPreferences);
var panelCheckIp = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
panelCheckIp.setBorder(BorderFactory.createEmptyBorder(15, 0, 0, 0));
panelCheckIp.add(buttonCheckIp);
panelCheckIp.add(Box.createGlue());
panelProxy.add(panelCheckIp);
labelProxy.setAlignmentX(Component.LEFT_ALIGNMENT);
this.panelProxyPreferences.setAlignmentX(Component.LEFT_ALIGNMENT);
panelCheckIp.setAlignmentX(Component.LEFT_ALIGNMENT);
}
Aggregations