Search in sources :

Example 1 with FlatButtonMouseAdapter

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;
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) JPanel(javax.swing.JPanel) ActionBruteForce(com.jsql.view.swing.manager.util.ActionBruteForce) BoxLayout(javax.swing.BoxLayout) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension)

Example 2 with FlatButtonMouseAdapter

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;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) BoxLayout(javax.swing.BoxLayout) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter) BasicProgressBarUI(javax.swing.plaf.basic.BasicProgressBarUI)

Example 3 with FlatButtonMouseAdapter

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);
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter)

Example 4 with FlatButtonMouseAdapter

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));
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter)

Example 5 with FlatButtonMouseAdapter

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);
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) ActionCheckIP(com.jsql.view.swing.action.ActionCheckIP) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter) JLabel(javax.swing.JLabel)

Aggregations

FlatButtonMouseAdapter (com.jsql.view.swing.ui.FlatButtonMouseAdapter)10 Color (java.awt.Color)9 JButtonStateful (com.jsql.view.swing.manager.util.JButtonStateful)6 BoxLayout (javax.swing.BoxLayout)4 JPanel (javax.swing.JPanel)4 JButton (javax.swing.JButton)3 JLabel (javax.swing.JLabel)3 JSqlException (com.jsql.model.exception.JSqlException)1 ActionCheckIP (com.jsql.view.swing.action.ActionCheckIP)1 ItemList (com.jsql.view.swing.list.ItemList)1 ActionBruteForce (com.jsql.view.swing.manager.util.ActionBruteForce)1 BorderLayout (java.awt.BorderLayout)1 Dimension (java.awt.Dimension)1 FlowLayout (java.awt.FlowLayout)1 IOException (java.io.IOException)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 ExecutionException (java.util.concurrent.ExecutionException)1 DefaultListModel (javax.swing.DefaultListModel)1 BasicProgressBarUI (javax.swing.plaf.basic.BasicProgressBarUI)1